RenderNode
RenderNode
Constructor
new RenderNode(name, manager)
Parameters
| name | type | optional | description |
|---|---|---|---|
| name | string | No | The name of the RenderNode. |
| manager | Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager | No | The manager that owns this RenderNode. |
Scope: static
Source: src/renderer/webgl/renderNodes/RenderNode.js#L32
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#L47
Since: 4.0.0
name
name: string
Description:
The name of the RenderNode.
Source: src/renderer/webgl/renderNodes/RenderNode.js#L38
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:
| name | type | optional | description |
|---|---|---|---|
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The context currently in use. |
Source: src/renderer/webgl/renderNodes/RenderNode.js#L85
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:
| name | type | optional | description |
|---|---|---|---|
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The context currently in use. |
Source: src/renderer/webgl/renderNodes/RenderNode.js#L98
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:
| name | type | optional | description |
|---|---|---|---|
| args | * | Yes | Arguments to pass to the node. These will vary depending on the node. |
Source: src/renderer/webgl/renderNodes/RenderNode.js#L69
Since: 4.0.0
setDebug
<instance> setDebug(debug)
Description:
Enables or disables debug reporting for this node.
When enabled, the run method is replaced with a wrapper that pushes the node's name onto the manager's debug stack before execution and pops it afterwards, allowing the renderer to track which nodes are active. The original run implementation is preserved in _run.
When disabled, the original run method is restored and _run is cleared.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| debug | boolean | No | Whether to report debug information. |
Source: src/renderer/webgl/renderNodes/RenderNode.js#L111
Since: 4.0.0