Closed gisonjourney closed 1 year ago
Hi @gisonjourney! This fork has +2 years of development on top of the fantastic work by Peter, so 90% of the code has changed to enable new features such as sun light illumination. Concretely about light sources are now defined in Threebox.js
defaultLights: function () {
this.lights.ambientLight = new THREE.AmbientLight(new THREE.Color('hsl(0, 0%, 100%)'), 0.75);
this.scene.add(this.lights.ambientLight);
this.lights.dirLightBack = new THREE.DirectionalLight(new THREE.Color('hsl(0, 0%, 100%)'), 0.25);
this.lights.dirLightBack.position.set(30, 100, 100);
this.scene.add(this.lights.dirLightBack);
this.lights.dirLight = new THREE.DirectionalLight(new THREE.Color('hsl(0, 0%, 100%)'), 0.25);
this.lights.dirLight.position.set(-30, 100, -100);
this.scene.add(this.lights.dirLight);
},
Are you assigning the lights to these as defined in the documentation? otherwise it won't obviously work as expected.
Thank you very much, it's very useful.
I used peterliu's version,pointlight could effect on model like this![1](https://user-images.githubusercontent.com/31496185/207503232-a7fa4c82-1c62-42ff-a23b-c0b282030938.png)
but when i use your version,this could not effected,like this
what shoud i do to get pointlight effection