LogoPixi’VN
pixi-jsClasses

Class: BlendModePipe

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:27

Internal

This Pipe handles the blend mode switching of the renderer. It will insert instructions into the InstructionSet to switch the blend mode according to the blend modes of the scene graph.

This pipe is were wwe handle Advanced blend modes. Advanced blend modes essentially wrap the renderables in a filter that applies the blend mode.

You only need to use this class if you are building your own render instruction set rather than letting PixiJS build the instruction set for you by traversing the scene graph

Implements

Constructors

Constructor

> new BlendModePipe(renderer): BlendModePipe

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:39

Parameters

renderer

Renderer

Returns

BlendModePipe

Methods

buildEnd()

> buildEnd(instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:76

Internal

called when the instruction build process is finished, ensuring that if there is an advanced blend mode active, we add the final render instructions added to the instruction set

Parameters

instructionSet

InstructionSet

The instruction set we are adding to

Returns

void

Implementation of

InstructionPipe.buildEnd


buildStart()

> buildStart(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:69

Internal

called when the instruction build process is starting this will reset internally to the default blend mode

Returns

void

Implementation of

InstructionPipe.buildStart


destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:78

Internal

Returns

void


popBlendMode()

> popBlendMode(instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:52

Pop the last blend mode from the stack and apply the new top-of-stack mode.

Parameters

instructionSet

InstructionSet

The instruction set being built.

Returns

void


prerender()

> prerender(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:40

Returns

void


pushBlendMode()

> pushBlendMode(renderable, blendMode, instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:47

Push a blend mode onto the internal stack and apply it to the instruction set if needed.

Parameters

renderable

RenderGroup | Renderable

The renderable or RenderGroup associated with the change.

blendMode

BLEND_MODES

The blend mode to activate.

instructionSet

InstructionSet

The instruction set being built.

Returns

void


setBlendMode()

> setBlendMode(renderable, blendMode, instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.d.ts:61

Ensure a blend mode switch is added to the instruction set when the mode changes. If an advanced blend mode is active, subsequent renderables will be collected so they can be rendered within a single filter pass.

Parameters

renderable

RenderGroup | Renderable | null

The renderable or RenderGroup to associate with the change, or null when unwinding.

blendMode

BLEND_MODES

The target blend mode.

instructionSet

InstructionSet

The instruction set being built.

Returns

void