Skip to content

Commit 7368682

Browse files
committed
Merge branch 'master' into dev
2 parents ada4525 + 223f46b commit 7368682

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ Alternatively see [how to build the library yourself](https://github.com/mrdoob/
1717
<script src="js/three.min.js"></script>
1818
```
1919

20-
This code creates a scene, then creates a camera, adds the camera and cube to the scene, creates a &lt;canvas&gt; renderer and adds its viewport in the document.body element.
20+
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a &lt;canvas&gt; renderer for the scene and camera, and it adds that viewport to the document.body element. Finally it animates the cube within the scene for the camera.
2121

2222
```html
2323
<script>
2424
25-
var camera, scene, renderer;
25+
var scene, camera, renderer;
2626
var geometry, material, mesh;
2727
2828
init();
2929
animate();
3030
3131
function init() {
3232
33+
scene = new THREE.Scene();
34+
3335
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
3436
camera.position.z = 1000;
3537
36-
scene = new THREE.Scene();
37-
3838
geometry = new THREE.BoxGeometry( 200, 200, 200 );
3939
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
40-
4140
mesh = new THREE.Mesh( geometry, material );
41+
4242
scene.add( mesh );
4343
4444
renderer = new THREE.CanvasRenderer();

0 commit comments

Comments
 (0)