Skip to content

Commit fbc1a73

Browse files
committed
Update README.md
1 parent aea110e commit fbc1a73

File tree

1 file changed

+49
-10
lines changed

1 file changed

+49
-10
lines changed

README.md

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Goo Engine is an open-source 3D engine using HTML5 and WebGL for rendering.
44

5-
## Project examples
5+
## Showcases
66

77
<p>
88
<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.
1515
<br>
1616
</p>
1717

18-
[See more showcases](http://goocreate.com/)
18+
[More showcases...](http://goocreate.com/)
1919

20-
## How to build
20+
## Install
2121

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+
```
2559

2660
## Documentation
2761

28-
* [Learn pages](http://learn.goocreate.com/)
2962
* [API Reference](http://code.gooengine.com/latest/docs/)
63+
* [Learn pages](http://learn.goocreate.com/)
3064
* [Forum](http://forum.goocreate.com/)
31-
* [Hello world codepen](http://codepen.io/rherlitz/pen/yKruG)
3265

3366
## Releases
3467

@@ -38,12 +71,18 @@ Goo Engine is an open-source 3D engine using HTML5 and WebGL for rendering.
3871

3972
[Goo Create](http://goocreate.com/) is a complete 3D authoring platform built on top of the Goo Engine.
4073

74+
## How to build
75+
76+
npm install
77+
npm install -g grunt-cli
78+
grunt minify
79+
4180
## Unit testing
4281

4382
* Run `grunt unittest` to run all tests using Karma
4483
* Run `npm test` to test the parts of the engine that are supported in Node.js
4584

46-
## Visual testing
85+
## Visual tests
4786

4887
Start a web server, e.g. using:
4988

@@ -52,7 +91,7 @@ Start a web server, e.g. using:
5291

5392
And then open:
5493

55-
* Visual tests: http://localhost:8000/visual-test/
94+
* Visual tests: [http://localhost:8000/visual-test/](http://localhost:8000/visual-test/)
5695

5796
## Code style checks
5897

0 commit comments

Comments
 (0)