Permalink
Browse files

Merge branch 'master' into dev

  • Loading branch information...
2 parents d25ebbe + 81ffca2 commit d579882ff3fd92cfdc1692a98ba31a6fae55e159 @mrdoob mrdoob committed May 19, 2012
Showing with 5 additions and 11 deletions.
  1. +5 −11 docs/api/core/Geometry.html
@@ -5,19 +5,13 @@
<h2>Example</h2>
-<code>// geometry with random points
+<code>var geometry = new THREE.Geometry()
-var geometry = new THREE.Geometry()
+geometry.vertices.push( new THREE.Vector3( -10, 10, 0 ) );
+geometry.vertices.push( new THREE.Vector3( -10, -10, 0 ) );
+geometry.vertices.push( new THREE.Vector3( 10, -10, 0 ) );
-for ( var i = 0; i < 10000; i ++ ) {
-
- var vertex = new THREE.Vector3();
- vertex.x = Math.random() * 1000 - 500;
- vertex.y = Math.random() * 1000 - 500;
- vertex.z = Math.random() * 1000 - 500;
- geometry.vertices.push( vertex );
-
-}
+geometry.faces.push( new THREE.Face3( 0, 1, 2 ) );
geometry.computeBoundingSphere();
</code>

0 comments on commit d579882

Please sign in to comment.