MCPcopy
hub / github.com/lo-th/Oimo.js / demo

Function demo

examples/demos/rotation.js:3–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1var g1, g2, b1, b2;
2
3function demo() {
4
5 cam ( 90, 20, 100 );
6
7 world = new OIMO.World({ info:true });
8
9 g1 = add({ size:[50, 10, 20], pos:[0,-5,12], rot:[0,0,-1], density:1, restitution:0.4 });
10 g2 = add({ size:[50, 10, 20], pos:[0,-5,-12], rot:[0,0,1], density:1, restitution:0.6 });
11
12 // basic geometry body
13 b1 = add({ type:'sphere', size:[1], pos:[0,60,12], move:true, restitution:0.4 });
14 b2 = add({ type:'sphere', size:[1], pos:[0,20,-12], move:true, restitution:0.6 });
15
16 // world internal loop
17 world.postLoop = postLoop;
18 world.play();
19
20};
21
22function contact () {
23

Callers

nothing calls this directly

Calls 2

camFunction · 0.50
addFunction · 0.50

Tested by

no test coverage detected