This type of node establishes a reference to a property of another object. In this way, the value of the node is automatically linked to the value of referenced object. Reference nodes internally represent the linked value as a uniform.
Constructor
new ReferenceNode(property, uniformType, object?, count?)| Parameter | Type | Default Value |
|---|---|---|
| property | string | — |
| uniformType | string | — |
| object? | null | Object | null |
| count? | null | number | null |
Constructs a new reference node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| property | string | — | |
| uniformType | string | — | |
| object | null | Object | — | |
| count | null | number | — | |
| properties | Array<string> | — | |
| reference | null | Object | — | |
| node | UniformNode | — | |
| group | UniformGroupNode | — | |
| Method | Type | |
|---|---|---|
| element | (indexNode: IndexNode) => ReferenceElementNode | |
| setGroup | (group: UniformGroupNode) => ReferenceNode | |
| setName | (name: string) => ReferenceNode | |
| label | (name: string) => ReferenceNode | |
| setNodeType | (uniformType: string) => void | |
| generateNodeType | (builder: NodeBuilder) => string | |
| getValueFromReference | (object?: Object) => any | |
| updateReference | (state: any) => Object | |
| setup | () => UniformNode | |
| update | () => void | |
| updateValue | () => void | |
Extends
NodeTSL function for creating a reference node.
| Parameter | Type | Default Value |
|---|---|---|
| name | string | — |
| type | string | — |
| object? | null | Object | — |
Returns
ReferenceNodeTSL function for creating a reference node. Use this function if you want need a reference to an array-like property that should be represented as a uniform buffer.
| Parameter | Type | Default Value |
|---|---|---|
| name | string | — |
| type | string | — |
| count | number | — |
| object | Object | — |
Returns
ReferenceNode