dicecomic

Click the picture to play the song · drag to turn the view

For your agent

Tell your agent what you want, and give it this page. Everything it needs is here: the figure's address, its bones and clips, the song the dance is keyed to, and what the compiler found.

Or connect dicecomic to your agent as a tool, once, and it can find every asset by itself: (no sign-in).

What your agent reads here
# Coffee on the red chair

dicecomic asset `red-chair`. A long-limbed figure who sits backwards on a red chair with a cup of chai, then gets up and dances. From the painting the universe started with.

**Compiles clean**: 0 errors, 8 warnings across every frame of every clip. The compiler checks each frame against a human body: joint range, hinges, joint speed, balance, foot contact, limb and scenery collision, and muscle length.

## The figure

- File: https://dicecomic.com/assets/red-chair/figure.glb (glTF binary, 2.9 MB). Served with open CORS; load it straight from this address.
- Units: metres, Y up, feet on y = 0, facing +Z. About 1.46 m tall.
- Skeleton: humanoid, 22 bones: hips, spine, chest, upperChest, neck, head, shoulder.L, upperArm.L, lowerArm.L, hand.L, shoulder.R, upperArm.R, lowerArm.R, hand.R, upperLeg.L, lowerLeg.L, foot.L, toes.L, upperLeg.R, lowerLeg.R, foot.R, toes.R. Bone names are the same on every humanoid in this universe, so clips retarget by name.
- Shape keys (muscles and fit): neckFlexors, deltoid.L, biceps.L, triceps.L, forearm.L, calf.L, deltoid.R, biceps.R, triceps.R, forearm.R, calf.R, abdominals, gluteus.L, quadriceps.L, hamstrings.L, gluteus.R, quadriceps.R, hamstrings.R.
- Clips: `idle` (7 s), `chai-dance` (80.13 s).
  - `idle` loops.
  - `chai-dance` is keyed against the song: clip time = song time.
- Song: https://dicecomic.com/audio/chai.mp3 ("Chai Pe Chakkar", made for dicecomic). The clip runs 80.13 s.
- Opening: sits on its chair, gets up and walks clear before dancing.
- Props: cup, phone.
- Colours: skin #f6ece2, top #2f43a0, trousers #24232b, hair #1d1b26, eyes #1d1b26, chair #d8432c, cup #d8432c.

## Put it in a three.js scene

```js
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';

const gltf = await new GLTFLoader().loadAsync('https://dicecomic.com/assets/red-chair/figure.glb');
scene.add(gltf.scene);
const mixer = new THREE.AnimationMixer(gltf.scene);
const clip = name => gltf.animations.find(c => c.name === name);
const idle = mixer.clipAction(clip('idle')); idle.play();

// dance with the song: drive the clip from the audio clock, not from dt
const song = new Audio('https://dicecomic.com/audio/chai.mp3');
const dance = mixer.clipAction(clip('chai-dance'));
song.onplay = () => { idle.stop(); dance.play(); };
// each frame:
//   if (!song.paused) { dance.time = song.currentTime; mixer.update(0); } else mixer.update(dt);
```

## Show it on a page

```html
<iframe src="https://dicecomic.com/play/?id=red-chair&embed=1" width="640" height="400" style="border:0" allow="autoplay" title="Coffee on the red chair on dicecomic"></iframe>
```

## Compiler findings

- warning (contact): foot.R planted foot slides at 0.44 leg lengths/s; chai-dance 16.57s–16.57s (frames 497–497, worst at 16.57s), from sitting, feet coming down
- warning (speed): hips hips travel at 4.2 leg lengths/s; chai-dance 48.80s–48.80s (frames 1464–1464, worst at 48.80s)
- warning (contact): foot.L sole 0.5 cm below the floor; chai-dance 50.10s–50.10s (frames 1503–1503, worst at 50.10s)
- warning (contact): foot.L planted foot slides at 0.37 leg lengths/s; chai-dance 51.60s–51.60s (frames 1548–1548, worst at 51.60s)
- warning (speed): lowerLeg.L turns at 1372°/s (a dancer's peak is 1300°/s); chai-dance 51.63s–51.63s (frames 1549–1549, worst at 51.63s)
- warning (speed): hips hips travel at 4.2 leg lengths/s; chai-dance 51.93s–51.93s (frames 1558–1558, worst at 51.93s)
- warning (muscle): neckFlexors stretched to 150% of its rest length (muscle works in 55–150%); chai-dance 52.73s–52.80s (frames 1582–1584, worst at 52.73s)
- warning (speed): lowerLeg.L turns at 1542°/s (a dancer's peak is 1300°/s); chai-dance 57.80s–57.80s (frames 1734–1734, worst at 57.80s)

Full report: https://dicecomic.com/assets/red-chair/report.txt. Per clip, as JSON: https://dicecomic.com/assets/red-chair/report.json. Metadata: https://dicecomic.com/assets/red-chair/asset.json.

## Changing it

A person makes their own version on https://dicecomic.com/asset/?id=red-chair: they say what should change (hair, clothes, colours, build, age), and the version is built, compiled and published under its own page. The original stays as it is.