Physics Tag Footer

group .........
Layout, lists and widgets
human .........
/lab/physics-tag-footer

── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────

A footer that fills itself by dropping. Scroll it into view and a stack of rounded labels rains in from above, tumbles off the walls, and piles up on the floor, each one grabbable and throwable afterwards. A top wall seals the box three seconds in so nothing can be flung back out, and dragged bodies are clamped so they cannot be dragged through a wall. Matter.js bodies driving real DOM elements.

── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────

  • * The lid arrives late

    Only the floor and side walls exist at first, so the labels can rain in from far above the frame. A top wall is added three seconds later, which is what stops a hard throw from launching a pill out of the box.

  • * Dragging suspends rotation

    A grabbed body gets infinite inertia for the length of the drag, so it translates without spinning, then has its real inertia restored on release. Its position and velocity are clamped every step so it cannot be dragged through a wall.

  • * Physics runs in the footer's own coordinate space

    Walls and bodies are built from the container rect, not the viewport, so the pile fits whatever box the footer occupies.