Skip to content

Commit 4406f9e

Browse files
committed
feat(showcase): Mixamo jumping-jacks hook on hero, playground default, README GIF
Re-enable the jumping-jacks clip-back on the three primary marketing surfaces as a pure eye-candy hook, while every other preset and the sub-3 README GIFs stay procedural (the DSL remains source of truth). - spec/examples/jumping-jacks.posecode: add clip "jumping-jacks" (this single directive drives the landing hero, playground default, and the captured GIF, all of which read this doc + SHOWCASE_CLIPS) - playground/src/main.ts: DEFAULT_PRESET = jumping-jacks so the playground greets visitors with the mocap clip; library order unchanged - docs/media/jumping-jacks.gif: re-render from the clip The clip directive stays visible in the editor, so the mechanism is transparent; deleting it drops back to procedural. Note: public/clips/*.fbx is gitignored (CDN-served); the prod asset must be named jumping-jacks.fbx to match SHOWCASE_CLIPS.
1 parent 5adfe8e commit 4406f9e

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

docs/media/jumping-jacks.gif

17.6 KB
Loading

playground/src/main.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import {
1919
import type { PosecodeEditor } from "./editor.js";
2020
import { PRESETS } from "./presets.js";
2121
import { SHOWCASE_CLIPS } from "./clips.js";
22+
23+
// The movement shown on first open (no shared link). Jumping jacks plays the
24+
// Mixamo showcase clip, so the playground greets visitors with polished mocap
25+
// while every other preset — and the editor once you engage — stays procedural.
26+
// Falls back to the first library entry if the id is ever removed.
27+
const DEFAULT_PRESET = PRESETS.find((p) => p.id === "jumping-jacks") ?? PRESETS[0]!;
2228
import { renderWarnings } from "./warnings.js";
2329
import llmPrompt from "../../spec/llm-authoring.md?raw";
2430

@@ -506,9 +512,9 @@ if (sharedSource) {
506512
initialDoc = sharedSource;
507513
intro.hidden = true;
508514
} else {
509-
initialDoc = PRESETS[0]!.source;
510-
currentPresetId = PRESETS[0]!.id;
511-
libCurrent.textContent = PRESETS[0]!.label;
515+
initialDoc = DEFAULT_PRESET.source;
516+
currentPresetId = DEFAULT_PRESET.id;
517+
libCurrent.textContent = DEFAULT_PRESET.label;
512518
}
513519

514520
// Boot the two heavyweights (CodeMirror editor + Three.js renderer) after the

spec/examples/jumping-jacks.posecode

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
posecode exercise "Jumping jacks"
22
rig humanoid
3+
clip "jumping-jacks"
34
pose start = standing
45

56
step "Out" 0.5s settle:

0 commit comments

Comments
 (0)