WestLangley hace 1 año
padre
commit
391c8ce843

BIN
examples/screenshots/webgl_instancing_performance.jpg


+ 1 - 6
examples/webgl_instancing_performance.html

@@ -97,7 +97,6 @@
 		const randomizeMatrix = function () {
 
 			const position = new THREE.Vector3();
-			const rotation = new THREE.Euler();
 			const quaternion = new THREE.Quaternion();
 			const scale = new THREE.Vector3();
 
@@ -107,11 +106,7 @@
 				position.y = Math.random() * 40 - 20;
 				position.z = Math.random() * 40 - 20;
 
-				rotation.x = Math.random() * 2 * Math.PI;
-				rotation.y = Math.random() * 2 * Math.PI;
-				rotation.z = Math.random() * 2 * Math.PI;
-
-				quaternion.setFromEuler( rotation );
+				quaternion.random();
 
 				scale.x = scale.y = scale.z = Math.random() * 1;