提交 9a04c244 编写于 作者: M Mr.doob

- Fixed mistake on the README example

上级 74e70f13
......@@ -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 );
}
......
/**
* @author kile / http://kile.stravaganza.org/
* @author mr.doob / http://mrdoob.com/
* @author kile / http://kile.stravaganza.org/
*/
THREE.Geometry = function () {
......
/**
* @author supereggbert / http://www.paulbrunt.co.uk/
* @author mr.doob / http://mrdoob.com/
* @author supereggbert / http://www.paulbrunt.co.uk/
*/
THREE.Matrix3 = function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册