How to use the DirectionalLightHelper function from three
Find comprehensive JavaScript three.DirectionalLightHelper code examples handpicked from public code repositorys.
GitHub: K3D-tools/K3D-jupyter
609 610 611 612 613 614 615 616 617 618
this.K3DObjects = new THREE.Group(); [this.keyLight, this.headLight, this.fillLight, this.backLight].forEach((light) => { self.camera.add(light); self.camera.add(light.target); // self.scene.add(new THREE.DirectionalLightHelper(light, 1.0, 0xff0000)); }); this.scene.add(ambientLight); this.scene.add(this.camera);
116
804
0
284 285 286 287 288 289 290 291 292 293
} else if (object.isPointLight) { helper = new THREE.PointLightHelper(object, 1); } else if (object.isDirectionalLight) { helper = new THREE.DirectionalLightHelper(object, 1); } else if (object.isSpotLight) { helper = new THREE.SpotLightHelper(object); }
1
3
0
GitHub: truongvithien/threed
395 396 397 398 399 400 401 402 403
light_dir.shadow.camera.far = 3500; light_dir.shadow.bias = - 0.0001; if (settings.light_dir && web3d.helper) { const light_dir_helper = new THREE.DirectionalLightHelper(light_dir, 10); scene.add(light_dir_helper); } }
1
0
0
+ 5 other calls in file
GitHub: Neticon/webgl-tests
32 33 34 35 36 37 38 39 40 41
directionalLight.shadow = new THREE.DirectionalLightShadow(camera) directionalLight.castShadow = true directionalLight.position.y = 5 scene.add(directionalLight) const lightHelper = new THREE.DirectionalLightHelper(directionalLight) // scene.add(lightHelper) const cubeCamera = new THREE.CubeCamera(0.01, 1000, 2 ** 9) cubeCamera.renderTarget.texture.minFilter = THREE.LinearMipMapLinearFilter cubeCamera.renderTarget.texture.mapping = THREE.CubeReflectionMapping // same as UVMapping
0
0
4
+ 5 other calls in file
three.Vector3 is the most popular function in three (22341 examples)