MCPcopy
hub / github.com/piqnt/planck.js / createProxy

Function createProxy

example/DynamicTreeTest.ts:232–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230}
231
232function createProxy() {
233 for (let i = 0; i < actors.length; ++i) {
234 const j = (Math.random() * actors.length) | 0;
235 const actor = actors[j];
236 if (actor.proxyId == null) {
237 getRandomAABB(actor.aabb);
238 actor.proxyId = tree.createProxy(actor.aabb, actor);
239 return;
240 }
241 }
242}
243
244function destroyProxy() {
245 for (let i = 0; i < actors.length; ++i) {

Callers 2

DynamicTreeTest.tsFile · 0.85
runActionFunction · 0.85

Calls 3

getRandomAABBFunction · 0.85
randomMethod · 0.80
createProxyMethod · 0.45

Tested by

no test coverage detected