TextureDrawTarget

TextureDrawTarget represents the draw target that draws into a texture.

Hierarchy

Constructors

new TextureDrawTarget(context: Context, texture: Texture): TextureDrawTarget

Properties

_texture: Texture

blendMode: BlendMode = "src-over"

The global blend mode.

context: Context

flipY: boolean = false

Whether y coordinate is flipped.

framebuffer: WebGLFramebuffer

scissor: Rect | undefined

The rectangle that masks draw region.

transform: Transform = new Transform()

The global transform that applies to all drawables.

Accessors

get size(): Vec2

get texture(): Texture

set texture(texture: Texture): void

    Methods

    clear(color: Color): void

    Clear this DrawTarget with color.

    dispose(): void

    draw(drawable: Drawable): void

    Draws the Drawable into this DrawTarget.

    use(): void