thanks for pointing that out! There has been a change in the API regarding texts, which has not been reflected in the documentation yet.
Now, the item created by
Scene.createTextBillboard() is a Cuboid-Item with a Text-Item attached as a child. There’s also a new method called
Scene.createText() to only make the Text-Item itself. Below are some examples:
1. How to make the new text item
let text = Scene.createText(0, 0, 1, "Hello World!");
text.setColor(255, 0, 0);
See this example in action
2. How to make a text billboard item
The item created with
Scene.createTextBillboard is simply a Cuboid-Item with a Text-Item as a child. You can call methods on the Cuboid and it will set properties on the Text-Item it has as a child.
let textBillboard: Cuboid = Scene.createTextBillboard(0, 0, 1);
textBillboard.setTextColor(255, 255, 255);
textBillboard.setColor(0, 205, 170);
See the example in action
We’ll be updating the documentation page accordingly. Hope this helps!