Phaser API Documentation

batchSprite(gameObject, camera, [parentTransformMatrix])


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


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.