react-three-legacy
react-three-legacy copied to clipboard
HemisphereLight not working
By adding a HemisphereLight
to the Scene, all the other lights stopped emitting, but leaving out the groundColor
prop, the others worked again. Essentially, all objects are rendered pitch black.
I tried manually adding a HemisphereLight
through the exposed scene
, and that works.
<Renderer width={this.state.width} height={this.state.height} background={0x2d2c5b}>
<Scene width={this.state.width} ref="exposeToWindow" height={this.state.height} camera="main-camera">
<PerspectiveCamera ref={App._onCameraMounted} name="main-camera" {...cameraProps} />
<HemisphereLight color={0x327aff} groundColor={0xffc77f} intensity={0.6}/>
<DirectionalLight color={0xfff5e8} position={new Vector3(0, 0, 20)} intensity={1} castShadow={true}/>
<ReactTHREE.PointLight color={0x327aff} intensity={0.6} position={new Vector3(0, 0, 20)}/>
<Object3D>...</Object3D>
</Scene>
</Renderer>