Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.52k stars 128 forks source link

HemisphereLight not working #110

Open danvim opened 5 years ago

danvim commented 5 years ago

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>