INNER CODE UNIT · JavaScript

y

MageStudio/Mage · src/physics/index.js:334

                    const y = source[i + 1] * worldScale.y;
                    const z = source[i + 2] * worldScale.z;
                    points[i] = x;
                    points[i + 1] = y;
                    points[i + 2] = z;

                    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,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…