Phaser API Documentation

  Version: 
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Event: PRE_RENDER
Phaser.Scenes.Events.PRE_RENDER
PRE_RENDER

Description:

The Scene Systems Pre-Render Event.

This event is dispatched by a Scene during the main game loop step.

The event flow for a single step of a Scene is as follows:

  1. PRE_UPDATE
  2. UPDATE
  3. The Scene.update method is called, if it exists
  4. POST_UPDATE
  5. PRE_RENDER
  6. RENDER

Listen to this event from a Scene using this.events.on('prerender', listener).

A Scene will only render if it is visible.

This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.

Parameters:

name type description
renderer Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer

The renderer that rendered the Scene.

Since: 3.53.0