From 98c08ebbcfd1d68867864c82846b8f48b25af2cd Mon Sep 17 00:00:00 2001 From: "Ying Ruei Liang (KK)" Date: Tue, 14 Jul 2015 16:48:58 +0800 Subject: [PATCH] Use cached variables to increase performance --- benchmark/cubes.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/cubes.html b/benchmark/cubes.html index ad6eaee..9460603 100755 --- a/benchmark/cubes.html +++ b/benchmark/cubes.html @@ -94,7 +94,7 @@ geometry = new THREE.CubeGeometry( 200, 200, 200 ); geometry2 = new THREE.CubeGeometry( 200, 400, 200 ); - for(var i = 0; i < meshes.length; i++) + for(var i = 0; i < numObjects; i++) { var compute = (Math.floor(Math.random()*4)); @@ -159,7 +159,7 @@ stats.update(); //rotate all the mesh objects - for(var i = 0; i < meshes.length; i++) + for(var i = 0; i < removeNum; i++) { meshes[i].rotation.x += 0.01; meshes[i].rotation.y += 0.03;