Properties:
color
(type: color) — default: blackcoords
(type: coord[]) — this NEED to be a relative coordinate. The z value will change the zIndex of the texttexts
(type: string[]) — a list with the same size as coords
containing the textstextSize = 20
(type: number) — the size in pixels of the text font. Default: 20
Add 2d text captions to the scene.
{
"type": "text",
"color": [1, 0, 0],
"coords": [
[null, [0, 0, 0]],
[null, [1, 1, 1]]
],
"texts": [
"Bottom left",
"Top right"
]
}
position: absolute
so the graphics container must have
position: relative
if you want to show the text.