I need to provide a modelID when creating item in Typescript. Where can I get the list of modelID of all the objects in the library?
And how can I create Quick board and Choice board using Typescript?
Thanks!
I need to provide a modelID when creating item in Typescript. Where can I get the list of modelID of all the objects in the library?
And how can I create Quick board and Choice board using Typescript?
Thanks!
Hi @zengusan,
You can create Info, Choice and Quiz panel using methods from GUI.HUD namespace.
Please see the documentation in https://cospaces.io/api/modules/gui.hud.html.
We are working on a convenient way to obtain modelID. At the moment there is a workaround:
add object to the Scene, and in the code write it to the console:
let c = Scene.getItem("boy") as AnimatedItem;
Debug.log(c)
Run the Space.
Then in More tools browser menu, open Developers Tools and console tab.
In console you may find all the information about the item, and in the following section there is the modelId
ShapeItem[name = "Casual boy"; model = %%8pgLNI34cVbYzqAYor60uXkcyKoyD0ALojh3fzMEro7
Feel free to ask if you have any questions
Thank you for the prompt response.