2
2
3
3
Goo Engine is an open-source 3D engine using HTML5 and WebGL for rendering.
4
4
5
- ## Project examples
5
+ ## Showcases
6
6
7
7
<p >
8
8
<a href =" http://goocreate.com/showcase/case/mountains-of-mouthness/ " ><img src =" http://labs.gooengine.com/github-images/mountains.jpg " /></a >
@@ -15,20 +15,53 @@ Goo Engine is an open-source 3D engine using HTML5 and WebGL for rendering.
15
15
<br >
16
16
</p >
17
17
18
- [ See more showcases] ( http://goocreate.com/ )
18
+ [ More showcases... ] ( http://goocreate.com/ )
19
19
20
- ## How to build
20
+ ## Install
21
21
22
- npm install
23
- npm install -g grunt-cli
24
- grunt minify
22
+ Browser: add the following to your webpage.
23
+
24
+ ``` html
25
+ <script src =" http://code.gooengine.com/latest/lib/goo.js" ></script >
26
+ ```
27
+
28
+ Node.js:
29
+
30
+ ``` js
31
+ npm install -- save goojs
32
+ ```
33
+
34
+ ## Sample code
35
+
36
+ [ Open on codepen] ( http://codepen.io/rherlitz/pen/yKruG )
37
+
38
+ ``` js
39
+ // var goo = require('goojs'); // (for node.js)
40
+
41
+ // Create a runner
42
+ var gooRunner = new goo.GooRunner ();
43
+ var world = gooRunner .world ;
44
+
45
+ // Add the canvas to the DOM
46
+ document .body .appendChild (gooRunner .renderer .domElement );
47
+
48
+ // Add a light entity
49
+ world .createEntity (new goo.PointLight (), [100 , 100 , 100 ]).addToWorld ();
50
+
51
+ // Add a camera entity
52
+ world .createEntity (new goo.Camera (), new goo.OrbitCamControlScript ({spherical: [5 ,0 ,0 ]})).addToWorld ();
53
+
54
+ // Add a box entity with a rotation script
55
+ world .createEntity (new goo.Box (), goo .Material .createMaterial (goo .ShaderLib .simpleLit ), function update (entity ) {
56
+ entity .setRotation (world .time , world .time , 0 );
57
+ }).addToWorld ();
58
+ ```
25
59
26
60
## Documentation
27
61
28
- * [ Learn pages] ( http://learn.goocreate.com/ )
29
62
* [ API Reference] ( http://code.gooengine.com/latest/docs/ )
63
+ * [ Learn pages] ( http://learn.goocreate.com/ )
30
64
* [ Forum] ( http://forum.goocreate.com/ )
31
- * [ Hello world codepen] ( http://codepen.io/rherlitz/pen/yKruG )
32
65
33
66
## Releases
34
67
@@ -38,12 +71,18 @@ Goo Engine is an open-source 3D engine using HTML5 and WebGL for rendering.
38
71
39
72
[ Goo Create] ( http://goocreate.com/ ) is a complete 3D authoring platform built on top of the Goo Engine.
40
73
74
+ ## How to build
75
+
76
+ npm install
77
+ npm install -g grunt-cli
78
+ grunt minify
79
+
41
80
## Unit testing
42
81
43
82
* Run ` grunt unittest ` to run all tests using Karma
44
83
* Run ` npm test ` to test the parts of the engine that are supported in Node.js
45
84
46
- ## Visual testing
85
+ ## Visual tests
47
86
48
87
Start a web server, e.g. using:
49
88
@@ -52,7 +91,7 @@ Start a web server, e.g. using:
52
91
53
92
And then open:
54
93
55
- * Visual tests: http://localhost:8000/visual-test/
94
+ * Visual tests: [ http://localhost:8000/visual-test/ ] ( http://localhost:8000/visual-test/ )
56
95
57
96
## Code style checks
58
97
0 commit comments