A mesh of particles
The body and every button are triangle meshes. Each frame is split into ten tiny substeps. In each one the particles coast under gravity, then a set of constraints nudges them back toward what the jelly wants to be (extended position-based dynamics, “small steps” flavour).
What holds it together
Edges resist stretching. Every triangle resists changing its area — in a flat world, area is volume — so squeezing one way bulges another. A gentle shape-matching pull remembers each piece’s overall pose so big slabs don’t slump, and damping along the edges gives the slow, syrupy wobble.
Buttons squish in depth
Each particle also carries a thickness that is a damped spring. Pressing a button thins it; to keep its volume, the button’s triangles ask for more area, so it bulges sideways, shoves its neighbours and wobbles back.
Glue, strands and drips
Buttons are glued to the body by soft links. Pull too far and they snap one by one. Every snap spawns a strand: a little rope that lengthens viscously as the ends part, thins because its volume is conserved, sags under gravity and finally breaks into retracting tails and drops. Pieces that touch grow new sticky bonds, so honey clings to the shelf and to itself.
Cutting and tearing
The knife finds the triangles its path crosses, sorts the triangles around each nearby vertex by which side of the blade they lie on, and duplicates vertices so the two sides stop sharing them. Connected pieces are re-detected and each becomes its own body. Overstretched edges tear with the same routine.
Heat, frost and glaze
Every particle holds a temperature, a crystal fraction and a film of fresh honey. Warmth softens edges and lets their rest shape creep; hot jelly thins as it melts into runny honey. Cold seeds sugar crystals that spread to neighbours, making honey cloudy, stiff, non-sticky and brittle; warmth melts them back. Runny honey — from the dipper or from melting — flows downhill along the mesh, drips from the lowest edges and pools on the shelf. Sticky bonds creep under load, so pieces cling, then slowly let go.
Light
The meshes are drawn into an offscreen thickness map — with legends, bubbles and state — then blurred into soft, rounded volume. One shader lights it: normals from the thickness slope, refraction of the backdrop, Beer–Lambert absorption (thicker is deeper amber), milky scattering, bubbles that ride along in the jelly’s own coordinates, a studio softbox reflection, and a coloured shadow with caustics where the jelly acts as a lens.