Browse Source

Using DynamicGeometry in decals example.

Mr.doob 10 years ago
parent
commit
6f6327b55a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      examples/webgl_decals.html

+ 2 - 3
examples/webgl_decals.html

@@ -111,9 +111,8 @@
 			light.position.set( 1, 0.75, 0.5 );
 			scene.add( light );
 
-			line = new THREE.Line( new THREE.Geometry( ), new THREE.LineBasicMaterial( { linewidth: 4 }) );
-			line.geometry.vertices.push( new THREE.Vector3( 0, 0, 0 ) );
-			line.geometry.vertices.push( new THREE.Vector3( 0, 0, 0 ) );
+			line = new THREE.Line( new THREE.DynamicGeometry(), new THREE.LineBasicMaterial( { linewidth: 4 } ) );
+			line.geometry.vertices.push( new THREE.Vector3(), new THREE.Vector3() );
 			scene.add( line );
 
 			loadLeePerrySmith();