Initialize Text object.
The text to display.
The styles used for the text.
The opacity of the entity (from 0 to 1)
An array of child entities for recursive update/render.
Whether or not the entity is dead.
Position of the entity.
Scale of the entity.
The styles used for the text.
The text to display.
Whether or not the entity is visible.
Whether or not there are any child entities.
Add and return a child object.
Object to add to the container.
Remove and return a child object.
Object to remove from the container.
Empty implementation from extending Entity.
Not used.
Not used.
Displays text on the canvas.
When using WebGL for rendering a second canvas is used for text.
Example
const text = new Text('Hello world.', { '20px monospace', '#333' }) text.pos.set(20, 20)