Skip to main content
Version: Phaser v4.0.0-rc.6

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:

nametypeoptionaldescription
fnPhaser.Types.GameObjects.RenderWebGLStepNoThe render step function to add.
indexnumberYesThe 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.

Source: src/gameobjects/components/RenderSteps.js#L91


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:

nametypeoptionaldefaultdescription
rendererPhaser.Renderer.WebGL.WebGLRendererNoThe WebGL Renderer instance to render with.
gameObjectPhaser.GameObjects.GameObjectNoThe Game Object being rendered.
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context.
parentMatrixPhaser.GameObjects.Components.TransformMatrixYesThe parent matrix of the Game Object, if it has one.
renderStepnumberYes0Which step of the rendering process should be run?
displayListArray.<Phaser.GameObjects.GameObject>YesThe display list which is currently being rendered. If not provided, it will be created with the Game Object.
displayListIndexnumberYes0The index of the Game Object within the display list.

Source: src/gameobjects/components/RenderSteps.js#L34
Since: 4.0.0