This node can be used to evaluate whether a primitive is front or back facing.
Constructor
new FrontFacingNode()Constructs a new front facing node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| isFrontFacingNode | boolean | — | |
| Method | Type | |
|---|---|---|
| generate | (builder: any) => any | |
Extends
NodeTSL object that represents whether a primitive is front or back facing
Type
FrontFacingNode<bool>TSL object that represents the front facing status as a number instead of a bool.
1 means front facing, -1 means back facing.
Type
Node<float>N E W
Negates a vector if the rendering occurs on the back side of a face, based on the material’s side configuration.
-
If the material’s side is
BackSide, the vector is inverted (negated). -
If the material’s side is
DoubleSide, the vector is multiplied byfaceDirection(negated only for back-facing fragments). -
If the material’s side is
FrontSide(default), the vector remains unchanged.
| Parameter | Type | Default Value |
|---|---|---|
| vector | Node<vec3> | — |
Returns
Node<vec3>Negates a vector if the rendering occurs on the back side of a face, based on the material’s side configuration.
-
If the material’s side is
BackSide, the vector is inverted (negated). -
If the material’s side is
DoubleSide, the vector is multiplied byfaceDirection(negated only for back-facing fragments). -
If the material’s side is
FrontSide(default), the vector remains unchanged.
| Parameter | Type | Default Value |
|---|---|---|
| vector | Node<vec3> | — |
Returns
Node<vec3>