How to use the DirectionalLightHelper function from three

Find comprehensive JavaScript three.DirectionalLightHelper code examples handpicked from public code repositorys.

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);
fork icon116
star icon804
watch icon0

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);
}
fork icon1
star icon3
watch icon0

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);
    }
}
fork icon1
star icon0
watch icon0

+ 5 other calls in file

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
fork icon0
star icon0
watch icon4

+ 5 other calls in file

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)