INNER CODE UNIT · JavaScript
min
MageStudio/Mage · src/physics/index.js:340
min = [Math.min(min[0], x), Math.min(min[1], y), Math.min(min[2], z)];
max = [Math.max(max[0], x), Math.max(max[1], y), Math.max(max[2], z)];
}
// A hull needs at least a tetrahedron; anything less cannot be
// built and would otherwise degrade silently into a unit box.
if (points.length < 12) return null;
return {
// Every leaf carries the ELEMENT's uuid, so contact
// attribution resolves to the model however it was split.
childUuid: uuid,
colliderType: COLLIDER_TYPES.MODEL_SHAPE,
points,
// The measured box still travels with each leaf: it sizes
// CCD and drives the childMap region test.
width: max[0] - min[0],
height: max[1] - min[1],