Ver Fonte

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

Takahiro há 7 anos atrás
pai
commit
b72a2526bf
1 ficheiros alterados com 3 adições e 3 exclusões
  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);
   var createLocallyOffsetChild = function() {
     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;
   };