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

Function postLoop

examples/demos/kinematic2.js:40–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40function postLoop () {
41
42 paddle.setQuaternion( rpaddle.quaternion );
43
44 var m;
45
46 bodys.forEach( function ( b, id ) {
47
48 if( b.type === 1 ){
49
50 m = b.mesh;
51
52 if(!b.isKinematic){
53 if( b.sleeping ) switchMat( m, 'sleep' );
54 else switchMat( m, 'move' );
55 }
56
57 if( m.position.y < -10 ){
58 b.resetPosition( Math.rand(-5,5), Math.rand(10,20), Math.rand(-5,5) );
59 }
60 }
61
62
63 });
64
65
66 editor.tell( world.getInfo() );
67
68
69}

Callers

nothing calls this directly

Calls 1

switchMatFunction · 0.85

Tested by

no test coverage detected