react-three-lgl
react-three-lgl copied to clipboard
Auto convert to LGLTracer's directionallight
Hi,
Are the original three.js DirectionalLights auto-converted to LGL Directionalight at this moment?
i am not quite sure, the lgl documentation is very scarce. you can force it by doing:
import { Canvas, extend } fron '@react-three/fiber'
import { Raytracer } fron '@react-three/lgl'
import { DirectionalLight } from 'lgl-tracer'
extend({ DirectionalLight })
<Canvas>
<Raytracer>
<directionalLight />
or if you want it to be optional
extend({ LglDirectionalLight: DirectionalLight })
<lglDirectionalLight />
but i don't really see a difference when i skip the extend.
i was wrong, turns out it completely ignores threejs lights. so the extend thing definitively works.
Thank you @drcmda. I shall try this out and let you know