LogoPixi’VN
pixi-jsClasses

Class: MeshPipe

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:45

Internal

The MeshPipe is responsible for handling the rendering of Mesh objects. It manages the batching of meshes, updates their GPU data, and executes the rendering instructions. It also handles the local uniforms for each mesh, such as transformation matrices and colors.

Implements

Constructors

Constructor

> new MeshPipe(renderer, adaptor): MeshPipe

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:68

Parameters

renderer

Renderer

adaptor

MeshAdaptor

Returns

MeshPipe

Properties

localUniforms

> localUniforms: UniformGroup<{ uColor: { type: "vec4<f32>"; value: Float32Array<ArrayBuffer>; }; uRound: { type: "f32"; value: number; }; uTransformMatrix: { type: "mat3x3<f32>"; value: Matrix; }; }>

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:51


localUniformsBindGroup

> localUniformsBindGroup: BindGroup

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:65


renderer

> renderer: Renderer

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:66

Methods

addRenderable()

> addRenderable(mesh, instructionSet): void

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:70

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

mesh

Mesh

instructionSet

InstructionSet

the instruction set currently being built

Returns

void

Implementation of

RenderPipe.addRenderable


destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:77

Returns

void


execute()

> execute(mesh): void

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:72

this is where the actual instruction is executed - eg make the draw call activate a filter. Any instructions that have the same renderPipeId have their execute method called

Parameters

mesh

Mesh

Returns

void

Implementation of

InstructionPipe.execute


updateRenderable()

> updateRenderable(mesh): void

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:71

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

mesh

Mesh

Returns

void

Implementation of

RenderPipe.updateRenderable


validateRenderable()

> validateRenderable(mesh): boolean

Defined in: node_modules/pixi.js/lib/scene/mesh/shared/MeshPipe.d.ts:69

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

mesh

Mesh

Returns

boolean

Implementation of

RenderPipe.validateRenderable