Bläddra i källkod

Changed light positions to Object3D.DefaultUp (#9306)

Wilt 9 år sedan
förälder
incheckning
216cb33657
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      src/lights/DirectionalLight.js
  2. 1 1
      src/lights/HemisphereLight.js
  3. 1 1
      src/lights/SpotLight.js

+ 1 - 1
src/lights/DirectionalLight.js

@@ -9,7 +9,7 @@ THREE.DirectionalLight = function ( color, intensity ) {
 
 
 	this.type = 'DirectionalLight';
 	this.type = 'DirectionalLight';
 
 
-	this.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 	this.updateMatrix();
 
 
 	this.target = new THREE.Object3D();
 	this.target = new THREE.Object3D();

+ 1 - 1
src/lights/HemisphereLight.js

@@ -10,7 +10,7 @@ THREE.HemisphereLight = function ( skyColor, groundColor, intensity ) {
 
 
 	this.castShadow = undefined;
 	this.castShadow = undefined;
 
 
-	this.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 	this.updateMatrix();
 
 
 	this.groundColor = new THREE.Color( groundColor );
 	this.groundColor = new THREE.Color( groundColor );

+ 1 - 1
src/lights/SpotLight.js

@@ -8,7 +8,7 @@ THREE.SpotLight = function ( color, intensity, distance, angle, penumbra, decay
 
 
 	this.type = 'SpotLight';
 	this.type = 'SpotLight';
 
 
-	this.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 	this.updateMatrix();
 
 
 	this.target = new THREE.Object3D();
 	this.target = new THREE.Object3D();