CanvasTexture
Defined in: sdk/src/asset/canvasTexture.ts:34
A texture backed by a canvas someone else draws on.
Properties
Section titled “Properties”handle
Section titled “handle”
readonlyhandle:number
Defined in: sdk/src/asset/canvasTexture.ts:36
The engine texture handle — stable across every update.
height
Section titled “height”
readonlyheight:number
Defined in: sdk/src/asset/canvasTexture.ts:39
readonlywidth:number
Defined in: sdk/src/asset/canvasTexture.ts:38
Size of the last upload. Follows the source when it is resized.
Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: sdk/src/asset/canvasTexture.ts:44
End it: the device frees the texture and the handle is dead afterwards.
Returns
Section titled “Returns”void
update()
Section titled “update()”update():
void
Defined in: sdk/src/asset/canvasTexture.ts:42
Re-take the source’s current content. Cheap to call, not free: one
texImage2D of the whole surface. Callers gate on visibility.
Returns
Section titled “Returns”void