How to use the RectAreaLight function from three

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

47
48
49
50
51
52
53
54
55

/** LIGHTS * */
// var neonPos = new THREE.Vector3(10,10,-45)
const neonPos = new THREE.Vector3(10, 10, -45);

const rectLight = new THREE.RectAreaLight(0xff00ff, 800, 5, 5);
rectLight.position.copy(neonPos);
rectLight.lookAt(0, 0, -1);
scene.add(rectLight);
fork icon0
star icon3
watch icon3

52
53
54
55
56
57
58
59
60
61
this.camera.position.set( 0.0, 2.0, -3.2 );
this.camera.lookAt(new THREE.Vector3(0, 1, 0));
this.scene.add( this.camera );


   // new THREE.RectAreaLight(色, 光の強さ, 幅, 高さ)
   const rectLight = new THREE.RectAreaLight(0xffffff, 5.0, 1, 1);
   rectLight.position.set( 1, 1, 1 );
 	rectLight.lookAt(new THREE.Vector3(0, 0, 0));
// rectLight.castShadow = true;
fork icon0
star icon0
watch icon0

+ 3 other calls in file

Other functions in three

Sorted by popularity

function icon

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