Phaser API Documentation

  Version: 
batchSprite(gameObject, camera, [parentTransformMatrix])

Description:

Takes a Sprite Game Object, or any object that extends it, and adds it to the batch.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.Image | Phaser.GameObjects.Sprite

The texture based Game Object to add to the batch.

camera Phaser.Cameras.Scene2D.Camera

The Camera to use for the rendering transform.

parentTransformMatrix Phaser.GameObjects.Components.TransformMatrix <optional>

The transform matrix of the parent container, if set.

Examples: