<light> elements from the loaded MuJoCo model and creates corresponding Three.js lights.
Usage
With Intensity Multiplier
Props
number
default:"1.0"
Multiplier applied to all light intensities.
Light Mapping
The component reads from the MuJoCo model:
model.nlight— number of lightslight_pos— positionlight_dir— directionlight_diffuse— colorlight_castshadow— shadow castinglight_attenuation— attenuation coefficientslight_cutoff— spotlight cone angle
Hook Alternative
For imperative usage inside your own components, useuseSceneLights:
Alternative
You can also enable MJCF lights via themjcfLights prop on MujocoCanvas:
Notes
- Lights are created once when the model loads and cleaned up on unmount
- If your MJCF has no
<light>elements, this component does nothing - The component delegates to
useSceneLightsinternally