create-threenative 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +3 -1
  2. package/agent-docs/references/capability-reference.md +177 -7
  3. package/capabilities.json +247 -4
  4. package/dist/index.js +6 -1
  5. package/dist/threenative.js +3 -2
  6. package/package.json +4 -4
  7. package/templates/action-rpg/package.json +1 -1
  8. package/templates/minimal/package.json +1 -1
  9. package/templates/platformer/package.json +1 -1
  10. package/templates/puzzle/package.json +1 -1
  11. package/templates/racing/package.json +1 -1
  12. package/templates/rain/.codex/config.toml +19 -0
  13. package/templates/rain/.cursor/mcp.json +32 -0
  14. package/templates/rain/.gemini/settings.json +32 -0
  15. package/templates/rain/.mcp.json +32 -0
  16. package/templates/rain/.vscode/mcp.json +36 -0
  17. package/templates/rain/.zed/settings.json +36 -0
  18. package/templates/rain/AGENTS.md +96 -0
  19. package/templates/rain/CLAUDE.md +98 -0
  20. package/templates/rain/assets/rain-loop.wav +0 -0
  21. package/templates/rain/assets/thunder.wav +0 -0
  22. package/templates/rain/assets/wind-loop.wav +0 -0
  23. package/templates/rain/index.html +18 -0
  24. package/templates/rain/kit.json +7 -0
  25. package/templates/rain/native-playtests/boot.playtest.json +13 -0
  26. package/templates/rain/native-playtests/lightning.playtest.json +173 -0
  27. package/templates/rain/opencode.json +41 -0
  28. package/templates/rain/package.json +56 -0
  29. package/templates/rain/playtests/auto-lightning-clear.playtest.json +66 -0
  30. package/templates/rain/playtests/auto-lightning.playtest.json +26 -0
  31. package/templates/rain/playtests/automation.playtest.json +133 -0
  32. package/templates/rain/playtests/cinematic.playtest.json +59 -0
  33. package/templates/rain/playtests/flash.playtest.json +27 -0
  34. package/templates/rain/playtests/fly.playtest.json +54 -0
  35. package/templates/rain/playtests/lightning.playtest.json +220 -0
  36. package/templates/rain/playtests/loading.playtest.json +57 -0
  37. package/templates/rain/playtests/paused.playtest.json +59 -0
  38. package/templates/rain/playtests/performance.playtest.json +22 -0
  39. package/templates/rain/playtests/reduced-motion.playtest.json +87 -0
  40. package/templates/rain/playtests/simulation.playtest.json +20 -0
  41. package/templates/rain/playtests/storm.playtest.json +150 -0
  42. package/templates/rain/playtests/survives.playtest.json +58 -0
  43. package/templates/rain/playtests/tiers.playtest.json +179 -0
  44. package/templates/rain/playtests/weather.playtest.json +77 -0
  45. package/templates/rain/public/favicon.svg +5 -0
  46. package/templates/rain/src/audio/storm.ts +314 -0
  47. package/templates/rain/src/game.ts +114 -0
  48. package/templates/rain/src/main.ts +15 -0
  49. package/templates/rain/src/render/bloom-shader.ts +65 -0
  50. package/templates/rain/src/render/camera.ts +160 -0
  51. package/templates/rain/src/render/clouds-shader.ts +242 -0
  52. package/templates/rain/src/render/clouds.ts +142 -0
  53. package/templates/rain/src/render/lighting.ts +39 -0
  54. package/templates/rain/src/render/lightning.ts +360 -0
  55. package/templates/rain/src/render/loading.ts +327 -0
  56. package/templates/rain/src/render/materials.ts +19 -0
  57. package/templates/rain/src/render/noise-volume.ts +159 -0
  58. package/templates/rain/src/render/palette.ts +18 -0
  59. package/templates/rain/src/render/post-shader.ts +178 -0
  60. package/templates/rain/src/render/postprocessing.ts +226 -0
  61. package/templates/rain/src/render/quality.ts +135 -0
  62. package/templates/rain/src/render/rain.ts +299 -0
  63. package/templates/rain/src/render/sky.ts +28 -0
  64. package/templates/rain/src/render/world-shader.ts +680 -0
  65. package/templates/rain/src/render/world.ts +146 -0
  66. package/templates/rain/src/render/worldEnvironment.ts +809 -0
  67. package/templates/rain/src/scenes/Boot.ts +334 -0
  68. package/templates/rain/src/state.ts +257 -0
  69. package/templates/rain/src/style.css +1160 -0
  70. package/templates/rain/src/ui/App.tsx +29 -0
  71. package/templates/rain/src/ui/GameUi.tsx +187 -0
  72. package/templates/rain/src/ui/Hud.tsx +327 -0
  73. package/templates/rain/src/ui/LoadingOverlay.tsx +46 -0
  74. package/templates/rain/src/ui/Menu.tsx +370 -0
  75. package/templates/rain/src/ui/automation.ts +60 -0
  76. package/templates/rain/src/ui/main.tsx +7 -0
  77. package/templates/rain/src/ui/tempest.ts +149 -0
  78. package/templates/rain/tailwind.config.ts +2 -0
  79. package/templates/rain/threenative.config.ts +66 -0
  80. package/templates/rain/tools/generate-shaders.mjs +656 -0
  81. package/templates/rain/tools/make-storm-audio.mjs +387 -0
  82. package/templates/rain/tools/storm-dsp.mjs +177 -0
  83. package/templates/rain/tools/tempest-bloom.frag +10 -0
  84. package/templates/rain/tools/tempest-clouds.frag +86 -0
  85. package/templates/rain/tools/tempest-post.frag +47 -0
  86. package/templates/rain/tools/tempest-world.frag +210 -0
  87. package/templates/rain/tools/verify-noise-volume.mjs +61 -0
  88. package/templates/rain/tsconfig.json +17 -0
  89. package/templates/rain/vite.config.ts +37 -0
  90. package/templates/rts/package.json +1 -1
  91. package/templates/runner/package.json +1 -1
  92. package/templates/sailing/package.json +1 -1
  93. package/templates/shooter/package.json +1 -1
  94. package/templates/snow/.codex/config.toml +19 -0
  95. package/templates/snow/.cursor/mcp.json +32 -0
  96. package/templates/snow/.gemini/settings.json +32 -0
  97. package/templates/snow/.mcp.json +32 -0
  98. package/templates/snow/.vscode/mcp.json +36 -0
  99. package/templates/snow/.zed/settings.json +36 -0
  100. package/templates/snow/AGENTS.md +88 -0
  101. package/templates/snow/CLAUDE.md +90 -0
  102. package/templates/snow/README.md +26 -0
  103. package/templates/snow/assets/crunch.wav +0 -0
  104. package/templates/snow/assets/wind.wav +0 -0
  105. package/templates/snow/index.html +12 -0
  106. package/templates/snow/kit.json +7 -0
  107. package/templates/snow/native-playtests/snow-physics.playtest.json +150 -0
  108. package/templates/snow/native-playtests/survives.playtest.json +47 -0
  109. package/templates/snow/opencode.json +41 -0
  110. package/templates/snow/package.json +58 -0
  111. package/templates/snow/playtests/footsteps.playtest.json +95 -0
  112. package/templates/snow/playtests/performance.playtest.json +36 -0
  113. package/templates/snow/playtests/snow-physics.playtest.json +154 -0
  114. package/templates/snow/playtests/survives.playtest.json +56 -0
  115. package/templates/snow/playtests/touch-controls.playtest.json +71 -0
  116. package/templates/snow/playtests/weather.playtest.json +119 -0
  117. package/templates/snow/public/favicon.svg +5 -0
  118. package/templates/snow/src/audio.ts +58 -0
  119. package/templates/snow/src/commands.ts +8 -0
  120. package/templates/snow/src/entities/Explorer.ts +279 -0
  121. package/templates/snow/src/game.ts +69 -0
  122. package/templates/snow/src/main.ts +15 -0
  123. package/templates/snow/src/render/bootPrint.ts +50 -0
  124. package/templates/snow/src/render/camera.ts +84 -0
  125. package/templates/snow/src/render/explorer.ts +321 -0
  126. package/templates/snow/src/render/lighting.ts +50 -0
  127. package/templates/snow/src/render/loading.ts +325 -0
  128. package/templates/snow/src/render/materials.ts +36 -0
  129. package/templates/snow/src/render/palette.ts +17 -0
  130. package/templates/snow/src/render/postprocessing.ts +44 -0
  131. package/templates/snow/src/render/props.ts +42 -0
  132. package/templates/snow/src/render/quality.ts +135 -0
  133. package/templates/snow/src/render/scenery.ts +244 -0
  134. package/templates/snow/src/render/sky.ts +57 -0
  135. package/templates/snow/src/render/snowSurface.ts +259 -0
  136. package/templates/snow/src/render/touch-controls.ts +143 -0
  137. package/templates/snow/src/render/weather.ts +279 -0
  138. package/templates/snow/src/render/worldEnvironment.ts +809 -0
  139. package/templates/snow/src/scenes/Boot.ts +12 -0
  140. package/templates/snow/src/scenes/Snow.ts +635 -0
  141. package/templates/snow/src/state.ts +46 -0
  142. package/templates/snow/src/style.css +143 -0
  143. package/templates/snow/src/terrain.ts +64 -0
  144. package/templates/snow/src/ui/App.tsx +15 -0
  145. package/templates/snow/src/ui/Controls.tsx +322 -0
  146. package/templates/snow/src/ui/GameUi.tsx +354 -0
  147. package/templates/snow/src/ui/icons.tsx +54 -0
  148. package/templates/snow/src/ui/main.tsx +7 -0
  149. package/templates/snow/tailwind.config.ts +2 -0
  150. package/templates/snow/threenative.config.ts +51 -0
  151. package/templates/snow/tsconfig.json +17 -0
  152. package/templates/snow/vite.config.ts +37 -0
  153. package/templates/starter/package.json +1 -1
  154. package/templates/tower-defense/package.json +1 -1
@@ -0,0 +1,88 @@
1
+ # AGENTS.md — __PROJECT_NAME__ snow
2
+
3
+ Instructions for the AI agent in this game. `CLAUDE.md` mirrors this file; edit `AGENTS.md`.
4
+
5
+ ## Ownership
6
+
7
+ ThreeNative owns bootstrap, renderer, fixed-step loop, input, loading, physics bindings, and the state bridge. This repository owns the explorer, the boot print, the glade, the weather, the HUD and the
8
+ look; `src/game.ts` is portable and React mounts from `src/main.ts`. The render camera also skips an object that projects under **0.5 px** in it; `renderer.minimumProjectedPixels` raises that threshold (`false` disables the cut, not the count) and `alwaysRender(object)` exempts an object, while camera-attached objects and shadow casters are kept. The engine also owns the per-frame world-matrix walk, and by default it does not descend into a hidden subtree — so a game that reads a hidden object's `matrixWorld` directly must use `getWorldPosition` (or call `object.updateWorldMatrix(true, false)`) first; `renderer.matrixWorld: "all"` restores three's every-node walk, and `TN_PROJECTION` reports the visited-node count either way.
9
+
10
+ ## Start every change
11
+
12
+ 1. **Critical planning gate:** invoke `threenative-capabilities` before `prd-creator`. Search
13
+ `engine_search_capabilities` for the full request and each concrete mechanic, inspect relevant
14
+ matches with `engine_capability_detail`, and record a capability or no-match for the plan. Apply the `ponytail` ladder before writing code; never hand-write what the capability search already installs.
15
+ 2. Then invoke `prd-creator`. Draft the plan around those capabilities and binding constraints,
16
+ direct the user to review it, and wait for explicit approval plus an instruction to implement it.
17
+ 3. Treat returned constraints as binding. This kit needs no navmesh and imports none, so it runs
18
+ on every target; adding `@threenative/physics/navigation` would make it web and desktop only.
19
+ 4. If a build, import, device, or blank frame fails, run `npx threenative doctor` and
20
+ `npx @threenative/playtest doctor`; missing observations are not zero.
21
+ For *"a bullet passes through a wall"*, `RigidBody3D` defaults to continuous collision; `continuousCollision` is the named per-body override, and `body.continuousCollision` reports the effective setting on web/native.
22
+
23
+ ## When the framework blocks you, write plain Three.js
24
+
25
+ When an `@threenative/*` API is broken, missing, or does not do what you need, replace only that
26
+ piece with portable Three.js/plain code. Keep the loop, scenes, input, registry, and playtest
27
+ bridge; avoid DOM globals, dynamic `import()`, and raw physics handles. **Report what blocked you**
28
+ (API, expectation, result, replacement); never stall the game.
29
+
30
+ ## Workflow skills
31
+
32
+ - `.agents/skills/prd-creator/SKILL.md` / `.claude/skills/prd-creator/SKILL.md` — game plan and approval gate.
33
+ - `.agents/skills/threenative-capabilities/SKILL.md` / `.claude/skills/threenative-capabilities/SKILL.md` — capability search.
34
+ - `.agents/skills/threenative-playtest/SKILL.md` / `.claude/skills/threenative-playtest/SKILL.md` — diagnosis and proof.
35
+ - `.agents/skills/threenative-assets/SKILL.md` / `.claude/skills/threenative-assets/SKILL.md` — assets and sculpting.
36
+ - `.agents/skills/threenative-visuals/SKILL.md` / `.claude/skills/threenative-visuals/SKILL.md` — captures and look.
37
+ - `.agents/skills/threenative-performance/SKILL.md` / `.claude/skills/threenative-performance/SKILL.md` — measured budgets.
38
+ - `.agents/skills/threenative-ui/SKILL.md` / `.claude/skills/threenative-ui/SKILL.md` — native-safe UI.
39
+ - `.agents/skills/threenative-context/SKILL.md` / `.claude/skills/threenative-context/SKILL.md` — portable ctx APIs.
40
+ - Confirmed framework bugs: use `file-engine-bug` in `.agents/skills/` or `.claude/skills/` after a minimal repro. A game-side `patches/` fix is temporary: once it is settled, it moves into the engine in one PR. Lazy-first: `.agents/skills/ponytail/SKILL.md` / `.claude/skills/ponytail/SKILL.md` — smallest correct change, and its reuse rung is the capability search above.
41
+
42
+ ## Commands and map
43
+
44
+ ```sh
45
+ pnpm dev
46
+ pnpm build
47
+ pnpm test
48
+ pnpm test:native
49
+ ```
50
+
51
+ The snow is one `SnowField` (`@threenative/core/world`) over one `Heightfield` built in `src/terrain.ts`: indentation, bank, compaction and disturbance composed into the canonical surface that queries, the drawn mesh and the collider all read. Never keep a second height grid.
52
+ `attachSnowPhysics` (`@threenative/physics`) owns the snow collider: each fixed step it reads the solver's contacts for the ball, crate and log, presses each body's own shape with its solved load, and installs the changed surface before the next step. Call `step` from `afterPhysics`, once; `observe()` reports `colliderError` and `loadProvenance` (load is a solver estimate). A kinematic `CharacterBody3D` makes no contact load, so `src/entities/Explorer.ts` plants `src/render/bootPrint.ts` itself with `snow.stamp`, only while `grounded`. Its capsule stands on a coarse walk surface (`walkSurface` in `src/terrain.ts`), not the 6 cm snow collider: Rapier sweeps a character against every triangle under it, which cost ~0.9 ms a step there.
53
+
54
+ Look lives in `src/render/`: `snowSurface.ts` (TSL material, compaction view, redraws `takeDirtyRegion`), `weather.ts` (`GPUParticles3D` snowfall and powder), `explorer.ts`, `scenery.ts`, `props.ts`. Tune response with `depth`/`hardness` and the refill in `src/scenes/Snow.ts`. The React HUD reads `GameState` and sends intents; `src/commands.ts` routes panel verbs into the same functions as the keys. Keep `playtests/survives.playtest.json` as smoke proof and `playtests/snow-physics.playtest.json` honest: it proves drop, settle and rolling track.
55
+ On a touch-primary device (`isMobile() && isTouchscreenAvailable()`), `src/render/touch-controls.ts` adds a left movement stick; keyboard is the desktop fallback.
56
+
57
+ ## Portable authoring contracts
58
+
59
+ Leave `assets` absent: the cook selects target-decodable passes, with `models.sharedImages: true` deduplicating images. `sharedImages: false` embeds duplicate copies; `models.compact` (default `{ flatten: true, join: true, instance: true }`) flattens the scene graph, merges primitives by material and batches a mesh shared by several nodes as `EXT_mesh_gpu_instancing` — all lossless, keeping any node matching `protectedPattern` (or named in `protectedNames`), an animation target, or a skin joint individually addressable; `compact: false` ships the scene graph as authored. `models: "none"` / `textures: "none"` / `audio: "none"` skip those passes and report uncooked bytes. Android/iOS currently skip compression and model dedupe. `assets.exclude` defaults to `[]`; source-relative globs (for example `["unused/**"]`) omit matching files and report saved bytes. `assets.budget` accepts `{ uncooked?: number | "none", total?: number | "none" }`, default `{ uncooked: 64_000_000, total: "none" }`: only bytes left uncooked where cooking was possible count toward `uncooked`. A number sets that ceiling; `"none"` disables both gates. Either disabled gate still reports bytes. Automatic texture cooking retains unaligned source images unchanged and reports `block-size`; those bytes still count toward the uncooked budget. An explicit compression codec override must satisfy four-pixel block alignment; `codec: "none"` opts out. Cooking never silently resizes an image to fix alignment.
60
+
61
+ Relative look capture: a binding with `pointerRelative: true` captures the canvas on click by default; set `captureOnClick: false` and call `ctx.input.captureMouse()` from your own gesture to opt out. Desktop mode precedence is CLI (`--windowed`, `--maximized`, `--fullscreen`) over `display.fullscreen` over `window.maximized`; with both false, `window.width`/`height` size the normal window.
62
+ Scenes use `load`, `enter`, `update`, `exit`, `render`; physics nodes are Godot-named and disposable. The fixed step is the snow's clock: deposition, footsteps and contacts never read the frame rate.
63
+ `input.vector("move").y` is +up and means forward; `Snow.ts` turns it into a camera-relative direction.
64
+ Rigged assets: put a `.glb` in `assets/`, await `ctx.assets.model("hero.glb")` in `Scene.load()`, then drive `AnimationPlayer` beside its entity. `ctx.goto(name)` rebuilds without resetting game
65
+ state; from a frame function `goto` and then `return`; `ctx.state.set({ /* copy this game's initial-state shape */ })`
66
+ is a partial patch. `game.goto("<scene-name>")` also rebuilds the scene, but it resets the game's
67
+ state. Seeded randomness is deterministic only when `defineGame({ seed })` is configured.
68
+
69
+ `src/render/quality.ts` owns `low`, `medium`, `high`; `isMobile()` chooses `low`, otherwise `high`; override with `setupPost(..., { tier: "low" })`. Unknown tiers throw and `TN_QUALITY_TIER` reports
70
+ the source. The bridge flushes about 100 ms; keep readouts in state and frame feedback in Three.js.
71
+
72
+ When an animation looks wrong, measure it before rewriting it. `clipPoseError` scores a
73
+ retargeted clip against its source per bone in degrees — whole quaternions relative to each rig's
74
+ own bind pose, so the two rigs' bind conventions cancel and a limb rolled about its own axis is
75
+ caught where a bone-direction check reads zero. `clipTrackBindings` names tracks that bind nothing
76
+ (the `<bone>.undefined` failure that plays the bind pose instead of the animation),
77
+ `clipBoneCoverage` names bones the clip does not drive and which therefore keep the previous
78
+ clip's pose, and `boneContact` reports in metres whether a named bone reaches the prop it is
79
+ supposed to be touching. Two loading conventions come from `@threenative/core`, not from your own loops: `loadAll(items, load)` fetches six at a time and returns results **in the input's order** (a pool that pushes returns completion order, so a positional pick lands a different asset every load), and `addInSlices(objects, (object) => ctx.add(object))` attaches 256 per presented frame so hundreds of objects never land in one long frame; override `concurrency`/`sliceSize`, pass `while: () => alive` to stop a torn-down scene without throwing, and `marker: false` silences `TN_LOAD_ALL`/`TN_ADD_SLICES` but never the measurement.
80
+ ## Budget real time for the look
81
+
82
+ Reference-driven authoring starts at `node_modules/create-threenative/agent-docs/references/dream-loop.md`.
83
+
84
+ Open a capture after visual changes. A scenario with no assertions or missing observations fails. The engine warns you before a human does: `TN_SCENE_WARNING` fires when the GPU used under a third of the frame while the JS render phase ran longer than the display's own period, and names the census behind it — objects considered, draws per pass, triangles per draw, shadow-exempt casters. It is a scene-shape verdict, so answer it by moving the draw and object counts, not the engine: read the bucket census before promising a merge. `npx threenative doctor` repeats the last verdict and the `DEV_MODE=true` chip shows it beside the frame rate; `TN_FRAME_SPANS=1` adds the render phase's own span tree when you need to know which part costs the milliseconds. The cheapest static object is one whose transform you never write: measured on 1,561 objects, leaving them alone costs 10.10 ms of render phase against 17.45 ms when the game rewrites every transform each frame, because three skips the per-object binding update when nothing changed. So do not touch a transform you do not need to — that is worth ~7 ms where `markStatic(root)`, which additionally composes a never-moving subtree once, measured 0.009 ms. Use it for scenery you are sure of, and `invalidateStatic(object)` to announce a write inside one; it deletes matrix arithmetic, not the walk. `TN_RENDERLIST_VALIDATE=1` recomputes every world matrix the long way each frame and throws on the first that disagrees, which is how you prove a freeze did not leave something stale on screen.
85
+
86
+ Recipes in the installed create-threenative: `node_modules/create-threenative/agent-docs/references/assertion-reference.md`, `node_modules/create-threenative/agent-docs/references/build-profiles.md`, `node_modules/create-threenative/agent-docs/references/capability-reference.md`, `node_modules/create-threenative/agent-docs/references/capture-the-frame.md`, `node_modules/create-threenative/agent-docs/references/creating-creatures.md`, `node_modules/create-threenative/agent-docs/references/ctx-cookbook.md`, `node_modules/create-threenative/agent-docs/references/debug-surface.md`, `node_modules/create-threenative/agent-docs/references/finding-assets.md`, `node_modules/create-threenative/agent-docs/references/gameplay-recipes.md`, `node_modules/create-threenative/agent-docs/references/menu-screens.md`, `node_modules/create-threenative/agent-docs/references/mobile-memory-budget.md`, `node_modules/create-threenative/agent-docs/references/performance-basics.md`, `node_modules/create-threenative/agent-docs/references/rigging-characters.md`, `node_modules/create-threenative/agent-docs/references/sculpt-from-a-reference.md`, `node_modules/create-threenative/agent-docs/references/trace-a-slow-frame.md`, `node_modules/create-threenative/agent-docs/references/visual-baseline.md`, and `node_modules/create-threenative/agent-docs/references/webview-ui.md`.
87
+ ## Optional multiplayer transport
88
+ For online play only, import `connect` from `@threenative/core/net` with an HTTPS URL and nonempty identity credential; configure `connectTimeoutMs`, `maxReliableMessageBytes`, `maxQueuedReliableBytes`, and `maxQueuedDatagrams` (10s/65,536/1 MiB/256), use `reliable-ordered` for ordered reliable messages and bounded `unreliable` datagrams that may drop, and keep serialization, replication, prediction, interpolation, snapshots and rejoin in this game's `src/` and server. There is no fallback: unsupported WebTransport/native rejects with `TN_NET_UNAVAILABLE`; reference Go server: `packages/runtime-native/examples/webtransport/server`.
@@ -0,0 +1,90 @@
1
+ <!-- Generated mirror of AGENTS.md. Do not edit; edit AGENTS.md. -->
2
+
3
+ # AGENTS.md — __PROJECT_NAME__ snow
4
+
5
+ Instructions for the AI agent in this game. `CLAUDE.md` mirrors this file; edit `AGENTS.md`.
6
+
7
+ ## Ownership
8
+
9
+ ThreeNative owns bootstrap, renderer, fixed-step loop, input, loading, physics bindings, and the state bridge. This repository owns the explorer, the boot print, the glade, the weather, the HUD and the
10
+ look; `src/game.ts` is portable and React mounts from `src/main.ts`. The render camera also skips an object that projects under **0.5 px** in it; `renderer.minimumProjectedPixels` raises that threshold (`false` disables the cut, not the count) and `alwaysRender(object)` exempts an object, while camera-attached objects and shadow casters are kept. The engine also owns the per-frame world-matrix walk, and by default it does not descend into a hidden subtree — so a game that reads a hidden object's `matrixWorld` directly must use `getWorldPosition` (or call `object.updateWorldMatrix(true, false)`) first; `renderer.matrixWorld: "all"` restores three's every-node walk, and `TN_PROJECTION` reports the visited-node count either way.
11
+
12
+ ## Start every change
13
+
14
+ 1. **Critical planning gate:** invoke `threenative-capabilities` before `prd-creator`. Search
15
+ `engine_search_capabilities` for the full request and each concrete mechanic, inspect relevant
16
+ matches with `engine_capability_detail`, and record a capability or no-match for the plan. Apply the `ponytail` ladder before writing code; never hand-write what the capability search already installs.
17
+ 2. Then invoke `prd-creator`. Draft the plan around those capabilities and binding constraints,
18
+ direct the user to review it, and wait for explicit approval plus an instruction to implement it.
19
+ 3. Treat returned constraints as binding. This kit needs no navmesh and imports none, so it runs
20
+ on every target; adding `@threenative/physics/navigation` would make it web and desktop only.
21
+ 4. If a build, import, device, or blank frame fails, run `npx threenative doctor` and
22
+ `npx @threenative/playtest doctor`; missing observations are not zero.
23
+ For *"a bullet passes through a wall"*, `RigidBody3D` defaults to continuous collision; `continuousCollision` is the named per-body override, and `body.continuousCollision` reports the effective setting on web/native.
24
+
25
+ ## When the framework blocks you, write plain Three.js
26
+
27
+ When an `@threenative/*` API is broken, missing, or does not do what you need, replace only that
28
+ piece with portable Three.js/plain code. Keep the loop, scenes, input, registry, and playtest
29
+ bridge; avoid DOM globals, dynamic `import()`, and raw physics handles. **Report what blocked you**
30
+ (API, expectation, result, replacement); never stall the game.
31
+
32
+ ## Workflow skills
33
+
34
+ - `.agents/skills/prd-creator/SKILL.md` / `.claude/skills/prd-creator/SKILL.md` — game plan and approval gate.
35
+ - `.agents/skills/threenative-capabilities/SKILL.md` / `.claude/skills/threenative-capabilities/SKILL.md` — capability search.
36
+ - `.agents/skills/threenative-playtest/SKILL.md` / `.claude/skills/threenative-playtest/SKILL.md` — diagnosis and proof.
37
+ - `.agents/skills/threenative-assets/SKILL.md` / `.claude/skills/threenative-assets/SKILL.md` — assets and sculpting.
38
+ - `.agents/skills/threenative-visuals/SKILL.md` / `.claude/skills/threenative-visuals/SKILL.md` — captures and look.
39
+ - `.agents/skills/threenative-performance/SKILL.md` / `.claude/skills/threenative-performance/SKILL.md` — measured budgets.
40
+ - `.agents/skills/threenative-ui/SKILL.md` / `.claude/skills/threenative-ui/SKILL.md` — native-safe UI.
41
+ - `.agents/skills/threenative-context/SKILL.md` / `.claude/skills/threenative-context/SKILL.md` — portable ctx APIs.
42
+ - Confirmed framework bugs: use `file-engine-bug` in `.agents/skills/` or `.claude/skills/` after a minimal repro. A game-side `patches/` fix is temporary: once it is settled, it moves into the engine in one PR. Lazy-first: `.agents/skills/ponytail/SKILL.md` / `.claude/skills/ponytail/SKILL.md` — smallest correct change, and its reuse rung is the capability search above.
43
+
44
+ ## Commands and map
45
+
46
+ ```sh
47
+ pnpm dev
48
+ pnpm build
49
+ pnpm test
50
+ pnpm test:native
51
+ ```
52
+
53
+ The snow is one `SnowField` (`@threenative/core/world`) over one `Heightfield` built in `src/terrain.ts`: indentation, bank, compaction and disturbance composed into the canonical surface that queries, the drawn mesh and the collider all read. Never keep a second height grid.
54
+ `attachSnowPhysics` (`@threenative/physics`) owns the snow collider: each fixed step it reads the solver's contacts for the ball, crate and log, presses each body's own shape with its solved load, and installs the changed surface before the next step. Call `step` from `afterPhysics`, once; `observe()` reports `colliderError` and `loadProvenance` (load is a solver estimate). A kinematic `CharacterBody3D` makes no contact load, so `src/entities/Explorer.ts` plants `src/render/bootPrint.ts` itself with `snow.stamp`, only while `grounded`. Its capsule stands on a coarse walk surface (`walkSurface` in `src/terrain.ts`), not the 6 cm snow collider: Rapier sweeps a character against every triangle under it, which cost ~0.9 ms a step there.
55
+
56
+ Look lives in `src/render/`: `snowSurface.ts` (TSL material, compaction view, redraws `takeDirtyRegion`), `weather.ts` (`GPUParticles3D` snowfall and powder), `explorer.ts`, `scenery.ts`, `props.ts`. Tune response with `depth`/`hardness` and the refill in `src/scenes/Snow.ts`. The React HUD reads `GameState` and sends intents; `src/commands.ts` routes panel verbs into the same functions as the keys. Keep `playtests/survives.playtest.json` as smoke proof and `playtests/snow-physics.playtest.json` honest: it proves drop, settle and rolling track.
57
+ On a touch-primary device (`isMobile() && isTouchscreenAvailable()`), `src/render/touch-controls.ts` adds a left movement stick; keyboard is the desktop fallback.
58
+
59
+ ## Portable authoring contracts
60
+
61
+ Leave `assets` absent: the cook selects target-decodable passes, with `models.sharedImages: true` deduplicating images. `sharedImages: false` embeds duplicate copies; `models.compact` (default `{ flatten: true, join: true, instance: true }`) flattens the scene graph, merges primitives by material and batches a mesh shared by several nodes as `EXT_mesh_gpu_instancing` — all lossless, keeping any node matching `protectedPattern` (or named in `protectedNames`), an animation target, or a skin joint individually addressable; `compact: false` ships the scene graph as authored. `models: "none"` / `textures: "none"` / `audio: "none"` skip those passes and report uncooked bytes. Android/iOS currently skip compression and model dedupe. `assets.exclude` defaults to `[]`; source-relative globs (for example `["unused/**"]`) omit matching files and report saved bytes. `assets.budget` accepts `{ uncooked?: number | "none", total?: number | "none" }`, default `{ uncooked: 64_000_000, total: "none" }`: only bytes left uncooked where cooking was possible count toward `uncooked`. A number sets that ceiling; `"none"` disables both gates. Either disabled gate still reports bytes. Automatic texture cooking retains unaligned source images unchanged and reports `block-size`; those bytes still count toward the uncooked budget. An explicit compression codec override must satisfy four-pixel block alignment; `codec: "none"` opts out. Cooking never silently resizes an image to fix alignment.
62
+
63
+ Relative look capture: a binding with `pointerRelative: true` captures the canvas on click by default; set `captureOnClick: false` and call `ctx.input.captureMouse()` from your own gesture to opt out. Desktop mode precedence is CLI (`--windowed`, `--maximized`, `--fullscreen`) over `display.fullscreen` over `window.maximized`; with both false, `window.width`/`height` size the normal window.
64
+ Scenes use `load`, `enter`, `update`, `exit`, `render`; physics nodes are Godot-named and disposable. The fixed step is the snow's clock: deposition, footsteps and contacts never read the frame rate.
65
+ `input.vector("move").y` is +up and means forward; `Snow.ts` turns it into a camera-relative direction.
66
+ Rigged assets: put a `.glb` in `assets/`, await `ctx.assets.model("hero.glb")` in `Scene.load()`, then drive `AnimationPlayer` beside its entity. `ctx.goto(name)` rebuilds without resetting game
67
+ state; from a frame function `goto` and then `return`; `ctx.state.set({ /* copy this game's initial-state shape */ })`
68
+ is a partial patch. `game.goto("<scene-name>")` also rebuilds the scene, but it resets the game's
69
+ state. Seeded randomness is deterministic only when `defineGame({ seed })` is configured.
70
+
71
+ `src/render/quality.ts` owns `low`, `medium`, `high`; `isMobile()` chooses `low`, otherwise `high`; override with `setupPost(..., { tier: "low" })`. Unknown tiers throw and `TN_QUALITY_TIER` reports
72
+ the source. The bridge flushes about 100 ms; keep readouts in state and frame feedback in Three.js.
73
+
74
+ When an animation looks wrong, measure it before rewriting it. `clipPoseError` scores a
75
+ retargeted clip against its source per bone in degrees — whole quaternions relative to each rig's
76
+ own bind pose, so the two rigs' bind conventions cancel and a limb rolled about its own axis is
77
+ caught where a bone-direction check reads zero. `clipTrackBindings` names tracks that bind nothing
78
+ (the `<bone>.undefined` failure that plays the bind pose instead of the animation),
79
+ `clipBoneCoverage` names bones the clip does not drive and which therefore keep the previous
80
+ clip's pose, and `boneContact` reports in metres whether a named bone reaches the prop it is
81
+ supposed to be touching. Two loading conventions come from `@threenative/core`, not from your own loops: `loadAll(items, load)` fetches six at a time and returns results **in the input's order** (a pool that pushes returns completion order, so a positional pick lands a different asset every load), and `addInSlices(objects, (object) => ctx.add(object))` attaches 256 per presented frame so hundreds of objects never land in one long frame; override `concurrency`/`sliceSize`, pass `while: () => alive` to stop a torn-down scene without throwing, and `marker: false` silences `TN_LOAD_ALL`/`TN_ADD_SLICES` but never the measurement.
82
+ ## Budget real time for the look
83
+
84
+ Reference-driven authoring starts at `node_modules/create-threenative/agent-docs/references/dream-loop.md`.
85
+
86
+ Open a capture after visual changes. A scenario with no assertions or missing observations fails. The engine warns you before a human does: `TN_SCENE_WARNING` fires when the GPU used under a third of the frame while the JS render phase ran longer than the display's own period, and names the census behind it — objects considered, draws per pass, triangles per draw, shadow-exempt casters. It is a scene-shape verdict, so answer it by moving the draw and object counts, not the engine: read the bucket census before promising a merge. `npx threenative doctor` repeats the last verdict and the `DEV_MODE=true` chip shows it beside the frame rate; `TN_FRAME_SPANS=1` adds the render phase's own span tree when you need to know which part costs the milliseconds. The cheapest static object is one whose transform you never write: measured on 1,561 objects, leaving them alone costs 10.10 ms of render phase against 17.45 ms when the game rewrites every transform each frame, because three skips the per-object binding update when nothing changed. So do not touch a transform you do not need to — that is worth ~7 ms where `markStatic(root)`, which additionally composes a never-moving subtree once, measured 0.009 ms. Use it for scenery you are sure of, and `invalidateStatic(object)` to announce a write inside one; it deletes matrix arithmetic, not the walk. `TN_RENDERLIST_VALIDATE=1` recomputes every world matrix the long way each frame and throws on the first that disagrees, which is how you prove a freeze did not leave something stale on screen.
87
+
88
+ Recipes in the installed create-threenative: `node_modules/create-threenative/agent-docs/references/assertion-reference.md`, `node_modules/create-threenative/agent-docs/references/build-profiles.md`, `node_modules/create-threenative/agent-docs/references/capability-reference.md`, `node_modules/create-threenative/agent-docs/references/capture-the-frame.md`, `node_modules/create-threenative/agent-docs/references/creating-creatures.md`, `node_modules/create-threenative/agent-docs/references/ctx-cookbook.md`, `node_modules/create-threenative/agent-docs/references/debug-surface.md`, `node_modules/create-threenative/agent-docs/references/finding-assets.md`, `node_modules/create-threenative/agent-docs/references/gameplay-recipes.md`, `node_modules/create-threenative/agent-docs/references/menu-screens.md`, `node_modules/create-threenative/agent-docs/references/mobile-memory-budget.md`, `node_modules/create-threenative/agent-docs/references/performance-basics.md`, `node_modules/create-threenative/agent-docs/references/rigging-characters.md`, `node_modules/create-threenative/agent-docs/references/sculpt-from-a-reference.md`, `node_modules/create-threenative/agent-docs/references/trace-a-slow-frame.md`, `node_modules/create-threenative/agent-docs/references/visual-baseline.md`, and `node_modules/create-threenative/agent-docs/references/webview-ui.md`.
89
+ ## Optional multiplayer transport
90
+ For online play only, import `connect` from `@threenative/core/net` with an HTTPS URL and nonempty identity credential; configure `connectTimeoutMs`, `maxReliableMessageBytes`, `maxQueuedReliableBytes`, and `maxQueuedDatagrams` (10s/65,536/1 MiB/256), use `reliable-ordered` for ordered reliable messages and bounded `unreliable` datagrams that may drop, and keep serialization, replication, prediction, interpolation, snapshots and rejoin in this game's `src/` and server. There is no fallback: unsupported WebTransport/native rejects with `TN_NET_UNAVAILABLE`; reference Go server: `packages/runtime-native/examples/webtransport/server`.
@@ -0,0 +1,26 @@
1
+ # Snow glade starter
2
+
3
+ A small winter glade where the snow remembers. The explorer leaves boot prints that sink with
4
+ their weight; a ball dropped into the powder settles into the crater it makes, and pushed, it rolls
5
+ and carves a connected track. A crate and a fallen log press their own shapes. Switch on the
6
+ blizzard and fresh snow slowly fills every track.
7
+
8
+ `SnowField` stores the deformation and `attachSnowPhysics` connects it to real Rapier contacts, so
9
+ the ball rests on the same surface you see. Everything that decides how it looks — the snow
10
+ material, the boot, the explorer, the forest, the flakes — is ordinary source in `src/render/`.
11
+
12
+ Controls: WASD or the arrow keys to walk (Shift to run), drag to orbit and scroll to zoom; `F` drops
13
+ the ball and `G` pushes it; `B` blizzard, `C` camera view, `V` compaction view, `P` auto-explore,
14
+ `R` clears every footprint, `M` sound. On a touch screen, drag the left stick.
15
+
16
+ The crunch and wind clips in `assets/` are generated noise; replace either with a recording.
17
+
18
+ ## Commands
19
+
20
+ ```sh
21
+ pnpm dev
22
+ pnpm build
23
+ pnpm typecheck
24
+ pnpm test
25
+ pnpm test:native
26
+ ```
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>__PROJECT_NAME__</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.ts"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "snow",
3
+ "title": "Snow glade",
4
+ "blurb": "Deformable snow that remembers every footstep, a ball that carves its own track, and weather you can turn into a blizzard.",
5
+ "genre": "snow",
6
+ "kit": true
7
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "name": "snow-physics-native",
3
+ "schemaVersion": 1,
4
+ "target": "desktop",
5
+ "viewport": {
6
+ "width": 1280,
7
+ "height": 720
8
+ },
9
+ "warmupFrames": 40,
10
+ "subject": "player",
11
+ "steps": [
12
+ {
13
+ "kind": "wait",
14
+ "label": "boot",
15
+ "waitTicks": 20,
16
+ "release": true
17
+ },
18
+ {
19
+ "kind": "input",
20
+ "label": "hands-off",
21
+ "press": "KeyP",
22
+ "holdTicks": 2,
23
+ "release": true
24
+ },
25
+ {
26
+ "kind": "wait",
27
+ "label": "standing",
28
+ "waitTicks": 30,
29
+ "release": true
30
+ },
31
+ {
32
+ "kind": "input",
33
+ "label": "drop",
34
+ "press": "KeyF",
35
+ "holdTicks": 1,
36
+ "release": true
37
+ },
38
+ {
39
+ "kind": "wait",
40
+ "label": "falling",
41
+ "waitTicks": 10,
42
+ "release": true
43
+ },
44
+ {
45
+ "kind": "wait",
46
+ "label": "settled",
47
+ "waitTicks": 240,
48
+ "release": true
49
+ },
50
+ {
51
+ "kind": "input",
52
+ "label": "push",
53
+ "press": "KeyG",
54
+ "holdTicks": 1,
55
+ "release": true
56
+ },
57
+ {
58
+ "kind": "wait",
59
+ "label": "rolled",
60
+ "waitTicks": 200,
61
+ "release": true
62
+ }
63
+ ],
64
+ "assert": {
65
+ "components": [
66
+ {
67
+ "entity": "ball",
68
+ "component": "airborne",
69
+ "atSteps": [
70
+ {
71
+ "label": "falling",
72
+ "equals": true
73
+ },
74
+ {
75
+ "label": "settled",
76
+ "equals": false
77
+ }
78
+ ],
79
+ "allowTrivial": "The drop must start in the air and end on the snow: a ball that never leaves the surface proves nothing about airborne contacts."
80
+ },
81
+ {
82
+ "entity": "ball",
83
+ "component": "settled",
84
+ "atSteps": [
85
+ {
86
+ "label": "settled",
87
+ "equals": true
88
+ }
89
+ ],
90
+ "allowTrivial": "Settled means the solved sphere's underside sits within 0.02 m of the surface it pressed, and that surface is at least 2 cm below fresh powder."
91
+ },
92
+ {
93
+ "entity": "ball",
94
+ "component": "airborneLoads",
95
+ "equals": 0,
96
+ "allowTrivial": "No load may reach the snow while the ball is more than 5 cm above it; a contact read off an airborne body is a phantom."
97
+ },
98
+ {
99
+ "entity": "ball",
100
+ "component": "reach",
101
+ "gte": 0.5,
102
+ "allowTrivial": "The push must carry the solved body half a metre or more through fresh powder; how far depends on the slope it was pushed up, so this is a floor, not a distance."
103
+ },
104
+ {
105
+ "entity": "ball",
106
+ "component": "rollRatio",
107
+ "gte": 0.6,
108
+ "lte": 1.6,
109
+ "allowTrivial": "Turn times radius over the ground covered: a rolling ball reads near 1 (a ball carving its own trench can over-spin as it slows), a sliding or copied transform reads near 0."
110
+ },
111
+ {
112
+ "entity": "ball",
113
+ "component": "trackGaps",
114
+ "equals": 0,
115
+ "allowTrivial": "Every recorded point of the ball's path must sit in pressed snow: the track is connected, not a row of holes."
116
+ },
117
+ {
118
+ "entity": "ball",
119
+ "component": "trackSamples",
120
+ "gte": 5,
121
+ "allowTrivial": "The connected-track check needs a path to check: five or more points ten centimetres apart."
122
+ },
123
+ {
124
+ "entity": "snow",
125
+ "component": "colliderError",
126
+ "lte": 0.001,
127
+ "allowTrivial": "The collider the next step uses is the canonical surface within a millimetre."
128
+ },
129
+ {
130
+ "entity": "snow",
131
+ "component": "renderError",
132
+ "lte": 0.001,
133
+ "allowTrivial": "The drawn snow is the canonical surface within a millimetre."
134
+ },
135
+ {
136
+ "entity": "snow",
137
+ "component": "loadProvenance",
138
+ "equals": "solver-impulse-per-step",
139
+ "allowTrivial": "Snow load is a solver estimate and must say so."
140
+ },
141
+ {
142
+ "entity": "snow",
143
+ "component": "version",
144
+ "gte": 2,
145
+ "changed": true,
146
+ "allowTrivial": "The surface must actually change during the run."
147
+ }
148
+ ]
149
+ }
150
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "native-snow-smoke",
3
+ "target": "desktop",
4
+ "schemaVersion": 1,
5
+ "viewport": {
6
+ "width": 1280,
7
+ "height": 720
8
+ },
9
+ "warmupFrames": 10,
10
+ "subject": "player",
11
+ "steps": [
12
+ {
13
+ "kind": "input",
14
+ "label": "hands-off",
15
+ "press": "KeyP",
16
+ "holdTicks": 2,
17
+ "release": true
18
+ },
19
+ {
20
+ "kind": "input",
21
+ "label": "walk",
22
+ "press": "ArrowUp",
23
+ "holdTicks": 120,
24
+ "release": true
25
+ },
26
+ {
27
+ "kind": "wait",
28
+ "label": "observe-movement",
29
+ "waitTicks": 10,
30
+ "release": true
31
+ }
32
+ ],
33
+ "assert": {
34
+ "movement": {
35
+ "entity": "player",
36
+ "minDistance": 1
37
+ },
38
+ "components": [
39
+ {
40
+ "entity": "player",
41
+ "component": "steps",
42
+ "gte": 2,
43
+ "allowTrivial": "The explorer plants boots in the snow on the native host too."
44
+ }
45
+ ]
46
+ }
47
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "mcp": {
4
+ "threenative-assets": {
5
+ "type": "local",
6
+ "command": [
7
+ "node",
8
+ "./node_modules/@threenative/core/mcp/assets.mjs"
9
+ ],
10
+ "enabled": true,
11
+ "environment": {
12
+ "ASSET_DOWNLOAD_DIR": "./public/assets",
13
+ "AUDIO_DOWNLOAD_DIR": "./public/audio"
14
+ }
15
+ },
16
+ "threenative-sculpt": {
17
+ "type": "local",
18
+ "command": [
19
+ "node",
20
+ "./node_modules/@threenative/core/mcp/sculpt.mjs"
21
+ ],
22
+ "enabled": true
23
+ },
24
+ "threenative-engine": {
25
+ "type": "local",
26
+ "command": [
27
+ "node",
28
+ "./node_modules/@threenative/core/mcp/engine.mjs"
29
+ ],
30
+ "enabled": true
31
+ },
32
+ "threenative-blender": {
33
+ "type": "local",
34
+ "command": [
35
+ "node",
36
+ "./node_modules/@threenative/core/mcp/blender.mjs"
37
+ ],
38
+ "enabled": true
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "__PROJECT_NAME__",
3
+ "private": true,
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "threenative build",
9
+ "build:web": "threenative build --target web",
10
+ "build:desktop": "threenative build --target desktop",
11
+ "build:android": "threenative build --target android",
12
+ "build:ios": "threenative build --target ios",
13
+ "test:native": "pnpm build:desktop && threenative-playtest --scenario native-playtests/snow-physics.playtest.json --scenario native-playtests/survives.playtest.json --target desktop --executable dist-native/__PROJECT_NAME__",
14
+ "pretest": "playwright install chromium",
15
+ "test": "pnpm build:web && threenative-playtest --scenario \"playtests/*.playtest.json\" --browser-recipe webgpu --headed --server-command \"pnpm exec vite preview --host 127.0.0.1 --port $PORT --strictPort\"",
16
+ "typecheck": "tsc --noEmit -p tsconfig.json"
17
+ },
18
+ "dependencies": {
19
+ "@threenative/core": "0.3.4",
20
+ "@threenative/physics": "0.3.4",
21
+ "@threenative/ui": "0.3.4",
22
+ "react": "19.2.0",
23
+ "react-dom": "19.2.0",
24
+ "react-reconciler": "0.33.0",
25
+ "three": "0.185.1"
26
+ },
27
+ "devDependencies": {
28
+ "@tailwindcss/vite": "4.3.3",
29
+ "@threenative/assets": "0.3.5",
30
+ "@threenative/playtest": "0.3.4",
31
+ "@types/react": "19.2.0",
32
+ "@types/react-dom": "19.2.0",
33
+ "@types/three": "0.185.3",
34
+ "@vitejs/plugin-react": "6.0.5",
35
+ "create-threenative": "0.2.8",
36
+ "esbuild": "0.27.0",
37
+ "playwright": "1.62.1",
38
+ "tailwindcss": "4.3.3",
39
+ "typescript": "5.9.3",
40
+ "vite": "8.2.0",
41
+ "@gltf-transform/cli": "4.4.2"
42
+ },
43
+ "optionalDependencies": {
44
+ "@threenative/runtime-native": "0.3.4"
45
+ },
46
+ "overrides": {
47
+ "sharp": ">=0.35.4"
48
+ },
49
+ "pnpm": {
50
+ "overrides": {
51
+ "sharp": ">=0.35.4"
52
+ },
53
+ "onlyBuiltDependencies": ["@threenative/core", "@threenative/runtime-native"],
54
+ "patchedDependencies": {
55
+ "three@0.185.1": "patches/three@0.185.1.patch"
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "snow-footsteps",
3
+ "schemaVersion": 1,
4
+ "target": "web",
5
+ "viewport": {
6
+ "width": 1280,
7
+ "height": 720
8
+ },
9
+ "warmupFrames": 20,
10
+ "subject": "player",
11
+ "steps": [
12
+ {
13
+ "kind": "input",
14
+ "label": "hands-off",
15
+ "press": "KeyP",
16
+ "holdTicks": 2,
17
+ "release": true
18
+ },
19
+ {
20
+ "kind": "input",
21
+ "label": "walk",
22
+ "press": "ArrowUp",
23
+ "holdTicks": 150,
24
+ "release": true
25
+ },
26
+ {
27
+ "kind": "wait",
28
+ "label": "settle",
29
+ "waitTicks": 30,
30
+ "release": true
31
+ }
32
+ ],
33
+ "assert": {
34
+ "diagnostics": {
35
+ "noConsoleErrors": true,
36
+ "noNetworkErrors": true,
37
+ "noRuntimeDiagnostics": true,
38
+ "runtimeReady": true
39
+ },
40
+ "movement": {
41
+ "entity": "player",
42
+ "minDistance": 1.2
43
+ },
44
+ "components": [
45
+ {
46
+ "entity": "player",
47
+ "component": "steps",
48
+ "gte": 3,
49
+ "allowTrivial": "Only a grounded body plants a boot that presses snow; three prints prove the walk cycle reaches the snow."
50
+ },
51
+ {
52
+ "entity": "player",
53
+ "component": "grounded",
54
+ "equals": true,
55
+ "allowTrivial": "The explorer ends standing on the snow it walked over."
56
+ },
57
+ {
58
+ "entity": "snow",
59
+ "component": "renderError",
60
+ "lte": 0.001,
61
+ "allowTrivial": "The drawn snow is the canonical surface within a millimetre after the walk."
62
+ },
63
+ {
64
+ "entity": "snow",
65
+ "component": "colliderError",
66
+ "lte": 0.001,
67
+ "allowTrivial": "The collider is the canonical surface within a millimetre after the walk."
68
+ }
69
+ ],
70
+ "resources": [
71
+ {
72
+ "id": "state",
73
+ "path": "lastSink",
74
+ "gte": 0.02,
75
+ "allowTrivial": "A planted boot in 28 cm of powder sinks at least 2 cm."
76
+ },
77
+ {
78
+ "id": "state",
79
+ "path": "contacts",
80
+ "changed": true
81
+ }
82
+ ],
83
+ "visual": [
84
+ {
85
+ "region": {
86
+ "x": 0,
87
+ "y": 0,
88
+ "width": 1280,
89
+ "height": 720,
90
+ "minNonblankPixelRatio": 0.01
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ }