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

RenderNode

RenderNode

Constructor

new RenderNode(name, manager)

Parameters

nametypeoptionaldescription
namestringNoThe name of the RenderNode.
managerPhaser.Renderer.WebGL.RenderNodes.RenderNodeManagerNoThe manager that owns this RenderNode.

Scope: static

Source: src/renderer/webgl/renderNodes/RenderNode.js#L21
Since: 4.0.0

Public Members

manager

manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager

Description:

The manager that owns this RenderNode.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L36
Since: 4.0.0


name

name: string

Description:

The name of the RenderNode.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L27
Since: 4.0.0


Public Methods

onRunBegin

<instance> onRunBegin(drawingContext)

Description:

By default this is an empty method hook that you can override and use in your own custom render nodes.

This method is called at the start of the run method.

Don't forget to call it in your custom method.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe context currently in use.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L74
Since: 4.0.0


onRunEnd

<instance> onRunEnd(drawingContext)

Description:

By default this is an empty method hook that you can override and use in your own custom render nodes.

This method is called at the end of the run method.

Don't forget to call it in your custom method.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe context currently in use.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L87
Since: 4.0.0


run

<instance> run([args])

Description:

Run the RenderNode.

This is a stub method that should be overridden by the specific

implementation.

This method may be wrapped by setDebug.

Parameters:

nametypeoptionaldescription
args*YesArguments to pass to the node. These will vary depending on the node.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L58
Since: 4.0.0


setDebug

<instance> setDebug(debug)

Description:

Set whether the node should report debug information.

It wraps the run method with additional debug information.

Parameters:

nametypeoptionaldescription
debugbooleanNoWhether to report debug information.

Source: src/renderer/webgl/renderNodes/RenderNode.js#L100
Since: 4.0.0