Browse Source

Removed global parent variable from example. Fixes #3903.

Mr.doob 12 years ago
parent
commit
a6979e39d2
1 changed files with 6 additions and 6 deletions
  1. 6 6
      examples/webgl_geometry_extrude_shapes.html

+ 6 - 6
examples/webgl_geometry_extrude_shapes.html

@@ -28,7 +28,7 @@
 
 			var camera, scene, renderer;
 
-			var text, plane;
+			var group, text, plane;
 
 			var targetRotation = 0;
 			var targetRotationOnMouseDown = 0;
@@ -64,9 +64,9 @@
 				light.position.set( 0, 0, 1 );
 				scene.add( light );
 
-				parent = new THREE.Object3D();
-				parent.position.y = 50;
-				scene.add( parent );
+				group = new THREE.Object3D();
+				group.position.y = 50;
+				scene.add( group );
 
 				function addGeometry( geometry, color, x, y, z, rx, ry, rz, s ) {
 
@@ -80,7 +80,7 @@
 
 					if ( geometry.debug ) mesh.add( geometry.debug );
 
-					parent.add( mesh );
+					group.add( mesh );
 
 				}
 
@@ -322,7 +322,7 @@
 
 		function render() {
 
-			parent.rotation.y += ( targetRotation - parent.rotation.y ) * 0.05;
+			group.rotation.y += ( targetRotation - group.rotation.y ) * 0.05;
 			renderer.render( scene, camera );
 
 		}