Torchlight
- Last UpdatedJan 18, 2024
- 2 minute read
The Torchlight node enables you to define the properties of a portable light. This node is not suited for use by itself, but can be referenced by an Avatar instance (torchlight field) and consumed by it.
Platform support
This node is fully supported on XR-Windows platform.
It is partially supported on XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-P WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Partial support |
Partial support |
Partial support |
Partial support |
|
|
|
|
|
|
Torchlight fields
These are the fields for Torchlight node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > Torchlight
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
color |
svec3 |
Mandatory |
Not set |
Color of the torchlight. |
|
falloff |
sfloat |
Optional |
Not set |
Width of the direct torchlight cylinder. |
|
freeTargetDir |
Svec3 |
Optional |
(0, 0, 1) |
Light direction in freetarget mode |
|
freeTargetLen |
sfloat |
Optional |
10 |
Light ray distance in freetarget mode. |
|
hotspot |
sfloat |
Optional |
Not set |
Width of the direct torchlight hot area cylinder. |
|
mode |
senum |
Optional |
freetarget |
When set to freetarget, it uses freeTargetDir and freeTargetLen to point the light in front of the avatar. When set to fixedtarget, it points light to the target. |
|
mwxTemplate |
sstring |
Optional |
modules/simulation/spot_torch.mwx |
The reference to the mwx file containing the spot light definition. |
|
position |
svec3 |
Mandatory |
Not set |
Position of the torchlight. This is usually managed by the avatar node referencing the Torchlight instance. |
|
rainbowSize |
sfloat |
Optional |
Not set |
The size of the rainbow effect. |
|
rainbowTexture |
sstring |
Mandatory |
Not set |
Texture used for rainbow effect. |
|
spotlight |
sstring |
Optional |
Not set |
Name of the spotlight object. |
|
visible |
sbool |
Optional |
true |
Used to switch torch on and off. |
|
target |
sstring |
Optional |
Not set |
Reference to the field hosting the target value. |