Represents a logical if/else statement. Can be used as an alternative
to the If()/Else() syntax.
The corresponding TSL select() looks like so:
velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity );
export {}The select() method is called in a chaining fashion on a condition. The parameter nodes of select()
determine the outcome of the entire statement.
Constructor
new ConditionalNode(condNode, ifNode, elseNode?)| Parameter | Type | Default Value |
|---|---|---|
| condNode | Node | — |
| ifNode | Node | — |
| elseNode? | null | Node | null |
Constructs a new conditional node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| condNode | Node | — | |
| ifNode | Node | — | |
| elseNode | null | Node | — | |
| Method | Type | |
|---|---|---|
| generateNodeType | (builder: NodeBuilder) => string | |
| setup | (builder: any) => void | |
| generate | (builder: any, output: any) => any | |
Extends
NodeTSL function for creating a conditional node.
| Parameter | Type | Default Value |
|---|---|---|
| condNode | Node | — |
| ifNode | Node | — |
| elseNode? | Node | — |
Returns
ConditionalNode