Browse Source

- Fixed mistake on the README example

Mr.doob 15 years ago
parent
commit
9a04c244f3
3 changed files with 7 additions and 7 deletions
  1. 5 5
      README.md
  2. 1 1
      src/core/Geometry.js
  3. 1 1
      src/core/Matrix3.js

+ 5 - 5
README.md

@@ -35,7 +35,7 @@ The library needs to be included first thing.
 
 	<script type="text/javascript" src="js/three.js"></script>
 
-This code creates a camera, then creates a scene object, adds a bunch of random particles to the scene, creates a &lt;canvas&gt; renderer and adds its viewport in the document.body element.
+This code creates a camera, then creates a scene object, adds a bunch of random particles in it, creates a &lt;canvas&gt; renderer and adds its viewport in the document.body element.
 
 	<script type="text/javascript">
 
@@ -46,14 +46,11 @@ This code creates a camera, then creates a scene object, adds a bunch of random
 
 		function init() {
 
-			camera = new THREE.Camera( 75, SCREEN_WIDTH / SCREEN_HEIGHT, 0.0001, 10000 );
+			camera = new THREE.Camera( 75, window.innerWidth / window.innerHeight, 0.0001, 10000 );
 			camera.position.z = 1000;
 
 			scene = new THREE.Scene();
 
-			renderer = new THREE.CanvasRenderer();
-			renderer.setSize( window.innerWidth, window.innerHeight );
-
 			for (var i = 0; i < 1000; i++) {
 
 				var particle = new THREE.Particle( new THREE.ColorFillMaterial( Math.random() * 0x808008 + 0x808080, 1 ) );
@@ -65,6 +62,9 @@ This code creates a camera, then creates a scene object, adds a bunch of random
 
 			}
 
+			renderer = new THREE.CanvasRenderer();
+			renderer.setSize( window.innerWidth, window.innerHeight );
+
 			document.body.appendChild( renderer.domElement );
 
 		}

+ 1 - 1
src/core/Geometry.js

@@ -1,6 +1,6 @@
 /**
- * @author kile / http://kile.stravaganza.org/
  * @author mr.doob / http://mrdoob.com/
+ * @author kile / http://kile.stravaganza.org/
  */
 
 THREE.Geometry = function () {

+ 1 - 1
src/core/Matrix3.js

@@ -1,6 +1,6 @@
 /**
- * @author supereggbert / http://www.paulbrunt.co.uk/
  * @author mr.doob / http://mrdoob.com/
+ * @author supereggbert / http://www.paulbrunt.co.uk/
  */
 
 THREE.Matrix3 = function () {