浏览代码

Changed light positions to Object3D.DefaultUp (#9306)

Wilt 9 年之前
父节点
当前提交
216cb33657
共有 3 个文件被更改,包括 3 次插入3 次删除
  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.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 
 	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.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 
 	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.position.set( 0, 1, 0 );
+	this.position.copy( THREE.Object3D.DefaultUp );
 	this.updateMatrix();
 
 	this.target = new THREE.Object3D();