This node can be used as a context management component for another node.
NodeBuilder performs its node building process in a specific context and
this node allows the modify the context. A typical use case is to overwrite getUV() e.g.:
node.context( { getUV: () => customCoord } );
\// or
material.contextNode = context( { getUV: () => customCoord } );
\// or
renderer.contextNode = context( { getUV: () => customCoord } );
\// or
scenePass.contextNode = context( { getUV: () => customCoord } );
export {}Constructor
new ContextNode(node?, value?)| Parameter | Type | Default Value |
|---|---|---|
| node? | Node | null |
| value? | Object | {} |
Constructs a new context node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| isContextNode | boolean | — | |
| node | Node | — | |
| value | Object | — | |
| Method | Type | |
|---|---|---|
| getScope | () => Node | |
| generateNodeType | (builder: NodeBuilder) => string | |
| getFlowContextData | () => Object | |
| getMemberType | (builder: NodeBuilder, name: string) => string | |
| analyze | (builder: any) => void | |
| setup | (builder: any) => void | |
| generate | (builder: any, output: any) => null | string | Node | |
Extends
NodeTSL function for creating a context node.
| Parameter | Type | Default Value |
|---|---|---|
| nodeOrValue? | Object | Node | null |
| value? | Object | {} |
Returns
ContextNodeTSL function for defining a uniformFlow context value for a given node.
| Parameter | Type | Default Value |
|---|---|---|
| node | Node | — |
Returns
ContextNodeTSL function for defining a name for the context value for a given node.
| Parameter | Type | Default Value |
|---|---|---|
| node | Node | — |
| name | string | — |
Returns
ContextNodeTSL function for defining a built-in shadow context for a given node.
| Parameter | Type | Default Value |
|---|---|---|
| shadowNode | ShadowNode | — |
| light | Light | — |
| node? | Node | null |
Returns
ContextNodeTSL function for defining a built-in ambient occlusion context for a given node.
| Parameter | Type | Default Value |
|---|---|---|
| aoNode | Node | — |
| node? | Node | null |
Returns
ContextNodeTSL function for defining a label context value for a given node.
| Parameter | Type | Default Value |
|---|---|---|
| node | Node | — |
| name | string | — |
Returns
ContextNode