# Jelly Candy: Fruit Bears

> Six translucent fruit gummies on a white table. Grab any part and pull, lift a head until the neck stretches thin, press one flat until it springs back, flick one across the pile or pour in more. Fixed-step soft-body physics and a marching-cubes skin in one offline HTML.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Interactive 3D](https://www.sandbase.ai/skills/interactive-3d)
- Version: 0.1.0
- Runs online: yes
- Page: https://www.sandbase.ai/skills/interactive-3d/jelly-candy

## What you get

Bring a candy, its physics and an optional palette. The Skill returns a downloadable Skill, interactive demos and example videos.

## Install

Download the Skill package from https://www.sandbase.ai/skills/interactive-3d/jelly-candy (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/jelly-candy create <your soft candy> with fixed-step soft-body physics, a metaball skin and touch controls
```

## How it works

1. **Describe and edit the candy** Start from the bundled Fruit Bears, six translucent fruit gummies on a white table, or fill the prompt slots for your own candy. new-project.mjs creates the project for a coding agent. Change flavors, layout, material and the body plan in src/candy.json; a ring or a worm needs no code change, and invalid data fails with a stable candy_* code. The Skill calls no model and needs no API key.
2. **Build one offline file** With Node 22.4 or newer, run npm ci, then npm run build:single to produce dist-single/index.html. Each candy is a set of mass points stepped in fixed 1/120 s ticks, pulled by shape-matching groups and springs, and drawn as one marching-cubes skin. No models, fonts, images or network assets load at runtime, and the page needs WebGL.
3. **Check every gesture** npm run shoot serves the file under the SandBase sample sandbox policy and drives grab, lift, press, throw, flavor, pour, wobble, idle and sound with real mouse or touch input, in English and Simplified Chinese at desktop, phone and embed sizes. Each gesture must change state and pixels. It needs a local Chrome; headless frame rates are only indicative.

## FAQ

### Does Jelly Candy need an API key?

No. Jelly Candy needs no credentials, paid calls or uploads. The built page runs offline and loads no models, fonts, images or network assets. A coding agent may use its own authorized model to edit the project, but the Skill calls none. npm ci installs public build dependencies once, and Chrome is needed only for browser verification.

### Is Jelly Candy a real material simulation?

No. Jelly Candy uses an illustrative soft-body model, not measured candy rheology. Shape-matching groups pull each candy toward its rest shape, a volume-preserving fit makes a squashed candy bulge instead of shrinking, strands are springs, and contacts are soft with a hard overlap limit. Extreme pulls briefly change the rendered volume within the bounds the verification checks.

### Can Jelly Candy use a shape other than a bear?

Yes. Jelly Candy reads any validated body plan from src/candy.json, so a ring, a worm or a bear needs no code change to the solver or the skin. A ten-point ring was checked with the same tests as the bears. Invalid plans fail with a stable candy_* code and localized guidance rather than a broken scene.

### What can I do with the candies in Jelly Candy?

In Jelly Candy you press on a candy to grab its nearest part, drag up to pull, drag down into the table to press, and let go while moving to throw. The card picks the next pour's flavor or a mix, sets the wobble stiffness and damping, shows live stretch and bounce counts, pours four more candies and toggles sound. Idle candies hop now and then.

### How many candies can Jelly Candy hold?

Jelly Candy holds at most 14 candies. When a pour would pass that cap, the oldest candies are removed first. The table is the only obstacle, and candies that leave its edge are held back by soft walls. Restarting the page restores the authored seed, so the opening layout is the same every time.

### Does Jelly Candy have sound or save progress?

Jelly Candy has only optional short synthesized squishes after a gesture, and they start muted. Nothing is stored, so reloading the page restores the authored seed. With reduced motion turned on, idle hops and the hop after a lift stop. The embedded frame needs only allow-scripts; storage and same-origin access are not used.

## Examples

- Jelly Candy interactive soft-body scene (scene)
- Jelly Candy: Fruit Bears (video)
