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

BatchHandlerTileSprite

This RenderNode handles batch rendering of TileSprites and Tiles.

It supplies shaders with knowledge of the frame and texture data,

which can be used to handle texture borders more intelligently.

Constructor

new BatchHandlerTileSprite(manager, [config])

Parameters

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

Scope: static

Extends

Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad

Source: src/renderer/webgl/renderNodes/BatchHandlerTileSprite.js#L26
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

batch

<instance> batch(drawingContext, glTexture, x0, y0, x1, y1, x2, y2, x3, y3, texX, texY, texWidth, texHeight, tintFill, tintTL, tintBL, tintTR, tintBR, renderOptions, u0, v0, u1, v1, u2, v2, u3, v3)

Description:

Add a quad to the batch.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context.
glTexturePhaser.Renderer.WebGL.Wrappers.WebGLTextureWrapperNoThe texture to render.
x0numberNoThe x-coordinate of the top-left corner.
y0numberNoThe y-coordinate of the top-left corner.
x1numberNoThe x-coordinate of the bottom-left corner.
y1numberNoThe y-coordinate of the bottom-left corner.
x2numberNoThe x-coordinate of the top-right corner.
y2numberNoThe y-coordinate of the top-right corner.
x3numberNoThe x-coordinate of the bottom-right corner.
y3numberNoThe y-coordinate of the bottom-right corner.
texXnumberNoThe left u coordinate (0-1).
texYnumberNoThe top v coordinate (0-1).
texWidthnumberNoThe width of the texture (0-1).
texHeightnumberNoThe height of the texture (0-1).
tintFillbooleanNoWhether to tint the fill color.
tintTLnumberNoThe tint color for the top-left corner.
tintBLnumberNoThe tint color for the bottom-left corner.
tintTRnumberNoThe tint color for the top-right corner.
tintBRnumberNoThe tint color for the bottom-right corner.
renderOptionsPhaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptionsNoOptional render features.
u0numberNoThe u coordinate of the distorted top-left corner.
v0numberNoThe v coordinate of the distorted top-left corner.
u1numberNoThe u coordinate of the distorted bottom-left corner.
v1numberNoThe v coordinate of the distorted bottom-left corner.
u2numberNoThe u coordinate of the distorted top-right corner.
v2numberNoThe v coordinate of the distorted top-right corner.
u3numberNoThe u coordinate of the distorted bottom-right corner.
v3numberNoThe v coordinate of the distorted bottom-right corner.

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

Source: src/renderer/webgl/renderNodes/BatchHandlerTileSprite.js#L162
Since: 4.0.0


Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.BatchHandler:

From Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode: