EventNode is a node that executes a callback during specific update phases.
Constructor
new EventNode(eventType, callback)| Parameter | Type | Default Value |
|---|---|---|
| eventType | string | — |
| callback | Function | — |
Creates an EventNode.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| eventType | string | — | |
| callback | Function | — | |
| updateType | string | — | |
| updateBeforeType | string | — | |
| Method | Type | |
|---|---|---|
| update | (frame: any) => void | |
| updateBefore | (frame: any) => void | |
Extends
NodeCreates an event that triggers a function every time an object (Mesh|Sprite) is rendered.
The event will be bound to the declared TSL function Fn(); it must be declared within a Fn() or the JS function call must be inherited from one.
Properties
FunctionReturns
EventNodeCreates an event that triggers a function when the first object that uses the material is rendered.
The event will be bound to the declared TSL function Fn(); it must be declared within a Fn() or the JS function call must be inherited from one.
Properties
FunctionReturns
EventNodeCreates an event that triggers a function before an object (Mesh|Sprite) is updated.
The event will be bound to the declared TSL function Fn(); it must be declared within a Fn() or the JS function call must be inherited from one.
Properties
FunctionReturns
EventNodeCreates an event that triggers a function before the material is updated.
The event will be bound to the declared TSL function Fn(); it must be declared within a Fn() or the JS function call must be inherited from one.
Properties
FunctionReturns
EventNode