INNER CODE UNIT · JavaScript
ccdRadius
MageStudio/Mage · src/physics/index.js:558
const ccdRadius = shapes.reduce((min, s) => {
const r =
s.radius != null
? s.radius
: Math.min(s.width || 1, s.height || 1, s.length || 1) / 2;
return Math.min(min, r);
}, Infinity);
this.storeElement(root, options);
this.worker.postMessage({
event: PHYSICS_EVENTS.ADD.COMPOUND,
uuid: root.uuid(),
position: { x: rootWorldPos.x, y: rootWorldPos.y, z: rootWorldPos.z },
quaternion: {
x: rootWorldQuat.x,
y: rootWorldQuat.y,
z: rootWorldQuat.z,