Phaser API Documentation

  Version: 
batchTexture(gameObject, texture, textureWidth, textureHeight, srcX, srcY, srcWidth, srcHeight, scaleX, scaleY, rotation, flipX, flipY, scrollFactorX, scrollFactorY, displayOriginX, displayOriginY, frameX, frameY, frameWidth, frameHeight, tintTL, tintTR, tintBL, tintBR, tintEffect, uOffset, vOffset, camera, parentTransformMatrix, [skipFlip], [textureUnit])

Description:

Generic function for batching a textured quad using argument values instead of a Game Object.

Parameters:

name type arguments Default description
gameObject Phaser.GameObjects.GameObject

Source GameObject.

texture WebGLTexture

Raw WebGLTexture associated with the quad.

textureWidth number

Real texture width.

textureHeight number

Real texture height.

srcX number

X coordinate of the quad.

srcY number

Y coordinate of the quad.

srcWidth number

Width of the quad.

srcHeight number

Height of the quad.

scaleX number

X component of scale.

scaleY number

Y component of scale.

rotation number

Rotation of the quad.

flipX boolean

Indicates if the quad is horizontally flipped.

flipY boolean

Indicates if the quad is vertically flipped.

scrollFactorX number

By which factor is the quad affected by the camera horizontal scroll.

scrollFactorY number

By which factor is the quad effected by the camera vertical scroll.

displayOriginX number

Horizontal origin in pixels.

displayOriginY number

Vertical origin in pixels.

frameX number

X coordinate of the texture frame.

frameY number

Y coordinate of the texture frame.

frameWidth number

Width of the texture frame.

frameHeight number

Height of the texture frame.

tintTL number

Tint for top left.

tintTR number

Tint for top right.

tintBL number

Tint for bottom left.

tintBR number

Tint for bottom right.

tintEffect number

The tint effect.

uOffset number

Horizontal offset on texture coordinate.

vOffset number

Vertical offset on texture coordinate.

camera Phaser.Cameras.Scene2D.Camera

Current used camera.

parentTransformMatrix Phaser.GameObjects.Components.TransformMatrix

Parent container.

skipFlip boolean <optional> false

Skip the renderTexture check.

textureUnit number <optional>

Use the currently bound texture unit?