Skip to main content
Version: Phaser v4.0.0-rc.6

BatchHandlerStrip

This RenderNode renders textured triangle strips, such as for the Rope

Game Object. It uses batches to accelerate drawing.

If a strip is submitted with too many vertices (usually >32,768),

it will throw an error.

Note that you should call batchStrip instead of batch to add strips.

Constructor

new BatchHandlerStrip(manager, config)

Parameters

nametypeoptionaldescription
managerPhaser.Renderer.WebGL.RenderNodes.RenderNodeManagerNoThe manager that owns this RenderNode.
configPhaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfigNoThe configuration object for this handler.

Scope: static

Extends

Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad

Source: src/renderer/webgl/renderNodes/BatchHandlerStrip.js#L21
Since: 4.0.0

Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.BatchHandler:

From Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Members

defaultConfig

defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig

Description:

The default configuration object for this handler.

This is merged with the config object passed in the constructor.

Overrides: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad#defaultConfig

Source: src/renderer/webgl/renderNodes/BatchHandlerStrip.js#L50
Since: 4.0.0


Inherited Methods

From Phaser.Renderer.WebGL.RenderNodes.BatchHandler:

From Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Methods

batchStrip

<instance> batchStrip(drawingContext, src, calcMatrix, glTexture, vertices, uv, colors, alphas, alpha, tintFill, renderOptions, [debugCallback])

Description:

Add a strip to the batch.

This method would usually be named batch, but the call signature

is different from the other batch handlers.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context.
srcPhaser.GameObjects.GameObjectNoThe Game Object being rendered.
calcMatrixPhaser.GameObjects.Components.TransformMatrixNoThe current transform matrix.
glTexturePhaser.Renderer.WebGL.Wrappers.WebGLTextureWrapperNoThe texture to render.
verticesFloat32ArrayNoThe vertices of the strip.
uvFloat32ArrayNoThe UV coordinates of the strip.
colorsUint32ArrayNoThe color values of the strip.
alphasFloat32ArrayNoThe alpha values of the strip.
alphanumberNoThe overall alpha value of the strip.
tintFillbooleanNoWhether to tint the fill color.
renderOptionsPhaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptionsNoOptional render features. Strip rendering should always set multiTexturing to false. It can use smoothPixelArt. Other options are ignored.
debugCallbackfunctionYesThe debug callback, called with an array consisting of alternating x,y values of the transformed vertices.

Source: src/renderer/webgl/renderNodes/BatchHandlerStrip.js#L128
Since: 4.0.0