Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions demos/head-turn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Every build and runtime dependency is installed from the public npm registry (`h

| Package | Version | Role |
| --- | --- | --- |
| `@rig-c/parts` | `1.71.0` | Slices per-part depth sheets from `depth.jpg`, promotes `face` (`head`) and `topwear` (`chest`) to `13×16` depth-sampled surface grids (`360` triangles each), and emits the 2.5D `turn`, `tilt`, and `body_turn` animations and `yaw` / `pitch` / `body_yaw_dial` sliders |
| `@rig-c/parts` | `1.71.1` | Slices per-part depth sheets from `depth.jpg`, promotes `face` (`head`) and `topwear` (`chest`) to `13×16` depth-sampled surface grids (`360` triangles each), and emits the 2.5D `turn`, `tilt`, and `body_turn` animations and `yaw` / `pitch` / `body_yaw_dial` sliders |
| `@rig-c/pose` | `1.4.0` | Cleans and retargets the 4-way sign-test pose sequence (`pose#455`, 25 frames at 24 fps) onto the rig's `yaw`, `pitch`, and `body_yaw_dial` sliders as the `"clip"` animation |
| `rig-c` | `2.79.0` | Gates (`--profile rig-play`) and compiles `rig.json` + `motion.json` into `skeleton.model.json`, `skeleton.json`, `skeleton.atlas`, and polygon-packed `skeleton.png`, and provides `readModel` in the browser |
| `@rig-c/play` | `1.20.0` | Loads `skeleton.model.json` + `skeleton.png` (`loadModel`) and steps the runtime pose and animation mixer (`RigPlayer`) |
| `@rig-c/play` | `1.21.0` | Loads `skeleton.model.json` + `skeleton.png` (`loadModel`) and steps the runtime pose and animation mixer (`RigPlayer`) |
| `@rig-c/pixi` | `0.1.5` | Renders the posed `RigPlayer` frame onto a PixiJS v8 `Container` (`PixiRig`) |
| `pixi.js` | `8.22.0` | Hardware-accelerated `WebGLRenderer` host |

Expand All @@ -26,7 +26,7 @@ Every build and runtime dependency is installed from the public npm registry (`h
1. **Source art and confirmed depth atlas**
- Painting: [`bundle/look.png`](./bundle/look.png)
- Confirmed depth atlas: [`bundle/depth.jpg`](./bundle/depth.jpg) (`1284×1289`, SHA-256 `c814960c7e40dd1d5573a5e6d6e5d97eefeb309d015dea924359dc87f8e998a0`, white = near, `zScale = 109.86819166092819`)
2. **2.5D head and body turn configuration (`@rig-c/parts@1.71.0`)**
2. **2.5D head and body turn configuration (`@rig-c/parts@1.71.1`)**
- `config.turn`:
- `pivot: 55`, `counter: 0.1`, `grid: [13, 16]`
- Head roles: `face: "surface"` (`face_surface` under `faceshift`), `hair_back: "rear"`, `hairpin: "rear"` (`rear_shift`), and facial/hair features (`ear_r`, `ear_l`, `nose`, `mouth`, `eyewhite_r`, `eyewhite_l`, `iris_r`, `iris_l`, `lash_r`, `lash_l`, `brow_l`, `brow_r`, `hair_front`) as `"unit"`
Expand Down Expand Up @@ -64,15 +64,17 @@ Every build and runtime dependency is installed from the public npm registry (`h
```bash
mkdir -p build-env && cd build-env
npm init -y
npm install --no-save \
@rig-c/parts@1.71.0 \
PLAYWRIGHT_SKIP_BROWSER_GC=1 npm install --no-save \
@rig-c/parts@1.71.1 \
@rig-c/pose@1.4.0 \
@rig-c/play@1.20.0 \
@rig-c/play@1.21.0 \
@rig-c/pixi@0.1.5 \
rig-c@2.79.0 \
pixi.js@8.22.0
```
2. **Run `@rig-c/parts` (`rigStage`) on the cut parts + depth sheets cropped from `depth.jpg`**:
2. **Reassemble the approved source layers using `@rig-c/parts@1.71.1` with the turn roles in the assemble config**:
- Do not reuse PNGs assembled by an older version: moving head parts must keep their own fringe and seam colours.
- Then run `@rig-c/parts` (`rigStage`) on the cut parts + depth sheets cropped from `depth.jpg`:
- Configure `config.turn` (head) and `config.turn.body` (torso `topwear` + `collar_back`) with `pivot: 55`, `counter: 0.1`, `grid: [13, 16]`, and `zScale: 109.86819166092819`.
- Emit `rig-out/rig.json`, `rig-out/motion.json`, `rig-out/images/`, `rig-out/depth_sheets.json`, and `rig-out/mesh_report.json`.
3. **Clean and retarget the 4-way sign-test pose clip with `@rig-c/pose`**:
Expand Down Expand Up @@ -111,3 +113,13 @@ Every build and runtime dependency is installed from the public npm registry (`h
bun run build
bun run verify
```

## Page physics environment

Immediately after creating its `PixiRig`, the page calls:

```js
rig.environment({ wind: [0, 0], gravity: [0, 1] });
```

This environment belongs to that player and persists across pointer/clip changes and seeks. Wind is zero; gravity uses the runtime axes (x right, y down). Authored physics response strengths remain in the rig. No global runtime default is changed.
26 changes: 13 additions & 13 deletions demos/head-turn/bundle-manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"schema": 1,
"sha256": "6c9f3e6fba334c10362f51585e6f02a2c642772505b4a4b64c63b337216ec1d8",
"sha256": "3f5a0b5f4b9dc3e2ea1231a937726afa00963f81e2a5d8d2a6194684d8600087",
"files": [
{
"path": "README.md",
"bytes": 1365,
"sha256": "47b488ebb86e81c1641648d75b7c4a8f78fa5a07b2ee38d88a335ca46bc26d69"
"bytes": 1575,
"sha256": "93ad01c5d59c89d52a57937ef75f81b8cc602167365f90f0b533b826844199c0"
},
{
"path": "THIRD_PARTY_LICENSES.txt",
Expand All @@ -14,8 +14,8 @@
},
{
"path": "app.js",
"bytes": 21243,
"sha256": "ca7920c05519a456309e4d6b9d32b460922c8b785ab4e0a2275c9f1924c03604"
"bytes": 21387,
"sha256": "27ba309caece2ce337ede3164c3143c42019260aa99db5d724c87e2256ace192"
},
{
"path": "depth.jpg",
Expand All @@ -34,8 +34,8 @@
},
{
"path": "runtime.js",
"bytes": 861880,
"sha256": "ed316db7c4cbac929f2ae901b7bd5694dc8a4b889c647d3b6f55e4f80733f1e1"
"bytes": 900848,
"sha256": "84228edc7a9efee1d5b9d486a9ebfe0988c2feaa82fafc076d58769201fc7595"
},
{
"path": "skeleton.atlas",
Expand All @@ -44,18 +44,18 @@
},
{
"path": "skeleton.json",
"bytes": 688778,
"sha256": "d03cbfbf7ee004e2eb2bd6715eb9d6a96b6a6084b766dec311b25692b37b50f2"
"bytes": 689886,
"sha256": "a683ce9de7e570e2572c9ba7b79920b405ff2e4f7b40b46efd2bfa5ad301dfbd"
},
{
"path": "skeleton.model.json",
"bytes": 1177764,
"sha256": "eca8add48a7353ac23e5a4d12556635ff14b74555882ffe58f18276e309723b5"
"bytes": 1182610,
"sha256": "ce6ef0bdc4376acb96746c7260d242dedf47e15a6d81d4508a1e7729b8ba6e64"
},
{
"path": "skeleton.png",
"bytes": 1792596,
"sha256": "53f36ff9e0b7a3a21dc8032d810a15de9c97720a1176159a12b46578c4e1d419"
"bytes": 1793991,
"sha256": "45b52e2a93561cadfe60f9b2f27aa3f9877be7ee209659028fe66e3e3a0d36ba"
}
]
}
6 changes: 4 additions & 2 deletions demos/head-turn/bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

This directory holds the compiled runtime assets for [`/demos/head-turn/`](../):

- `skeleton.model.json`, `skeleton.json`, `skeleton.atlas`, `skeleton.png` — compiled 2.5D head and body turn rig produced by `@rig-c/parts@1.71.0`, `@rig-c/pose@1.4.0`, and `rig-c@2.79.0` (`--profile rig-play --pack --page-edges free --pack-shape polygon`).
- `runtime.js` — browser ESM bundle of the published runtime packages (`@rig-c/play@1.20.0`, `@rig-c/pixi@0.1.5`, `rig-c@2.79.0`, `pixi.js@8.22.0`).
- `skeleton.model.json`, `skeleton.json`, `skeleton.atlas`, `skeleton.png` — compiled 2.5D head and body turn rig produced by `@rig-c/parts@1.71.1`, `@rig-c/pose@1.4.0`, and `rig-c@2.79.0` (`--profile rig-play --pack --page-edges free --pack-shape polygon`).
- `runtime.js` — browser ESM bundle of the published runtime packages (`@rig-c/play@1.21.0`, `@rig-c/pixi@0.1.5`, `rig-c@2.79.0`, `pixi.js@8.22.0`).
- `app.js`, `index.html` — consumer page driving `pointer` mode (critically damped spring on `yaw_dial`, `pitch_dial`, `body_yaw_dial`, `gaze_x_dial`, `gaze_y_dial`) and `clip` mode (`@rig-c/pose` 4-way sign-test clip played by `@rig-c/play` and rendered on WebGL via `@rig-c/pixi`).
- `look.png`, `depth.jpg` — the source character painting and confirmed grayscale depth atlas (`1284×1289`, SHA-256 `c814960c7e40dd1d5573a5e6d6e5d97eefeb309d015dea924359dc87f8e998a0`).
- `THIRD_PARTY_LICENSES.txt` — third-party licence notices.

See [`../README.md`](../README.md), [`../bundle-manifest.json`](../bundle-manifest.json), and [`../package-manifest.json`](../package-manifest.json) for full package provenance (`name@version` + npm tarball `sha512` integrity) and step-by-step rebuild instructions.

The page sets its own player environment: `rig.environment({ wind: [0, 0], gravity: [0, 1] })`. Reassemble the approved source layers with turn roles before rig generation; do not reuse legacy assembled PNGs.
2 changes: 2 additions & 0 deletions demos/head-turn/bundle/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ async function main() {

const stage = new Container();
const rig = new PixiRig(assets, { ticker: null, autoUpdate: false });
// This page owns its physics environment; authored response strengths stay in the rig.
rig.environment({ wind: [0, 0], gravity: [0, 1] });
stage.addChild(rig);

// Measure neutral bounds at setup/idle to frame the bust cleanly in the viewport.
Expand Down
136 changes: 68 additions & 68 deletions demos/head-turn/bundle/runtime.js

Large diffs are not rendered by default.

Loading
Loading