You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-27Lines changed: 24 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -19,48 +19,45 @@ Alternatively see [how to build the library yourself](https://github.com/mrdoob/
19
19
20
20
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` 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.
21
21
22
-
```html
23
-
<script>
24
-
25
-
var scene, camera, renderer;
26
-
var geometry, material, mesh;
22
+
```javascript
23
+
var scene, camera, renderer;
24
+
var geometry, material, mesh;
27
25
28
-
init();
29
-
animate();
26
+
init();
27
+
animate();
30
28
31
-
functioninit() {
29
+
functioninit() {
32
30
33
-
scene =newTHREE.Scene();
34
-
35
-
camera =newTHREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 1, 10000 );
0 commit comments