LogoPixi’VN
pixi-jsClasses

Class: CanvasGraphicsPipe

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:9

Internal

Implements

Constructors

Constructor

> new CanvasGraphicsPipe(renderer, adaptor): CanvasGraphicsPipe

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:19

Parameters

renderer

Renderer

adaptor

GraphicsAdaptor

Returns

CanvasGraphicsPipe

Properties

renderer

> renderer: Renderer

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:15


state

> state: State

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:16

Methods

addRenderable()

> addRenderable(graphics, instructionSet): void

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:22

This is where the renderable is added to the instruction set. This is called once per renderable. For instance, a MeshRenderPipe could be used to enqueue a 'draw mesh' command to the rendering instruction set, catering to the rendering of mesh geometry. In more complex scenarios, such as the SpritePipe, this seamlessly coordinates with a batchPipe to efficiently batch and add batch instructions to the instructions set

Add is called when the instructions set is being built.

Parameters

graphics

Graphics

instructionSet

InstructionSet

the instruction set currently being built

Returns

void

Implementation of

RenderPipe.addRenderable


contextChange()

> contextChange(): void

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:20

Returns

void


destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:25

Returns

void


execute()

> execute(graphics): void

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:24

Parameters

graphics

Graphics

Returns

void


updateRenderable()

> updateRenderable(_graphics): void

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:23

Called whenever a renderable has been been updated, eg its position has changed. This is only called in the render loop if the instructions set is being reused from the last frame. Otherwise addRenderable is called.

Parameters

_graphics

Graphics

Returns

void

Implementation of

RenderPipe.updateRenderable


validateRenderable()

> validateRenderable(_graphics): boolean

Defined in: node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsPipe.d.ts:21

This function is called when the renderer is determining if it can use the same instruction set again to improve performance. If this function returns true, the renderer will rebuild the whole instruction set for the scene. This is only called if the scene has not its changed its structure .

Parameters

_graphics

Graphics

Returns

boolean

Implementation of

RenderPipe.validateRenderable