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

Function postLoop

examples/demos/kinematic.js:48–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46};
47
48function postLoop () {
49
50 //paddle.setPosition( mpaddle.position );
51
52 var m;
53
54 bodys.forEach( function ( b, id ) {
55
56 if( b.type === 1 ){
57
58 m = b.mesh;
59
60 if(!b.isKinematic){
61 if( b.sleeping ) switchMat( m, 'sleep' );
62 else switchMat( m, 'move' );
63 }
64
65 if( m.position.y < -10 ){
66 b.resetPosition( Math.rand(-5,5), Math.rand(10,20), Math.rand(-5,5) );
67 }
68 }
69
70
71 });
72
73 editor.tell( world.getInfo() );
74
75}

Callers

nothing calls this directly

Calls 1

switchMatFunction · 0.85

Tested by

no test coverage detected