Capítulo 397 de 859
Represents a compute shader node.
count is a number.count is not provided.updateBeforeType is set to NodeUpdateType.OBJECT since ComputeNode#updateBefore is executed once p…Constructor
| Signature |
|---|
new ComputeNode( computeNode : Node, workgroupSize : Array.<number> ) |
Properties
| Property | Description |
|---|---|
.computeNode : Node | The node that defines the compute shader logic. |
| `.count : number | Array.<number>` |
.countNode : UniformNode | A uniform node holding the dispatch count for bounds checking. Created automatically when count is a number. |
| `.dispatchSize : number | Array.<number>` |
.isComputeNode : boolean (readonly) | This flag can be used for type testing. |
.name : string | The name or label of the uniform. |
.onInitFunction : function | A callback executed when the compute node finishes initialization. |
.updateBeforeType : string | The updateBeforeType is set to NodeUpdateType.OBJECT since ComputeNode#updateBefore is executed once per object by default. |
.version : number | The version of the node. |
.workgroupSize : Array.<number> | An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. |
Methods
| Method | Description |
|---|---|
.dispose() | Executes the dispose event for this node. |
.label( name : string ) : ComputeNode | Sets the ComputeNode#name property. |
.onInit( callback : function ) : ComputeNode | Sets the callback to run during initialization. |
.setName( name : string ) : ComputeNode | Sets the ComputeNode#name property. |
.updateBefore( frame : NodeFrame ) | The method execute the compute for this node. |