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
| name | type | optional | description |
|---|---|---|---|
| manager | Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager | No | The manager that owns this RenderNode. |
| config | Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig | No | The configuration object for this handler. |
Scope: static
Extends
Source: src/renderer/webgl/renderNodes/BatchHandlerStrip.js#L21
Since: 4.0.0
Inherited Members
From Phaser.Renderer.WebGL.RenderNodes.BatchHandler:
- batchEntries
- bytesPerIndexPerInstance
- bytesPerInstance
- currentBatchEntry
- floatsPerInstance
- indexBuffer
- indicesPerInstance
- instanceCount
- instancesPerBatch
- maxTexturesPerBatch
- programManager
- vertexBufferLayout
- verticesPerInstance
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:
- batch
- batchTextures
- finalizeTextureCount
- pushCurrentBatchEntry
- run
- setupTextureUniforms
- setupUniforms
- updateRenderOptions
- updateShaderConfig
- updateTextureCount
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:
| name | type | optional | description |
|---|---|---|---|
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The current drawing context. |
| src | Phaser.GameObjects.GameObject | No | The Game Object being rendered. |
| calcMatrix | Phaser.GameObjects.Components.TransformMatrix | No | The current transform matrix. |
| glTexture | Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | No | The texture to render. |
| vertices | Float32Array | No | The vertices of the strip. |
| uv | Float32Array | No | The UV coordinates of the strip. |
| colors | Uint32Array | No | The color values of the strip. |
| alphas | Float32Array | No | The alpha values of the strip. |
| alpha | number | No | The overall alpha value of the strip. |
| tintFill | boolean | No | Whether to tint the fill color. |
| renderOptions | Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptions | No | Optional render features. Strip rendering should always set multiTexturing to false. It can use smoothPixelArt. Other options are ignored. |
| debugCallback | function | Yes | The 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