CanvasSprite Class

Extends Sprite
Module: Textures

Canvas sprite is used to render canvas based elements in a 2D canvas.

The sprite can be configured to keep a relative size to the screen of an absolute size.

Item Index

Attributes

canvas

Element

DOM canvas to draw.

sizeAttenuation

Number

Size attenuation indicates how the sprite should be scaled relative to the camera.

texture

CanvasTexture

Texture where the text is drawn to.