Browse Source

Improved daydream and gearvr examples performance.

Mr.doob 7 years ago
parent
commit
a5c700d78f
2 changed files with 0 additions and 16 deletions
  1. 0 8
      examples/webvr_daydream.html
  2. 0 8
      examples/webvr_gearvr.html

+ 0 - 8
examples/webvr_daydream.html

@@ -80,10 +80,6 @@
 					object.position.y = Math.random() * 4 - 2;
 					object.position.z = Math.random() * 4 - 2;
 
-					object.rotation.x = Math.random() * 2 * Math.PI;
-					object.rotation.y = Math.random() * 2 * Math.PI;
-					object.rotation.z = Math.random() * 2 * Math.PI;
-
 					object.userData.velocity = new THREE.Vector3();
 					object.userData.velocity.x = Math.random() * 0.01 - 0.005;
 					object.userData.velocity.y = Math.random() * 0.01 - 0.005;
@@ -194,10 +190,6 @@
 
 					}
 
-					cube.rotation.x += cube.userData.velocity.x * 2 * delta;
-					cube.rotation.y += cube.userData.velocity.y * 2 * delta;
-					cube.rotation.z += cube.userData.velocity.z * 2 * delta;
-
 					cube.userData.velocity.y -= 0.00098;
 
 				}

+ 0 - 8
examples/webvr_gearvr.html

@@ -86,10 +86,6 @@
 					object.position.y = Math.random() * 4 - 2;
 					object.position.z = Math.random() * 4 - 2;
 
-					object.rotation.x = Math.random() * 2 * Math.PI;
-					object.rotation.y = Math.random() * 2 * Math.PI;
-					object.rotation.z = Math.random() * 2 * Math.PI;
-
 					object.userData.velocity = new THREE.Vector3();
 					object.userData.velocity.x = Math.random() * 0.01 - 0.005;
 					object.userData.velocity.y = Math.random() * 0.01 - 0.005;
@@ -219,10 +215,6 @@
 
 					}
 
-					cube.rotation.x += cube.userData.velocity.x * 2 * delta;
-					cube.rotation.y += cube.userData.velocity.y * 2 * delta;
-					cube.rotation.z += cube.userData.velocity.z * 2 * delta;
-
 					cube.userData.velocity.y -= 0.00098;
 
 				}