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

Function postLoop

examples/demos/basic.js:70–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68};
69
70function postLoop () {
71
72 //world.step();
73
74 var m;
75
76 bodys.forEach( function ( b, id ) {
77
78 if( b.type === 1 ){
79
80 m = b.mesh;
81
82 if( b.sleeping ) switchMat( m, 'sleep' );
83 else switchMat( m, 'move' );
84
85 if( m.position.y < -10 ){
86 b.resetPosition( rand(-5,5), 30, rand(-5,5) );
87 }
88 }
89
90 });
91
92 editor.tell( world.getInfo() );
93
94}

Callers

nothing calls this directly

Calls 1

switchMatFunction · 0.85

Tested by

no test coverage detected