Browse Source

fixes on camera tests

simonThiele 10 năm trước cách đây
mục cha
commit
d736fd82f6
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 1
      test/unit/cameras/Camera.js
  2. 0 2
      test/unit/cameras/PerspectiveCamera.js

+ 4 - 1
test/unit/cameras/Camera.js

@@ -13,7 +13,10 @@ test( "lookAt", function() {
 
 test( "clone", function() {
 	var cam = new THREE.Camera();
-	cam.lookAt(new THREE.Vector3(1, 2, 3));
+
+	// fill the matrices with any nonsense values just to see if they get copied
+	cam.matrixWorldInverse.set( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 );
+	cam.projectionMatrix.set( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 );
 
 	var clonedCam = cam.clone();
 

+ 0 - 2
test/unit/cameras/PerspectiveCamera.js

@@ -39,8 +39,6 @@ test( "clone", function() {
 			bottom = -1,
 			top = 1,
 			aspect = 16 / 9,
-			left = -top * aspect,
-			right = -bottom * aspect,
 			fov = 90;
 
 	var cam = new THREE.PerspectiveCamera( fov, aspect, near, far );