How to use the SpotLightHelper function from three
Find comprehensive JavaScript three.SpotLightHelper code examples handpicked from public code repositorys.
GitHub: ASSERT-KTH/ci-hackathon
262 263 264 265 266 267 268 269 270 271
bulbLight.add(new THREE.Mesh(bulbGeometry, bulbMat)); //bulbLight.position.set(...position); spotLight.castShadow = true; lightHelper = new THREE.SpotLightHelper( spotLight ); //scene.add( lightHelper ); scene.add(spotLight.target) scene.add(spotLight) group.add(bulbLight)
26
28
0
+ 2 other calls in file
287 288 289 290 291 292 293 294 295 296
} else if (object.isDirectionalLight) { helper = new THREE.DirectionalLightHelper(object, 1); } else if (object.isSpotLight) { helper = new THREE.SpotLightHelper(object); } else if (object.isHemisphereLight) { helper = new THREE.HemisphereLightHelper(object, 1); }
1
3
0
GitHub: FabricLabs/verse
68 69 70 71 72 73 74 75 76 77
}); // Lighting const ambient = new THREE.AmbientLight(0x404040); const spotlight = new THREE.SpotLight(0xffffff); const lightHelper = new THREE.SpotLightHelper(spotlight); // Voxels const selectionGlow = new THREE.PointLight(0xffffff, 1, 50); const materials = {
1
1
0
+ 17 other calls in file
GitHub: onlymg/webgl-react
24 25 26 27 28 29 30 31 32 33
// add light to scene const light = new three.SpotLight(0xffffff, 1) light.position.set(-50, 50, 0) // const h = new three.SpotLightHelper(light, 1, 0x333333) // this.scene.add(h) this.scene.add(light)
0
2
0
GitHub: ryo612/rhinestone
158 159 160 161 162 163 164 165 166 167
light.position.set(radius * 2 + 100, radius * 2, 100); light.castShadow = true; light.shadow.mapSize.set(5200, 5200); scene.add(light); const helper = new THREE.SpotLightHelper(light, 5); //helper.setClearColor(0x474747, 1); //scene.add(helper); const light2 = new THREE.DirectionalLight(0xfff0dd, 0.3);
0
0
0
+ 3 other calls in file
101 102 103 104 105 106 107 108 109 110
spotLight.angle = Math.PI / 16; spotLight.penumbra = 0.5; spotLight.castShadow = true; spotLight.position.set( obj.posX, obj.posY, obj.posZ ); scene.add( spotLight ); spotLightHelper = new THREE.SpotLightHelper( spotLight ); scene.add( spotLightHelper ); }
0
0
0
+ 6 other calls in file
GitHub: ryo612/simulator
236 237 238 239 240 241 242 243 244 245
light.position.set(radius * 2 + 100, radius * 2, 100); light.castShadow = true; light.shadow.mapSize.set(5200, 5200); scene.add(light); // const helper = new THREE.SpotLightHelper(light, 5); //helper.setClearColor(0x474747, 1); //scene.add(helper); const light2 = new THREE.DirectionalLight(0xfff0dd, 0.3);
0
0
0
GitHub: zDawnING/MyLearnWebGL
60 61 62 63 64 65 66 67 68 69
spotLight2 = createSpotLight( 0x00FF7F ); spotLight3 = createSpotLight( 0x7F00FF ); spotLight1.position.set( 0, 30, -20 ); spotLight2.position.set( -25, 30, 10 ); spotLight3.position.set( 25, 30, 10 ); slHelper1 = new THREE.SpotLightHelper( spotLight1 ); slHelper2 = new THREE.SpotLightHelper( spotLight2 ); slHelper3 = new THREE.SpotLightHelper( spotLight3 ); // spotLight1.visible = false; spotLight2.visible = false; spotLight3.visible = false; slHelper1.visible = false; slHelper2.visible = false; slHelper3.visible = false;
0
0
1
+ 47 other calls in file
three.Vector3 is the most popular function in three (22341 examples)