跳转到内容

CanvasTexture

此内容尚不支持你的语言。

Defined in: asset/canvasTexture.ts:26

A texture backed by a canvas someone else draws on.

readonly handle: number

Defined in: asset/canvasTexture.ts:28

The engine texture handle — stable across every update.


readonly height: number

Defined in: asset/canvasTexture.ts:31


readonly width: number

Defined in: asset/canvasTexture.ts:30

Size of the last upload. Follows the source when it is resized.

destroy(): void

Defined in: asset/canvasTexture.ts:36

Release the GL texture. The handle is dead afterwards.

void


update(): void

Defined in: asset/canvasTexture.ts:34

Re-take the source’s current content. Cheap to call, not free: one texImage2D of the whole surface. Callers gate on visibility.

void