Phaser.GameObjects.Components.RenderSteps
Scope: static
Source: src/gameobjects/components/RenderSteps.js#L7
Since: 4.0.0
Static functions
Static functions
addRenderStep
<instance> addRenderStep(fn, [index])
Description:
Add a render step.
The first render step in _renderSteps is run first.
It should call the next render step in the list.
This allows render steps to control the rendering flow.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| fn | Phaser.Types.GameObjects.RenderWebGLStep | No | The render step function to add. |
| index | number | Yes | The index in the render list to add the step to. Omit to add to the end. |
Returns: Phaser.GameObjects.Components.RenderSteps - This Game Object instance.
renderWebGLStep
<instance> renderWebGLStep(renderer, gameObject, drawingContext, [parentMatrix], [renderStep], [displayList], [displayListIndex])
Description:
Run a step in the render process.
This is called automatically by the Render module.
In most cases, it just runs the renderWebGL function.
When _renderSteps has more than one entry,
such as when Filters are enabled for this object,
it allows those processes to defer renderWebGL
and otherwise manage the flow of rendering.
Tags:
- webglOnly
Parameters:
| name | type | optional | default | description |
|---|---|---|---|---|
| renderer | Phaser.Renderer.WebGL.WebGLRenderer | No | The WebGL Renderer instance to render with. | |
| gameObject | Phaser.GameObjects.GameObject | No | The Game Object being rendered. | |
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The current drawing context. | |
| parentMatrix | Phaser.GameObjects.Components.TransformMatrix | Yes | The parent matrix of the Game Object, if it has one. | |
| renderStep | number | Yes | 0 | Which step of the rendering process should be run? |
| displayList | Array.<Phaser.GameObjects.GameObject> | Yes | The display list which is currently being rendered. If not provided, it will be created with the Game Object. | |
| displayListIndex | number | Yes | 0 | The index of the Game Object within the display list. |
Source: src/gameobjects/components/RenderSteps.js#L34
Since: 4.0.0