Browse Source

Benchmarks: Fix rotation setup in updateMatrixWorld() test (#25122)

* set quaternion, not rotation

* Rename rotation to quaternion since that's what it is.
Diarmid Mackenzie 2 years ago
parent
commit
dcea07eb22
1 changed files with 4 additions and 3 deletions
  1. 4 3
      test/benchmark/core/UpdateMatrixWorld.js

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

@@ -4,14 +4,15 @@
 
 	var position = new THREE.Vector3( 1, 1, 1 );
 	var scale = new THREE.Vector3( 2, 1, 0.5 );
-	var rotation = new THREE.Quaternion();
-	rotation.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 8 );
+	var quaternion = new THREE.Quaternion();
+	quaternion.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 8 );
 	var createLocallyOffsetChild = function () {
 
 		var child = new THREE.Object3D();
 		child.position.copy( position );
 		child.scale.copy( scale );
-		child.quaternion.copy( rotation );
+		child.quaternion.copy( quaternion );
+
 		return child;
 
 	};