Pārlūkot izejas kodu

Copy position/quaternion/scale instead of override in .updateMatrixWorld benchmark test

Takahiro 7 gadi atpakaļ
vecāks
revīzija
b72a2526bf
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      test/benchmark/core/UpdateMatrixWorld.js

+ 3 - 3
test/benchmark/core/UpdateMatrixWorld.js

@@ -8,9 +8,9 @@
   rotation.setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI / 8);
   rotation.setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI / 8);
   var createLocallyOffsetChild = function() {
   var createLocallyOffsetChild = function() {
     var child = new THREE.Object3D();
     var child = new THREE.Object3D();
-    child.position = position;
-    child.scale = scale;
-    child.rotation = rotation;
+    child.position.copy(position);
+    child.scale.copy(scale);
+    child.rotation.copy(rotation);
     return child;
     return child;
   };
   };