How to use the PointLightHelper function from three
Find comprehensive JavaScript three.PointLightHelper code examples handpicked from public code repositorys.
GitHub: juanuys/boids
64 65 66 67 68 69 70 71 72 73
lure = null // lure = new THREE.PointLight(0xffffff, 3, 500); // lure.position.set(0, 50, 0); // scene.add(lure); // var lightHelper = new THREE.PointLightHelper(lure); // scene.add(lightHelper); // BOIDS const numberOfBoids = 300
2
5
0
281 282 283 284 285 286 287 288 289 290
if (helper === undefined) { if (object.isCamera) { helper = new THREE.CameraHelper(object); } else if (object.isPointLight) { helper = new THREE.PointLightHelper(object, 1); } else if (object.isDirectionalLight) { helper = new THREE.DirectionalLightHelper(object, 1); }
1
3
0
142 143 144 145 146 147 148 149 150 151
pointLight.castShadow = true; this.scene.add(pointLight); const sphereSize = 8; const pointLightHelper = new THREE.PointLightHelper(pointLight, sphereSize); this.scene.add(pointLightHelper); break; }
0
3
3
GitHub: EHB-MCT/FileSharing
54 55 56 57 58 59 60 61 62 63 64 65 66 67
scene.add(lightHolder); const sphereSize = 1; const pointLightHelper = new THREE.PointLightHelper(light1, sphereSize); scene.add(pointLightHelper); function animate() { requestAnimationFrame(animate);
0
0
0
three.Vector3 is the most popular function in three (22341 examples)