back Melba Design Festival

Melba Sofia Design Festival · Website · 2021

Melba Design Festival

A custom web presence based on 19 physics-driven containers, all engineered for the 4th Melba Sofia Design Festival.

Role
Creative Development
Tech
Matter.js, Paper.js, Vanilla JS (ES6 classes), Canvas API, Webpack
Credits
Studio Komplekt · Next DC
Recognition
Awwwards Honorable Mention

Concept

The festival’s visual identity grew out of a classic Bulgarian tradition: jars of compotes and pickles, preserving the best of a season. The festival did the same with design, sealing every part of the 2021 programme inside its own container.

My job was to make those containers interactive.

Every section of the site lives in a jar, filled with illustrated produce, wobbling jelly and its own name in floating pieces. Hover, and it all drifts, bumps and slowly settles, like a jar someone just set down.

The Ancestral Method, all hand-coded

This was 2021, when the only way to tune a jelly blob was to change a decimal point, hard-reload the tab, and watch it either set into stone or melt into digital soup. No AI agents, no code run on vibes, just YouTube tutorials and getting lost in the docs.

Inside the Physics

  1. Invisible glass walls

    Each jar is its own Matter.js world, sealed by six invisible static walls. The jar you see is the illustrator’s drawing, layered over the canvas, with the walls hand-placed to match its outline. The physics engine and the artwork never directly touch; they simply share a unified coordinate system representing the boundary of the glass.

  2. Syrup gravity

    Standard gravity isn’t there; instead, objects float weightlessly as if suspended in thick syrup. To eliminate elastic bouncing, every object is assigned a mass five times heavier than Matter.js defaults, combined with a restitution value of zero. This is what makes all vector collisions land softly.

  3. Convex vs. concave outlines

    Matter.js natively calculates collisions exclusively for convex polygons, whereas the festival illustrations feature complex, organic curves. To maintain performance, every object uses a dual-layer architecture: a hidden mathematical collider simulated by the engine, and a visible graphic skin rendered to the user.

    The collision mechanism: A simplified, straight-edged SVG vector outline. While scanning a smooth curve pixel-by-pixel demands hundreds of points, reducing the shape to sharp corners allows a complex asset like a peach to be represented by just 11 points. Minimizing the vertex count drastically drops the number of collision checks required per frame, keeping all 19 jars running at a locked frame rate.

    The concave shapes issue: Complex shapes like leaves cannot be processed as a single convex hull without losing their empty inner gaps. We used poly-decomp to automatically slice concave paths into separate convex pieces, which are then welded into a single composite rigid body. A pathseg polyfill handles the path segmentation layer directly in the browser. Pretty proud of that one.

    The skin: Illustrated assets receive a standard PNG sprite precisely scaled and anchored to match the underlying collider geometry. To optimize memory, matching items (such as six identical peaches in one jar) share the exact same mathematical vector outline. Flat geometric elements like leaves skip image assets entirely, rendering the vector collider path directly as the visual artwork.

    Skins: what visitors saw. Colliders: what the physics engine simulates. The outlines are the real ones from the live site; the shaded pieces are the leaf’s convex parts, and the dashed shapes are the invisible walls hiding behind the drawn glass. Hover or drag across the jar to nudge the contents.

  4. How the jelly blobs work

    Each liquid blob is engineered as a circular ring of independent, rigid particles bound together by structural constraints. Individually they are solid; collectively they wobble. A single ring contains between 16 and 44 invisible coordinate nodes depending on the blob size, with each node maintaining three distinct mathematical connections:

    • A rigid structural link to its immediate neighbor to maintain overall ring circumference.
    • A secondary, looser constraint to the node two positions ahead to prevent the shape from folding in on itself.
    • A weak anchor tether dragging the node back to its original baseline coordinate, ensuring the blob always drifts home.

    Where it gets really interesting: A secondary canvas running Paper.js loops through these coordinate nodes every frame, drawing a smooth vector spline through the points so a small cluster of floating tracking dots reads as a single, continuous, organic shape. When a rigid asset like a peach collides with the perimeter, the tracking points give way dynamically before the anchor tethers pull them back into formation.

    Tether pulls each dot back home. Shape spring stops the ring folding in on itself. Original is the Review jar’s tuning: 16 dots, tether 0.009, shape spring 0.04. Poke the blob, or shake the jar.

  5. Experience It Live

    Together, the rigid geometries, invisible boundaries, and structural spring blobs form an interconnected system of 19 independent worlds that remain fully operational today.

    Because physics layouts are best understood through physical touch, open the live platform on a desktop screen and run your cursor through the jars.