Phaser API Documentation

  Version: 
onDrawSprite(gameObject, target)

Description:

This callback is invoked when a sprite is drawn by this pipeline.

It will fire after the shader has been set, but before the sprite has been drawn, so use it to set any additional uniforms you may need.

Note: Manipulating the Sprite during this callback will not change how it is drawn to the Render Target.

Parameters:

name type description
gameObject Phaser.GameObjects.Sprite

The Sprite being drawn.

target Phaser.Renderer.WebGL.RenderTarget

The Render Target the Sprite will be drawn to.

Since: 3.60.0