threedog 1.1.0 → 1.2.0

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 (363) hide show
  1. package/CHANGELOG.md +879 -798
  2. package/README.md +1 -1
  3. package/core/assets/Animator.js +41 -3
  4. package/core/assets/Assets.js +100 -24
  5. package/core/assets/assetEntry.js +73 -20
  6. package/core/assets/assetHot.js +68 -16
  7. package/core/assets/assetLoad.js +6 -6
  8. package/core/assets/assetLod.js +9 -2
  9. package/core/assets/assetManifest.js +12 -2
  10. package/core/assets/assetPart.js +54 -0
  11. package/core/assets/ik.js +271 -0
  12. package/core/assets/modelNeeds.js +37 -0
  13. package/core/assets/namedModel.js +102 -29
  14. package/core/assets/nodeVisibility.js +15 -0
  15. package/core/audio/Audio.js +36 -4
  16. package/core/audio/audioReverb.js +99 -0
  17. package/core/audio/audioRules.js +1 -1
  18. package/core/audio/audioVoice.js +1 -1
  19. package/core/base/Events.js +14 -4
  20. package/core/base/Random.js +1 -1
  21. package/core/base/Vars.js +1 -1
  22. package/core/base/docRef.js +51 -0
  23. package/core/base/errorCodes.js +178 -126
  24. package/core/base/errorHints.js +9 -7
  25. package/core/base/errors.js +25 -10
  26. package/core/base/events.generated.js +2 -0
  27. package/core/base/freeParts.js +76 -0
  28. package/core/base/math.js +28 -0
  29. package/core/base/sections.js +5 -5
  30. package/core/base/validate.js +31 -3
  31. package/core/engine/Engine.js +16 -6
  32. package/core/engine/Loading.js +5 -3
  33. package/core/engine/copies.js +1 -1
  34. package/core/engine/headlessLoad.js +4 -1
  35. package/core/engine/lifecycle.js +32 -16
  36. package/core/engine/loop.js +71 -27
  37. package/core/engine/moduleSlots.js +2 -2
  38. package/core/engine/moduleTypes.js +3 -3
  39. package/core/engine/modules.js +65 -39
  40. package/core/engine/page.js +6 -3
  41. package/core/engine/services.js +6 -5
  42. package/core/engine/startup.js +5 -5
  43. package/core/input/Input.js +28 -14
  44. package/core/input/inputContext.js +28 -16
  45. package/core/input/inputKeyboard.js +31 -3
  46. package/core/input/inputPad.js +4 -0
  47. package/core/input/inputPointer.js +2 -1
  48. package/core/input/inputSeat.js +1 -1
  49. package/core/inspect/Budget.js +109 -19
  50. package/core/inspect/DebugOverrides.js +28 -4
  51. package/core/inspect/Describe.js +17 -9
  52. package/core/inspect/Inspect.js +4 -2
  53. package/core/inspect/InspectMaterials.js +3 -1
  54. package/core/inspect/InspectPerf.js +19 -9
  55. package/core/inspect/InspectScene.js +32 -7
  56. package/core/inspect/MaterialInfo.js +19 -2
  57. package/core/inspect/UrlState.js +46 -27
  58. package/core/inspect/catalog.js +28 -9
  59. package/core/inspect/debugView.js +2 -1
  60. package/core/inspect/describeRender.js +25 -13
  61. package/core/inspect/describeText.js +14 -6
  62. package/core/inspect/lightWatch.js +1 -1
  63. package/core/inspect/metadata.generated.js +35 -17
  64. package/core/inspect/pictureChecks.js +148 -0
  65. package/core/inspect/pictureMenu.js +84 -0
  66. package/core/inspect/pictureWriters.js +26 -6
  67. package/core/inspect/textureBytes.js +12 -2
  68. package/core/inspect/toolDoor.js +2 -4
  69. package/core/ops/Ops.js +11 -4
  70. package/core/ops/holds.js +27 -10
  71. package/core/ops/opsAtomic.js +15 -7
  72. package/core/ops/opsGuard.js +2 -2
  73. package/core/ops/opsRun.js +8 -7
  74. package/core/ops/sharedPoint.js +72 -21
  75. package/core/ops/stacks.js +56 -16
  76. package/core/saves/SaveStore.js +9 -3
  77. package/core/saves/Saves.js +32 -23
  78. package/core/saves/saveApply.js +96 -44
  79. package/core/saves/saveIds.js +1 -1
  80. package/core/saves/saveVersions.js +7 -5
  81. package/core/saves/session.js +17 -8
  82. package/core/saves/stateReplace.js +34 -15
  83. package/core/scene/Rays.js +52 -10
  84. package/core/scene/Views.js +13 -7
  85. package/core/scene/adaptive.js +144 -21
  86. package/core/scene/drawOnly.js +17 -0
  87. package/core/scene/gameLights.js +44 -3
  88. package/core/scene/sceneMethods.js +13 -11
  89. package/core/scene/stepPoses.js +11 -3
  90. package/core/scene/targeting.js +5 -3
  91. package/core/scene/thingOps.js +1 -1
  92. package/core/scene/tier.js +15 -0
  93. package/core/stream/Batching.js +30 -7
  94. package/core/stream/Stream.js +26 -7
  95. package/core/stream/batchGroups.js +2 -2
  96. package/core/stream/chunkStream.js +7 -5
  97. package/core/stream/prepare.js +77 -0
  98. package/core/time/skip.js +3 -1
  99. package/core/time/time.js +4 -2
  100. package/docs/AI.md +82 -83
  101. package/docs/API.md +16 -16
  102. package/docs/CODEMAP.md +16 -11
  103. package/docs/COMMANDS.md +139 -142
  104. package/docs/CONVENTIONS.md +37 -49
  105. package/docs/MIGRATING-0.8.md +2 -2
  106. package/docs/MIGRATING-1.0.md +2 -2
  107. package/docs/THREE.md +28 -35
  108. package/docs/api/assets.md +3 -1
  109. package/docs/api/audio.md +4 -2
  110. package/docs/api/budget.md +5 -0
  111. package/docs/api/characters.md +10 -8
  112. package/docs/api/collision.md +6 -4
  113. package/docs/api/engine.md +16 -16
  114. package/docs/api/events.md +3 -2
  115. package/docs/api/ground.md +6 -5
  116. package/docs/api/hud.md +4 -2
  117. package/docs/api/input.md +5 -5
  118. package/docs/api/particles.md +2 -1
  119. package/docs/api/photo.md +3 -0
  120. package/docs/api/post.md +7 -4
  121. package/docs/api/quests.md +2 -2
  122. package/docs/api/rays.md +1 -2
  123. package/docs/api/saves.md +7 -7
  124. package/docs/api/settings.md +2 -2
  125. package/docs/api/tools.md +3 -1
  126. package/docs/api/vars.md +1 -1
  127. package/docs/api/vegetation.md +4 -2
  128. package/docs/api/world.md +1 -1
  129. package/docs/recipes/01-new-game.md +16 -17
  130. package/docs/recipes/02-npc.md +22 -18
  131. package/docs/recipes/03-items-pickups.md +37 -35
  132. package/docs/recipes/04-quests.md +15 -10
  133. package/docs/recipes/05-props-bake.md +101 -95
  134. package/docs/recipes/06-clock-events.md +28 -28
  135. package/docs/recipes/07-flow-scenes-pause.md +29 -26
  136. package/docs/recipes/08-weather-sky.md +52 -64
  137. package/docs/recipes/09-materials-lights-models.md +26 -17
  138. package/docs/recipes/10-blender-level.md +15 -10
  139. package/docs/recipes/11-vehicles.md +12 -7
  140. package/docs/recipes/12-navmesh.md +44 -26
  141. package/docs/recipes/13-animation.md +56 -45
  142. package/docs/recipes/14-custom-module.md +21 -18
  143. package/docs/recipes/15-perf.md +61 -55
  144. package/docs/recipes/16-dev-bridge.md +23 -33
  145. package/docs/recipes/18-world.md +36 -42
  146. package/docs/recipes/19-shooting-picking.md +20 -15
  147. package/docs/recipes/20-content-actions-save.md +48 -56
  148. package/docs/recipes/21-camera.md +45 -54
  149. package/docs/recipes/22-shop-gold.md +12 -7
  150. package/docs/recipes/23-ops.md +25 -23
  151. package/docs/recipes/26-ui-parts.md +67 -47
  152. package/docs/recipes/27-net.md +12 -7
  153. package/docs/recipes/28-terrain.md +24 -21
  154. package/docs/recipes/29-grid.md +32 -27
  155. package/docs/recipes/30-templates.md +21 -20
  156. package/docs/recipes/31-audio.md +39 -22
  157. package/docs/recipes/32-action-game.md +19 -14
  158. package/docs/recipes/33-stream-sources.md +15 -11
  159. package/docs/recipes/34-environment-lighting.md +126 -70
  160. package/docs/recipes/35-picture-from-reference.md +8 -8
  161. package/docs/recipes/36-ground-plants.md +27 -21
  162. package/docs/recipes/40-scene.md +19 -28
  163. package/docs/recipes/43-shader-patches-surfaces.md +15 -12
  164. package/docs/recipes/44-water-weather-hooks.md +34 -31
  165. package/docs/recipes/45-cascaded-shadows.md +35 -26
  166. package/docs/recipes/46-blender-art-route.md +6 -1
  167. package/docs/recipes/49-game-module-contract.md +13 -8
  168. package/docs/recipes/50-own-renderer.md +6 -2
  169. package/docs/recipes/51-capability-catalog.md +15 -8
  170. package/docs/recipes/52-around-the-picture.md +34 -32
  171. package/docs/recipes/53-ground-up-close.md +6 -1
  172. package/docs/recipes/55-mods-time-wrap.md +27 -19
  173. package/docs/recipes/56-webgpu-tsl.md +74 -43
  174. package/docs/recipes/57-control.md +18 -13
  175. package/docs/recipes/58-input.md +26 -16
  176. package/docs/recipes/59-depth-post-effects.md +8 -3
  177. package/docs/recipes/60-judge-the-picture.md +9 -8
  178. package/docs/recipes/61-deploy.md +5 -0
  179. package/docs/recipes/62-picture-code.md +70 -79
  180. package/docs/recipes/63-third-person-start.md +47 -45
  181. package/docs/recipes/64-particles.md +22 -10
  182. package/docs/recipes/65-swarm.md +18 -13
  183. package/docs/recipes/66-common-tasks.md +38 -35
  184. package/examples/action/GAMEMAP.md +2 -3
  185. package/examples/action/main.js +3 -3
  186. package/examples/action/picture/lights.js +3 -1
  187. package/examples/perf-island/GAMEMAP.md +3 -3
  188. package/examples/perf-island/picture/lights.js +2 -1
  189. package/examples/plain-picture/GAMEMAP.md +1 -1
  190. package/examples/rc2d/GAMEMAP.md +1 -1
  191. package/examples/styletest/GAMEMAP.md +2 -2
  192. package/examples/styletest/main.js +1 -1
  193. package/examples/techniques/interior-light/README.md +3 -3
  194. package/examples/techniques/interior-light/interiorLight.js +2 -4
  195. package/examples/techniques/interior-light/picture/lights.js +2 -1
  196. package/examples/techniques/modular-building/picture/lights.js +3 -1
  197. package/examples/techniques/outlines-and-rim/picture/lights.js +3 -1
  198. package/examples/techniques/procedural-animation/README.md +1 -1
  199. package/examples/techniques/procedural-animation/main.js +1 -1
  200. package/examples/webgpu-tsl/GAMEMAP.md +1 -1
  201. package/examples/world/GAMEMAP.md +2 -3
  202. package/examples/world/art/humanoid.js +1 -1
  203. package/examples/world/main.js +6 -3
  204. package/index.d.ts +2 -2
  205. package/llms.txt +101 -0
  206. package/modules/ambience/Ambience.js +21 -5
  207. package/modules/calendar/index.js +9 -5
  208. package/modules/calendar/schedule.js +23 -8
  209. package/modules/camera/FirstPersonCamera.js +3 -1
  210. package/modules/camera/FollowCamera.js +10 -5
  211. package/modules/camera/RtsCamera.js +4 -3
  212. package/modules/camera/common.js +70 -8
  213. package/modules/camera/contract.js +1 -1
  214. package/modules/characters/Character.js +16 -10
  215. package/modules/characters/NPC.js +31 -19
  216. package/modules/characters/assetModel.js +14 -9
  217. package/modules/characters/astar.js +6 -1
  218. package/modules/characters/contract.js +2 -2
  219. package/modules/characters/index.js +34 -22
  220. package/modules/characters/movers/manual.js +1 -1
  221. package/modules/characters/movers/rapier.js +17 -2
  222. package/modules/characters/movers/simple.js +1 -1
  223. package/modules/characters/movers/support.js +16 -7
  224. package/modules/characters/npcAvoid.js +2 -2
  225. package/modules/characters/npcSim.js +3 -2
  226. package/modules/characters/pathAsync.js +24 -8
  227. package/modules/characters/pathJob.js +1 -1
  228. package/modules/characters/player.js +10 -9
  229. package/modules/characters/playerStrings.js +5 -5
  230. package/modules/characters/proceduralRig.js +5 -5
  231. package/modules/characters/useModel.js +6 -0
  232. package/modules/characters/walkTo.js +1 -1
  233. package/modules/collision/Collision.js +29 -18
  234. package/modules/collision/grid.js +22 -4
  235. package/modules/content/index.js +3 -1
  236. package/modules/content/loader.js +1 -1
  237. package/modules/content/models.js +82 -33
  238. package/modules/content/props.js +2 -1
  239. package/modules/content/rules.js +11 -5
  240. package/modules/content/templates.js +3 -3
  241. package/modules/content/words.js +2 -2
  242. package/modules/debug/DebugPanel.js +9 -9
  243. package/modules/flow/index.js +9 -6
  244. package/modules/gameplay/Dialogue.js +34 -20
  245. package/modules/gameplay/Interactions.js +19 -15
  246. package/modules/gameplay/Inventory.js +9 -4
  247. package/modules/gameplay/Quests.js +12 -10
  248. package/modules/gameplay/pickups.js +23 -11
  249. package/modules/grid/index.js +1 -1
  250. package/modules/grid/preview.js +2 -2
  251. package/modules/grid/tiles.js +1 -1
  252. package/modules/hlod/index.js +4 -1
  253. package/modules/hud/index.js +47 -10
  254. package/modules/hud/parts.js +28 -9
  255. package/modules/level/geometry.js +8 -3
  256. package/modules/level/index.js +10 -5
  257. package/modules/level/load.js +4 -2
  258. package/modules/lights/sources.js +1 -1
  259. package/modules/music/Music.js +22 -4
  260. package/modules/nav/index.js +20 -10
  261. package/modules/particles/Particles.js +31 -14
  262. package/modules/particles/effect.js +20 -5
  263. package/modules/particles/lit.js +72 -0
  264. package/modules/photo/Photo.js +72 -28
  265. package/modules/photo/pathTrace.js +106 -0
  266. package/modules/rigid/RigidBodies.js +23 -14
  267. package/modules/rigid/Vehicles.js +3 -13
  268. package/modules/rigid/sync.js +2 -1
  269. package/modules/settings/Settings.js +52 -20
  270. package/modules/settings/apply.js +23 -9
  271. package/modules/settings/sections.js +39 -6
  272. package/modules/settings/strings.js +2 -0
  273. package/modules/settings/view.js +19 -3
  274. package/modules/sky/dome.js +15 -3
  275. package/modules/sky/environment.js +28 -12
  276. package/modules/sky/fog.js +1 -1
  277. package/modules/sky/frame.js +6 -1
  278. package/modules/sky/shader.js +4 -3
  279. package/modules/sky/skyModule.js +8 -4
  280. package/modules/swarm/Swarm.js +1 -1
  281. package/modules/terrain/ChunkManager.js +61 -15
  282. package/modules/terrain/chunkJob.js +2 -2
  283. package/modules/terrain/index.js +20 -5
  284. package/modules/terrain/terrainEdit.js +8 -4
  285. package/modules/terrain/terrainTexture.js +4 -2
  286. package/modules/timeline/Timeline.js +4 -3
  287. package/modules/timeline/Tween.js +3 -0
  288. package/modules/timeline/letterbox.js +1 -0
  289. package/modules/triggers/index.js +36 -17
  290. package/modules/vegetation/Vegetation.js +81 -19
  291. package/modules/vegetation/densityMap.js +13 -8
  292. package/modules/vegetation/draw.js +147 -24
  293. package/modules/vegetation/groundChunks.js +20 -5
  294. package/modules/vegetation/index.js +3 -3
  295. package/modules/vegetation/modelGeometry.js +9 -4
  296. package/modules/water/Water.js +11 -8
  297. package/modules/weather/Weather.js +7 -2
  298. package/modules/weather/shaders.js +25 -5
  299. package/modules/weather/weatherDraw.js +20 -6
  300. package/modules/world/World.js +2 -1
  301. package/modules/world/index.js +2 -2
  302. package/modules/world/persist.js +6 -2
  303. package/modules/world/views.js +15 -2
  304. package/package.json +4 -1
  305. package/presets.js +5 -5
  306. package/render/PostFX.js +84 -41
  307. package/render/backend.js +137 -16
  308. package/render/cascades.js +3 -1
  309. package/render/cascades.tsl.js +2 -0
  310. package/render/daylight.js +7 -1
  311. package/render/detail.js +7 -4
  312. package/render/effects.js +27 -8
  313. package/render/fogLook.js +24 -0
  314. package/render/fuse.js +5 -2
  315. package/render/fx/detail.tsl.js +9 -7
  316. package/render/fx/index.js +7 -2
  317. package/render/fx/library.tsl.js +1 -0
  318. package/render/fx/lightShaft.tsl.js +114 -0
  319. package/render/fx/noise.tsl.js +25 -8
  320. package/render/fx/objectOrigin.tsl.js +39 -10
  321. package/render/fx/particles.tsl.js +23 -6
  322. package/render/fx/patchNodes.tsl.js +17 -12
  323. package/render/fx/pcss.tsl.js +51 -0
  324. package/render/fx/postWebGPU.tsl.js +89 -29
  325. package/render/fx/sky.tsl.js +3 -9
  326. package/render/fxNumbers.js +10 -4
  327. package/render/impostor.tsl.js +107 -0
  328. package/render/lighting.js +33 -1
  329. package/render/lightmap.js +42 -28
  330. package/render/lights.js +19 -3
  331. package/render/materials.js +6 -4
  332. package/render/mergeCommon.js +4 -1
  333. package/render/occlusion.js +14 -4
  334. package/render/patches.js +79 -41
  335. package/render/postRuns.js +32 -0
  336. package/render/postWebGL.js +97 -10
  337. package/render/probes.js +10 -14
  338. package/render/shaderErrors.js +2 -1
  339. package/render/shadowCache.tsl.js +33 -5
  340. package/render/shadows.js +42 -16
  341. package/render/slots.js +8 -5
  342. package/render/vertexInputs.js +52 -0
  343. package/types/core.d.ts +114 -46
  344. package/types/gameplay.d.ts +56 -23
  345. package/types/generated/core/audio/Audio.d.ts +27 -1
  346. package/types/generated/core/base/Random.d.ts +1 -1
  347. package/types/generated/core/input/Input.d.ts +6 -8
  348. package/types/generated/core/input/inputSeat.d.ts +1 -1
  349. package/types/generated/core/inspect/Budget.d.ts +26 -0
  350. package/types/generated/core/inspect/DebugOverrides.d.ts +0 -2
  351. package/types/generated/core/saves/Saves.d.ts +10 -7
  352. package/types/generated/core/saves/session.d.ts +8 -2
  353. package/types/generated/core/scene/Rays.d.ts +1 -3
  354. package/types/generated/modules/particles/Particles.d.ts +1 -1
  355. package/types/generated/modules/world/World.d.ts +2 -1
  356. package/types/generated/render/PostFX.d.ts +35 -9
  357. package/types/physics.d.ts +796 -764
  358. package/types/pixel.d.ts +1 -1
  359. package/types/tsl.d.ts +62 -1
  360. package/types/world.d.ts +12 -3
  361. package/ui/Focus.js +7 -5
  362. package/ui/Parts.js +1 -1
  363. package/ui/touchPart.js +6 -3
package/CHANGELOG.md CHANGED
@@ -1,798 +1,879 @@
1
- # Changelog (threedog)
2
-
3
- What changed in each version and how a game upgrades.
4
-
5
- ## 1.1.0 (2026-11-08)
6
-
7
- - `threedog check` type-checks every `.js` of a game, not a list of known folders (`main.js`, `game/`, `content/`, `picture/`, `plugins/`). Code in another folder (`landmarks/`, `data/`, ...) was skipped while `check` said it passed, and a mistake there only failed in the build. Those files now count, so a game can show type errors it did not show before. Assets and tests (`public/`, `tests/`, `docs/`, `shots/`) are still left out. The game template's `tsconfig.json` includes all `.js` the same way.
8
- - `threedog shot --cam x,y,z,targetX,targetY,targetZ[,fov]` places the camera at a pose without a view declared in the game (a facade, a roofline, a far backdrop). It cannot be combined with `--view`.
9
- - The picture check reports meshes that lie entirely beyond `camera.far` (never drawn from there) as a fact, with the documented way to move the plane: `engine.autoView.manual('far')`.
10
- - The picture check's "time barely changes the picture" line says it varied `engine.calendar.timeOfDay`; a game that switches its lights by its own presets can ignore it.
11
- - API page of `followCamera`: `minPitch` and `maxPitch` state their defaults (0.05 and 1.35) and that the view cannot look up unless `minPitch` is negative.
12
- - The game template's `CLAUDE.md` tells a helper's brief to start with `threedog how`, recipes 60 and 62 for the picture and a clean `check`.
13
-
14
- ## 1.0.1 (2026-11-07)
15
-
16
- - Docs only: the install lines in the package READMEs name 1.0 (0.9 was never on npm).
17
-
18
- ## 1.0.0 (2026-11-07)
19
-
20
- - A request awaited inside a save load without its `turn` fails with `save-nested` after `engine.loading.timeoutMs` with no sign of life, and the load fails its normal way. It used to wait for good.
21
- - `detach` is gone from the engine: write `obj.removeFromParent()`. `engine.remove` stays.
22
- - A `turn` kept after its load ended no longer lets `content.load` jump the line: it waits behind the load before it, as `level.load` did.
23
- - `applyState({ save })` and `{ play }` answer in `refused` when the load or the new game failed, so `threedog state` and a scenario stop there. The title stays open. They used to answer ok.
24
- - An item's `use` that answers `{ ok: false, code }` or throws keeps the item: `inventory.use` is atomic, sends no `item:use`, and hands the failure to the caller. It used to spend the item and answer ok.
25
- - `engine.i18n.locale` is read-only: `setLocale` is the one way to change the language. Writing it skipped the name lookup and `i18n:change`.
26
- - A failed `content.load` no longer marks the pack's vegetation table for good: the same pack loaded again registers its plants.
27
- - A pack that names an op nothing defines, loaded in a running game, leaves nothing behind. Its actions and quests used to stay, and the name then failed every later load.
28
- - A world save holding a record faster than its time channel (`time.local` above 1) loads. Its debt mark goes below zero, and the load refused that as damage, the rollback of a failed load too.
29
- - A tween whose write throws ends there and its promise rejects: `await engine.timeline.tween(...)` can now throw, and a `timeline.play` step with it ends `failed` and gives control and input back. It used to never answer. A tween nobody awaits is reported as an unhandled rejection, once.
30
- - A cutscene writes a character or the camera only while it is the holder in charge. A path on a ragdoll or a seated rider, and a shot under a newer `takeCamera` or a newer run, keep their time and write nothing; back in charge they write where their clock is.
31
- - The default physics floor follows the ground: a level installed while running takes it away, and a ground source that leaves brings it back. Terrain chunks and trunks leave with their ground source too. `ops.undo` of a failed run answers `nothingToUndo` instead of throwing.
32
- - A solid prop is in a new `collision` or `collider3d` on the line after `engine.use`. It used to come back on the next frame.
33
- - A save part's `load(data, turn)` and a module's `afterLoad(engine, turn)` can change level and load packs after an await: `level.load(x, { turn })` and `content.load(x, { turn })` go at once. It used to wait for itself, for ever. Without the turn a call waits in line like any outside request, and dev says so when it stalls (`save-nested`).
34
- - A part registered during a load runs after it, whole, in its own turn. Its first lines used to run inside the load.
35
- - A failed pack ends only when the old level and registrations are back, and saves and loads asked meanwhile wait. A restore that fails reaches the caller (`err.notRestored`). It used to reload in the background and swallow the failure.
36
- - `content.load` returns a Promise for this load, not `engine.content`.
37
- - One reading route in the docs: taking over a game starts at its status notes, a new feature at `AI.md` or `threedog how`, then the recipe and API page. `AI.md` calls its table a recommendation, and `API.md` no longer tells a game to write `?.` for a module it needs.
38
- - MCP `check` now lists the first bypass hints with file, line, advice and how to switch them off, the same ones `threedog check` prints, one of each kind first. It used to drop them.
39
- - In a game that runs, `threedog how` answers the most asked tasks with the lines to add (recipe 66 "In an existing game": where they go, what to skip, the failure to handle, the check; a test runs them). An answer shows an example only if it belongs to the chosen route.
40
- - `threedog how` with no words opens a category list; `--browse <category>` lists capabilities, `--card <id>` shows one: what it solves, when it does not fit, install, dependencies, time, saves, an example and what verified it. The MCP tool takes `browse` and `card` fields. `--list` is gone.
41
- - A scenario can say `{ "until": { ... }, "within": seconds }`: reach this state by the deadline, then check the end with `expect`. A win that freezes early passes; an error, a freeze before the state, a stuck load and a missed deadline each name themselves. `step` stays strict.
42
- - `before` / `after` that contradict the stages through a capability are refused with `module-order`, as they are by module name. They used to warn and drop the line. `water` no longer states `after: ['sky']`: it reads the horizon color, and a frame's lag does not show.
43
- - Frozen physics queries refresh through one wrapper that gives the step length back even if Rapier throws. Checked on Rapier 0.21: no narrower native route exists, and the refresh leaves velocities, sleep, contacts and a pending kinematic move alone.
44
- - A swap is finished when queries can trust it: after `engine.use(collision(), { replaces: 'collision' })` the next line reads the level walls, frozen or not. A module that feeds a provider says so with `ctx.feeds(capability, fn)`; a provider that refuses what it is fed fails its `use()` and the old one comes back. A copy rebuilt through `follows` that throws is built again at the next read.
45
- - An old `engine.haltLoop` or `views.show` handle no longer ends a later hold of the same name.
46
- - `world.simulate` on a time channel pays the time as it passed. A far or tiered record, `engine.skip` and a saved debt no longer rewrite the past at the speed of the settlement: half a second at 1x and half at 0.5x gives 0.75, not 0.5. Each record's own `time.local` rate counts the same way. Older saves load; what they owe is read at the first speed it meets.
47
- - A dialogue `do` that throws ends the conversation and answers its `say()`, on a bubble too. It used to leave a line nobody could finish.
48
- - A cutscene has one ending: `finished`, `skipped`, `dropped` or `failed`. `timeline.play()` resolves with `{ ending, error? }`, `timeline:end` carries the same, and describe counts it; `{ skipped }` is gone. A dropped or failed run runs no more steps, a parallel branch included, and gives the screen back. A new game or `dispose` drops a run: its `do` steps no longer run on what came after.
49
- - A failed atomic op puts `once` items, interaction counters and content markers back with everything else. Every engine save part now says whether an atomic op covers it, or why not (`notAtomic`, rule R67).
50
- - A reward that cannot be given is no longer lost in silence. `content.run` answers `{ ok: true }` or a failure listing each word that failed, and `content:failed` fires; `{ give }` reports what did not fit, part of a stack too. A finished quest fires `quest:unpaid`, tells the player (`quests.notify` gets type `'unpaid'`), and owes the items until there is room (saved, shown in `quests.list()`); `onUnpaid` lets the game decide instead.
51
- - An async `onUse` is judged when it settles: one that fails or throws spends no `once` item and adds no count, and it cannot be used twice while it waits.
52
- - Physics queries and rays see walls, solids, bodies and moves at once, also while frozen; world boxes stand on a new level at once. `engine.remove` of a model or a parent also removes its body. Public vectors must be finite: NaN and Infinity are refused with `bad-position`.
53
- - `exit()` takes the first walkable exit a vehicle offers (`exitPosition(seat, n)`; `rigid` cars offer four) and answers `false`, rider seated, when none is. `exit({ force: true })` always gets out. It used to step into the wall and shove the car
54
- - A seat is one relation owned by `characters`, saved with its seat number. A load keeps who sat where; a car built after the load takes its rider; a game's own vehicle keeps its rider through a load (`characters.addVehicle`); a cutscene over a driver lets go of the pedal; a rider stays on the seat with no holder moving it. `interaction.use`'s `approaching` has `remove()`, like the walk it stands for
55
- - A walk is a task of the control slot, and one list says what ends it: a load or new game, a level change, a placement, a seat, physics taking the body, the character going. It used to outlive the level, the seat and the placement, and wait for ever under a ragdoll. `character.placeAt` drops an NPC's path as `npc.placeAt` does
56
- - The view has one write route. The first holder of the camera records the view it took and the last one out lands it, so a slider moved during a shot takes effect at the end and overlapping shots no longer leave a half-way fov. A rig told to move during a hold records it and lands at release. A hold from writing the camera directly ends at a new game. The first-person body hides only while that view shows.
57
- - Quality presets are shares of what the game set: High lets everything through, and no preset raises anything. MSAA never changes during a run: the settings row applies at the next start, and Low no longer turns the post chain on. `engine.tier` is the one quality value: the device's tier unless the player's preset says otherwise, for particles and everything else that reads it. `settings.set` refuses a key no row owns. Terrain and vegetation offer their own settings rows.
58
- - Tools: `verify` and `step` share one step result, and less time than asked is a failure in both. `check` names a local file an asset pack names that `public/` lacks. A switched-off module has the state `disabled`; `engine.disabledModules` is gone, `describe().disabledModules` is derived from the state, and the short describe names it.
59
- - `applyState` takes its module keys from each module's `stateKeys`: core no longer lists them.
60
- - Loads and state turns, one rule per cause. A level file that fails now fails, whatever the manifest falls back to: no gray level, no `level:loaded`, and `saves.apply` answers false. Every load has one limit, `engine.loading.timeoutMs`, measured as silence, so a file that never answers no longer freezes `start()`, `level.load` or a load, and a load everybody stopped waiting for is aborted. `flow.transition` rejects at the same limit and gives the screen back. `level.load` during a save load waits for it. Autosave waits for the end of a door trip or a cutscene. A failed load puts a code-built level back. A content pack never commits inside a state replacement. A session turn on a disposed engine answers false.
61
-
62
- - An unloaded level takes its `world.zone` and `level.spawn` with it. `unuse('content')` takes its hud markers off the screen. Path rasters no longer outlive the collision module or the playthrough that made them
63
- - A collider with no `y` stands on the ground as it is now: after `terrain.edit` the rigid copy of a `collision.addBox` moves with the ground, so a crate no longer falls through a post left at the old height
64
- - `engine.skip` during a skip rejects with `skip-busy`, as its doc says. It used to resolve, and its end unfroze the game during the first one's fade
65
- - `assets.release` keeps a model whose geometry was handed out, as `trim` does
66
- - `saves.register` on a held key throws `save-key-taken`. It used to take the part away from its owner in silence
67
- - `replaces` sees more than the one module it names. `engine.use(terrain(), { replaces: 'terrain' })` now installs the new `terrainDraw` too, where the old drawing part stayed on a terrain that had gone and the new one was dropped with a warning; weather and vegetation act alike. A hold a rig opened on the camera ends with the rig, so the next rig moves. A live ragdoll gives its character back when rigid leaves. A swap, failed or not, leaves the game on the level it stood on, and a pack's older level no longer takes it back; a newcomer with its own `url` or `scene` still opens there
68
- - A module that leaves takes what it registered with it. `unuse('characters')` used to hang the world step with a near NPC; `unuse('rigid')` broke `raycast({ targets: 'all' })`; `unuse('level')` left record nodes in the scene and in rays; `unuse('inventory')` left its touch button. `input.touchButton` and `assets.onSwap` now return `{ remove() }`; a button two parties asked for stays until the last one leaves
69
- - A template's physics prop comes back from a load as it was saved: turned, moving, asleep or in the air. It used to land upright on the ground. A load no longer writes a change for a crate nothing touched, and a crate that was nudged stays nudged in a save (a nudge under 5 cm used to count as settling and was lost). A body keeps the speed it fell asleep with.
70
- - `engine.unuse('rigid')` or replacing it stands a limp character back up. It used to stay held by the old physics for good.
71
- - Weather set with `seconds: 0` reads the same after a load.
72
- - `thing.set` with no height stands a template's physics prop on the ground. It used to go half into the floor and could fall through it.
73
- - `stream.teleport` belongs to the state it was asked in: a new game or load (`saves.load` too) that goes through during the trip abandons it. It rejects with `stream-removed` and the player stays. It used to land on the new state, below ground at the old door's destination. A `flow.transition` still fading out is dropped the same way, and `engine.skip` is now cancelled by `saves.load` as well.
74
- - Autosave no longer overwrites a save after `session.quit()` with no title part: `session.playing` stays false until a new playthrough starts.
75
- - Every load entry acts alike. `saves.apply` ends a walk and rebuilds what `saves.load` does; any save put back closes the title; a rolled-back `saves.load` or `saves.apply` fires `session:failed` with `kind: 'quick'`. A rollback keeps rigid velocities and quest markers.
76
- - A new game leaves no run state behind: holds taken in play, `world.anchor`, `audio.state` (a new save part, `audio`), a level loaded after a code-built opening scene.
77
- - A module's function timer follows the module at a new game: gone with it, kept when it was used after `start()`.
78
- - What joins after `start()` joins the new-game state: a player where it began, a part as its `init` left it, a pack's `startItems`.
79
- - The title track plays after quit whichever of `flow` and `music` was installed first. `session.load` keeps the vehicle camera and a view saved on a switched rig.
80
- - `flow.transition` goes on across a load that fails, as `stream.teleport` does. An atomic op's rollback puts a `NaN` back as it was.
81
- - A second `engine.skip` during one under way rejects, as its doc says; its end used to unfreeze the game during the first one's fade.
82
- - Dev warns when a second `saves.register` takes a key another part holds. A dev gameplay error stays frozen until reload, a new game included: documented, and guarded by a test.
83
-
84
- - `stream.teleport` belongs to the state it was asked in: it waits out a running load, and a new game or load (`saves.load` too) that goes through abandons it. It rejects with `stream-removed` and the player stays. It used to land on the new state, below ground at the old door's destination. A load that fails leaves the trip going, and a level change does not touch it. A `flow.transition` running or in line is dropped the same way, without bringing the old track back, and `engine.skip` is now cancelled by `saves.load` as well.
85
- - `saves.apply` fires `save:loaded`, as `saves.load` does: a walk ends on it, and the HUD quest list and calendar ranges rebuild. Its `slot` argument is what the event carries.
86
- - A save part named `__proto__` is refused at `saves.register`. Its data used to be lost without a word.
87
- - `saves.save` refuses data with `NaN` or `Infinity` at any depth, naming the part and the path, and the slot keeps its last good save. It used to answer true and store `null`. A game with a field like `hp: Infinity` saves a finite number or leaves the field out.
88
- - A longer view distance builds stream entries and world models without the player moving.
89
- - A delete the store refused lists the slot again.
90
- - `saves.apply(x); saves.save('s'); saves.apply(y)` stores x on a page with `afterLoad` hooks too.
91
- - A save part may be named like an Object method (`constructor`, `toString`).
92
- - A `commits.request` made during a failed `session` load's rollback lands.
93
- - `views.current` is declared `string | null`, as it is at runtime.
94
-
95
- - New event `level:unloaded { source }`: a level left, by `unload()` or a switch just before the new one commits. On it the navmesh goes (`nav.ready` false, no path of any size from the old level), hlod lets the level go, grid tiles and A* rasters drop what they read from it. `level.ready` stays true after `unload()` because nothing is loading; `level.root` says whether a level stands, and `level.playable` is false.
96
- - `walkTo` ends with its playthrough: `session.newGame`, `session.load` and `quit` settle it as `cancelled` and give the control slot back. It used to go on walking in the new game.
97
- - The level's walls reach a replaced `collision` while the engine is frozen or skipping, not only on the next fixed step.
98
- - `engine.unuse('cameraRig')` puts back the perspective view and the fov it found.
99
- - A replaced provider no longer leaves consumers on the old one. After `replaces` on `rigid`, a template's crates get bodies in the new module where play left them (a template reload that changes, adds or removes `body` reaches built copies too), riders leave the old module's car by the normal exit, and rapier movers build anew. NPC agents, `findPathAsync`, weather drawing, interaction entries of props, NPCs, pickups and cars, and a replaced camera rig all follow the provider installed now. Version numbers no longer decide this: they count per module, so compare the object. Game code that keeps a handle does the same (recipes/55).
100
- - `replaces: 'world'` and `unuse('world')` are refused (`module-replaces`, `module-unuse`) once a module that uses the world is installed or the game has started, and nothing changes: it used to break the game. Install your world before the modules that need it.
101
- - One way to an orthographic view: a real `THREE.OrthographicCamera` in `engine.camera`. A rig's `projection: 'orthographic'` now does exactly that, and the next perspective view brings the first camera back, so the camera class that acted as both is gone: `engine.camera` is a plain three.js camera, always. `camera.orthoSize` and `camera.isEngineCamera` are gone (`MIGRATING-1.0.md`).
102
- - Navmesh paths fit the body that asks: a `radius` on `findPath` or `findPathAsync`, and `walkTo` and NPCs with theirs, gets a mesh of that size, built on first ask and rebuilt with the level. Small bodies take gaps a large one cannot; a body too wide for every way gets `noPath` where its `walkTo` used to end `'stuck'` at the gap. One size costs nothing extra. Recipe 12 section 5.
103
- - `findPathAsync` on A* sees every floor of a level: ground under a bridge or a lower storey is walked as `findPath` walks it. It used to read only the top one, so a steep roof closed the road under it and a slope under a deck did not count.
104
- - `level({ url })` with a pack that sets `level`: `content.load` before `start()` now ends as it does after `start()`, the pack whole and its level up, and the url file is not fetched. The url load used to overtake the pack and drop all of it, in silence. If the pack's level cannot load, the url is the level.
105
- - A pack whose `level` is overtaken by a newer `level.load`, save load or unload is no longer lost: only its `level` gives way, and its other sections commit on the level that won, once that load has ended. A newer load that fails leaves the old level, and the pack's other sections still go in. An overtaken `level.load` now resolves when the newer load has ended.
106
- - Two engines on a page: gamepads follow the keyboard, so only the engine last pressed or focused (the first one until then) reads them, seats included. An engine alone on a page reads a pad as before.
107
- - The level's `col_` walls and solid props go into whichever `collision` is installed, tilted props into whichever `collider3d`: after a `replaces`, a failed one, or a module that came late or came back. They used to stay behind in the old module, so a character walked through. `module:restored` now fires after every swap, with the fresh modules, once their `init` is done, and content sections load into a newcomer that declares them, as a `content.load` on a running game would. A newcomer with its own format that refuses a pack written for the old holder gets a warning naming the pack, and the game runs on.
108
- - `level({ url })` with a pack that sets `level`: `content.load` before `start()` now ends as it does after `start()`, the pack whole and its level up, and the url file is not fetched. The url load used to overtake the pack and drop all of it, in silence. If the pack's level cannot load, the url is the level. A pack overtaken by a newer `level.load` still goes, and now warns.
109
- - Two engines on a page: gamepads follow the keyboard, so only the engine last pressed or focused (the first one until then) reads the pads no seat is bound to. A seat hears the pad it was given on any engine, and the owner leaves that pad alone. An engine alone on a page reads a pad as before.
110
- - The level's `col_` walls and solid props go into whichever `collision` is installed, tilted props into whichever `collider3d`: after a `replaces`, a failed one, or a module that came late or came back. They used to stay behind in the old module, so a character walked through. `module:restored` now fires after every swap, with the fresh modules, once their `init` is done, and content sections load into a newcomer that declares them, as a `content.load` on a running game would.
111
- - Recipe 66 has two more whole examples, both run by its test: two areas built in code that a save returns to by their manifest names, and a ladder that goes on after a load mid-climb.
112
- - Rule R40 no longer calls a `subtitle` option and a canvas lookup on one `createEngine` line a dialogue box.
113
- - `thing.set`, `world.set` and `world.move` on a live character (the player, an NPC with a model) are its `placeAt`: they used to answer ok and be undone by the next step.
114
- - A write to a record with `positionFrom: 'view'` moves its model and any rigid body on it, instead of being overwritten at the end of the step; `rot` and `scale` on a template with a `body` build a new body.
115
- - `rot` and `scale` written to a character's record (`world.set`, `thing.set`) reach the character and survive a rebuild and a load; what it cannot obey is refused by name. `thing.set` no longer drops the x and z of `rotation` and `scale` arrays.
116
- - Undo of a `thing.set` that ended a ride seats the character again, or answers `ownerRefuses` if the seat is gone or taken; `ops.define` takes `canUndo` for such answers. `placeAt` on a ragdoll carries the whole body there at rest, where the next step used to put it back.
117
- - `placeAt` on a seated character, and so any write to its record's position, ends the ride and puts it there: the seat used to pull it back on the next step.
118
- - One entry each: `stream.setRadius`, `weather.setAuto` and `post.setAntialias` are gone; assign `stream.radius`, `weather.auto` and `post.antialias`, which do the same. The command `threedog eval` is gone; `threedog js` is the one name.
119
- - `threedog test` no longer counts a check labelled `skipped:` as passed: the summary names it and says how many did not run.
120
- - `engine.skip(null)` fails with `skip-amount` like `engine.skip({})`, not a TypeError. Bad arguments throw at the call, and the docs now say so.
121
- - The perf island example opens again: its op name was refused by the `noun.verb` rule.
122
- - `engine.camera = cam` takes a real `THREE.PerspectiveCamera` or `THREE.OrthographicCamera`: rendering, post, picking, shadows, audio, rigs and `pixelSnap` go on with it, and resize keeps its frustum. Other classes are refused with `camera-option`. The type of `engine.camera` is now the union of the two, so TypeScript code reading `.fov` narrows first.
123
- - Terrain: `terrain.setViewChunks` and `terrain.setDensity` are gone; assign `terrain.viewChunks = n` and `terrain.density = d`, which do the same. Density thins plants without a collider only, so it never changes collision.
124
- - Declarations: `terrain()` and `vegetation()` are declared as the two modules they return, like `weather()`; nothing changes in a game that passes them to `engine.use`. The class names `Ambience`, `Budget`, `Calendar`, `DebugPanel`, `Grid`, `Grids`, `Layer`, `Music`, `Net`, `Particles`, `PostFX`, `Sky`, `SoundHandle`, `Swarm`, `Timeline`, `Water`, `Weather`, `WeatherDraw` and `World` are types only, as they always were: nothing can import them as values. The `weather.*` names (`weather.auto`, `weather.current`, `weather.defineField`, `weather.label`, `weather.lightningBrightness`, `weather.name`, `weather.overcastColor`, `weather.particles`, `weather.set`, `weather.setAuto`, `weather.types`) are unchanged, now counted as a module's.
125
- - `compositeGround` with `rigid`: terrain inside a level's region was solid but not on the ground. The hills stood as invisible collision inside the level, so a dropped box stopped in mid-air over a lake. The terrain's physics triangles now stop at the regions where another part answers.
126
- - `mover: 'rapier'`: a swimmer moved to a place with no water, or whose water was removed, froze the game with a NaN position. It falls and lands now.
127
- - A content pack with a `level` file now commits as a whole once the file is here: `{ place: 'npc_home' }` reads the new level's marker, and a later pack of the same load, or a later `content.load`, waits for it. If the file fails, nothing of the pack commits. Code right after `content.load` cannot read such a pack's sections yet; wait for `start()` or `level:loaded`. A pack refused by a section leaves the level as it was, a load in flight included. A section may declare `cancel(prepared, c)` to let go of what its `prepare` holds.
128
- - A save that names the current level now drops a `level.load` still downloading. Before, the file landed on top of the loaded save.
129
- - `engine.unuse('level')` and `{ replaces: 'ground' }` take the level with the module: its scene, `col_` walls and what `level.track` holds. Before, they stayed behind.
130
- - Object contracts (`mover`, `vehicle`, `ground`, `collider3d`) list their members under `api` like every other contract; a replacement's own `contract.js` with `methods` should rename it.
131
- - A content section's `fields` key is gone: nothing read it for a section. A game kind's and a template's `fields` are unchanged.
132
- - A template with a `body` and a per-axis `scale` builds: the array went into its resting height and the model failed to appear. A place turned on a reload now turns a record with an `[x, y, z]` rot too, and the editor's turn handle keeps the three numbers.
133
- - `compositeGround`: `terrain:void` fires for rigid bodies and ragdolls again when one part is a level. The void height comes from the parts that have one.
134
- - `compositeGround` region: `(x, z) => boolean` or `{ volume }`, the shape water and trigger zones take. `{ circle }` and `{ rect }` are gone: write them as a function.
135
- - `slope` and `groundType` with a `refY` pick the layer on a level, as `surface` always did, so walkability and footsteps under a bridge read the ground under the bridge.
136
- - `quests.list()`: a step counts as done once the quest left it. A step `next` jumped over stays not done, and a step a loop came back to is current and not done.
137
- - A* (`findPath` without `nav`): a goal on a floor the walker can't reach is `noPath`, and `walkTo` ends with that status. It used to be `ok` with a path that ended under the goal.
138
- - `compositeGround({ parts })` could not be installed: its only option was refused as unknown. It works now; recipe 10 section 6 shows it.
139
- - Water goes by height: a character, `describe().player.inWater` and buoyant rigid bodies now pass their own height to `waterAt`. Before, a character walking under a lake was lifted through the ceiling to swim. A game's `addWaterBody({ query })` now gets `y` from these too.
140
- - `docs/MIGRATING-1.0.md`: every change an existing game can hit since 0.9.0, as what you will see and what to do. A `preventDefault` on `character:fall` and a `thing.explain()` now answer with the fix instead of a bare TypeError.
141
-
142
- - Local players on one screen: `engine.input.seat({ pad, keys })` is one player's own keys and gamepad, read like `engine.input`; `createPlayer({ id, input })` adds a player with that seat and its own world record (no `id`: the one player, as before); `characters.moveInput` takes an optional seat (no argument: as before); `removePlayer(id)`; `engine.player` stays the first player. Interactions, footstep sounds and NPCs giving way still follow `engine.player` only. Recipe 58.
143
- - Data checks that ran only in development now hold in release: a NaN or short position (`world.add`, `move`, `set`) is refused and writes nothing; an op with a missing required arg or an `id` with no record fails with `badArgs` before `run`; `world.set` cannot change a record's id or kind; two NPCs with one name and no id, a `once` interaction with no stable id, and a template state value outside its fields all throw. A game that passes its development run is unaffected.
144
- - Contracts state position authority: the characters, mover and vehicle contracts have a `position` entry naming who may write a character's position, and `@threedog/tools/contract` checks any contract that has one. Nothing changes at run time.
145
- - A `picture` or `ui` module disabled after an error now gives back what it borrowed with `ctx.borrow`, as unloading does: a value someone else set meanwhile stands. Before, its fog or tone mapping stayed on the screen with nothing maintaining it.
146
- - Skip: a module says how `engine.skip` advances it with `skipKind`: `exact`, `approx`, `step` or `none`. Every engine module declares it (rule R57), `engine.catalog` shows it and reports a module with a `fixed` or `skip` hook that has none, and an unknown word stops `engine.use`. The `skip` hook and `noSkip` stay.
147
- - Metadata: `threedog map` now writes one generated file of module, content section, contract and placement field facts (`threedog/metadata`). `catalog`, `how` (engine modules and options by name, with no page running), the editor, rules R38 and R50 and the content loader read it instead of keeping their own lists. A content section can declare `live: true`; field specs take `label` and `rare`. A pack with a `level` section and no `level()` module now gets the named error instead of being dropped. The code map, rule R51 and the content file list now read it too: a content section states what it holds in its own `desc`, and `describe().content.sections` also names `actions`, `places`, `audio`, `views`, `renames` and `rules`. Rule R6 now also fails when an option or contract name in it is missing from the types; a contract name a game should not call is marked `@internal` at its source.
148
- - Asset tool chain: `npm audit` flagged `glob`/`minimatch` under `@gltf-transform/cli` (moderate, build time only). This repo overrides them to the fixed `glob` 14; a game that installs `@gltf-transform/cli` for `threedog assets optimize` adds the same `overrides` entry (recipe 46). `threedog assets optimize` itself is unchanged.
149
- - Capabilities and readiness: `before` / `after` can name a capability (`after: ['ground']` follows whichever module provides it, also across a `replaces`); `engine.explain({ module })` and `{ capability }` say whether one can be called now. `engine.has(name)` now also answers for a capability a module provides. Development and test builds compare a bound provider's API with the capability's contract, on module changes only: a gap is one `module-contract` warning and a line in `engine.catalog(name).problems`, and the module still runs.
150
- - `engine.explain` is the one way to ask why: `{ thing: id }` replaces `engine.thing(id).explain()` (`detail` holds the same object), `{ module }` and `{ capability }` are new, and `threedog explain thing <id> --full` replaces `threedog thing <id>` (MCP: `explain` with `about: "thing"`). The CLI word for a value is `threedog explain value fog.far`.
151
- - Dev server: who writes a value now covers the values the engine writes on its own and shared points, not only picture values; `engine.debug.watch(name, object, key)` adds any value the game names (does nothing in release). `engine.explain({ value })` replaces `explain({ picture })` and also gives the value's short history; two writers taking turns across frames are reported too, in a one-line `[picture-conflict]` hint whose fix moved to `explain`; a yield warning and `describe().owned` name the line that took the value. Only watched values are seen, so no conflict seen is not proof of none.
152
- - Water asked at a height: characters, rigid bodies, `describe().player.inWater` and spawn search now pass their height to `waterAt`, so a game's `addWaterBody({ query })` or `{ volume }` that depends on `y` (a pool upstairs, a waterfall) works for them. Before, they asked with no height and saw no water.
153
- - `collider3d.sweep`: a ball that starts touching a solid and moves out of it is clear, so a flying mover can take off from the ground it stands on.
154
- - `walkTo`: a vertical leg of a path (a path source for a flyer) is progress and goes straight; before, it drifted sideways and ended `stuck`.
155
- - `mover: 'rapier'` NPC: while another mover has it, its capsule leaves the world and comes back at the character. Before, it stayed at the take-off spot as an invisible wall and blocked the new mover's own sweeps. A mover may give an optional `leave()` for this (`mover.contract.js`).
156
- - Types: `player.move` and `player.mover` now show the `y` a control step passes (the code already took it); nothing to change in a game.
157
- - A failed `replaces` leaves the game as it was: the old modules come back in their old places, also when one requires another, and content sections load into them again, so definitions and progress are back. Game code that defined things by hand does so again on the new event `module:restored` `{ modules }`.
158
- - `session.newGame` / `quit` could be refused for good after a late `replaces` by a part of a lower version: the new-game state now takes the new part's data when the part cannot read what is there.
159
- - A failed load also rolls back a part whose `save()` gave nothing just before it: it goes to its new-game state. Without one, a soft error names the part.
160
- - A load taken over by a newer one on the next line can no longer roll back over it, and a taken-over `saves.load` no longer emits `save:loaded`.
161
- - A content section may say `once: true`: its commit gives state, not definitions (`startItems`), so it is not replayed.
162
- - `engine.use(x(), { replaces: 'slot' })` with a module named `x` already installed that does not hold the slot is now `[module-replaces]`. Before, the newcomer was ignored and the slot's holder unloaded for nothing.
163
- - `engine.setPixelSize(null)` leaves a ratio the game took with `renderer.setPixelRatio`; before, it was overwritten.
164
- - `ctx.borrow`: a module's handles now end newest first when it leaves, so two borrows of one property give back the original value (before: the first borrow's value stayed).
165
- - Control: two owners taking one character on one layer now throw `[control-conflict]` in release builds too (was: warn once, the later owner won), and the first keeps the character.
166
- - Shared values: two owners `set` one point on one layer, or a second provider of an exclusive slot, now throw `[shared-conflict]` / `[shared-taken]` in release builds too (was: warn once, the later write won). Development and release behave the same and the earlier value stays.
167
- - Placement: a prop's `rot` and `scale` also take `[x, y, z]` (numbers act as before), `ground: false` keeps the written `y` instead of snapping to the ground, and `collide` on a model turned about x or z is held by `engine.collider3d` (a named error without one). `triggers.add({ volume: { contains(p), bounds? } })` takes the same plain volume as water.
168
- - Ground: `slope`, `groundType` and `waterAt` (and a provider's `ground.slope` / `ground.type`) take `refY` like `surface` (existing calls unchanged); `core/scene/ground.contract.js` states what a ground provider gives; `compositeGround({ parts: [{ of, region, priority }] })` holds the ground slot over `terrain({ part: true })` / `level({ part: true })` so both can run; `engine.addWaterBody({ query(x, z, y), bounds, mesh })` or `{ volume, level }` is water you draw yourself; `describe().spatial` shows the ground holder and water.
169
- - `engine.collider3d`, a new slot with a contract (`modules/rigid/collider3d.contract.js`): `addSolid`, `overlap`, `sweep` on all three axes. `rigid` is the first holder. Nothing changes for a game that does not call it. A module of yours that `provides: ['collider3d']` now needs `{ replaces: 'collider3d' }` next to `rigid`.
170
- - Ragdolls take any body: the rule `ragdoll.graph` is `'humanoid'` (default, unchanged), a graph `{ part: { bone, parent, limits, mass } }` for four legs or a tail, or `false` (then `rigid.ragdoll` returns null). Recipe 11. A hit without `position` lands on the root part, hips on a human. `rigid.ragdoll({ mass })` is now the exact total (a human came out 1% over).
171
- - Falling is one rule, `fall`, covering characters and rigid bodies; the default is unchanged (`'rescue'`). `engine.mod('fall', { owner, id?, set: false })` leaves it to the game, and a function `(facts, engine) => 'rescue' | false` decides per fall (`facts.kind`: `'character'` or `'body'`). It is asked once per fall.
172
- - Migration: `preventDefault` on `character:fall` is gone (calling it now throws `not a function`). Replace `events.on('character:fall', e => e.preventDefault())` with `engine.mod('fall', { owner: 'game', id: 'player', set: false })`, or a function for a decision per fall. `character:fall` still fires first, with `{ character, safe }`.
173
- - `rigid({ fallbackFloor: false })` removes the flat plane at y = 0 that a ground without collision of its own got; default unchanged.
174
- - Assets: a model copy now holds its asset's data: `release`, `trim` and a replaced build wait for the last copy, and `describe().assets` lists `leases` and `waiting`. Nothing to do in a game.
175
- - New games and starter pictures: `picture/index.js` is now a `type: 'picture'` module. Write `engine.use(createPicture()); const { picture } = engine;` and switch looks at run time with `engine.use(next(), { replaces: 'picture' })`; meshes holding old materials must take the new ones. A hand-written `createPicture(engine)` keeps working; a newly pulled starter picture needs the new line.
176
- - Modules: `ctx.borrow(obj, values)` writes properties on an object the module does not own and restores them when it goes, unless something else wrote them meanwhile. Replace a hand-written save and restore with it; nothing else changes.
177
- - Vegetation: at low quality, plants with `collider` are drawn thinned again, as many as before they were placed in full. Plants not drawn still block. Nothing to do in a game.
178
- - `characters.path` rule: `engine.mod('characters.path', { owner, id?, set: ({ from, to, o }, engine) => points | null | 'walk' })` is where `findPath`, `findPathAsync`, `walkTo` and NPCs get paths (default `'walk'`, `false` for none), for flight or anything off the ground; `findPath(a, b, { id })` picks a character's entry.
179
- - `character.mover` rule: `engine.mod('character.mover', { owner, id, set })` swaps how a character moves until the handle goes, and `mover` (`player.mover` too) takes `(character, engine) => ({ name, move(x, z, run, dt, y) })` (`mover.contract.js`, `engine.characters.kit`, recipe 57). `control.take` steps and `handle.move(x, z, run, dt, y)` gain `y`, default 0. A mover name that does not exist now throws `character-option` instead of warning and walking with `'simple'`: fix the name.
180
- - XYZ: paths from `findPath` / `findPathAsync` / `engine.nav` are `{ x, y, z }`; schedule stops keep a `y` you give (`{ x, z }` still means the ground) and it picks the floor, also for where the NPC starts; `walkTo` and NPC stops arrive only at the height asked for. A height near no walkable surface at that spot (a stop written `[x, 0, z]` on ground at 8) goes to the nearest surface and warns once `[nav-height]`, so nothing needs rewriting; a height near a surface picks that floor. `collision.addBox({ y })` stops only a body overlapping `y .. y + height`, so a wall upstairs leaves the floor below free (`y` omitted: as before). `collision.walkable` with a `y` and `walkableAt(x, z, radius, y)` read boxes the same way, and so does A*, on the walker's floor; a wall on a level file's upper floor no longer blocks A* paths below it. A navmesh path that only gets under a goal cut off upstairs is now `noPath`, not a path ending a floor below. NPCs on different floors no longer push each other, or yield to a player on another floor.
181
- - World stays the same at any quality or position: scattered plants with `collider` are placed identically at every `density` (only collider-free species thin); terrain edit, height and shape keys no longer alias far from the origin; `engine.nav` / `findPathAsync` / NPC crowd goals go to the floor the height you pass picks (the ground answers only when none is given); rigid bodies under a moved or rotated parent register at the world pose and write back through the parent (a parent scaled differently per axis throws `rigid-misuse`); standing at the exact centre of a circle or box collider is pushed out towards +x; buoyancy no longer clears forces the game adds to the same body.
182
- - Containers: `add`, `remove`, `setData`, `transfer` and `trade` throw `[container]` for a quantity that is not a whole number >= 1 (before, `remove("apple", -2)` added stock). `{ op }` and `{ can }` content words run as the actor given to `content.run` / `content.test`, like `give` / `take`. A swarm `capacity` must be a whole number, and a damaged swarm save part is refused whole instead of half-loaded. Weather fields that are not finite numbers, terrain paint types that are not strings and grid layer payloads that are not objects are no longer loaded from a save.
183
- - `threedog new-game name --pixel` (and `init --pixel`): a sprite-character starting point (`pixelSize`, `pixelSprite`, a `pixelSnap` camera, input, interactions, dialogue, autosave and start screen), gray placeholders; not together with `--open-world`. Recipe 13 gains 3d (which modules need an engine character, run on a sprite) and its `c.facing < 0` mirror test is replaced: `facing` is an angle, not a left/right sign.
184
- - Release and recovery: a trigger zone's `remove()` inside its own `onExit` no longer deletes a neighbouring zone, and a second `remove()` does nothing. A water normal map swapped for another frees the old texture. A throwing particle depth pass puts the scene back. Unloading the light pool puts back the glow of the stand-ins it borrowed. Unloading `timeline` ends running cutscenes (camera and actors go back) and `flow` stops a transition that has not swapped the scene yet. Modules get `ctx.signal`, which aborts when their install ends, for async work started in `install`.
185
- - Branching quests: a step can have `next` (a step id, `e => id`, or `false` to finish), and `quests.state(id).visited` lists the steps passed. Save version 3 adds `visited`; older saves load as before.
186
- - `dialogue({ bubbleChoice: 'ask' })`: a bubble line with choices stays up and waits for `dialogue.choose { index, run }` (run is in `dialogue.bubbles()`); the default still warns and ends the script.
187
- - `triggers.add({ occupancy: 'each' })`: an enter, stay and exit per actor instead of one for the whole zone (default `'zone'`).
188
- - Modules own their content sections: a module field `content: { section: { fields, references, validate, prepare, commit, effects } }` decides a section's format, so replacing a module replaces its format. A replacement quests, dialogue or inventory module must declare its own section to read content data. A pack is checked and prepared whole before anything commits. Data for a module that is not installed is a `module-needs` error naming it.
189
- - `level.load` builds the new level first: on failure the old level stays, `level:failed` fires instead of `level:loaded`, and the Promise rejects, so a save that names a broken level rolls back. Catch the rejection if you called it without `await`. New events `level:loading` and `level:playable`, new field `level.playable`; `level:loaded` means the state is committed.
190
- - `saves.save` during a load waits for it to end; `saves.collect` during a load throws `save-busy`.
191
-
192
- - `threedog check`: the bypass hints (rule R40) now show without `--verbose` (the first 5; `--rule R40` lists all) and the last line counts them ("check passed, 3 bypasses"). R40 also catches `new Promise(r => setTimeout(r, ms))` (use `engine.clock.after`), every `localStorage.setItem` that is not an obvious preference, raw `keydown` / `keyup` listeners, `AudioContext` / `new Audio`, hand-made dialogue boxes, interact-distance checks and box-overlap collision. The game template's CLAUDE.md starts with "name the engine system before writing a new system file".
193
- - Pixel games: `threedog/pixel` adds `pixelGrid`, `pixelSprite` and `spriteFrame`, and `followCamera` and `fixedCamera` take `pixelSnap: { pixelsPerMeter, bounds }`. Camera and sprites round on one grid along the screen's axes, so a turned view moves by whole art pixels, also along a level's edge. Recipe 62 section 4b.
194
- - With `pixelSize`, the pointer's `ndcX` / `ndcY` ran across the padding at the right and bottom as well, up to k real pixels off; they now run across the picture.
195
-
196
- - Replacing the game state is now one transaction. `saves.apply`, `saves.load` and `session.newGame` / `load` / `quit` take turns in the order asked, so two overlapping loads end as one whole save instead of a mix of both, and a load that fails rolls back to the whole state before it. Idle, a save with only synchronous parts still applies before `apply` returns. What a game may notice:
197
- - A second `apply` / `load` asked while one runs now waits for it (async parts or a running `afterLoad`). Do not await one inside a part's `load()` or an `afterLoad`: it cannot start until they return, so it would wait forever (dev warns, `save-nested`). Start it from a `save:loaded` or `session:start` listener.
198
- - `ops.run`, `ops.can` and `ops.undo` now answer `'loading'` and change nothing for the whole replacement: also during a synchronous part's `load()`, a `world:load` listener, a running `afterLoad` and a rollback (before, only while an async part loaded). An `afterLoad` or `load()` that ran an op to rebuild should write directly, inside `engine.ops.allow(...)`. A game's own `engine.freeze` (a menu) keeps allowing ops.
199
- - During a failed load in dev, ops answer `'loading'` until the rollback ended, then `'halted'` (before, `'halted'` at once).
200
- - `session.load` of a missing or unreadable slot asked during a replacement now answers after its turn, not at once.
201
- - The load's freeze owners `threedog:load` and `threedog:load-parts` are one owner, `threedog:state-replace`. Code that looked for those names reads the new `engine.saves.replacing`.
202
- - A module's registrations now leave with it. `ctx.ops.define`, `ctx.saves.register`, `ctx.ui.define`, `ctx.stream.addReadyCheck`, `ctx.budget.metric`, `ctx.things.addSource` / `explainWith` and `ctx.ground.provide` / `addColliders` take the same arguments as the engine calls; `engine.unuse`, a `use()` batch that throws and a failed `init` all remove them, so `use(inventory())`, `unuse('inventory')`, `use(inventory())` works. Your own modules keep working unchanged; move their registrations to `ctx` to get this. `engine.catalog(name).resources` lists what a module owns.
203
- - A save part that leaves keeps its data: it rides in later saves and goes back to a part registered under that key. So `engine.use(mine(), { replaces })` where `mine` registers the same part key now receives the old module's data through `load`; give `mine` its own key if it uses another format. `saves.register` and `ui.define` now return a handle (they returned nothing, so no code changes).
204
- - A module whose `init` failed loses its ops, save parts and UI parts with its other handles. Calling one of its ops now answers that the op is unknown.
205
- - `ground` is one exclusive capability, held by `terrain` and `level`. Installing both now fails at `use()` with `shared-taken` instead of the later `setGround` winning: keep one, or swap with `engine.use(terrain(), { replaces: 'ground' })`. `level` no longer sorts after `terrain`. A module of your own giving the ground declares `provides: ['ground']` and calls `ctx.ground.provide(...)` instead of `engine.setGround`. When a provider leaves, the flat ground comes back. `engine.setGround` from game code still works over a module's ground, with a dev warning.
206
- - `use`, `unuse`, `replaces` and `engine.plugins.on` / `off` now go through one check: the module list after the change is worked out and every module in it must still find what it `requires`, before anything is touched. A `replaces` that drops a capability another module needs now throws `module-replaces` instead of leaving that module broken: add the capability to `provides` of the module that takes over. `engine.plugins.off` throws `module-unuse` and stays on when a module outside the plugin needs it; a plugin owning both provider and consumer goes off as a set.
207
- - `requires` now means the provider works. Until a required provider runs (still initializing, failed, or blocked), a module is `'blocked'`: its `init` waits and its hooks do not run, and `engine.catalog(name).blockedBy` and `describe().moduleStates` say why. If a provider fails, a `critical` module requiring it stops `start()` with `module-critical`, and others stay blocked; modules that do not depend on it go on. A later `engine.use(mine(), { replaces })` of the failed provider starts them. A module that can live without the provider lists it in `optional`. Inits of one late `use()` batch now run provider first instead of side by side.
208
- - A second provider of an exclusive slot is now refused in every build, before anything is touched. A release build used to warn and let the later one win.
209
-
210
- - `threedog check` and the runtime error for a guessed pause (`engine.time.pause()`, `engine.pause()`, `engine.time.stop()`, `resume`) now point to `engine.freeze(owner)`.
211
- - A game in `games/` of a clone no longer breaks `npm install` after an engine upgrade. `threedog new-game` now writes `"*"` for `threedog` and `@threedog/*` (the workspace copies), and `threedog doctor` reports a game whose range does not accept the current engine, or that has its own copy of the engine in `node_modules`; `threedog doctor --fix` rewrites the ranges. `threedog init` outside a clone keeps `^version`.
212
- - Test tools: a spec file that cannot be imported (for example its top level touches `document` or `window`) is now named with the file that threw, the cause and the fix; the other spec files still run and the round ends failed, instead of one bare "document is not defined" stopping everything. New warning rule R56: a test item that fails on a measured time (`ms < 100`) without `serial: true`.
213
- - `createEngine({ pixelSize: k })` and `engine.setPixelSize(k)`: one art pixel is k real screen pixels, every one the same width at any display scale, on WebGL and WebGPU, through page zoom and moves to another display. Replaces working out `devicePixelRatio / k` by hand (recipe 62 section 4b). Every engine write of the pixel ratio now goes through one place, so settings that clash are an error naming which to keep (`pixel-conflict`).
214
-
215
- ## 0.9.0 (2026-11-06)
216
-
217
- A game on 0.8.0 upgrades with no code changes, apart from the three points below: a particle list of three or more stops now uses every stop, `engine.start()` after `dispose()` rejects, and a save damaged in the listed ways is refused. Run `threedog doctor --fix` to move the `threedog` and `@threedog/*` pins in `package.json` (a `^0.8.0` range does not reach 0.9, so a game in `games/` of a clone would get a second engine from npm).
218
-
219
- - Picture check, checked against what seven games really show. `shadow-jag` now moves the shadow map's pixel grid by half a pixel and reads what follows it, in place of counting corners, which stayed the same with a map four times finer. `shadow-stripes` needs at least two bands, and glowing lines through a shadow no longer split it. Moving film grain is no longer read as shadow.
220
- - `nav({ crowd: true })` NPCs walk to a link's end before crossing, as other walkers do: they started about 1 m short, so a climb cut through the deck. One whose goal lay just past the landing no longer stops short of it.
221
- - Docs from a real trial: recipe 12 gives where a hatch's ends really sit, in place of the unchecked 0.4 m, a `linkPose` for a hatch, and says a link has no queue; recipe 02 says crowd NPCs walk through the player; recipe 57's ladder read an action that does not exist (`moveBack`), so it could not go down; recipe 64 shows a flipbook on both routes.
222
- - Tools: a headless browser is closed after 2 idle minutes (was 10), and every tool that opens one first stops what a dead browser left behind, such as a stuck page whose tool was killed.
223
- - `engine.start()` always answers after `dispose()`: it rejects at once with `engine-disposed`. It used to stay pending for good when `dispose()` ran while it waited on a model, the preload or a module's `init`, and a `start()` after the `dispose()` of a running engine answered as if the engine were alive.
224
- - `whenReady` of the built-in stream sources, and any `stream.source` or `stream.teleport` asked for after `dispose()`, reject with `stream-removed` instead of waiting for a frame. Waits in game code (`assets.model`, `jobs.add`, `nextFixed`) stay pending after `dispose()`, as before.
225
- - A damaged save is refused in more cases: a `containers`, `inventory`, `quests`, `terrain` or `grids` part of the wrong shape, and a world `step` that is not a whole number. Each is `save-bad-record` at load (load false, game rolled back) instead of a code error, a game frozen one step later, or a bag emptied without a word. Found by the long fuzz runs.
226
- - New games' `CLAUDE.md` and recipes 16 and 32 ask for a scenario for every end state (lose, die and respawn, retry, reload mid-run) and a read of `threedog verify`'s "ops never run" list.
227
- - Recipe 56 lists what draws wrong on WebGPU without a thrown error (`Points` size, `LineLoop`, `linewidth`, `customDepthMaterial`, `MeshDepthMaterial`, `toneMapped`, `dithering`, `texture(map, uv)` and `map.repeat`).
228
- - The docs no longer say the navigation library can be swapped: a module in the `nav` slot is Recast underneath (CONVENTIONS.md "What can be replaced"). Recipe 12 gives Recast's real download size.
229
- - `nav({ links: [{ id, from, to, oneWay, radius }] })` (experimental): NPCs path across jumps and ladders. These are Recast off-mesh connections: a path point that starts one has `link: { id, from, to }`, tiles rebuilt by obstacles keep them, and `findPathAsync` sees the same ones. A link that attaches nowhere warns `nav-link` at the build.
230
- - NPCs, `character.walkTo` and `nav({ crowd: true })` NPCs cross links in a straight line at walking speed unless the game says otherwise: `link:enter` and `link:exit` tell it when (`crossing.seconds` sets how long), `engine.characters.linkPose` bends the line. No default animation. An NPC saved mid-link goes on from the same spot after a load. Recipe 12, section 6.
231
- - `characters.findPath`, `characters.findPathAsync` and `nav.findPath` now type their points as `NavPathPoint`: `{ x, z }` plus `link` on a point that starts a link. A game without links gets the same points as before and changes nothing; code that walks a path by hand past a link should stop at that point, or use `character.walkTo`.
232
- - Particles: `size`, `color` and `opacity` take more than two stops, evenly spaced `[a, b, c]` or timed `[[0, a], [0.2, b], [1, c]]`, so a fade-in is possible. The two-point form reads as before; a list of three or more used to drop the rest and now uses them. A bad list throws `[module-params]` at `define`, `emit`, `attach` or `particles()`.
233
- - Particles: the geometry attribute `aLife` holds each particle's life fraction (0 birth, 1 death) for a game's own material.
234
- - Particles: `ratePerMeter` (effect option, option of `particles.attach`, live on the handle) emits per meter the emitter moves, spread along the path of the step, on top of `rate`. Default 0.
235
- - Particles: `soft` fades a particle where it meets what writes depth, default 0, off. On WebGLRenderer it costs a depth-only draw of the scene per render while a soft effect is on screen; on WebGPURenderer's WebGL2 backend it works only with post and antialias on, and warns otherwise.
236
-
237
- ## 0.8.0 (2026-11-06)
238
-
239
- npm never had 0.7.1: coming from 0.7.0, read this section and the 0.7.1 section below it, and follow `docs/MIGRATING-0.8.md`, which goes from 0.7.0 straight to 0.8.0.
240
-
241
- - Decoded sounds no longer pile up: they are assets now, so `assets.release` takes a sound (name or path), `assets.trim()` and level changes free long ones, and long sounds over a memory budget go by themselves, the longest unused first. Playing sounds play on, a freed one loads again when played, effects under 10 s stay cached, `preload: true` keeps a track. A failed file by path now reads `Asset failed to load`, same code `asset-load`.
242
- - Characters, vehicles and rigid bodies draw between fixed steps (`engine.stepBlend`), and the camera rigs follow that drawn place, so motion stays smooth on a screen faster than 60 Hz or when a frame runs no step or two. `root.position` and `mesh.position` stay the step's truth: gameplay reads what it read before, and the drawn pose is one step behind it, as swarms already were.
243
- - `jumpBuffer: 0` means "this step only" instead of never jumping, a press now gets its whole `jumpBuffer` (one step more than before), and with `coyoteTime: 0` walking off an edge spends the ground jump instead of leaving a free air jump.
244
- - `character.walkTo` no longer counts a long leg after a corner as being stuck: a path of several long legs used to replan at each one and ended `'stuck'` after `maxRepaths`.
245
- - `session.load` asked while a new game is still running (right after a page opened with `?play`) waits and then loads; it used to join the new game, answer `true` and load nothing.
246
- - `threedog types`: a name declared and never read is a hint in a game's code and an error in `packages/`. `shot <url>` on a built page keeps its fog, shadow, key and light facts and names what it could not read there (no three.js for the tools on a built page).
247
- - `quests.define` refuses a quest without a `steps` list when it is defined; it used to throw on every check after `start`.
248
- - The engine gives no help for this version's old names: a stale uniform name in shader text reads 0 with no warning, and an old `sky()` or `water()` option is an ordinary unknown option. See `docs/MIGRATING-0.8.md`.
249
- - `saves.register({ movedFrom })` is removed; only the calendar used it. The time and day of a 0.2 save under the old `sky` part are no longer read. Every released sample save from 0.7.0 on still loads.
250
- - `engine.sky.uniforms` is public, like `engine.water.uniforms`: the live handle for the uniforms given to `engine.sky.clouds()` and `engine.sky.layer()`, on both renderers (`engine.sky.dome.material.uniforms` only ever worked on WebGL).
251
- - The field `calendar.daysPerSeason` is removed: nothing read it and writing it did nothing. The `calendar({ daysPerSeason })` option stays.
252
- - `engine.THREE` is removed: `import { THREE } from 'threedog'`. Holding the whole of three.js on the engine kept every class in every game's bundle, and the package now has a `sideEffects` list: a bare `createEngine()` page went from 1561 KB to 1336 KB (470 KB to 397 KB gzipped). A dev page holds three.js under a private name for the engine's own tools (the picture check), a production build does not.
253
- - The contract files are importable from an install: `import contract from 'threedog/modules/gameplay/inventory.contract.js'`, as `@threedog/tools/contract` says. They are plain data for checking a replacement.
254
- - A model's clips moved from `model.userData.animations` to `model.animations`, three's own place. A game that cloned a model and then animated the clone crashed: three copies `userData` through JSON, which breaks the clips. A model with clips is now never batched, as the batching rule always said.
255
- - `phase` on the engine has one more value, `'starting'`, while modules run their `init`; `'loading'` now starts after them.
256
- - `uiFocus` is marked experimental: its shape may still change. `engine.input.push` is the stable route.
257
-
258
- - 249 public names are now `@experimental`, so 1.0 does not freeze them: the ones no game, recipe, example or template uses, and the coordination features no test game has used (`engine.stacks`, `engine.wrap`, `engine.mod`, `time.channel`). None is removed; `docs/api-surface.txt` lists each one. They sit in: `adaptive`, `assets`, `audio`, `batching`, `budget`, `calendar`, `characters`, `checkOptions`, `collision`, `control`, `decoders`, `dialogue`, `error`, `firstPersonCamera`, `fixedCamera`, `flow`, `followCamera`, `ground`, `i18n`, `inRange`, `input`, `interactions`, `inventory`, `jobs`, `level`, `materialPatches`, `mod`, `music`, `nav`, `ops`, `page`, `particles`, `photo`, `pickups`, `player`, `post`, `quests`, `random`, `rays`, `rigid`, `rtsCamera`, `runState`, `saves`, `session`, `settings`, `sky`, `stacks`, `startup`, `stateApplied`, `stateRefused`, `stream`, `terrain`, `terrainMaterial`, `time`, `timeline`, `toggleOnKey`, `ui`, `uniforms`, `urlState`, `validate`, `vars`, `vegetation`, `water`, `weather`, `world`, `wrap`.
259
- - NPCs and `character.walkTo` follow a path by one rule: an NPC skips points it has passed and no longer stands still for a step at each point, so it runs a few centimetres ahead of where it was mid-walk.
260
- - `inventory.slotsUsed` is gone: read `inventory.of().slotsUsed`.
261
- - `settings({ sections })` takes an entry `{ id: 'graphics', omit: [...] }` that leaves graphics rows out; an omitted row stays the game's value, and no preset or stored value moves it. A fixed pixel look omits `pixelRatio`, `antialias`, `adaptive` (recipe 62 section 4b).
262
- - The WebGPU renderer no longer asks for `powerPreference` on Windows, where Chrome ignores it and warned on every page load.
263
- - A damaged save is refused in more cases: an NPC `nav` that is not an object or a path that is not a list of points, a character speed that is not a sane number, a record with no `position`, content marks or an interactions part of the wrong shape, a physics body past ±1e7 (it hung the page for good). Each is `save-bad-record` at load (load false, game rolled back) instead of freezing the game. Found by the long fuzz runs.
264
- - Docs: recipe 28 section 4b, a road laid on terrain: the road and the height function read the same data.
265
- - A KTX2 model or texture asked for before `engine.start()` loads on WebGPU: the engine waits for the renderer's init itself, and `await engine.renderer.init()` is no longer needed.
266
- - `engine.setCamera(kind, options)` before play (boot code, or with the title up) keeps its options when play starts.
267
- - A moving physics body that freezes outside `rigid({ terrainRing })` warns once in dev, by name (`rigid-misuse`); recipe 11 explains the freeze.
268
- - `hud.counter` with no label shows the value alone; it used to show the id.
269
- - `inspect.perf()` on a halted page: `cpuMs` and `fps` are null and the text says they are not measured (they read 0). Its `lights` line says it counts point and spot lights.
270
- - `input.holders` and `runState.blockedBy` count pushes and removes that wait for the next fixed step, so the status line of a halted page no longer names a closed window.
271
- - Saves now hold the camera view: a new save part `cameraRig` (yaw, pitch), so Continue no longer loses a first-person view. Old saves load as before. `session.load` / `newGame` rebuild the installed rig on the same object, so a `const rig = engine.cameraRig` kept at boot stays the camera and a save part's `load()` that writes the rig keeps its write.
272
- - Error codes merged before 1.0, one code per failure: `options-object` is now `bad-position`; `npc-option` is `character-option`; `pickup-prop-id` is `world-id`; `session-handle` is `module-handle`; `world-missing` is `module-needs`; `load-failed` is `asset-load`. `bad-arg` is gone: `input.bind` raises `input-keys`, `characters.support` raises `character-option`, `settings({ presets })` raises `module-params`.
273
- - Some raises moved to the code that says what went wrong: `engine.stacks.define` of a known name raises `engine-misuse` (was `mod-owner`), `swarm.onStep` with no function raises `swarm-step`, `weather.set` with bad seconds raises `weather-option` (both were `module-params`), a damaged saved swarm raises `save-bad-record` (was `save-refused`).
274
- - Four throws that protected nothing are now one dev warning: `engine.wrap` on a `_private` method works, `createEngine({ fallback })` without WebGPU starts, a vegetation `rule` beside `positions` plants the listed spots, `ui.theme.promptHeight` starts.
275
- - Error text follows the current names: `shared-layer` no longer lists a `style` layer, `input-bound-twice` no longer mentions a module keys option, `rigid-misuse` covers the ragdoll cases, `quest-step` covers definitions, and other fixes that named the wrong call.
276
- - Editor test fixes: the test pickup sat under the editor panel and could not be clicked (moved), the grid-item test model now turns with its record, and a drag where the outer turn ring would stand is checked to move the camera and write nothing (the turn handle shows the yaw ring only).
277
- - Editor, first walked through by hand on a new game: opening it closes the title screen, Esc no longer opens the game's menu over the scene, the buttons stay in one place, a save says "Saved", a refusal is colored, a second Add lands beside the first, yes/no fields are lists (an unset `static` no longer looks like "no"), and a value the game cannot load (a `place` that does not exist) is taken back from the file at once instead of breaking the next start. `threedog content add` to a list written on one line opens it, one entry per line.
278
- - `threePatches.off('lod-view-camera')` now works: LOD objects made after it keep three's own `update` and `clone`.
279
- - `threedog how`: a sentence that only points at a recipe no longer ranks its row, and a text line joins the ranking only if it holds the typed word itself, so "webgpu", "node material" and "climb" reach their recipes again.
280
- - A module's `type` is optional: without one it is `'rules'`. A module going against its type (a `ui` module binding keys, a `picture` module defining an op) now warns once in dev and the call goes through; it used to throw. An unknown type name still throws.
281
- - `threedog state` and `threedog snap` (also `snap --play`) move no game time: they used to add a tick or two.
282
- - Animators update in a core step right after the `onFrame` list, so an `anim.sync` / `go` / `set` from any `onFrame` shows the same frame.
283
- - `engine.step()` during an unawaited `start()` or session change warns once in dev (`step-during-load`).
284
- - `views.show` writes the fov through the engine's owner, so `autoView.manual('fov')` keeps the game's value, and `release()` gives the fov back.
285
- - `assets.report` and `inspect.materials` share one texture slot table: `specularMap` is data in both, and a `lightMap` may be linear or sRGB in both.
286
- - `createEngine({ audio: { music } })` key spelling is checked by `music()` when it installs, not in core.
287
- - Removed: the error messages for names gone since 0.4 and earlier (`createEngine({ post })`, `createEngine({ style })`, `engine.elapsed`, a fourth `clock.after` argument): the first two are now plain unknown options. Error codes `renamed-field` and `shadow-type`, and `withHint` from `threedog/error-hints` (`hintText` stays).
288
- - Removed before 1.0, nothing implemented it: the ground API's optional `ground.navGeometry`. The navmesh comes from `staticTrimeshes()`.
289
- - `content.load` reads a pack's own `places` file; the `places` option goes on top, and `{ places: data.places }` is no longer needed.
290
- - `weather()` no longer needs `sky()`: rain and snow fall without it, or under a game's own sky, which reads `weather.current.grey` and `weatherDraw.flash`.
291
- - A low-tier device changes only defaults. `particles.define` `max`, `weather({ particles })`, a weather `count` and `sky.environment({ interval })` stand as the game gave them, as `colorResolution` already did.
292
- - `sky.replace(false)` is in the type: it draws no sky. A skybox now reaches full brightness at the brightest row of the game's keyframes, not at ambient 1.2.
293
- - `hlod` puts everything back when the module unloads. The shadows switch reaches near-only plants and plants on vegetation's own ground. `terrain({ viewFog })` keeps working under a replaced `terrain-draw`.
294
- - `music.play`, `music.stinger`, `hud.counter`, `hud.bar`, `calendar.at`, `calendar.daily`, `calendar.between` and `vegetation.removeInstance` check their option keys.
295
- - Removed, no reader anywhere: `settings.saved`.
296
- - New in `threedog/tsl`: `noise`, `hash` (the engine's value noise, until now only in sky hooks) and `instanceOffset` (an offset through the instance's rotation and scale). `ctx.fx` in patches, sky hooks and post effect nodes now holds the same full list.
297
- - `#include <threedog_uniforms>` declares every name on `engine.uniforms`, `uNight` and the sky values included. A shader that also declares one of them itself drops its own line.
298
- - `engine.shadows.cache`: a batch now answers for its originals, so `{ static: cityRoot }` covers batched copies, and an InstancedMesh whose instances change, or that leaves the scene, redraws the kept map by itself.
299
- - New: `adaptive.base`, the ratio this device or game starts at. A settings preset's `pixelRatio` is a share of it.
300
- - Removed before 1.0, no game used them (`MIGRATING-0.8.md`): `adaptive.paused`, `settings.removeSection`.
301
- - `hlod` hides a far original on the batch layer, the way `engine.batching` does. The `hlod-visible` patch and `userData.rayVisible` are gone: `mesh.visible` on a registered mesh is plain three.js again, and reads the game's value near and far. The full model of a far `assets.lod` waits on the same layer, so read `getCurrentLevel()` to see what is drawn.
302
- - Occlusion culling keeps a game's `mesh.layers` write made while the mesh was hidden; showing it used to put the old mask back.
303
- - Settings store only what the player changed, like `input.rebound()` for keys: one volume change no longer pins the render scale and every graphics value for later launches, and a preset is stored by name. A preset's `pixelRatio` is a share of the device's default ratio, so `medium` is no longer blurry on a 2x screen and `high` no longer renders 1.5x on a 1x one. `settings.values` is read only and `settings.get('pixelRatio')` is the real ratio. Stored files of version 1 are read: a value equal to the default lets go.
304
- - `engine.setPixelRatio(p)` is now the top adaptive resolution climbs back to: it was undone within two minutes while the raw three.js call stayed. Adaptive may still lower it under load.
305
- - New, off unless called, `@experimental`: `engine.rigid.ragdoll(character, { impulse, position, bones, limits, mass })` turns a skinned character limp and `rd.remove()` returns it to animation (recipe 11, section 3b). Reads common skeletons by itself, names what it cannot read; the mover, animator, capsule and camera yield and come back; the pose goes to the plain three.js bones in fixed steps; not saved. Partial or blended ragdoll is left out. `control.take` has a new layer, `physics`, between `cutscene` and `net`.
306
- - Swarm: a handle kept in a field now stays good. Handles pass 2^24 after 16 births, and a Float32 column rounded them, so `row()` answered -1 as if the target had died. A game's own `fields` are `Float64Array` now (twice the memory per field); `x`, `y`, `z` and `r`, `g`, `b` stay `Float32Array`.
307
- - `audio.buses.master` exists, as recipe 31 always said. A name that is no bus warns once with `[unknown-name]` and gives `master`, so `node.connect(audio.buses.wrong)` no longer throws and freezes gameplay in dev.
308
- - Pure functions: a number such as `1e9` or `0xff` is no longer read as an outer variable named `e9` or `xff`, so `terrain({ height })` accepts them.
309
- - `content.load`'s `unknown content` error now says `rules` must be listed in `content/index.js` too, and recipe 20 says the same.
310
- - Docs: `n.fbm`, `noise` and `hash` run 0 to 1 (recipe 28); every `bloom` option with its default (52); pool lights and walls (09); `onBeforeCompile` on WebGPU and a node-material sky (54, 08); where the canvas is (01); `vegetation.define` order and keeping plants off a line (36); how `describe` nests a part (19). Recipes 02 and 04 no longer send a game to engine source or engine tests.
311
- - Tools tell the truth, from four AI-built games. `check` reads `content/index.js`, what the page really loads: a kind listed there without `rules` is now an error instead of a green check and a dead page, and a file left out is a warning. A kind's `load` is optional: a game that imports its own file no longer writes an empty function. Valid TSL (`p.xy`, `.mul` on a `uniformArray` element) is a hint, not "engine API misused", and the worker check no longer reads `1e9` as a variable `e9`.
312
- - `applyState({ fresh, play, pos })` keeps `pos` (a new run used to undo it while `state` printed Set). A view moves `engine.focus` to its target and waits for the world there, so `shot --view` no longer needs a `--pos` beside it. `threedog perf -w game` measures a game's page, as its usage line always said.
313
- - `threedog test` says before the run, and again on a timeout, that a spec with `page.screenshot` left the GPU for software rendering; `software: false` keeps it on the GPU for a real picture. COMMANDS.md: a steering test holds the loop and advances with `engine.step`, so machine load cannot change its path.
314
- - Picture check: edges are not read when the picture changes by itself between two identical renders (moving film grain read as "shadow stripes on 92%"); a line over a default budget says why the number exists and that nothing is cut at it. `threedog how` no longer prints a GLSL sample under a row in a WebGPU game. New games: CLAUDE.md names `threedog play`, STATUS.md no longer asks for three versions against "build it".
315
-
316
- - Physics follows the `world` time channel: `engine.mod('time.world', { mul: 0.2 })` slows rigid bodies and vehicles with everything else, and a hit-stop at speed 0 holds them. To keep bodies at full speed, slow a channel of your own instead of `world`.
317
- - The press that opens a window or dialogue from a fixed step no longer also acts on it. `h.fresh` counts input frames, ended by `input.endFrame()`, so it holds at any frame rate and no longer depends on who called `uiFocus` first.
318
- - Renamed before 1.0 (`MIGRATING-0.8.md`): `engine.pause` is `engine.haltLoop` and `engine.paused` is `engine.halted`, because it stops rendering and an AI asked to pause a game reached for it and got a dead screen; a game freezes (`engine.freeze`, flow `'paused'`). The `pause` stack is `halt` and the error code `pause-owner` is `halt-owner`. `runState.state` is `'loading' | 'title-frozen' | 'halted' | 'frozen' | 'running'`: `'test-paused'` and `'paused'` go, and so does the `kind: 'test'` option.
319
- - `engine.freeze(owner, { ambient: true })` is now a real still: skeletal animation, character animation and particles stop with `uTime`. A plain freeze, as behind a pause menu, keeps them moving as before. `engine.still` is true during one, for a game's own frame code.
320
- - A page hold is a freeze (`MIGRATING-0.8.md`): a window in the background or a lost graphics device freezes gameplay by owner `'page'`, a full still. Cutscene tweens and camera moves used to run on over a stopped world, and `runState` said `running`. `page.held` is removed (`engine.frozen`, `runState.owners`), and `describe().page.held` goes with it. `step()` obeys it like any freeze; a page with the loop stopped has no hold, so tools still step a background window.
321
- - Removed: error code `character-hook`. Nothing raises it: assigning `player.onStep` or `player.onLand` gets no warning; use the events `character:step` and `character:land`.
322
- - Marked experimental, no promise at 1.0: `nav.crowd`. It hands out the raw Recast object, like `nav.navMesh`, `query` and `tileCache`.
323
- - New, off unless called: `engine.shadows.cache(light, { static })` draws what does not move once and redraws only the rest, by copying a kept depth map into the light's shadow map on WebGPU (recipe 45). One plain map only, no cascades; other renderers draw everything, with a warning. Marked `@experimental`: no frame time has been measured yet.
324
- - `threedog assets optimize --lod` writes lower-detail levels of each model (meshoptimizer simplification, geometry only) and reports triangles per level; skinned, morphing, animated and small models are skipped with the reason. `engine.assets.lod(name)` (experimental) or `lod: true` on a prop or template draws them as a plain `THREE.LOD`; off by default, and rays, collision and saves keep the full model. A LOD object is never batched.
325
- - `threedog assets optimize` no longer needs the external `ktx` program: when it is not on PATH the textures are encoded by `ktx2-encoder` (npm, MIT, Basis Universal as WebAssembly), still by slot (normal / occlusion / roughness as linear UASTC, color as sRGB ETC1S). `ktx` on PATH stays the first choice; the output names the encoder and the encoding time. The "`ktx` is required" error is gone; with no encoder at all it says `npm i -D ktx2-encoder`. Field page `docs/testing/field/2026-11-05-ktx/`.
326
- - Saves survive upgrades, now guarded: fixed sample saves from 0.7.0 and from 0.7.1 (`packages/engine/tests/save-compat/samples/`, every save part plus the stored settings) are loaded by a test on every run, and a save from a newer engine is checked to be refused with a message and no change. Nothing in the engine needed fixing. Every release now adds a sample and old ones are never edited (`docs/plans/release-checklist.md`).
327
- - `engine.batching.tint` on a batch that had already drawn did nothing on real WebGPU: three built the batch's shader before the batch had any instance color, so the first tint never reached the GPU. The first tint now rebuilds the batch material once. Guard in bundles.mjs reads pixels on real WebGPU.
328
- - `engine.batching` batches are no longer `DynamicDrawUsage`: on `WebGPURenderer` that refreshed every batch in full, every pass, every frame. City flight on a real GPU: frame median about 10.6 to 8.7 ms (one pair). Writes to a batch reach the screen as before.
329
- - Three's `BundleGroup` works beside the engine, no new API: `engine.batching` leaves a mesh under a `BundleGroup` alone, `hlod.add` skips it with a warning, `describe().render.bundles` and the `inspect.scene()` reason `in-bundle` report it. It gained nothing on the city scene; recipe 05 says when it may pay.
330
- - `engine.stream` unloads through `engine.jobs`, behind every build, so a row of blocks no longer leaves in one frame. An entry out of range can stay a few frames longer in the real-time loop; `engine.step` still finishes in the same frame.
331
- - `engine.remove` counts the scene only when a part is held by neither `assets.shared` nor `batching.held`. Batching relists only the parents that changed.
332
- - A damaged world save record whose `motion` is not an object (e.g. the number 25) is now refused at load as `save-bad-record` (load false, game rolled back) instead of throwing `Cannot create property 'vx' on number` in the fixed step and freezing the game; `motion: null` and game-own fields stay allowed.
333
- - A hang the fuzz found: a position far past float precision (`applyState({ pos })` with z = -3.6e178, or any `placeAt` / ground call) froze the page for good, because the chunk loops (`cx = floor(x / size); ...; cx++`) stop advancing once `x / size` passes 2^53. Positions with |x| or |z| above 1e9 are now refused with the `bad-position` code and the position in the message (`xzOf`), so `applyState` reports `pos` as refused and the game goes on. Each fuzz case also has a time limit now (`FC_CASE_MS`; 60 s in the browser items, 30 s in the writer item): a case over it is a failure that prints its input, seed and path. Dev warning, once: a world record whose `jump` or `safe` is the wrong kind of value (a damaged or hand-edited save) is still repaired when the character writes its motion, but the warning `character motion: the world record's 'jump' is ...` now names the field.
334
- - Fuzz tests (fast-check, fixed seed, short in the normal suite): the content writer now refuses values that are not data (NaN, Infinity, undefined, functions, bigints) by name instead of writing them as code, and writes a carriage return and -0 correctly; a damaged `scene` save part is refused as `save-bad-record` (load false, game rolled back, no frozen gameplay) instead of throwing a code error. Long run for a release: `FC_RUNS=300 threedog test Fuzz` (see `docs/plans/release-checklist.md`).
335
- - Editor (dev server only): pickups get a height handle and can be added from the panel (items the game defines); a grid item turns in quarter turns and writes `rotation`; undo of a cleared field puts it back in front of the property that followed it (the content write takes an optional `spot`); an entry with computed values can be deleted and the delete undone; the turn handle's outer rings no longer tip the anchor. NPC facing is not content data, so NPCs get no turn handle, and schedules are still edited by hand.
336
- - Dev warning, once: the game added its own light while the engine's placeholder lights (`engine.lights.sun`, `engine.lights.hemi`) are still in the scene, so the two add up. It names the fix, `createEngine({ lights: false })`; nothing is refused or changed, and there is no warning with `lights: false`, with the placeholders removed, or for a module's or pool's lights. New field page `docs/testing/field/2026-11-05-many-lights/` (frame time vs light count, lightPool, shadows, adding a light mid-play).
337
- - Fewer freezes from hooks: a quest reward that throws (`content-place`, `ground-missing`) no longer leaves the quest half finished. `content.run` runs every effect of a list and rethrows the first error, the quest still finishes (`quest:done`, toast) and the failure is reported softly. A job that fails inside its commit tick no longer freezes the fixed step a second time; its promise rejects once. `ground-missing` (a prop, spawn or `snapToGround` beyond `terrain({ shape })`) and `swarm-disposed` (`spawn()` after `dispose()`, returns -1) are warnings now: the fallback was already safe.
338
- - Surface names these changes touch, as the API lock lists them: `decoders`, `openWindows`, `uniforms.uCloud`, `uniforms.uCloudScale`, `uniforms.uCloudSpeed`, `uniforms.uCover`, `uniforms.uCurve`, `uniforms.uMoonPower`, `uniforms.uSunPower`, `sky.gradientCurve`, `sky.moonSize`, `sky.orbitSway`, `sky.orbitTilt`, `sky.starScale`. See `MIGRATING-0.8.md`.
339
- - Removed before 1.0 (`MIGRATING-0.8.md`): `rays.cast`, `rays.pick`, `i18n.t`, `engine.openWindows`, `engine.decoders`, `EASINGS`, `assets.reportText` and `assets.users`.
340
- - Removed and renamed before 1.0 (`MIGRATING-0.8.md`): `player.object` is `player.root`, `player.addTo` is `engine.add(player.root)`, `hud.add` is `hud.bump`, `dialogue.cps` is `dialogue.charsPerSecond`, `rtsCamera({ angle })` is `pitch`, `weather.define` is `weather.defineField`, `terrain.T` is `terrain.generator`, `terrain.CHUNK` is `terrain.chunkSize`.
341
- - Marked experimental, no promise at 1.0: `player.saveMotion`, `player.loadMotion`, `engine.terrainDraw`, `engine.vegetationDraw`, `engine.weatherDraw`.
342
- - Removed or renamed before 1.0 (`MIGRATING-0.8.md`): `rigid.R` is `rigid.rapier`; `collision.circles` and `collision.boxes` go (use `collision.forEachStatic`); `stream.readyCheck` is `stream.addReadyCheck`; `music.addTracks` is `music.define(name, track)`; `debug.startBench`, `debug.benchmarking` and the panel's stress button go (use `threedog stress`); the types `Object3D`, `Vector3`, `Vector2`, `Color`, `Quaternion`, `Material`, `BufferGeometry` and `Texture` are no longer exported from `threedog` (import them from `three`). `threedog assets` needs a verb (`optimize` or `check`). `doctor --json` prints `{ ok, summary, items }`.
343
- - One meaning for `@experimental`: the name may change or go with no migration note. `api-count` reads the tag, a tag on a module or an engine member covers what hangs off it, and `docs/api-surface.txt` ends the line with it, so rule R55 lets it move and requires a note when a stable name gets marked. Newly marked: `net`, `Net`, `fakeNetwork`, `webSocket`, `threads`, `grids`, `Grids`, `Grid`, `Layer`, `hlod`, `ops.guard`, `ops.allow`, `terrain.edit`, `stream.source`, `stream.sources`, `stream.teleport`, `post.get`, `post.list`, `post.own`, `post.setAntialias` (tagged before, read by the lock only now), `rigid.rapier`, `rigid.world`, `rigid.playerBody`, `rigid.playerCollider`, `nav.navMesh`, `nav.query`, `nav.tileCache`, `nav.helper`, `assets.gltf`, `assets.draco`, `assets.ktx2`, `post.object`, `post.targets`, `shadows.csm`, `commits`, `swarm`, `terrainDraw`, `vegetationDraw`, `weatherDraw`, `bakeProbes`, `loadProbes`, `loadLightmap`, `moduleOrder`, `moduleStates`, `disabledModules`, `player.saveMotion`, `player.loadMotion`, `jobs.loadingMs`, `jobs.maxSteps`, `jobs.slowStepMs`, `stream.unloadFactor`, `batching.held`, `world.steps`, `level.heightfield`, all of `threedog/tsl` (`wind`, `cloudShadow`, `season`, `objectOrigin`, `uniforms`, `celLighting`, `detailBump`, `detailNoise`, `rim`, `shadowTint`, `waterFresnel`, `waterSurface`, `waterWave`, `wrapDiffuse`), `voxelGI`, `temporalAA`, `sunShafts`, `lightVolumes`. Only `--json` and MCP shapes are an interface; printed text may change.
344
- - Uniforms renamed (`MIGRATING-0.8.md`): `uCloudScale` to `uCloudShadowScale`, `uCloudSpeed` to `uCloudShadowSpeed`, `uCloud` to `uWeatherCloud`, `uCurve` to `uSkyCurve`, `uCover` to `uGroundCover`, `uSunPower` to `uSunBrightness`, `uMoonPower` to `uMoonBrightness`. The dome's own `uCloudScale` and `uCloudSpeed` are now `uSkyCloudScale` and `uSkyCloudSpeed`, on `engine.sky.uniforms` and in sky hooks.
345
- - `engine.batching`: the default cell is now four stream cells (256 m), not one (64 m). A cell no wider than a streamed block could not batch across blocks, so a model used a few times per block drew every copy alone. The city field run on WebGPU went from 19.8 ms to 9.4 ms a frame (real GPU, 14.4 km flight). Culling is coarser: 13-25% more triangles drawn there. A game with heavy props can set `createEngine({ batching: { cell: 64 } })`.
346
- - Removed or renamed before 1.0 (`MIGRATING-0.8.md`): `engine.tick` is `engine.time.tick`; `engine.cpuMs`, `cpuMs`, `engine.cpuPhases`, `cpuPhases`, `cpuPhases.fixed`, `cpuPhases.frame`, `cpuPhases.render`, `cpuPhases.afterRender` are read through `engine.inspect.perf()`; `engine.terms`, `terms`, `terms.cloudShadow`, `terms.season` are `engine.shaderTerms`; `engine.view`, `view`, `view.manual` are `engine.autoView`; `terrain.isReadyAround` and `rigid.groundReady` are gone (`engine.stream.addReadyCheck` already waits on them); `lightPool.usage` is `engine.describe().lightPool`; `saves.queue` and `saves.prefix` are private (new `saves.putAttachment`, `saves.removeAttachment`, `saves.attachments`, `saves.storageKey`).
347
- - Failure and "not found" have one shape (`MIGRATING-0.8.md`): `inventory.add` returns `{ ok: true, key, added }`, or `{ ok: false, code: 'full', facts }`, also on containers. `grids.get`, `inventory.get`, `interactions.get` give `undefined` when there is none, and `interactions.get` and `interactions.items` are typed.
348
- - `clock.after(seconds, fnOrEvent, { data, channel })`: the third argument is options, as in `clock.every`; the old form throws.
349
- - `player.onStep` and `player.onLand` were one-slot properties, and a second system silently took the slot: they are gone. Listen to the new `character:step` and to `character:land`.
350
- - Writing `stream.radius`, `terrain.viewChunks`, `terrain.density`, `post.antialias` or `weather.auto` now takes effect like its `setXxx`.
351
- - `engine.moduleOrder`, `moduleStates`, `disabledModules`, `bakeProbes`, `loadProbes` and `loadLightmap` are marked experimental.
352
- - Tools: a second `tune write` always takes effect: a line with a hand comment or a Windows line ending used to run after the new value and win while the tool said "Written". The file keeps its line endings, and code in a material literal (`side: THREE.DoubleSide`) stays.
353
- - Editor: steps run one at a time, each from the file as the last step left it, so an overlapping save, drag or Ctrl+Z no longer corrupts the undo history or gets refused as a conflict. A drag or a row being typed in survives a save landing under it; a dead dev server is a refused step. A file put back to the editor's last text now reloads the page. Add skips an id only the file has; a broken list in a json row is refused; a field written as `null` can be edited; key order no longer counts as a conflict; a failed check leaves a hand save alone; removing an NPC reloads the page.
354
- - Tools: `threedog stress` stops on a lost WebGPU device or an uncaptured GPU error (it read as spare capacity), frees each step's instanced mesh, and keeps the load inside the view. Both stress pages now share `@threedog/tools/stress-load`, so a game on WebGL gets gpu ms too.
355
- - `engine.stateRefused`: what the URL parameters or the latest `applyState` could not do. `shot` and `capture` fail on a value you named that the page refused (`--weather rian`). A weather refused early and accepted late is no longer reported, and a hook refusing `at` is a refusal, not a position error.
356
- - `describe().world.changed` leaves out where a record with motion stands (a walking NPC), so the Changed line keeps what a command did; runtime rows hold a copy of the position.
357
- - `check` in a game: file size (R1), copied passages in game docs (R22), paths, commands and links in game docs (R18), a module with no key (R51) and setup-time creation (R33) are warnings now. R33 stays an error only for `{ initial: true }`, and its fix names `// runtime: <reason>`. A stale GAMEMAP warns in a game and still fails for the engine's examples. `lib` no longer reads `createEngine(cfg)` as WebGL.
358
- - No key is not an error: `interaction-no-key` is a dev warning and play goes on. `interaction.use` runs when code asks, `ops` does not offer it, and the `noKey` code is gone. `engine.input.bind('interact', [])` says no key on purpose.
359
- - Sky: a second `engine.sky.environment()` replaces the first. `engine.sky.replace(false)` means no drawn sky. `sky({ time })` with a calendar warns once in either install order. `engine.sky.layer` takes any non-empty name. `engine.sky.sunDir` is the same vector as `uSunDir`, and a game's write stays (`engine.autoView.manual('sunDir', false)` gives it back). `camera.aspect` is the owned value `view.aspect`. A direct write to `uSkyTop`, `uSkyHorizon`, `uDaylight` or `uTimeOfDay` warns once (`signal-overwritten`) with the entry to use.
360
- - `applyState`: `season` with no calendar and an `at` nothing knows go into `refused` instead of throwing after a partial apply. The `state-at` code is gone.
361
- - `world`: `{ save: false }` records may hold anything, unless the kind is simulated with `worker: true`. A class instance in a saved record (`Vector3`, `Color`) is refused at once instead of failing after a load, and the error gives the line to copy.
362
- - Fewer freezes from the loop: an `approach` interaction on a held character is refused with `cannotWalk`, an NPC yields when a game holds it on the base layer, a WebGL-only material added after start is reported without stopping play.
363
- - New games: the template colors the engine's background instead of assigning one, so `sky()` shows and `palette.background` still works. Style advice in the template reads as defaults, with plain three.js named as equally valid.
364
-
365
- - Loading: a model whose textures failed to decode (KTX2 transcoder, bad image) now counts as loaded with missing references: `describe().loading.ok` is false, `warnings` names the file, and `threedog loading` says "N partial" instead of "N/N ok". Before, GLTFLoader swallowed the failure and everything read ok.
366
- - Audio: `describe().audio` (present while a bus is ducked or a voice plays) and `engine.audio.info` (now documented) report the duck level the active ducks ask for, not the gain node's value mid-fade, so a fade reads right on a headless page where the audio clock stands still.
367
- - Errors: the `asset-load` hint tells "called before the backend is initialized" (a load before `engine.start()`) from a real 404; the `not-installed` hint says it is a plain TypeError and when engine.<module> is the cause. The error log names an Event or an empty-message rejection instead of `{"isTrusted":true}`.
368
- - Tools: `shot --keep --out name.png` writes exactly `name.png` (the timestamp is only for generated names); the scenario line uses ground and weather ids, not the translated names. Recipes 16, 26 and 34 note the position formats, that `bloom` / `ao` rows already exist, and that occlusion culling hides nothing in step mode.
369
- - Pathfinding: without a navmesh, `characters.findPath` returns `null` (`noPath` when detailed) for a target inside a wall or water, and its straight legs are sampled every 0.12 m, so a route no longer clips wall corners (up to 0.3 m before).
370
- - Describe: records without a name (props, template instances) now appear in `nearby` by id with their kind, the nearest 8 only.
371
- - Describe: `ambience` carries `audioLocked` while its rules wait for a click or key press, so an empty `on` on a bridge page is not read as "no rule matches here".
372
- - Tools: `play --stop` asks the server up to three times and stops a stuck one named in dev.json, instead of removing the record and leaving the process alive.
373
- - Docs: recipe 26 covers hiding the interface for a photo mode (engine ui and plain three.js), custom title items closing the title, and the HUD unit following the engine locale.
374
-
375
- - Library: `lib pull` refuses an entry that cannot draw on the game's renderer, with nothing copied, and `lib check` fails on such a copy (GLSL in a WebGPU game, a node material in a WebGL game). `--force` copies it to port by hand; the check reads the copy, so a port clears it. Node materials and TSL now count as WebGPU only when an entry's `backends` are read from its code, and an entry without `backends` gets them from its files.
376
- - Library: `lib pull` prints the import path where the file landed, not the path stored from the game the entry came from.
377
- - Assets: `assets.texture()` and models with textures before `start()` work on the WebGPU route. The upload waits for the first frame instead of throwing "initTexture() called before the backend is initialized".
378
- - Docs: COMMANDS.md says where each kind of library entry lands; the `modular-building` README says what `examples pull` copies and that the demo page stays in the engine repository.
379
- - `threedog capture` works on WebGPU games: it hooks the draws of WebGPURenderer, prints the renderer it measured, skips Spector on real WebGPU and says so, and fails on a frame with no draws. It now prefers the hardware GPU.
380
- - `threedog stress` measures the game: from a game folder or with `-w` the load goes on top of the game's scene on its own renderer. A WebGPU game without real WebGPU is refused. The neutral page stays for the engine repo and is named as such.
381
- - `engine.inspect.perf()` says "nothing measured yet" before any draw is counted: new field `measured`, `ok` is false, no tick on frame metrics.
382
- - `threedog bake light` traces rays through a BVH instead of a probe grid: sky no longer leaks into rooms through walls, and pillars shade the floor. `--spacing` is gone, `--samples` now means rays per texel (default 128). The sky now matches the strength of the hemisphere light it stands for, so bake again and compare. A map with no light fails and writes nothing; a failed shader is printed.
383
- - `threedog tune write` merges into the earlier block instead of replacing it; the block passes `threedog types`; `tune` takes `-w`; with no file it names the values that need one.
384
- - Docs: tuning without a mouse (COMMANDS), turning the ambient off after a bake and the `?bake=1` flag (recipe 34).
385
-
386
- - Input: pressing the interact key with nothing to use is no longer silent. The press lands in the op history as a refused `interaction.use` (`inputLocked` with the context holding the input, or `nothingNear`), and `threedog test` prints it, the input lock and the open dialogue under a failed spec. `describe().ui.dialogue.advance` names the keys that advance a dialogue.
387
- - `threedog init`: leaves a game that passes its first `threedog check` (it writes GAMEMAP.md; the extra `map` step is gone from the READMEs and recipe 01); a package already in `devDependencies` is not also added to `dependencies`; files the template layers wrote are no longer reported as "existing files kept".
388
- - `threedog check -w <game>` reads that game alone: tsc and R18 no longer go through every game, example, spec and engine doc only to throw the results away, the generated-doc checks of the engine stay in the root check, and the other parts run beside the rules instead of after them. The line that counted other workspaces' type errors is gone with it.
389
- - Characters and NPCs take `model: [name, ...args]` like props (it crashed inside `Object3D.add` and `check` could not see it); arguments on a file or async model stop with `character-option`. The open-world template declares `home` in `content/places.js`, so `{ place: 'home' }` passes `check`. `art board` and `lib` run in a repository root stop and ask for `-w <game>`. Recipe 02 says `humanoid` is your own asset, and the game template says how to set `locale`.
390
- - Editor (dev server only, F2): first version done. Edit the selected entry's properties from its field table, add an entry from the game's templates and named models, delete one, undo and redo (Ctrl+Z, Ctrl+Y; the file comes back byte for byte, a hand edit in between refuses it). Moves now cover height and rotation, the real model follows the drag, and `static: false` entries, physics bodies, grid items (`cell`) and NPCs (`start`) can be picked and moved. `threedog content` write-back gained `unset` and `restore` in `contentWrite` for this; the CLI is unchanged.
391
- - `engine.applyState` resolves to `{ ok, refused: [{ key, value, reason }] }`: a weather name the game lacks or a key no module handles is reported, not dropped. A module hook refuses with `{ refused: { key: reason } }` and lists its keys in `stateKeys`. `fresh: 1` now means yes; a `fresh`, `wait` or `pos` value it cannot read throws `state-value`.
392
- - `describe()` has `vars` (story flags and counters) and `world.changed` / `world.removed` (what play changed, capped at 50 with the rest counted), so a snapshot and `expectDescribe` see them. Snapshots drop `picture.writers` (frame counters), compare story counters exactly, and an `--only` path found nowhere fails instead of matching nothing.
393
- - A bad position is refused, not an engine error: `thing.set` answers `badPosition` in `can`, and an op whose argument is that position fails with that code, so gameplay no longer freezes on it. A NaN an op worked out itself is still an engine error, where it happened.
394
- - Bridge commands report what took effect: `state` fails with the reason and exit 1, `step` and `hold` say how many seconds really passed and fail when short, `press` fails when the engine stopped, scenarios stop on a refused state or a stopped engine. `op` refuses a value that does not fit its shape, and accepts `position=3,0,4` for an untyped argument. `press` and `op` print a `Changed:` line.
395
- - Bridge output: every cut says so and how to see the rest; `ops` no longer prints `[object Object]`; `log()` shows in `js` checks scripts and when a script throws; `status` counts only errors since `threedog reload`; `catalog --find` searches the library and says when nothing is found; `threedog --help` and `<bridge command> --help` exit 0.
396
- - A page that died at start answers in seconds, not over 100: the wait counts errors from before the command, and the bridge's headless page records them from its first line.
397
- - `new-game --open-world` games start with `presets.weather.temperate`, so `state weather=rain` works in them.
398
- - `threedog how`: searches the api pages and every docs line, not only the AI.md rows and recipe headings; handles word forms (`pixelate`, `arrangement`); orders GLSL or TSL answers by the game's renderer (from `main.js`); says "the docs never use" a word only after a search of every docs line.
399
- - Calls that did nothing and said nothing now warn or leave a record, none is refused: container start items that do not fit (warn, names the container), `quests.start` on a done quest (warn), a swarm spawned before the first new game or load and cleared by it (warn), `music.stinger` with audio not running (the `music:stinger` event still fires, with `played: false`; it also gets `played: true` when it sounded).
400
- - Settings: `settings.reset(key?)` puts one value (or all) back to the engine's or the game's default; `resetBindings()` still does keys.
401
- - Docs: `readParams` throws on a wrong type in every build (only an unknown key is dev-only); `heightScale` wording; recipe 11 sample car drives 20 m in 3 s; swarm in the new game's CLAUDE.md and GAMEMAP "Not used yet".
402
-
403
- - Assets: manifest entries whose `fallback` names loop back (a to b to a) now fail once with `asset-fallback-cycle` naming the chain, instead of waiting on each other forever.
404
- - Sky: removed the options `moonSize`, `starScale`, `gradientCurve`, `orbitTilt`, `orbitSway`. They only set the start value of a uniform or field that stays writable (`engine.uniforms.uMoonSize` etc.), so the engine keeps one entry, not two; using one throws `sky-option` naming the entry. Notes in `docs/MIGRATING-0.8.md`.
405
- - `engine.remove` keeps a geometry or material another object in the scene still uses, and disposes it with its last user. `stream.add`'s default unload goes through it, so unloading one block no longer makes the renderer rebuild every block that shares its models. Code that relied on `remove` disposing a shared geometry at once should dispose it itself. On WebGPU the records of loaded objects now stay until those objects leave the scene, so peak GPU memory is higher (about 110 MB in the city stress run) and levels off.
406
- - Batching: its per-frame check is bounded in meshes instead of roots, and batched originals stay out of three's walks during the engine's draw (`describe().threePatches`: `batching-draw-walk`). A district of streamed blocks went from about 60-70 ms to about 22 ms a frame.
407
- - API lock for 1.0: `docs/api-surface.txt` lists every public name with its signature (engine repository only). `threedog check` rule R55 fails when the surface differs from it; a removed or retyped name also needs a line naming it under this heading. `threedog api-count --lock` rewrites the snapshot. The old `api count` total guard is gone (the snapshot covers it).
408
-
409
- ## 0.7.1 (2026-11-05)
410
-
411
- Never on npm: it reaches users inside 0.8.0. Bug fixes for asset lifetime, WebGPU memory and `assets optimize`, plus new optional tools; nothing public was removed. Upgrade notes are in `docs/MIGRATING-0.8.md`.
412
-
413
- - Asset lifetime: a load now owns its data. Copies of a model that fell back count on the entry that really has the data, so `assets.trim()` and `release` no longer free what those copies use, and `modelNow` works for such a name. `users('shrub')` is the copies asked for by that name; `users('rock')`, the name it fell back to, counts them too. When the fallback's data is freed, the name loads again on its next use.
414
- - A load ended while it runs (`release`, `trim`, a palette write, a name registered again, `dispose`) is freed when it arrives and never written back; a download is aborted, and a font never reaches `document.fonts`. Code awaiting it: after `release` and the like it gets a fresh load, never freed data; after `dispose` the promise stays pending for good, and so does any later `model()` / `texture()` / `font()`, so nothing rejects during teardown or resumes against a dead engine.
415
- - A palette write no longer leaves a generated model's old build behind: it is freed with its last copy, or at once with none. Registering a name again does the same. Generated textures and internal `cached()` builds stay as they were, because nothing counts who uses them.
416
- - Recipe 18 §4b follows one object from creation to removal and says who owns what at each step.
417
- - New `--json` on `threedog check` and `threedog test`: one result on stdout, `{ ok, summary, items: [{ code, level, file, line, message, fix }] }` (fields only when known); the text goes to stderr and the exit code is unchanged. Items carry the rule id, the TS code, `content` or `test`, and the rule's fix. The MCP `check` tool reads this shape instead of parsing text.
418
- - `new-game` and `init` write `AGENTS.md` beside `CLAUDE.md` (the same text) for tools that do not read CLAUDE.md; an existing `AGENTS.md` is kept.
419
- - New optional module `swarm()`: many same-kind gameplay objects (bullets, enemy crowds, pickups, debris) in typed arrays, one `InstancedMesh` each. `engine.swarm({ name, capacity, geometry, material, fields })`, then `spawn`, `free`, `row`, `onStep`, `near`, `clear`, `dispose`. Stable handles, fixed-step update on a time channel, drawing smoothed between fixed steps, opt-in saves. Recipe 65. Nothing changes for a game that does not install it.
420
- - New `engine.stepBlend`: how far the drawn frame is between two fixed steps, for drawing fixed-step state smoothly.
421
- - New `threedog content stamp`, `content set --source` and `content capture`: copy an arrangement (`content/arrangements/<name>.js`, read by tools only) into plain entries, batch-edit every copy explicitly, and capture a named group from the running game into an arrangement. Rule R52 warns while a captured and stamped group is still named in code.
422
- - Recipe 65 shows pure-picture bulk with TSL compute on WebGPU (plain three.js, no engine API).
423
- - WebGPU memory: a mesh dropped while its material stayed in use kept its render record, geometry arrays and GPU buffers until the renderer died. The engine now sweeps these records every few seconds, for engine paths and plain `scene.remove` alike, so a game has nothing to do (recipe 56): a plain three.js scene dropping 60,000 meshes went from 1.1 GB of heap to a flat 200-260 MB, and a 7.8 km terrain flight from +72 MB to +25 MB, flat to 15.6 km. It reads a private three.js list; if an upgrade moves it, the sweep turns off with the warning `webgpu-records-unread`. `threePatches.off('webgpu-record-sweep')` switches it off.
424
- - Dev warning `geometry-undisposed`: geometries nothing in the scene uses keep piling up on the renderer. The fix is `geometry.dispose()` when a mesh is gone for good.
425
- - `threedog check` rule R53 fails on merge conflict markers committed in any tracked text file.
426
- - `threedog assets optimize`: the optimized pack now comes last in `assets.js` (a game rewritten by the old command is moved over), so `/optimized/x.glb` wins over an original of the same name, and that override no longer prints the "replaced by manifest" warning. A cached model is no longer skipped from the problem count: `--strict` and a lower `--budget` judge it like a fresh run. `module-cycle` no longer fails with an internal TypeError when the first module in the list only waits behind a cycle.
427
-
428
- ## 0.7.0 (2026-11-05)
429
-
430
- - Public surface audit (`threedog api-count --unused`): removed `engine.level.object` (same as `level.root`); dropped from the public types (code stays, engine-internal) `engine.triggers.action`, `engine.settings.action`, `engine.interactions.action` (copies of the module option), `engine.inventory.defs`, `engine.quests.defs` (use `inventory.item(id)` and `quests.list()`). 98 more unused names are kept on purpose, each with a reason in `packages/tools/api-count.mjs`
431
- - Follow camera: `collision({ cameraOcclusion })` now defaults to `'both'`: meshes registered with `engine.rays.addStatic(mesh, { occluder: true })` stop the arm without a gameplay collider (a crown, an eave). Level buildings count too; `'colliders'` keeps the old test.
432
- - `character.placeAt` over a registered support stands on it; `mover: 'manual'` runs the `states` hook. Recipe 57 "Moved by script" (ride, lift, ladder), recipe 32 says what a support needs.
433
- - Script runs: `?fresh` / `applyState({ fresh })` / `threedog state fresh=1` delete the saves for a clean start; `inputLocked` carries `facts.by`; `snap --play`; `shot` and `snap` name the backend that drew the picture; `snap` timeouts say what the page was doing; a `js` script waiting on a stopped clock ends with the reason; the WebGPU fallback is one line in errors.log.
434
- - `threedog assets optimize [--dry]`: Meshopt + KTX2 copies of art/models/ in public/optimized/, textures encoded by slot (a normal map is never compressed as color), `assets.js` pointed at the results, reruns skip unchanged files, per-file size / GPU memory / problems. `npm run assets` crashed on start (a name used twice); fixed.
435
- - Light probes: `engine.bakeProbes` now builds three's per-pixel probe grid on both renderers, stored in half precision; `follow`, `height`, `probes.probe` and `own()` are gone, probe files are version 2 (MIGRATING-0.7.md). `describe().render.probes` reports lit objects outside the grid and light counted twice.
436
- - Real-time light on WebGPU: `@threedog/post-effects/tsl` adds `voxelGI`, `temporalAA`, `sunShafts`, `lightVolumes`. Post effects gain `needsBuffers` (normal, diffuse, velocity merged into one scene render), `backend`, `skipOnLowTier` and `facts`; `describe().render.post` says `held` and why.
437
- - Occlusion culling: `engine.occlusion.enabled` skips hlod cells and batched groups while hidden, on both renderers; `describe().render.occlusion`.
438
- - Lightmaps: `threedog bake light` (system Chrome, real WebGPU) and `engine.loadLightmap(file)`; `describe().render.lightmap`.
439
- - `celLighting` in `threedog/tsl`: colored cel bands on `MeshToonNodeMaterial`, cast shadows in the same bands. `paletteLut` in `@threedog/post-effects`: a fixed palette for `lut()`. Docs no longer say `rampTexture` colors work on three's toon: it reads only the red channel.
440
- - New games start on WebGPU with TSL: `threedog new-game` and `init` write `import 'threedog/tsl'` and `createEngine({ renderer: 'webgpu' })`; `--webgl` starts the GLSL form instead. `--example` and `templates/example` are removed. `createEngine` called with no `renderer` still builds the WebGL renderer. With no WebGPU in the browser the game runs on three's WebGL2 backend, slower.
441
- - `engine.hud.value(id)` reads the current value of a counter or bar. `describe().renderer` gives `requested`, `backend`, `reason`, and `gpu`, `tsl`, `glsl`, `compute` (what that backend can run).
442
- - `threedog/layers` exports `RESERVED_LAYERS`, the one table of the three.js layers the engine keeps (26 to 29 and 31); a game's own layers are 1 to 25.
443
- - `threedog js --wait <seconds>`: a script waiting on the game clock on a page nobody steps ends with the reason instead of a silent timeout.
444
-
445
- ## 0.6.0 (2026-11-04)
446
-
447
- - Fixed: on WebGPU, cascades on a light whose `target` has a parent took the target's local position, so shadows fell another way than the light shone; they use its world position now, as WebGL does.
448
- - Breaking: `grids.preview({ look })` is `{ draw }` and a layer's `tiles: { look }` is `tiles: { color }`; an unknown `tiles` key now throws.
449
- - New: picture parts. `PICTURE_SLOTS` and the type `PictureSlot` name the picture values only one writer may hold (sky, fog, tone, environment, background, sun); `describe('picture').picture.slots` shows the holders; `engine.unuse(name)` removes a module. On the dev server a write to a value another part holds warns `picture-held`, and a removed picture part's leftovers warn `picture-leftover` (recipes/62-picture-code.md 3e).
450
- - Fixed: the sky dome stayed in the scene after `engine.use(mySky(), { replaces: 'sky' })`.
451
- - Breaking: `look` no longer names picture things. The game folder is `picture/` and `createPicture(engine)`, gameplay calls `picture.lamp(id)`; the module type is `'picture'`; the drawing parts are `terrainDraw`, `vegetationDraw`, `weatherDraw` with slots `terrain-draw`, `vegetation-draw`.
452
- - Breaking: the look check is the picture check: `--no-picture`, `picture` and `pictureMs` in `shot --json`, the `Picture intent:` line in DESIGN.md, `lib add --kind picture`, `@threedog/tools/picture-check`. Seven recipes and the `plain-picture` example are renamed.
453
- - New (dev server only): `describe('picture').writers` and `engine.explain({ picture: 'fog.far' })` (`threedog explain picture fog.far`) name the file:line that last changed a light, fog, tone, environment, background or material value; a value not tracked says so. Two places writing one value in one frame with different results give one warning (`picture-conflict`) naming both. The look check adds measured facts: a `ShaderMaterial` that ignores fog or tone, a light layout changed during play, transparent meshes whose pixels depend on draw order. Recipe 62 "Wiring `picture/` parts".
454
- - Breaking: `makeMaterial`, `engine.makeMaterial`, `look.materials`, `look.surface` and the glow verb are gone, and so are the material and patch plugin slots: materials are plain three.js. New: `applyEffects(mat, { lighting })`, `rampTexture`, the `uNight` signal.
455
- - Breaking: `createEngine({ style })` is gone and throws with the fix: the look is plain three.js in the game's `picture/` code, UI colors go in `createEngine({ ui })`, season tints are `engine.sky.seasonTints`; `types/style.d.ts` and `core/styleParts.js` are deleted.
456
- - Docs: recipes 09 (style folder) and 48 (makeMaterial) are merged into `recipes/09-materials-lights-models.md`: materials are plain three.js in `picture/`, module looks are `.material`, the UI look is `createEngine({ ui })`. Recipe 43 teaches shader code through `applyEffects` only; the `lighting` spec key becomes a plain `lighting` slot patch there.
457
- - Breaking: the dev panel (`?panel=1`) reads and writes three.js objects directly; its style export, "apply and rebuild" and `?ov=` are gone, `engine.styleWorkbench` is `engine.devPanel`, and the `threedog tune` block holds plain three.js writes.
458
- - Breaking: `threedog style check` is removed; `threedog style palette | compare` are now `threedog picture palette | compare` (bridge `picture-palette`, `picture-compare`; MCP `picture_palette`, `picture_compare`).
459
- - Breaking: `style.character` is gone: `characters({ animation })`, and `engine.characters.material` is the plain three.js material of every placeholder capsule.
460
- - Breaking: `style.triggers` is gone: `triggers({ debugColor, debugOpacity })`.
461
- - Breaking: `style.palette` is gone: `engine.assets.palette`, a plain writable object that generators read as `this.palette`; a write rebuilds what is asked for after it.
462
- - Breaking: cached and baked models read their materials back as recorded (plain three.js, `neutralMaterial`), no longer rebuilt from a material role. `assets.report()` says `madeByEngine`; `explain().materials` lost `keys`.
463
- - Breaking: `style.grid` is gone: `grids({ ok, bad, previewOpacity, previewHeight, tiles, tileLift })`; the preview's and tiles' plain three.js materials are `pv.material` and `layer.material`.
464
- - Breaking: `style.pickup` is gone: `pickups({ color, size, lift })`, and `engine.pickups.material` is the plain three.js material of boxes and geometry-only models.
465
- - Breaking: `style.ui` is gone; the UI look sits in `createEngine({ ui: { theme, css, fonts, templates } })` beside the part names, and `engine.ui.templates` is writable.
466
- - Breaking: `look.ground` and `style.terrain` are gone. The ground's look is `terrain({ colors, biomeColors, steep, variation, detail })`, `engine.terrain.material` (get / set), `.uniforms`, `.patches`, `.recolor()` (recipe 36).
467
- - Breaking: `look.water` and `style.water` are gone. The water's look is `engine.water.material` (get / set), `.uniforms`, `.patches`, `.shader()`, `.normalMap()` (recipe 44).
468
- - Breaking: `style.particles` is gone: `particles({ effects, default })`; an effect's `.material` is get / set and drawn as given, `.uniforms` its `{ value }` objects (recipe 64).
469
- - Breaking: weather looks are `weather({ rain, snow, area, lightning, lightningBrightness, overcastColor })` options; `engine.weather.define(field, spec)` and `engine.weather.particles` (plain `.material`, `.uniforms`, `.spec`) replace `look.weather`.
470
- - Breaking: plants take plain materials. `engine.vegetation.material`, `.patches`, `.sway()` and `.color()` replace `look.wind` and `look.vegetation`; wind strength and speed are `engine.uniforms.uWindAmp` / `uWindFreq`.
471
- - `threedog art board`: every art resource of a game on one page, with where it is used, what is unused, missing or not traced, and copy lines for the AI; `--json` is the same data, `--live` and the dev panel's "art" folder show what the running game really loaded.
472
- - `?at=<place>` (`threedog shot --at <place>`, `applyState({ at })`): skips the start screen and stands the player at a named place with the game's camera on it at once. `?pos` no longer opens on a camera glide either (new event `state:placed`).
473
- - `interactions.add(mesh, { label, onUse, once, counter })`: `once` hides the mesh after a use, `counter` adds to a HUD counter (new `hud.add(name, n)`), both saved in the new `interactions` save part; pick-and-count things no longer need pickups and an inventory. Recipe 03 says which to use when.
474
- - `createEngine({ ui: { theme } })` is the one place to reskin: every default part (dialogue, prompt, HUD, toast, menus, title) reads its variables, and recipe 26 "Reskin" lists them on one screen. The HUD now follows `bg` / `fg` / `accent` unless `hudBg` / `hudFg` / `hudAccent` are set; new `radiusSmall` and `shadowSmall` replace the corners and shadows that were fixed in the CSS (the default toast is no longer a pill).
475
- - Breaking: the sky writes no light, fog, exposure or environment; it computes the signals and draws the dome. Your `picture/` code reads `engine.uniforms` and writes three.js (recipe 62).
476
- - Breaking: `sky({ sun | hemisphere | fog })` throw naming what to write; delete the option. `createEngine({ lights: false })` drops the placeholder lights, which are now still.
477
- - Breaking: no fog by default. `style.sky.fog` and `look.fog.set` write `scene.fog` once; a fog that changes over the day is yours.
478
- - Breaking: no default tone curve (`renderer.toneMapping` stays three.js's default unless `style.toneMapping` names one), and no room environment map unless `look.lights` `env.intensity` is above 0. `env.share` is gone.
479
- - Breaking: `style.exposure` and `look.tone` exposure are numbers, and `look.lights` keys take no function: exposure and light over the day are your `picture/` code.
480
- - Breaking: weather no longer multiplies `look.lights.*` or `look.fog.far`; it writes the signals `uWeatherLight` and `uWeatherFog`. `uViewDistance` is new (stream radius without terrain, a fog's far; `terrain({ viewFog: true })` writes it).
481
- - Breaking: plain game materials get the cloud-shadow patch only once the game turns cloud shadow on, in one recompile at that moment.
482
- - Breaking: `style.sky.groundTint` and `part.author.drive / driven / feed` are gone (nothing left reads them).
483
- - `describe().render.defaults` lists what the engine itself still puts on the picture, each with how to stop it.
484
- - The `look.*` verbs are deprecated: no new features, recipe 52 says what to write instead. Removal is a later step.
485
- - `threedog new-game`: `main.js` wires a start screen, autosave and Esc pause + settings menu (delete a line to drop one), the template's CLAUDE.md opens with an "Already here" table, recipe 63 is a 16-line third-person start. R40 hints at a hand-written localStorage save or pause; `shot` says when the start screen covers the picture.
486
- - Esc under pointer lock opens the menu on the first press: the browser keeps that key, so a lock the player ended counts as the back key when nothing else is open and the game is running. `page:pointerlock` also says `byEngine`.
487
- - `threedog lib add --kind look` stores one file from `picture/` (or a `.glsl`) in the library and `lib pull` puts it back under `picture/` (`picture/shaders/` for `.glsl`); a look file that imports siblings is refused at add. `art copy` of a folder takes `.glsl` files along. Recipe 62 section 3c.
488
- - `engine.shadows.cascades(light, { count: 3 })`: cascaded shadows for a game's own DirectionalLight, with or without a sky, on both renderers; returns a handle (`set`, `remove`). `look.shadow.set({ cascades })` runs on the same code; the look check's usage line for a game's own light points here; recipe 45.
489
- - The look check points the way: over-budget facts (new budget entries `shadowMaps`, `shadowMapSize`), usage lines for cascaded shadows and `lightPool`, new facts for near-black shadows, shadow stripes and stepped edges, and fog named first when it is most of the picture. They read the game's own lights too. Recipe 60 "When the look check names a feature".
490
- - `threedog new-game` generates a `picture/` folder instead of `style/`: the gray starting picture as plain three.js the game owns (`index`, `palette`, `lights`,
491
- `materials`), with `createEngine({ lights: false })`; recipe 62. Styles keep working. Water with no fog reflects the sky's horizon color, not a fixed gray.
492
- - Prop and template `collide: 'circle'` now stands on the model's base (the lowest fifth of its height above the ground), not on its widest extent: a lamp's arm or a tree's crown no longer blocks walkers or pulls the follow camera in. Characters can walk closer to such models; a box is unchanged. New form: `collide: { circle: 0.25, occluder: false }`. A mistyped `collide` is refused at load.
493
- - `lightPool`: a camera cut (`engine.views.show`, a fixed-camera shot) moves the lights at once, without the fade; `shot --view` drew the old spot's lamps. `views.show` emits `camera:shot`.
494
- - `threedog shot <url>`: a local dev server of another game's folder is refused; one that cannot say is reported. The scene is counted again after the picture, with a warning if it changed.
495
- - Black-frame hint lists shader programs that failed to compile. Test runner: a second argument to `ev` fails.
496
- - `threedog shot` and `threedog capture` wait for the game's code after `await engine.start()` (lamps added after a later await): no request in
497
- flight and the scene's objects / lights / materials unchanged for 0.3 s, at most 10 s; shot says how long it waited and what was added.
498
- - `presets.camera.overShoulder` looks up (minPitch -1.05) like `thirdPersonAction`; every camera preset that locks the mouse can look up (tested).
499
- - The look check names the material whose hiding brings a black frame back (a ShaderMaterial with NaN / Inf, spread by bloom), and reports fog
500
- that is most of the color in a large share of the picture, with its near / far and color.
501
- - Deploying under a sub-path: `threedog build my-game --base /my-game/` (Git Bash's rewrite of `/my-game/` is undone), and root-relative
502
- manifest paths (`'/models/x.glb'`) now follow the build's base; recipes/61-deploy.md. The pack test builds and serves under a sub-path.
503
- - `threedog describe` and the other bridge commands: when a threedog dev server of another folder answers, the message says so instead of
504
- "no dev server".
505
- - Dev error log: a repeated warning (warned again after each reload) is counted, not written again.
506
- - Recipe 32: bullet time needs `engine.time.channel('enemies')` first, and world records follow it through `world.simulate(kind, { channel })`.
507
-
508
- ## 0.5.0 (2026-11-04)
509
-
510
- - Install instructions agree everywhere (README, package READMEs, COMMANDS.md): until 0.4.0 is on npm, use the engine from the repository;
511
- after that, `npm install threedog@0.4 three@~0.187.0` and `@threedog/tools@0.4`. Each says which version it describes.
512
- - Node: every package.json (and a new game's) declares `^20.19.0 || >=22.12.0`, the range vite 8 needs. `threedog dev / build / preview /
513
- test / shot / perf / stress / capture / gallery / bake` stop first on an older Node, printing the version found, the range and how to fix it;
514
- `threedog doctor` reports the same check.
515
- - New-game CLAUDE.md: a clear request is built directly (no confirmation round); the AI asks only about choices that change the result and
516
- cannot be inferred, writes its other picks as "(picked, not asked)" and lists them in its report; a change updates only the records it makes wrong.
517
-
518
- - After-await fixes (outside review of 0.4.0). A module unloaded while its async init awaited (replaces, a plugin removed) can no longer act on a
519
- same-named module installed after it: each install has its own identity; what the old init tracks or `ctx.mod`s afterwards is removed at once, its queued `ctx.whileCompiling` warm-ups do not run
520
- (dev warning `[module-handle]`), and its completion or failure leaves the newcomer's state and handles alone.
521
- - `saves.apply`: a listener that throws after an `await` inside an async `load()` now fails and rolls back the load like one that throws before
522
- it (the capture lasts until the load settles, one scope per load). The rollback point is a copy of every part's `save()`, so
523
- `save: () => state, load: d => Object.assign(state, d)` rolls back correctly; `save()` data that cannot be copied refuses the load
524
- (`[save-part-threw]`, MIGRATING-0.5).
525
- - Plugins composed: a post effect keeps its place across `plugins.off` / `on` (equal `order`s keep the order the names were first added in,
526
- plugin effects are placed in plugin-list order), so A, B no longer come back B, A. `look.post.set({ A: false })` pauses in place,
527
- `plugins.off` unloads. Each style-pack plugin is its own owner (`style:<pack>/<file>`): switching B off no longer drops A's material. Two
528
- plugins writing the same key on one layer are a dev `[shared-conflict]` naming both, unless one file says `export const replaces = '<file>'`.
529
- `plugins.off` / `on` return `{ off | on, reach, rebuilt, note }`; `plugins.list()` and `describe().slots` give each plugin's reach (`live` or
530
- `new materials only`); `off('<pack>')` says the pack's starting values stay. New `engine.look.materials.rebuild()`: materials already made
531
- are made again from the current layers (patches, replace, type) and swapped in place, keeping call params, hand-set colors and wind / cloud
532
- shadow; `plugins.off` / `on` of a material or patch plugin calls it (`{ rebuild: false }` skips it) (MIGRATING-0.5).
533
-
534
- - Turning shadows off (look.shadow, the settings menu) is the renderer switch only: `renderer.shadowMap.enabled`. No light's `castShadow` is
535
- written any more, so a game that changes `castShadow` while shadows are off keeps its value when they come back. `describe().owned['shadows.off']`
536
- is gone; budget `shadowLights` is 0 while shadows are off (MIGRATING-0.5).
537
- - `threedog lib pull` of a code entry writes a working plugin: the code in `plugins/<name>/`, plus the wiring file `plugins/<name>.js` that calls
538
- its factory, from the entry's new `plug` line (`lib add --plug "makeIt({ ... })"`, else the exported function; `pull --plug` overrides).
539
- - `[plugin-shape]` errors name the file, what it exports and the exact fix: a factory function, a module with no `type` or no hook, an effect
540
- with no name.
541
- - One entry per look value: `water()`, `sky()` and `terrain()` options that were look values are gone; each is a `look.water` / `look.sky` /
542
- `look.ground` param (style layer: `style.water`, `style.sky`, `style.terrain.config`). New params: `look.water` `normalMap normalScale
543
- normalRepeat normalSpeed shininess specular`; `look.sky` `keyframes sunSize sunGlow sunBrightness moonSize moonColor moonBrightness
544
- starDensity starScale gradientCurve groundTint orbitTilt orbitSway dim.tint dim.stars`; `look.ground` `normals`. `sky({ skybox })` →
545
- `look.sky.replace`. The old options throw in dev naming the call (MIGRATING-0.5).
546
- - `water({ material })` is gone: the water surface material has one entry, `engine.look.water.replace(fn)` (style layer: `style.water.material`).
547
- It throws in dev naming the call. `water({ uniforms })` stays: it declares the uniforms the `look.water.patch` hooks read (MIGRATING-0.5).
548
- - Type declarations: `look.clouds`, the leaked three.js `Light` export, the `.engine` back-references (terrain, characters, cameraRig, control,
549
- views) and three test-only readouts (`audio.info`, `ambience.info`, `level.buildMs`) are gone from the types; runtime unchanged (MIGRATING-0.5).
550
- - Shared values check number values the same way on `engine.mod` and on `handle.change()`: set / add / mul are finite numbers; clamp is
551
- `{ min?, max? }` with each given bound a finite number and min <= max; `stacks.define({ min, max })` the same. A wrong one throws `[shared-value]`
552
- naming what was given and the fix, instead of making the value NaN (`clamp: { max: 'oops' }`, `{ max: NaN }`) or holding a reversed range.
553
- - Colliders take `occluder: false` (`collision.addCircle` / `addBox` / `addSegment` / `addObject`): walkers are still stopped, the follow
554
- camera's occlusion check ignores it. A forest of trunk colliders no longer collapses the camera onto the player.
555
- - `shot --play` starts straight in play: the engine's new `?play` URL key (`applyState({ play })`) does what the title's Start does
556
- (`engine.session.newGame()`, the title part closes; flow leaves its start state). Games no longer need a `?play` key of their own.
557
- - Page arguments rewritten by Git Bash are also undone from its `EXEPATH` root, and `shot` prints the page it really opens when the argument
558
- was rewritten (`npm run shot -- /` echoes `> threedog shot C:/Git/`, which read like the wrong page).
559
- - `threedog how "game test"` finds how to write a game's own test (a CONVENTIONS.md entry row pointing at COMMANDS.md "A game's tests").
560
- - The api page of `collision.addBlocked` gives the `bounds` shape `{ minX, maxX, minZ, maxZ }`.
561
- - The repository `.gitignore` no longer ignores every `shots/` folder: tool output stays under `.threedog/`, a game's own screenshots can be committed.
562
- - Follow camera `ground: 'shorten'` samples the arm at most 0.2 m apart (capped at 160 samples, so 0.2 m up to a 32 m arm) instead of 12 fixed
563
- samples: a narrow rise in the ground height (a 0.25 m bump in the middle of an 8 m arm) now shortens the arm instead of being stepped over.
564
-
565
- ## 0.4.0 (2026-11-04)
566
-
567
- - Sky colors for a game shader: `engine.uniforms.uSkyHorizon` / `uSkyTop` hold the colors the sky draws this frame (tint and lightning included);
568
- the default fog color is the same horizon. `weather.set(name, { seconds: 0 })` switches at once (before any step); negative seconds throw.
569
- The type check names the expression a call was made on (`` `engine.random` is not a function ... (it is Random; call one of its methods) ``).
570
- - One small look API: every `engine.look.<part>` has `set` / `patch(hook)` / `add` / `replace(thing)` / `manual` / `value`, and `patch` only
571
- swaps a named hook. `look.materials.patch` is now `look.materials.add`; `look.fog.replace` is removed (a fog of your own is `scene.fog = ...`,
572
- the engine yields); the module plumbing (`write`, `extend`, `drive`, `tick` ...) moved to `part.author`. Removed verbs throw naming the new call
573
- (MIGRATING-0.4).
574
- - Post effects have one entry, `engine.look.post.add(x, { name, slot, order, owner })`: a plain three.js Pass, a WebGPU node function or an effect
575
- `{ name, create, node, fuse }`; the plugins folder and a style's plugins go through it, so every effect switches with `look.post.set`. Removed:
576
- `engine.post.addPass / insertPass / removePass`, `look.post.patch`, `style.post`, `postAdd / postRemove`, `createEngine({ post })` (each throws or
577
- is gone, see MIGRATING-0.4). A function exported by a plugin file is a `[plugin-shape]` error on both renderers (it was a WebGPU post pass).
578
- A Pass that renders the scene itself replaces the scene render (it drew the scene twice). WebGPU: removing an effect frees its nodes (leak fixed).
579
- - Material roles have one entry, `engine.look.materials`: the style's `materials` table is its style layer and `makeMaterial` reads nothing else
580
- (look.materials.set also reaches Material-instance roles). Style packs bundle look plugins (`style.plugins`, plugged by `engine.plugins` on the
581
- style layer, `plugins.off('<style>')`). The world example's `lowpoly` style is replaced by a small `world` style; its models moved to `examples/world/art/`.
582
-
583
- ### Breaking (module types, leftovers)
584
-
585
- - A module's `type` decides how its errors are handled: a `look` or `ui` module that throws is switched off and the game keeps running; the
586
- `presentation: true` flag is gone. `stage` only orders hooks; the stages `world` / `presentation` are renamed `ground` / `effects`.
587
- - `engine.time.manual` is gone (`engine.mod('time.<channel>', { owner, set })`).
588
- - The terrain data part reads no style: chunk colors and the `viewFog` fog distance belong to the terrain look (owner `terrainLook`, removed with it).
589
- - The 0.2 rename traps (`[renamed-field]` on `clock.timeScale`, sky calendar fields, `.reason`, `runState.by`, `describe().ui.inputContexts`,
590
- dialogue `{ lock }`, `style.pickup.model`, item `mesh`) are removed; `[item-mesh]` is gone.
591
- - New-game template: the style lists `plugins` (with a `style/plugins/` folder) instead of `post: []`; the blank game no longer depends on
592
- `@threedog/post-effects`. `threedog how` labels THREE.md rows that name engine APIs `engine + three.js`, not `plain three.js`.
593
-
594
- ### Breaking (time, input, character control)
595
-
596
- - One time source: `engine.time` counts fixed steps (`engine.tick`); `real`, `ambient`, the calendar and channels are views (`engine.time.now(name)`). `engine.elapsed` and `engine.time.real` are gone (`engine.time.now('real')`); `describe().time` has `tick / real / ambient / calendar`; the `clock` save part is folded into `time` (old saves load).
597
- - Input by context: modules declare actions (`input.action`, `ctx.input.action`), the game binds keys (`input.bind`, `createEngine({ bindings })`), the player rebinds on the settings layer (`input.rebind`, `input.rebound()`). `input.define` and `createEngine({ padBindings })` are gone; the base context is `walk` (was `gameplay`). F3, F4, dialogue 1-9, RTS Q / R and the cutscene skip keys are no longer bound by default (`presets.bindings.debug / dialogNumbers / rtsRotate / cutsceneSkip`).
598
- - Character control: one control slot per character (`engine.control.take(ch, { owner, layer, step })`, layers base < script < cutscene < net). Gone: control `'none'`, writable `player.control`, `presets.player.none`, timeline `lockInput` (`actors`).
599
-
600
- ### Added (plugins folder)
601
-
602
- - `plugins/` next to a page's html: each file is plugged at `engine.start()` by what it exports (Object3D, Pass / node pass, Material, ShaderPatch, module); order by file name or `plugins/plugins.json`; `engine.plugins.off(name)` / `on(name)`; a wrong shape is `[plugin-shape]`.
603
- - `describe().slots`: what is plugged where, from which file, what it affects.
604
- - Plain `PointLight` / `SpotLight`: counted by `engine.budget` `lights` (limit 8) / `shadowLights`, listed in `describe().render.lights`; a casting light at intensity 0 stops redrawing its shadow map.
605
- - `threedog lib pull` puts code entries (shader, material, effect, module) in `plugins/` by default (models and textures still in `art/`).
606
-
607
- ### Breaking (physics, nav, weather, collision)
608
-
609
- - `weather.set(name, seconds)` is `weather.set(name, { seconds })`; a number throws `[module-params]` in dev.
610
- - `engine.collision.circles` / `.boxes` are Sets (insertion order, O(1) remove): `.length` is `.size`, `.filter` / `.map` need `[...set]`.
611
- - `engine.interactions.items` is a read-only array built on each read (insertion order); writing to it does nothing. `get(id)` is the fast lookup.
612
- - New `engine.collision.mirror({ add, remove })`: one add / remove diff of the static colliders, used by rigid and nav (their own copies are gone).
613
- - New `engine.assets.useTexture(name, use, { where, instead, opts })`: fetch a texture for a stand-in; a failed load is one `[load-failed]` warning
614
- naming the slot. detail, surface, particles, weather particles and water use it (sky still has its own).
615
- - rigid rebuilds its physics world once per new game / load (it rebuilt on `session:end` and again on `world:load`); a refused load leaves physics as it was.
616
- - New options with the old values as defaults: `weather({ lightningFirst: 5, lightningInterval: [6, 20] })`, `nav({ maxObstacles: 1024, maxAgents: 128, arrive: 0.6 })`.
617
- - `nav()` declares `optional: { collision }`.
618
-
619
- ### Breaking (per-frame waste, save loads, look write paths)
620
-
621
- - The weather look's entries on the look points are owned by the module `weatherLook` (was owner `'weather'`): `holders().find(h => h.owner === 'weatherLook')`. It takes each entry once through `ctx.mod` and rewrites it with the new `handle.change(value)`, so a frame adds no entry and no cleanup handle.
622
- - While a save part's `load()` is still pending (it returned a Promise), gameplay is frozen: no fixed step runs and `ops.run` / `ops.can` fail with code `loading` until every part is applied.
623
- - `ops.list({ available: true })` (and so `describe().actions`) no longer throws for an op whose `offers` throws or offers an arg set that fails its args check: such an op shows as an entry with code `offersFailed` / `badOffer` and `facts.error`.
624
- - Post effects have a fifth slot, `tone` (exclusive, between `hdr` and `ldr`): an effect there replaces the engine's tone-mapping output (OutputPass on WebGL, renderOutput on WebGPU) and must output display color; `describe().render.toneMapping` then names it.
625
-
626
- ### Added (per-frame waste, save loads, look write paths)
627
-
628
- - `handle.change(value)` on every `engine.mod` / `ctx.mod` handle: rewrites that entry's value in place (same op and layer); false on a stale handle.
629
- - `describe().look.<part>.<key>.pack`: the style part that set a style-layer value when `createEngine({ style: [...] })` merged several (its `name`, else `style[<index>]`).
630
- - Rule R48: engine code writes `toneMappingExposure`, `shadowMap.enabled / type` and `environmentIntensity` only inside the owning look part's apply (allowlist with reasons in the rule file).
631
- - Rule R49: every shader patch and post fuse the engine and its add-ons ship has a `tsl` form next to `glsl`, so it draws on WebGPURenderer (WebGL-only-by-design patches listed with reasons in the rule file).
632
- - Camera rigs are no longer wrapped method by method (a pose compare on every call, `forward()` read every fixed step included): the built-in rigs mark their own placement once (fixed `cut`, rts `moveTo({ instant })`).
633
- - Staged content templates no longer serialize each copy's model every frame; an open menu with an idle cursor reads no layout per frame (the control list is cached and re-read on a move, a confirm or a DOM change).
634
-
635
- ### Breaking (plain three.js is adopted)
636
-
637
- - `engine.scene.add(obj)` registers the root like `engine.add` (thing registry, describe, thing.set); engine modules mark their own objects with `engineOwned`.
638
- - `engine.post.addPass(pass)` / `insertPass(pass, i)` / `removePass(pass)`: a plain three.js Pass (WebGL) or `(input, ctx) => node` (WebGPU) joins the chain; RenderPass / OutputPass of the engine's own are skipped.
639
- - A game rendering the canvas itself takes the frame: the engine stops drawing its own and warns once `[own-frame]`; removing the call hands it back.
640
- - Plain lit three.js materials (Lambert / Phong / Standard / Physical / Toon) that enter the scene take the engine's cloud shadow (and a `look.cloudShadow.replace`), on both renderers, sharing one program per type. Opt out per material with `material.userData.cloudShadow = false`; materials already given engine patches are left alone; listed in `describe().owned['cloudShadow.plain']`. Snow / season cover stays opt-in: `applyEffects(mat, { season: 'ground' })`.
641
- - Vegetation on its own ground (no terrain): adding a species places only that species on the loaded chunks (it dropped and rebuilt every chunk). Terrain and own-ground chunks stream through one helper (`core/chunkStream.js`).
642
-
643
- ### Breaking (consistency sweep)
644
-
645
- - `music.stop(fade)` is `music.stop({ fade })` (like `play`); a number throws `[module-params]` in dev.
646
- - `setValidate` is gone; `createEngine({ validate })` is per engine (`engine.validate`). Page-wide warnings stay on while any live engine has checks on (it was: the last `createEngine` decided for the page).
647
- - The event-name spelling check (`[event-typo]`) now also runs in the `npm test` bundle (it read raw `import.meta.env.DEV` and was off there).
648
- - Dev notes print through `note(text, key?)` (core/validate.js); R45 flags a bare `console.info` in engine code.
649
- - No three.js prototype is changed for rays: `Mesh.prototype.raycast` and `BufferGeometry.prototype.computeBoundsTree / disposeBoundsTree` are three's again. Registered static meshes still get a BVH (own `mesh.raycast`). A game that relied on BVH for its own `THREE.Raycaster` adds three-mesh-bvh's setup itself.
650
- - New `threePatches` export and `describe().threePatches`: the remaining class changes (`shadow-accessors`, `node-setup-position`), each undone page-wide with `threePatches.off(id)`.
651
- - AI.md: the "When something happens -> which tool" list moved to recipe 16 §11 (the MCP server reads it there).
652
- - No module option takes keys any more; modules only declare their actions and the game binds them (`createEngine({ bindings })` / `engine.input.bind`). Gone: `inventory({ keys, pad })`, `quests({ keys, pad })`, `photo({ keys, pad })`, `interactions({ keys })`, `grids.preview({ rotateKeys })`, `characters({ brakeKeys, brakePad })`, `createPlayer({ jumpKeys, runKeys })` (each now `[module-params]`). `presets.keys` is gone; its maps are `presets.bindings.inventory / quests / photo / gridRotate / brake`, plus new `presets.bindings.walk` (run / jump, what `presets.player.*` used to carry) and `presets.bindings.interact` (E / gamepad X, what `presets.interactions.*` used to carry). `presets.player.*` and `presets.interactions.*` hold no keys now. Migrate: `createEngine({ bindings: { ...presets.bindings.walk, ...presets.bindings.interact, ...presets.bindings.inventory } })`; "no key" is a binding to `[]`.
653
- - `createEngine` options are typed in their schema (`engine.catalog('core').params` shows `bool`, `number`, `object|array` ... instead of `any`): a wrong shape such as `batching: 'yes'` or `fov: 'wide'` now throws `[module-params]` at the call (it used to pass and fail later or be ignored). An unknown `fallback` is `[module-params]` too (was `[engine-misuse]`). Param schemas accept several shapes as `'bool|object'`.
654
- - R6 (options tables) is an error now: a module's schema and its d.ts options interface must name the same keys; a schema default written again as a destructuring default in the same function fails; a modules/ options table with `keys` / `pad` / `xKeys` fails.
655
- - `inventory({ pauseGame })` of the wrong type is `[module-params]` (was `[inventory-misuse]`; the schema already checked it).
656
- - Timing arguments are options objects (a number in their place throws `[module-params]` in dev): sound handle `h.fade(to, s)` / `h.stop(s)` are `h.fade({ to, seconds })` / `h.stop({ fade })`; `timeline.tween(t, to, duration, ease)` is `tween(t, to, { duration, ease })`; `fadeScreen(engine, to, seconds)` is `fadeScreen(engine, to, { seconds })`; `anim.go(state, fade)` / `anim.action(name, fade)` take `{ fade }`; fixed camera `blend(name, seconds, ease)` is `blend(name, { seconds, ease })`.
657
- - Handles end with `remove()`: a tween promise's `cancel()` and a `dialogue.say()` promise's `stop()` are `remove()`; a sound handle gains `remove()` (same as `stop()`); a look part's `dispose()` is `remove()` (it owns no GPU resource). R7 now fails (was a warning) on any returned object with `stop()` / `cancel()` and no `remove()`, with no allowlist.
658
- - `flow.transition` called `music.stop(fade)` positionally (it threw in dev since `music.stop({ fade })`); fixed.
659
- - An unbound module action no longer throws at `engine.use` (`interactions()` without keys, `inventory()` without keys); reading it warns `[input-unbound]` once in dev, so binding after `use` works.
660
- - Actions a module declares outside its ctx leave with it: the rts camera's `rotateLeft / rotateRight` (declared by the camera module), the player's `jump / run / brake` (declared at `characters()` install, optional), a grid preview's `rotate` (removed with the preview).
661
-
662
- ### Breaking (module types and capabilities)
663
-
664
- - Every module declares `type`: `'world' | 'look' | 'actor' | 'rules' | 'ui' | 'net' | 'tool'` (what it may own; `stage` still says when it runs). A module without one throws `[module-type]` with the fix: add `type: 'rules'` for game logic.
665
- - Dev checks by type throw `[module-type-rule]` with the fix: a `look` module may not `ops.define` or write world records; a `ui` module may not `input.bind` or `saves.register`. A `world` module's file may not draw (rule R47).
666
- - `requires` names a capability (`'world'`, `'inventory'`, `'sky'`), provided by a module's `provides`; a missing one names both fixes (install the engine part, or your own provider). Built-ins provide theirs (world, level, collision, rigid, nav, calendar, weather, sky, particles, inventory, quests, dialogue, interactions). After `{ replaces }`, `engine.<capability>` is the new provider's API.
667
- - `describe().modules` is a list of `{ name, type, provides?, requires? }` (was a list of names).
668
- - `weather()` returns two modules, installed by the same `engine.use(weather(...))`: `weather` (state, `engine.weather`: types, current, set, auto, save, events) and `weatherLook` (look, `engine.weatherLook`: particles `systems`, `flash`, `apply`, `particles`, `area`; `describe().weatherLook.rainVisible / snowVisible`). `engine.weather.systems / flash / apply / particles / area` and `describe().weather.rainVisible / snowVisible` are gone.
669
- - Calendar: `timeOfDay`, `day` and `dayLength` are views of the `'calendar'` time channel (an origin plus `engine.clock.now`), not a counter of their own; writing them moves the origin. `day:start` / `season:change` / clock-time timers fire right after time moves (new `engine.time.onMove(fn)`), on a step and on a skip. `calendar.tick()` is gone; the save part also stores `at` (older saves still load).
670
-
671
-
672
- ### Breaking (module boundaries)
673
-
674
- - Core, render and ui name no module; modules register what core needs. A module's loading-screen name `module.<name>` is registered by the module with its own text (`engine.i18n.add` in install); `describe().player` drops `running` / `jumping` (compare `state` yourself); the light-count warning skips lights marked `userData.fixedCount` (light pools set it) instead of names starting `lightPool_`; night glow reads the `daylight` measure (`engine.audio.measure`: calendar, or the sky without one); the baseline sun follow steps aside for whoever holds `shadow.follow`; the title's Settings button comes from `engine.ui.titleItem('settings', ...)` (an unknown string in title `items` throws, listing the added ids); the water surface numbers moved to `render/fxNumbers.js`.
675
- - New: `saves.register(key, { checkNewGame(data) })` (dev check of a part's new-game data; the world's "records placed by code" warning moved there), `engine.ops.route(fn)` / `engine.ops.refused(name, args, { reason, actor })`, `engine.world.pauseSimulation()`, `engine.inventory.contents()` / `setContents(data, { only })`. net uses only these; a game's own inventory provider needs `contents` / `setContents` for net to sync it.
676
- - Checks: R25 follows a module held in a local (`const inv = e.inventory; inv._x`); R46 (another module's internal files) is an error; R27 also flags module names kept in `core/I18n.js`; R3 looks for `module.<name>` in the module's own folder.
677
-
678
- ### Breaking (look values on shared points)
679
-
680
- - Every `engine.look.<part>.<key>` is a shared point (`describe().shared['look.fog.far']`): the game's value is the base, effects multiply on top, the settings menu can only restrict. A game's `look.lights.set({ sun: { intensity: 3 } })` now dims in rain and fades at sunset (it used to cover both); for the exact number use `look.lights.manual('sun')` or `{ layer: 'system' }`.
681
- - Two owners `set` one look value on one layer throw `[shared-conflict]` in dev (was: the later write won). Fix: one owner, `mul` / `add`, or another `layer`.
682
- - `engine.mod('sky.sunLight' | 'sky.ambient' | 'sky.fog' | 'sky.tint' | 'sky.flash' | 'sky.cover')` are now `look.lights.sun.intensity`, `look.lights.hemi.intensity`, `look.fog.far`, `look.sky.tint`, `look.sky.flash`, `look.ground.cover`; `engine.sky.modifiers` is gone (read `engine.stacks.get(name).value()` or `describe().shared`).
683
- - Shadows: `createEngine({ shadows, shadowType })`, `engine.setShadows`, `engine.shadows`, `engine.shadowType` and `look.lights` `sun.shadow` are gone; use `engine.look.shadow.set({ enabled, type })` (core, works without a sky; a sky adds cascades, extent ...).
684
- - Fog: `createEngine({ fogFar })`, `engine.setFogFar` and `engine.fogFar` are gone; the start value is `style.sky.fog.far` / `sky({ fog: { far } })`, a game sets `look.fog.set({ far })`, `terrain({ viewFog: true })` makes the terrain look write the layer below it (owner `terrainLook`, removed with that module).
685
- - Fog: an explicit `near` or `density` is kept as given; the weather multiplies `far` only (it used to scale density too).
686
- - Settings menu: shadows / bloom / ao off is a `set: false` on the settings layer; on removes it, so a scene that turned them off stays off and a low-tier device's bloom stays off.
687
- - `look.<part>.set(...)`'s handle `remove()` returns whether it removed anything.
688
-
689
- ### Breaking (terrain and vegetation: data and look)
690
-
691
- - `terrain()` and `vegetation()` each install two modules: data (`engine.terrain`, `engine.vegetation`) and look (`engine.terrainLook`, slot
692
- `'terrain-look'`; `engine.vegetationLook`, slot `'vegetation-look'`). A game draws either its own way with
693
- `engine.use(mine, { replaces: 'terrain-look' })` + `engine.terrain.view({ add, change, remove, show })` (or `'vegetation-look'` +
694
- `engine.vegetation.view({ species, change, ring, show, drop })`) and keeps collision, paths, felling and saves (recipe 28 sections 6 and 7).
695
- Code that lists module names (`openWorld().map(m => m.name)`) now sees `terrainLook` and `vegetationLook` too.
696
- - Chunk records hold data only. Removed: `c.terrain` / `c.group` (terrain meshes: `engine.terrainLook.meshes.get(c)`), `c.veg` / `c.vegGroup`
697
- (plant meshes: `engine.vegetationLook.mesh(c, name)`; placement data: `c.plants[name]`, felled slots `c.hidden[name]`),
698
- `im.userData.hidden` / `im.userData.ids` (use `c.hidden[name]` and `c.plants[name].ids`).
699
- - `vegetation.define()` returns the species' data; `geometry`, `lodGeometry`, `material` and `fadeUniforms` moved to
700
- `engine.vegetationLook.kind(name)`. `Vegetation.levelOf` / `updateFade` and the terrain look internals `mountTerrain.js`, `chunkLevels.js`,
701
- `terrainMat` / `sideMat` are gone.
702
- - A chunk job that keeps failing is tried 3 times, then reported (`terrain:chunkFailed`, `[terrain-chunk-failed]`,
703
- `describe().perf.chunks.failed`); `engine.terrain.retry()` sends it again (it used to sit in loading for ever).
704
- - `terrain.setDensity` places only the plants again (ground collision is kept); `look.ground.replace` swaps the material in place.
705
-
706
- ## 0.3.0 (2026-11-03)
707
-
708
- WebGL renderer. Upgrade steps for a 0.2 game, most common first, with the error each old form now gives: [docs/MIGRATING-0.3.md](docs/MIGRATING-0.3.md).
709
-
710
- ### Breaking
711
-
712
- - Options: more option bags go through one schema (`readParams`): an unknown or removed option throws `[module-params]` in dev (release: warns once, ignored). This covers `createEngine`, `openWorld`, module factories, `npcs.add`, `createPlayer`, `triggers.add`, `addWheeled`, `audio.addBus`.
713
- - Calendar: time of day, days, seasons, clock-time timers and their save moved from `sky()` to the new `calendar()` module (`engine.calendar`). `sky({ dayLength | day | seasons | daysPerSeason | hoursPerDay })` throws `[sky-option]`; `engine.sky.timeOfDay / day / season / ...` throw `[renamed-field]` in dev; `engine.sky.at / between / daily / onSeason` are gone. `openWorld` installs `calendar` (object form `calendar: {}`, was `sky: {}`).
714
- - Pickups: new `pickups()` module. `inventory.spawnPickup / nearestPickup` and `inventory({ pickupRadius, bobDistance })` are gone (`pickups.spawn(position, { give })`, `pickups({ radius, showDistance })`). Event `item:pickup` → `pickup:take`; `container:add / remove` removed (`item:add / remove` carry `container`, `actor`). Pickup handle `id` is the world record id. `style.pickup.model` is not read (the shape is an asset model by name). Content pickups need `pickups()` `[module-needs]`.
715
- - NPCs: `talk / talkLabel / talkRadius` → `interact: { op: 'npc.talk', label, radius, args }`.
716
- - Clock and holds: `engine.clock.timeScale` removed (`engine.mod('clock.rate', { owner, set })`; `clock.rate` is read-only). `engine.resume / unfreeze` removed: `pause` / `freeze` return `{ owner, remove() }` (no chaining). `defineState` returns a handle. `runState.by` → `runState.owners`.
717
- - Sky and lights: `engine.sky.sun / hemi` → `engine.lights.sun / hemi`; `sky.modify` removed (`engine.look.*`, `engine.mod`); `sky({ sun | hemisphere | fog: 'manual' })` throws `[sky-option]` (`look.lights.manual`, `look.fog.manual`). `look.tone` has no `mapping` (the engine writes `renderer.toneMapping` once at creation; change it in three.js). `setFogFar` no longer writes `scene.fog`.
718
- - Style shader keys moved to look hooks: `style.sky.fog.glsl`, `style.sky.clouds.glsl / uniforms`, `style.wind.glsl / uniforms`, `style.water.glsl`, `water({ glsl })` throw and name `look.<part>.patch(slot, ...)`. Style functions (`backdrop`, fog `color`, tone `exposure`) receive `{ time, weather, season, state, sky }` instead of the sky.
719
- - Audio: `audio.register(name, synth)` removed; a synth is an asset (`assets.manifest({ sounds: { name: fn } })`). `audio.sounds` rules `'synth'` / `{ synth }` throw `[audio-synth-gone]`. `audio.addBus(name, { level, owner })` returns a handle.
720
- - Assets: model `params` in a manifest is a schema (`{ h: { type: 'number', default: 3 } }`), not values. `assets.cached` is no longer public.
721
- - Characters: `canSwim` → `water: 'swim' | 'block' | 'wade' | fn`; the speed argument of `move()` and `moveInput.speed` are ignored (`engine.mod('move.speed', ...)`).
722
- - Vehicles: `rigid.addVehicle` → `rigid.addWheeled`; `seat` → `seats: []`; `seatPosition / exitPosition` take a seat index; `vehicle:enter / exit` carry a `Rideable`.
723
- - Removed: `entities` module, `engine.entities`, events `entity:spawn / remove / state / stage` (content templates with `stages`, event `template:stage`); `engine.spawn` (`engine.content.spawn`); `vegetation.add` (`vegetation.define`); `triggers({ debug })` / `setDebug` (`engine.debug.view('triggers')`); dialogue `lock` option (`channel: 'bubble'`).
724
- - Changed shapes: `quests.state` is a method `state(id)`; `trade()` and grid `check / preview / place` results use `code` (was `reason`) plus `facts`, `nextActions`; `describe().ui.inputContexts` → `describe().holds.input`.
725
- - The 0.2 rename stubs (`[renamed-api]` for `setExposure`, `setToneMapping`, `sky.setEnvironment / setShadow`, `weather.define`, `post.add / enable`, `look.clouds`, `cameraOverride`, views `pos`, `style.character`) are removed; those names are now plain `TypeError` / `undefined` (renamed result fields are the exception below: a dev-only error pointing at the new name, no compatibility).
726
- - 0.2 names that used to do the wrong thing silently now throw `[renamed-field]` in dev naming the new form, all through one rename table helper (`renamed` in `core/validate.js`; release builds skip it): `dialogue.say / start({ lock })` → `channel: 'bubble'`; `engine.clock.timeScale` → `engine.mod('clock.rate')`; the names that moved from `engine.sky` to `engine.calendar` (an explicit list); `style.pickup.model`; result `.reason`, `runState.by`, `describe().ui.inputContexts`. Writing `clock.rate` throws `[mod-owner]` (it is read-only).
727
-
728
- ### Added
729
-
730
- - `calendar()` (`at / between / daily / onSeason / untilMark`, `isDay`, `daylight`) and `pickups()` modules, both in the `index.js` exports.
731
- - `engine.mod` / `engine.stacks`: owned, timed, saved modifiers for any quantity (`move.speed`, `clock.rate`, sky multipliers), event `mod:end`; `engine.time` channels; `onFixed(fn, { channel, phase })`; `onRender(fn)`; `engine.wrap(target, method, fn)`; `input.gate(action, owner)`, `input.push({ owner })`, `describe().holds`.
732
- - Look: `look.<part>.manual(keys)`, `look.state(patch)`, `look.shadow.include(material)`, `look.materials.glow` (emissive that follows daylight), `look.view`, `lights.env.intensity` / `lights.env.share`, sun `shadow`, hemi `ground`; sky `top` / `horizon`; `style.sky.dim: { tint, stars }` (default on; false keeps a sky.tint at full color at night, or stars through cloud cover); `replace(m, { effects: false })`; `terrain({ material, effects: false })`. `describe().owned` and `describe().look.<part>.<key>.writer` say who writes each value; the engine yields to a game's direct three.js write.
733
- - Shaders: named patch slots (`{ slot, pars, glsl }`), callable `#include <threedog_detail>` / `<threedog_lighting>`, uniforms `uSunDir`, `uDaylight`, `uTimeOfDay`; material texture slots (`{ texture, channel, repeat, wrap, colorSpace }`), `aoMap`, `lightMap`, screen projection.
734
- - Rendering: light probe bake scaffold (`engine.bakeProbes` / `loadProbes`); `bakeVertexAO`; post `ao({ radius, intensity })`; dev views `overdraw` / `shaderCost`, `debug.defineView`, `debug.reloadGlsl`, `debug.reloadAssets`; `inspect.materials()` / `inspect.perf()`.
735
- - Assets: `manifest([packs])`, `paramsOf / setParams` (hot swap), per-entry `cache: false`, `castShadow`, `receiveShadow`; textures as a Texture or factory; sounds as synth functions.
736
- - Content: `contentParts` (one kind split over files), `engine.content.fields()`, `content.spawn`, field tables checked by content-check, content write-back.
737
- - Characters: `maxJumps`, `airJumpSpeed`, `jumpBuffer`, `fall`, `states`, `channel`, `id`, mover `'manual'` (switchable at runtime), `launch`, `addJumps`, `resetJumps`, `jumpState`, `stat()`, `characters.support` (moving platforms), `safeGround`; events `character:launch`, `character:fall`, `character:water`. Anything can be ridden (`Rideable`, several seats, passengers).
738
- - Gameplay: hold / approach interactions (events `interaction:hold`, `interaction:interrupt`), per-actor bags `inventory.of(actor)`, `quests.advance`, dialogue bubbles (`channel: 'bubble'`, event `dialogue:bubble`), UI focus navigation and choice cursor, HUD anchors, grid levels / occupancy layers, `npcs.add({ channel })`.
739
- - Cameras: follow camera `projection` / `size`, `ground`, `mouseLook`, `hideTargetNear`, `setView / getView`, preset `thirdPersonAction`; `screenToGround` on every camera rig.
740
- - Saves: `saves.register({ movedFrom })`; `dispose({ keepContext })`; net WebSocket heartbeat / reconnect; worker watchdog.
741
- - Exports: `calendar`, `pickups`, `contentParts`, `bakeVertexAO`. Tools package exports `@threedog/tools/browser`, `look`, `contract`, `panel`, `gallery`.
742
- - Optional technique examples, copied into a game rather than installed as modules (`threedog examples list`).
743
- - World: near tiers `world.simulate(kind, { fullRadius, nearEvery })` (records beyond `fullRadius` run near once every `nearEvery` seconds with the accumulated dt). NPCs use them: those farther than half of `world.radius` now step 15 times a second instead of every fixed step.
744
- - Assets: `assets.modelNow(name)` of a registered model nothing has loaded yet (code-built ones included) warns once in dev `[asset-not-loaded]`, naming `modelNow(name) ?? await model(name)` and `preload: true`.
745
- - Grids: default player text `grid.<code>` (zh-CN, en) for every built-in failure code (`outOfBounds`, `occupied`, `wrongGround`, `notFlat`, `noGrid`, `idTaken`, `unknown`, `notPlaced`, `noTarget`, `badFields`), registered by `grids()`; `engine.t('grid.' + r.code)` no longer warns `[unknown-name]`.
746
- - Light pool: `lightPool.add(at, { dusk })` lets a source follow the time of day on the same daylight curve as `look.materials.glow` (street lamps off at noon, their light given to lit sources); default off.
747
- - HUD: `hud.counter(id, { value })` takes text too (a clock, a quest step); without a value it shows the label alone instead of "0".
748
-
749
- ### Changed defaults
750
-
751
- - Lighting (changes every game's default look under a sky): the style's ambient column is now the whole diffuse fill. The neutral room environment takes its share (`look.lights` `env.share`, 0..1, default 0.5) and the hemisphere light the rest (`env.intensity` stays the absolute `scene.environmentIntensity`, also under a sky: a game's value is written as given); before, the room map added about four times the ambient on top, so sunlit and shaded faces looked alike (rainy-street noon: shadows 19% darker -> 50%). Packs tuned against the old fill may want a higher ambient column.
752
- - Post effects: a listed effect is on. `lut`, `grain`, `vignette`, `chromatic`, `dof`, `ao` and `outline` no longer default to `enabled: false` (placed in `style.post` they silently did nothing); pass `enabled: false` to list one off. `style check` counts on-effects by the same rule.
753
- - Lighting: under a sky the neutral room environment follows the sky's day curve (nights darker on PBR); sun shadow bias is a few centimeters in world terms (contact shadows); neutral sky keyframes hold night longer.
754
- - Post: on the low tier `look.post.set({ '<effect>.enabled': false })` turns off a costly effect the game added (it was a no-op). Photo bloom follows the game's post chain.
755
- - `freeze()` keeps `uTime` moving (`{ ambient: true }` stops it). `jump()` is buffered. `item:add / remove` fire for every container.
756
- - Batching merges only engine-placed content; game meshes opt in with `userData.batch = true`.
757
- - i18n locale matched by language (`'zh'` → `'zh-CN'`); unknown locale warns once. `input.simulate` throws on an unknown action.
758
- - Cold start: nothing renders before ready; shaders compile for the real target.
759
- - NPCs: near tiers are off by default (every near NPC walks every fixed step; before, NPCs beyond half `world.radius` moved every 4th step in visible jumps). Large crowds opt in with `characters({ npcTiers: { fullRadius, nearEvery } })` or `engine.npcs.tiers(opts)`.
760
-
761
- ### Fixed
762
-
763
- - Interactions: an interaction on a model the game moved away from its world record is found where the model stands (was missed beyond 2 m). One xz index keyed by each item's world position, re-filed only when it moved.
764
- - Scene delta (cascades, fog, glow): a class with its own `material` accessor (troika-three-text) keeps it; the engine's material-swap hook calls the original getter / setter instead of shadowing them.
765
- - UI display timers (toasts) run on the page's own clock: wall clock in the game, the stepped time on a headless page, so `threedog step` then `snap` no longer shows every toast from the step.
766
- - Sky: stars sit behind the drawn clouds and dim with the weather's cloud cover (`uCloud`), so a rainy or overcast night shows no starry sky (without weather the default cover 0.25 leaves them at 75%).
767
- - Adaptive resolution changes the render scale before a frame draws, not after: the frame of the change was presented blank (a screenshot caught it black).
768
- - Weather grey (and any `sky.tint`) follows the sky's light: the tint color is dimmed by how bright the sky is now, so a rainy night stays dark instead of turning lit grey; the brightest sky row is unchanged.
769
- - Under a sky the room environment follows the sky's light (ambient column x sky color), not the ambient column alone: Standard / Lambert / Phong no longer stay day-lit at night while Toon goes dark.
770
- - `describe()` shows set values (post params, exposure, light intensity) as set (`0.25`, `1.12`), not rounded to one decimal.
771
-
772
- ### Saves
773
-
774
- - 0.2 saves load. The calendar takes the old `sky` part (`movedFrom`); saved NPC `talk` fields become `interact`; the `world` part is version 5 (migrated on load). 0.2 builds refuse 0.3 saves as `'tooNew'`.
775
- - A save with a `null` part is refused as corrupt; a load error in any part, `world:load` listener or `afterLoad` rolls the game back.
776
- - Physics: new save part `rigid`. Bodies added with `addBox / addBall / addHull({ id })`, and every vehicle, save pose, rotation, velocities and sleep; a load restores them (before, a toppled crate came back upright and at rest, and a car stayed where it was at load time). Ids are unique across bodies and vehicles (`[rigid-misuse]`). Not synced by `net()`. newGame / load rebuild the physics world and emit `rigid:rebuilt { world, player, bodies }` once the bodies are back: a game re-creates its own joints there (they used to vanish silently). In dev, a rebuild that dropped joints with none re-created by the next step warns `[rigid-misuse]`.
777
-
778
- ### Tools
779
- - `threedog snap` on a paused (step-driven) page draws the current state once before reading, without advancing game time: at tick 0 it saved a black picture.
780
- - `threedog how`: among equal matches an AI.md row (the one recommended entry) ranks before recipe sections and technique examples; the recipe column no longer counts as task words. `docs/CONVENTIONS.md` "One task, which entry" says which entry is first where a task has several.
781
-
782
- - Removed: `threedog new-style`, `--style` on `new-game` / `init`, positional `content set <id> <field> <json>` (now `field=value`). A game's look lives in its own `style/` folder; no published style packages.
783
- - Game folder: a command run inside a game acts on that game wherever it sits (nested in another repo's npm workspaces, or outside `games/` here); `-w .` and `-w <path>` name a game by its folder. `threedog init [folder]` takes the folder to create (was a name for the current folder) and refuses a workspaces root.
784
- - Errors: `engine.error.at` is the first stack line of a gameplay error (also on the describeText error line); bridge commands print `engine error [code] where: message (at …)` instead of `engine error [object Object]`.
785
- - Error summaries (the dev log's repeat line, `threedog errors`, play / verify / test results) keep the end of a long message, where engine errors put the requirement and `[code]` (was cut at 100–220 characters).
786
- - `new-game` starts blank; `--open-world` gives terrain, sky, follow camera and a player.
787
- - Added: `threedog stress`, `tune show | write`, `gallery [--shots]`, `art list | copy`, `content add | remove`, `--gpu` / `--software`, `doctor --json`, `map -w <game>`. `threedog shot` prints the look numbers after every shot (`--ref`, `--no-look`, `--json`).
788
- - The look check reaches every picture: `threedog snap` (dev bridge / MCP) runs it on the live page (`--no-look` skips it); `threedog shot http://localhost:5173/` opens a running page without building; `threedog shot --image file.png` gives the pixel-only part for a picture taken any other way and says what needs the live page. Glare is printed as `fact:` with the detail lost under it (on vs off), a `contradiction:` only where DESIGN.md says no glare (`Look intent: no-glare`).
789
- - Look check: large clipped areas, large near-black areas and a night not dark from lighting (`clipped`, `crushed`, `time-flat`) are now `fact:` lines, a `contradiction:` only where DESIGN.md declares the opposite. DESIGN.md takes an optional `Look intent:` line of listed words (`no-glare`, `no-pitch-black`, `dark-nights`, `bright-nights`, `strong-light`, `bright`, `muted`, ...), the only source of a look wish: the free words of the "Look and controls" table and "Not for this game" are no longer read; an unknown word is reported. `style check` no longer warns above 2 post effects: it notes which are on, which are costly, and how to see each one's cost.
790
- - content-check: fields of props, templates, pickups and kinds; model names from the game's `assets.js`; old NPC `talk` and `'synth'` sound rules are errors. Rules R41–R45 (engine code); R39 removed.
791
- - Template: a new game's package.json depends on `@threedog/post-effects` (the style's `post` line uses it); the outside-the-repo check installs exactly the template's dependencies.
792
- - Template: a new game has the `shot`, `types`, `perf`, `bake`, `assets` and `doctor` scripts the docs name (`npm run shot` works in a standalone game).
793
- - Error hints: a property read on `null` no longer gets the "module not installed" hint (`null-value`: a lookup or helper such as three.js `mergeGeometries` returned null).
794
- - Look check: a `light:` fact (key vs fill share of the brightness, how much darker shadows are; a contradiction only under a DESIGN.md "strong / dramatic light"), a fact when the camera stands inside a closed mesh, each exposure next to noon / midnight when a style's exposure curve differs; the printed block is short (at most four one-sentence hints, ranked; `--json` keeps all).
795
- - `threedog shot` / `snap` print only what bears on the picture under it (time, weather, camera; `threedog describe` for the rest, `--json` / `--describe-only` keep the whole state). `threedog check` prints warnings as one count line per rule (`--verbose` lists them).
796
- - Ops `interaction.use` / `pickup.take`: a `tooFar` result carries `facts: { distance, radius, at }`. `presets.keys.gridRotate` is in the types. GAMEMAP counts an action named by an interaction as used. The dev model-cache warning names the plugin's error instead of "no model cache".
797
-
798
- ## 0.1.0 (unreleased)
1
+ # Changelog (threedog)
2
+
3
+ What changed in each version and how a game upgrades.
4
+
5
+ ## 1.2.0 (2026-11-10)
6
+
7
+ - Fixed: shadows on tier 'low' no longer smear. With `engine.shadows.cascades(...)` the single low-tier map now covers `maxFar / count` (shifted toward the view), so its texels are as fine as one cascade's; a game's `count: 1` still covers all of `maxFar`. The engine sun's PCF radius follows its map size (2 on the low-tier 1024 map). A radius or map size the game set (any value other than the engine's default) is kept across tier changes. Trade-off: on tier 'low' far shadows end sooner (recipe 45).
8
+ - Fixed: the picture check no longer calls a light useless when it only lights `lit: true` particles; it recolors them before each capture and puts their colors back after.
9
+
10
+ - Fixed: in first person (and a follow camera's close-up), a shadow-casting point or spot light the player carries (a head lamp, a torch, within one body width of the body) is no longer shadowed by the player's hidden body, on both renderers; before, its pool had a hard black wedge on one side. The sun and other lights still cast the body's shadow; a body that is seen shadows every light as before. A point / spot light added after the camera started now gets the body's shadow too. Nothing to call (recipe 34).
11
+ - Changed: `settings.define(key, def, apply)` (on `engine.settings`) now draws its row in the settings menu: a switch for true/false, a slider for a number with `{ min, max, step? }` (a `limits` number row has 0..1), buttons for `{ options }`, labelled by `label` (an i18n key or text, else the key), in the tab `menu` names (default a new `options` tab, shown only while it has a row). Before, a defined row was drawn by no tab unless the game's own tab drew it, so it silently never showed. Upgrade: a row your own `addSection` tab draws needs `menu: false` (the menu warns once when it sees a row drawn twice); a row the menu cannot draw (a number without `min`/`max`, a string without `options`) or a `menu` naming a missing tab warns once. Unknown `define` options now throw in dev.
12
+ - New: `lightShaft(engine, opts)` in `threedog/tsl`, a cheap beam of light you can see in the air (daylight through a ceiling hole or window, a stage or lighthouse beam). A plain additive `THREE.Mesh`: sides soften by view angle, it fades where it meets geometry and near the camera, scene fog dims it, optional drifting `dust` (skipped on tier 'low'); can follow a SpotLight or DirectionalLight. WebGPURenderer only (both backends), `WebGLRenderer` throws `tsl-misuse`. Recipe 34 "Light you can see in the air" now says when to use it and when `sunShafts` / `lightVolumes`.
13
+ - New: `engine.audio.reverb({ sends, decay, size, wet, fade })`, one reverb send/return any bus can feed (generated impulse, no file), off until called, `null` turns it off; an ambience rule `{ reverb: 0.7, when: { zone: 'cave' } }` sets its wet by place (recipes/31 §9). `audio.info.reverb` shows it.
14
+ - New: particle effects take `lit: true`: the scene's point, spot, directional, ambient and hemisphere lights tint each particle's color (dust a lamp lights), the same on WebGL and WebGPU; default unchanged (recipes/64 "Lit particles").
15
+ - Fixed: `check` hints for a hand-made inventory and a hand-made reach check now read what the code does, not one spelling: each needs two signals of the job. A bag kept as a state field (`{ bag: [] }`, `S.bag.push(...)`, `.reduce`) is flagged when, within 3 lines, something is compared with a named capacity-like limit (`> RULES.capacity`, `>= this.maxSlots`; a number literal does not count); a distance against a named range (`Math.hypot(...) < RULES.reach`) is flagged beside a `hud.hint` or the E key. Tetris piece bags, ammo counts, a physics weight and a combat range beside an attack / use press stay quiet. Before, only `const bag = []` and a number threshold beside the E key were flagged.
16
+ - A `session:start` listener added right after `await engine.start()`, when the playthrough already began inside start() (`?play`, or newGame during start), now warns `session-start-missed` with the fix (listen before start, or read `engine.session.playing`); event semantics are unchanged, nothing is replayed.
17
+ - Docs: first-person start (recipe 63 §7) and which way `yaw` points (recipe 21 §3); a light the player carries, with a shadow (recipe 34); end screens are flow states (recipe 26 intro); ambience is "sounds by place" (recipe 31 §3); a `settings.define` row is drawn by your own tab, labelled by the text or `e.t(key)` you pass; `onRender`'s `dt` is the frame's seconds, the same as `onFrame`'s.
18
+
19
+ - Fixed: a post effect order that breaks scene depth only once a held effect turns on (outline after `ao` while a low preset holds `ao` off) is refused at `engine.post.add`; before, it was accepted and threw later inside the settings switch that turned `ao` on, half-applied.
20
+ - Fixed: on WebGL, `engine.shadows.cascades(light)` while another DirectionalLight (the engine sun included) casts a shadow throws `shadow-cascades` naming that light; before, every patched material failed to compile (`CSM_cascades` index out of range).
21
+ - Post effect params refuse NaN and Infinity (`post-effect`), at `engine.post.add` and at `handle.set`; finite values, negative and huge included, are kept as given.
22
+ - An atomic op's rollback is synchronous: an atomic save part whose `load()` returns a Promise is refused there (`engine-misuse`, reported; the other parts still go back) instead of being waited for, which let a failed nested op's pending load overwrite the outer op's commit. `engine.applyState` now waits for every module `applyState` hook to settle before a failure ends the request, so a slower sibling cannot write over the next request.
23
+ - Fixed: a settings switch (bloom, ao, a game row with `limits`) turned back on, or the settings module unloaded, gives back every effect it switched off, also one that left the row meanwhile (an old effect named `bloom` once a `glow` declares `about.acts: 'glow'`); before, that effect stayed off.
24
+ - `runContract` (`@threedog/tools/contract`) now returns a Promise: write `await runContract(...)`. Its small engine uses the real `saves.define` and install check, so a module the engine would refuse (a save key defined twice, an unknown field or a bad `first`, an `install` that returns a Promise) fails the contract instead of passing it, and the save round trip loads parts by `first` and waits for a part load that returns a Promise, as `saves.load` does.
25
+ - Rule R67 no longer checks `saves.register` calls: that name was removed.
26
+ - Fixed: on WebGPU a renderer borrow (a pass, an `onRender` hook) that turned off `scene.fogNode` and threw left the fog off for good; `scene.fogNode` is put back like `scene.backgroundNode`.
27
+ - Fixed: with WebGL cascaded shadows the path-traced photo and the gallery's `game` light saw one sun per cascade (3 cascades at intensity 2 lit like 6); they now see the one sun. The engine marks such parts (core/scene/drawOnly.js; a clone is not marked) and every scene copy leaves them out.
28
+ - Fixed: a path-traced photo of far plants drawn as impostor cards traced one small card per species near the origin; the cards are now left out, and `pathTraced.untraced` says the far plants are not in the traced photo.
29
+ - Fixed: rain and snow rebuilt on a tier change on WebGPU took the old system's internal "no texture" stand-in (freed with the old material) for the game's texture; only textures the game gave are carried over.
30
+ - API cleanup (one entry per job). Internal now, not public names (they still run inside the engine; a game that called one uses the form named): `stacks.mod` (use `engine.mod`, or `ctx.mod` in a module), `ground.height`, `ground.slope`, `ground.type` and `ground.waterLevel` (a ground provider still implements them; a game samples with `engine.surface / slope / groundType / waterLevel`, `engine.ground` keeps `has` and `voidY`), `engine.commits` (a module reaches it as `ctx.commits`, a game uses `engine.nextFixed`), `assets.forget` and `rays.forget` (`engine.remove` calls both), `debug.dispose`. `engine.stacks` keeps `define`, `get`, `changed` and `describe`. What a ground provider supplies is the public type `GroundProvider` (documented in `api/ground.md`); `setGround`, `ctx.ground.provide` and `compositeGround` take it (the same members as before; `compositeGround.parts` names it).
31
+ - Renamed: `engine.freeze(owner, { ambient: true })` -> `{ still: true }`, matching `engine.still`. `ambient` is now an unknown option and throws like any other unknown key.
32
+ - Removed the old names kept as aliases (a rename removes the old name in the same change, design.md 2.6; nobody wrote them): `saves.register`, `characters.createPlayer`, `input.action`, `hud.counter`, `freeze({ ambient })` (and the same on `ctx`), and the `api-renamed` warning code they used.
33
+ - No longer `@experimental` (they are named in the recipes and sit beside stable siblings): `engine.mod`, `engine.stateApplied`, `post.get`, `post.list`, `quests.isDone`, `quests.isFailed`, `vars.setFlag`, `input.released`, `input.keysOf`, `vegetation.isRemoved`, `vegetation.restoreInstance`, `ui.isOpen`, `settings.isOpen`, `random.int`. `saves.removeAttachment` stays `@experimental` because `saves.putAttachment`, the other half of the pair, is.
34
+ - The API lock (`docs/api-surface.txt`) now has an `events` group (every event name in `events.generated.js`, so a rename or removal needs a changelog line), lists `engine.debug` member by member (`debug.view`, `debug.defineView`, `debug.override`, `debug.clear`, `debug.viewModes`...; the type of `engine.debug` is the named `DebugApi`), and skips members tagged `@internal` in the hand-written declarations too. `api/*.md` no longer lists `@deprecated` aliases or `@internal` members.
35
+ - Verb rule R69 now also covers the ways to give back: `remove` is the verb, and `clear`, `forget`, `release`, `unload` and `dispose` are allowed only where they do what remove cannot (each exception states why in the rule and in CONVENTIONS.md). `triggers.clear` stays (it empties the whole set in one call); nothing else was renamed.
36
+ - explain grows a key, `{ asset: name }` (engine.explain): it says who holds an asset (lease labels such as `content:oak`, `pickups`, `model copy`) and why a pinned or retired build is still in memory. Nothing to change in a game.
37
+ - One state-application path. `saves.load(slot, { turn })`, `session.newGame({ turn })` and `session.quit({ turn })` take the turn a save part's `load()`, an `afterLoad` or a module's `applyState(e, params, turn)` was given, and then run inside that request, as `level.load({ turn })` does; without it they wait in line as before. `engine.applyState` is one request in the state line: a second call starts when the first ended. A part registered after its save was loaded loads like a load (ops return `'loading'` meanwhile, its `afterLoad` hooks run after it); an atomic op's rollback goes past a part that throws, waits for an async part and keeps unchanged world models; `afterLoad` skips failed, blocked and disabled modules and waits for one still initializing; a `session.track` handle whose `remove()` throws no longer stops a new game or load.
38
+ - Renamed: `engine.saves.register` -> `engine.saves.define`, `ctx.saves.register` -> `ctx.saves.define`; `characters.createPlayer` -> `characters.addPlayer`; `input.action` -> `input.define` (and `ctx.input`); `hud.counter` -> `hud.addCounter`, which also returns a handle `{ set(value), remove() }`. Every other named registry already says `define` (`ops.define`, `ui.define`, `stacks.define`); one verb set: `define`, `add`, `set`, `remove`, `describe` (AI.md, rule R69).
39
+ - Picture menu: `engine.catalog('picture')` (and `threedog catalog picture`) lists every picture capability, one row each: on now, runs here or why not, cost class, one way on, recipe, main limit; `catalog(id, { offered })` adds effects not in the chain yet (no change for existing calls). Lookup names: `module:<id>`, `op:<name>`, `capability:<id>` pick the kind; a bare name tries the capabilities (`picture`, `post`, `shadows`) first, so a game module named `picture` (the game template has one) is now `catalog('module:picture')`. Combination checks (kind `mistake`: baked light plus the fill it saw; kind `note`, facts without a must-fix: metal with no environment map, bloom before a low exposure, fog color far from a flat background, the nearest caster outside every shadow box) print in `describe().render` (`checks`) and first in `threedog shot`'s hints; `describe().render.probes[].doubled` and `.lightmap.doubled` are gone, read `describe().render.checks` (id `lit-twice`). Every `@threedog/post-effects` effect carries `about` (also on its factory).
40
+ - `engine.catalog(id)` and `threedog catalog` take one prefix scheme, `module:`, `op:`, `capability:`; a bare name that is both a capability and a module gives the capability: the game template's `picture` module is now `catalog('module:picture')` (`catalog('picture')` is the picture menu).
41
+ - Perf pass 2: `engine.inspect.perf().textureMB` (and `threedog perf`'s texture MB) reads three's `texturesSize` on WebGPU and adds shadow maps to the WebGL estimate (it read 0 with TSL or procedural materials); occlusion culling no longer drops hidden casters' shadows for a second after cascades are rebuilt, and skips the test box of a batch the camera stands in; the kept shadow map refills at most once every 8 shadow frames for instance writes (streaming batches); hlod `remove()` hands its meshes back to batching.
42
+ - Far trees as cards: `vegetation.define(name, { impostor: true })` (or `{ views, size }`) bakes views of the species' own model and materials and draws everything beyond `lodRing` as one card mesh per species, lit live through baked normals; no shadow there. Off by default, instead of `lodGeometry`. WebGPU only (WebGL draws the mesh and warns). `threedog perf --only=pages --renderer=webgpu --impostor` compares.
43
+ - Module timing (`engine.profile()`, the budget's `modules` limits, the spiky marker) counts fixed hooks one step per frame, the dearest: slow frames' catch-up steps no longer read as a physics spike. hlod no longer lets batching take a mesh it took; the kept shadow map (`engine.shadows.cache`) redraws when a kept instanced mesh is hidden, swapped, stops casting or leaves the scene (vegetation rings). `threedog perf` prints each page's worst modules as median/p95.
44
+ - Adaptive quality: under load the adaptive controller now walks `engine.adaptive.steps` (default: each post effect's declared `cheaper` params, then the resolution, then effects that declare `skipOnLowTier` held off) and raises them back in reverse; a game's own knob is a `{ name, down, up }` step, `['resolution']` keeps the old behavior. The perf notice's clause is now `lowered automatically: resolution 1.5 -> 1.2, reflections cheaper (...)`, and the first dev warning reads the same. A direct `renderer.setPixelRatio` now takes only the resolution step out, not the whole controller. Recipe 15 section 4b.
45
+ - Path-traced photos: `photo({ pathTracer: () => import('three-gpu-pathtracer/webgpu') })` and `photo.trace({ samples, seconds })` (a Promise of the shot, with `pathTraced` naming what the tracer did not draw as the game does; progress in `photo.tracing`), op `photo.trace`; `take()` is unchanged. `threedog shot --path-trace [--samples n]` writes that view as a reference picture. The tracer is the game's optional package (recipe 26).
46
+ - WebGPU picture, all optional: `autoExposure()` from `@threedog/post-effects/tsl` (exposure that adapts like an eye, measured on the GPU, before tone mapping); `pcss()` from `threedog/tsl`, a shadow filter for `light.shadow.filterNode` whose edge softens with distance (it reaches the engine's cascades); a `RectAreaLight` in the scene no longer needs `RectAreaLightNode.setLTC` / `RectAreaLightUniformsLib.init` from the game, on either renderer (recipe 34). Nothing changes for a game that uses none of them.
47
+ - Reflections on WebGPU: `reflections()` from `@threedog/post-effects/tsl` (three's `SSRNode`, mirror mode, in proportion to metalness; held on low tier; recipe 34). Post effects can ask `needsBuffers: ['metalRough']`, one 8-bit target merged into the same scene render.
48
+ - Streamed content whose material the renderer has not drawn yet attaches once its shaders are compiled and its textures uploaded (a task later); `budget: { gpuMemoryMB }` on WebGPU (three's own estimate).
49
+ - Vegetation draws fewer calls for the same picture: each chunk's plants are now frustum culled by three against every camera, so the main view skips the nearest chunks behind it and each shadow camera (every cascade) draws only the chunks inside its own box. Before, the nearest ring drew in full behind the camera and every cascade drew every casting chunk. World example: 213 -> 190 draw calls (vegetation 93 -> 57), with 3 cascades 329 -> 297 (vegetation 137 -> 75); screenshots differ no more than two runs of the same build. Chunks off the main view are no longer hidden as a whole, so trees just outside the picture keep the shadows they cast into it; a felled plant is drawn at zero scale where it stood (an all-zero matrix made the chunk's bounding sphere NaN, so rays missed every plant of that chunk). Nothing to change in a game
50
+ - The engine's random pattern changes once: grain, paper, stroke and dab detail, cloud shadows, sky clouds, stars, outline wobble and film grain now use one integer hash, so WebGL and WebGPU draw the same pattern (the old sin-based hash gave each GPU and backend its own). Density, size, softness and brightness are unchanged; only the arrangement moves. The public functions keep their names and meaning: `threedogHash(vec2)` (TSL `fx.hash`), `threedogNoise(vec2)` and the post snippets' `fxHash(vec2)` take any position, as before.
51
+ - `threedog assets check` checks `needs` on the file the engine loads (the winning entry after all packs, `optimized` included, at `public/<url>`), whatever folder is checked; `content check` warns when `collide.layer` is on a tilted prop (the same rule as the runtime warning); the MCP tools `scenario` and `verify` take `freezeReload` like the CLI's `--freeze-reload`.
52
+ - Model contract: a manifest model entry can declare `needs: { nodes: [...], clips: [...] }`. `threedog assets check` errors for each node or clip the glb lost (with the closest name it has), and the load warns the same line once (`[asset-needs]`). Optional; games without `needs` are unchanged. The optimized pack from `assets optimize` now replaces only the file (url, lods, node, and a generator or Texture it stands in for), so `needs` and `prepare` survive and a generator no longer shadows the optimized file. The `optimized` pack that `threedog assets optimize` writes now swaps only the file (url, lods, a part's node): the original entry's other options (`needs`, `prepare`, `params`) stay, where before the whole entry was replaced and they were lost.
53
+ - `threedog play`, `status`, `verify` and `scenario` now check their options with the shared strict parser: a mistyped one (`play --stopp`, `verify --freeze-relod x`) fails with the list of valid options instead of running the command the default way, and `verify` / `scenario` take one scenario name. The real options (`--stop`, `--freeze-reload`) are unchanged.
54
+ - A model given to `vegetation.define({ model })` now draws with the material the game made, plus only the engine's wind / season / clouds. The copy vegetation makes of each material used to keep only what three's `clone()` knows, so a NodeMaterial's own `setupLightingModel` (the `celLighting` route), a field its class never declares and a classic material's own `onBeforeCompile` were dropped and the trees drew with three's plain lighting. Every engine copy of a material (vegetation, tinted characters and pickups, terrain textures, batching) now carries them. A code-built model named in `define` (`model: 'bush'`, a manifest generator that returns an Object3D) goes through the game's `engine.assets.onModel` first, like a content prop of that name. An attribute on only some meshes of the model (uv on the leaves only) is still dropped from the species, now with a `vegetation-ignored` notice in `describe().warnings`.
55
+ - `temporalAA` works with the vegetation module on WebGPU. Grass with wind and the near-only fade read each instance's matrix again in every patch (4 vertex inputs each), and temporalAA's velocity buffer added 4 more, past the device's 16, so its pipeline failed and a game had to fall back to MSAA. `objectOrigin()` / `instanceOffset()` (threedog/tsl) now share one input per matrix column in a program: such grass needs 9 inputs, 13 with temporalAA. The picture is the same.
56
+ - A WebGPU program that needs more vertex inputs (or buffers) than the device has stops at its build with a `[vertex-inputs]` error counting what stacked up (geometry attributes, instance matrix and color, last frame's matrix for the velocity buffer, engine patches, the material's own attribute nodes) and what to do, instead of three's raw pipeline or attribute-location error. three draws its plain stand-in for that mesh.
57
+ - Collider layers: `collision.addBox`, `collision.addCircle`, `collision.addSegment` and `collision.addObject` take `layer: 'gate'`, and a character (`createPlayer`, `npcs.add`) takes `passes: ['gate']`. Such a body walks through those colliders and every other body is stopped; `findPath`, `characters.findPathAsync`, `walkTo`, NPC paths, the navmesh and the `rapier` mover follow it. `collision.walkable` takes `passes` too, `collision.walkableAt` and `collision.resolve` an extra `passes` argument. Nothing changes for a game that uses neither (recipe 12, "Gates some characters pass").
58
+ - `engine.assets.onModel((model, name) => ...)` runs the game's setup once on every model copy the engine hands out, before it is drawn (it leaves the root's place, turn and size to the placer: dev throws on a change): `assets.model` / `modelNow` / `lod`, content props and templates, pickups, character bodies and a level file. A game that recolored engine-made props with a scene sweep can drop the sweep. Games without it are unchanged.
59
+ - A manifest model can name one node of a multi-part file: `{ url: '/models/kit.glb', node: 'Wall.001' }`. The part sits at the origin with the turn and size it has in the file, the file loads once for all its parts, and a missing node name fails naming the close names (three's renames `Wall001`, `Fence_1` are accepted).
60
+ - `threedog assets optimize` follows manifest entries `{ url, node }`: the file is optimized once, the entry is re-pointed at the optimized copy with the same node, and a node the file lacks (before or after) is reported as `model-needs`, together with the entry's `needs` checked on the optimized file.
61
+ - Collider layers reach content and levels: `collide: { layer: 'gate' }` on a prop or template (a box, or with `circle`), and a custom property `layer` on a `col_` mesh or `collider` object in a level. Same `passes` rule as `collision.addBox`; a non-text layer on a level wall warns `level-layer-ignored`, a layer on a tilted prop `content-layer-ignored` (collider3d has no layers), and either one then stops every mover.
62
+ - A glTF node authored hidden with `KHR_node_visibility` (`visible: false`) now loads hidden (three 0.187 ignores the extension); its children are hidden with it. `threedog assets check` lists such nodes in one `hidden` line per file.
63
+ - `engine.hud.hint(id, { action, label, anchor })` (UI part `hud.hint`, @experimental): an on-screen key hint "E · Talk" (written like the interaction prompt). The key text is `engine.input.label(action)`, so it follows rebinding and keyboard / pad switching, and an action that needs a key and has none shows the `input.noKey` text, as the prompt does; `hud.button` takes `action` too and shows its key.
64
+ - `engine.hud.button(id, { label, run, icon, anchor })` (UI part `hud.button`): a clickable HUD button. The press never reaches the game (no shot, no look-drag, no pointer lock), focus goes back to the game after a click, and `label` goes through `engine.t`. `hud.remove(id)` takes it away.
65
+ - With `nav()` installed but no navmesh (procedural terrain has none, a level may still be loading), `characters.findPath` / `findPathAsync` still use collision A*, and dev builds now warn once (`nav-fallback`) saying so. Which method answers is unchanged.
66
+ - `followCamera` keeps distance and pitch inside `minDistance`..`maxDistance` and `minPitch`..`maxPitch` as before, and now warns once in dev when a game asks for a value outside, naming the option to widen (`[camera-clamped]`). The same for a `rtsCamera` start height and a `firstPersonCamera` start pitch.
67
+ - `engine.describe().warnings` (dev): every warning said on the page, `{ count, list }` with the first 20 as `{ code, text, fix }`, so an AI sees a fallback or clamp without the console. Codes for "the engine used something other than what the game gave" end in `-clamped`, `-fallback`, `-ignored` or `-replaced`.
68
+ - `threedog scenario` / `verify`: a `press` step fails when a game action is blocked (an open window holds input, and the message says who), instead of passing with nothing pressed. A page reload during the run fails it with the reason. `until` is checked inside the page, so it no longer costs one round trip per tick.
69
+ - `threedog scenario|verify <name> --freeze-reload`: the dev server ignores file saves during the run (no page reload; a saved `index.html` still reloads), and takes them again when it ends (10 minutes at most). The reload error of a run points to it.
70
+ - `threedog dev` fetches the game page once after it starts and prints one line with the status and the next step when it is not 200.
71
+ - `threedog perf --size WxH`: measure at a given window size.
72
+ - Rule R33 finds a world model by the nearest binding of the name (scope-aware), not any variable of that name in the file. Rule R18 no longer reads a game doc's own helper names as engine API claims.
73
+ - `threedog assets check` notes (one information line per kind, not a warning; `--full` lists all) when a model's node name is one three.js GLTFLoader renames (`Wall.001` -> `Wall001`, `_1` suffixes), because `engine.assets` finds the part by the renamed name.
74
+ - `scripts/check-public-export.mjs [dir]` (repo maintainers): exits 1 naming internal records (`HANDOFF.md`, `docs/plans/`, test records, `games/`, ...) that git tracks in the public copy; for its pre-push hook.
75
+ - Performance you can see: `engine.budget.notice()` (also `describe().perf.notice`) is one line, printed by `describeText`, `threedog shot` and `threedog verify`, when the game is over limits it declared itself (never the engine's own reference limits), slower than its recorded baseline, has a spiky module (p95 over 3x its median and over 2 ms), or runs at a resolution adaptive resolution lowered; nothing when all is fine. `shot --save-baseline` / `verify <name> --save-baseline` write this machine's `.threedog/perf-baseline.json` (`engine.budget.record()`, keyed by GPU, canvas size, pixel ratio and camera; not committed, new games ignore `.threedog/`); later runs with the same key compare medians past a noise margin, modules that were 0 or new included. Budget limits take `modules: { terrain: 1.5 }` (ms per frame of one module).
76
+ - `engine.profile()` now returns `{ module: { ms, mean, p95 } }` per frame over the last 300 frame-hook cycles (ms is the median; it used to return the average and reset on read) and is on by default in dev builds; `profile(true)` still turns it on in production. Upgrade: read `.mean` where you used the number. `threedog inspect perf` lists the five dearest modules with p95. Meaning change, same keys: frame time `cpuMs` in `describe().perf`, `inspect.perf()`, the budget and the F3 panel is now one reading, the median of the last frames (`describe().perf.cpuFrames`), where it was the last frame (the panel: a half-second average); it is still 0 before the first frame and null while halted. `describe().perf.cpu` is still the last frame by phase.
77
+ - A vegetation species that is grass-scale (`nearOnly`, or `maxRing: 1`) and casts shadows by default gets a hint from `threedog content check` and a dev warning from `vegetation.define`: set `castShadow: false`, or `shadowRing: 0` to keep only the nearest ring (writing `castShadow: true` keeps them and silences it).
78
+ - `engine.profile()` judges a module first used after start on its own cycles (it read 0 ms for its first 300), and a level load or flow transition during play clears frame and module timing again once it settles, so its start-up cost is not counted as play.
79
+ - An action that cannot be read is explained by every cause: an opaque context above it, `shadowed-by:<context>` (a pass-through context binds the same key), `context-off:<context>` (its own context is not on the stack) and its gate owners, in what `press` reports; `describe().holds.shadowed` lists the shadowed actions. The interaction prompt, `hud.hint` and markers write a key and its text with one helper.
80
+ - Health check, errors and ops: `op:rolledBack` is sent once when an atomic op's rollback finishes; `engine:error` and `engine.error` also work in release builds; an async `run` is refused only for atomic ops (a plain op may return a Promise).
81
+ - Health check, saves: a stack in a save that no module knows is dropped with a warning, a damaged known stack refuses the load; a save part's `first` may be a number (lower ranks load first); a failed photo save is told once; new error codes `save-provider-changed` and `fog-fallback`.
82
+ - Health check, picture: `vegetation.plantOf(hit)` returns the plant a ray hit (species, cx, cz, id, position) for `removeInstance`; `post.byRole(role, name?)` falls back to the effect's name when no effect declares the role in `about.acts`.
83
+ - Health check, colour: `renderOnce(target)` returns display pixels like the screen; WebGL direct fog is mixed in linear space (`threePatches.off('fog-linear')` turns it off); the sky environment yields to a game's own and takes the map back.
84
+ - Health check, tiers: tier-following defaults (sun shadow map, weather count, sky environment interval, terrain colour map); a shared boolean switch warns the writer that loses; the settings shadows row hides with no caster.
85
+
86
+ ## 1.1.0 (2026-11-08)
87
+
88
+ - `threedog check` type-checks every `.js` of a game, not a list of known folders (`main.js`, `game/`, `content/`, `picture/`, `plugins/`). Code in another folder (`landmarks/`, `data/`, ...) was skipped while `check` said it passed, and a mistake there only failed in the build. Those files now count, so a game can show type errors it did not show before. Assets and tests (`public/`, `tests/`, `docs/`, `shots/`) are still left out. The game template's `tsconfig.json` includes all `.js` the same way.
89
+ - `threedog shot --cam x,y,z,targetX,targetY,targetZ[,fov]` places the camera at a pose without a view declared in the game (a facade, a roofline, a far backdrop). It cannot be combined with `--view`.
90
+ - The picture check reports meshes that lie entirely beyond `camera.far` (never drawn from there) as a fact, with the documented way to move the plane: `engine.autoView.manual('far')`.
91
+ - The picture check's "time barely changes the picture" line says it varied `engine.calendar.timeOfDay`; a game that switches its lights by its own presets can ignore it.
92
+ - API page of `followCamera`: `minPitch` and `maxPitch` state their defaults (0.05 and 1.35) and that the view cannot look up unless `minPitch` is negative.
93
+ - The game template's `CLAUDE.md` tells a helper's brief to start with `threedog how`, recipes 60 and 62 for the picture and a clean `check`.
94
+
95
+ ## 1.0.1 (2026-11-07)
96
+
97
+ - Docs only: the install lines in the package READMEs name 1.0 (0.9 was never on npm).
98
+
99
+ ## 1.0.0 (2026-11-07)
100
+
101
+ - A request awaited inside a save load without its `turn` fails with `save-nested` after `engine.loading.timeoutMs` with no sign of life, and the load fails its normal way. It used to wait for good.
102
+ - `detach` is gone from the engine: write `obj.removeFromParent()`. `engine.remove` stays.
103
+ - A `turn` kept after its load ended no longer lets `content.load` jump the line: it waits behind the load before it, as `level.load` did.
104
+ - `applyState({ save })` and `{ play }` answer in `refused` when the load or the new game failed, so `threedog state` and a scenario stop there. The title stays open. They used to answer ok.
105
+ - An item's `use` that answers `{ ok: false, code }` or throws keeps the item: `inventory.use` is atomic, sends no `item:use`, and hands the failure to the caller. It used to spend the item and answer ok.
106
+ - `engine.i18n.locale` is read-only: `setLocale` is the one way to change the language. Writing it skipped the name lookup and `i18n:change`.
107
+ - A failed `content.load` no longer marks the pack's vegetation table for good: the same pack loaded again registers its plants.
108
+ - A pack that names an op nothing defines, loaded in a running game, leaves nothing behind. Its actions and quests used to stay, and the name then failed every later load.
109
+ - A world save holding a record faster than its time channel (`time.local` above 1) loads. Its debt mark goes below zero, and the load refused that as damage, the rollback of a failed load too.
110
+ - A tween whose write throws ends there and its promise rejects: `await engine.timeline.tween(...)` can now throw, and a `timeline.play` step with it ends `failed` and gives control and input back. It used to never answer. A tween nobody awaits is reported as an unhandled rejection, once.
111
+ - A cutscene writes a character or the camera only while it is the holder in charge. A path on a ragdoll or a seated rider, and a shot under a newer `takeCamera` or a newer run, keep their time and write nothing; back in charge they write where their clock is.
112
+ - The default physics floor follows the ground: a level installed while running takes it away, and a ground source that leaves brings it back. Terrain chunks and trunks leave with their ground source too. `ops.undo` of a failed run answers `nothingToUndo` instead of throwing.
113
+ - A solid prop is in a new `collision` or `collider3d` on the line after `engine.use`. It used to come back on the next frame.
114
+ - A save part's `load(data, turn)` and a module's `afterLoad(engine, turn)` can change level and load packs after an await: `level.load(x, { turn })` and `content.load(x, { turn })` go at once. It used to wait for itself, for ever. Without the turn a call waits in line like any outside request, and dev says so when it stalls (`save-nested`).
115
+ - A part registered during a load runs after it, whole, in its own turn. Its first lines used to run inside the load.
116
+ - A failed pack ends only when the old level and registrations are back, and saves and loads asked meanwhile wait. A restore that fails reaches the caller (`err.notRestored`). It used to reload in the background and swallow the failure.
117
+ - `content.load` returns a Promise for this load, not `engine.content`.
118
+ - One reading route in the docs: taking over a game starts at its status notes, a new feature at `AI.md` or `threedog how`, then the recipe and API page. `AI.md` calls its table a recommendation, and `API.md` no longer tells a game to write `?.` for a module it needs.
119
+ - MCP `check` now lists the first bypass hints with file, line, advice and how to switch them off, the same ones `threedog check` prints, one of each kind first. It used to drop them.
120
+ - In a game that runs, `threedog how` answers the most asked tasks with the lines to add (recipe 66 "In an existing game": where they go, what to skip, the failure to handle, the check; a test runs them). An answer shows an example only if it belongs to the chosen route.
121
+ - `threedog how` with no words opens a category list; `--browse <category>` lists capabilities, `--card <id>` shows one: what it solves, when it does not fit, install, dependencies, time, saves, an example and what verified it. The MCP tool takes `browse` and `card` fields. `--list` is gone.
122
+ - A scenario can say `{ "until": { ... }, "within": seconds }`: reach this state by the deadline, then check the end with `expect`. A win that freezes early passes; an error, a freeze before the state, a stuck load and a missed deadline each name themselves. `step` stays strict.
123
+ - `before` / `after` that contradict the stages through a capability are refused with `module-order`, as they are by module name. They used to warn and drop the line. `water` no longer states `after: ['sky']`: it reads the horizon color, and a frame's lag does not show.
124
+ - Frozen physics queries refresh through one wrapper that gives the step length back even if Rapier throws. Checked on Rapier 0.21: no narrower native route exists, and the refresh leaves velocities, sleep, contacts and a pending kinematic move alone.
125
+ - A swap is finished when queries can trust it: after `engine.use(collision(), { replaces: 'collision' })` the next line reads the level walls, frozen or not. A module that feeds a provider says so with `ctx.feeds(capability, fn)`; a provider that refuses what it is fed fails its `use()` and the old one comes back. A copy rebuilt through `follows` that throws is built again at the next read.
126
+ - An old `engine.haltLoop` or `views.show` handle no longer ends a later hold of the same name.
127
+ - `world.simulate` on a time channel pays the time as it passed. A far or tiered record, `engine.skip` and a saved debt no longer rewrite the past at the speed of the settlement: half a second at 1x and half at 0.5x gives 0.75, not 0.5. Each record's own `time.local` rate counts the same way. Older saves load; what they owe is read at the first speed it meets.
128
+ - A dialogue `do` that throws ends the conversation and answers its `say()`, on a bubble too. It used to leave a line nobody could finish.
129
+ - A cutscene has one ending: `finished`, `skipped`, `dropped` or `failed`. `timeline.play()` resolves with `{ ending, error? }`, `timeline:end` carries the same, and describe counts it; `{ skipped }` is gone. A dropped or failed run runs no more steps, a parallel branch included, and gives the screen back. A new game or `dispose` drops a run: its `do` steps no longer run on what came after.
130
+ - A failed atomic op puts `once` items, interaction counters and content markers back with everything else. Every engine save part now says whether an atomic op covers it, or why not (`notAtomic`, rule R67).
131
+ - A reward that cannot be given is no longer lost in silence. `content.run` answers `{ ok: true }` or a failure listing each word that failed, and `content:failed` fires; `{ give }` reports what did not fit, part of a stack too. A finished quest fires `quest:unpaid`, tells the player (`quests.notify` gets type `'unpaid'`), and owes the items until there is room (saved, shown in `quests.list()`); `onUnpaid` lets the game decide instead.
132
+ - An async `onUse` is judged when it settles: one that fails or throws spends no `once` item and adds no count, and it cannot be used twice while it waits.
133
+ - Physics queries and rays see walls, solids, bodies and moves at once, also while frozen; world boxes stand on a new level at once. `engine.remove` of a model or a parent also removes its body. Public vectors must be finite: NaN and Infinity are refused with `bad-position`.
134
+ - `exit()` takes the first walkable exit a vehicle offers (`exitPosition(seat, n)`; `rigid` cars offer four) and answers `false`, rider seated, when none is. `exit({ force: true })` always gets out. It used to step into the wall and shove the car
135
+ - A seat is one relation owned by `characters`, saved with its seat number. A load keeps who sat where; a car built after the load takes its rider; a game's own vehicle keeps its rider through a load (`characters.addVehicle`); a cutscene over a driver lets go of the pedal; a rider stays on the seat with no holder moving it. `interaction.use`'s `approaching` has `remove()`, like the walk it stands for
136
+ - A walk is a task of the control slot, and one list says what ends it: a load or new game, a level change, a placement, a seat, physics taking the body, the character going. It used to outlive the level, the seat and the placement, and wait for ever under a ragdoll. `character.placeAt` drops an NPC's path as `npc.placeAt` does
137
+ - The view has one write route. The first holder of the camera records the view it took and the last one out lands it, so a slider moved during a shot takes effect at the end and overlapping shots no longer leave a half-way fov. A rig told to move during a hold records it and lands at release. A hold from writing the camera directly ends at a new game. The first-person body hides only while that view shows.
138
+ - Quality presets are shares of what the game set: High lets everything through, and no preset raises anything. MSAA never changes during a run: the settings row applies at the next start, and Low no longer turns the post chain on. `engine.tier` is the one quality value: the device's tier unless the player's preset says otherwise, for particles and everything else that reads it. `settings.set` refuses a key no row owns. Terrain and vegetation offer their own settings rows.
139
+ - Tools: `verify` and `step` share one step result, and less time than asked is a failure in both. `check` names a local file an asset pack names that `public/` lacks. A switched-off module has the state `disabled`; `engine.disabledModules` is gone, `describe().disabledModules` is derived from the state, and the short describe names it.
140
+ - `applyState` takes its module keys from each module's `stateKeys`: core no longer lists them.
141
+ - Loads and state turns, one rule per cause. A level file that fails now fails, whatever the manifest falls back to: no gray level, no `level:loaded`, and `saves.apply` answers false. Every load has one limit, `engine.loading.timeoutMs`, measured as silence, so a file that never answers no longer freezes `start()`, `level.load` or a load, and a load everybody stopped waiting for is aborted. `flow.transition` rejects at the same limit and gives the screen back. `level.load` during a save load waits for it. Autosave waits for the end of a door trip or a cutscene. A failed load puts a code-built level back. A content pack never commits inside a state replacement. A session turn on a disposed engine answers false.
142
+
143
+ - An unloaded level takes its `world.zone` and `level.spawn` with it. `unuse('content')` takes its hud markers off the screen. Path rasters no longer outlive the collision module or the playthrough that made them
144
+ - A collider with no `y` stands on the ground as it is now: after `terrain.edit` the rigid copy of a `collision.addBox` moves with the ground, so a crate no longer falls through a post left at the old height
145
+ - `engine.skip` during a skip rejects with `skip-busy`, as its doc says. It used to resolve, and its end unfroze the game during the first one's fade
146
+ - `assets.release` keeps a model whose geometry was handed out, as `trim` does
147
+ - `saves.register` on a held key throws `save-key-taken`. It used to take the part away from its owner in silence
148
+ - `replaces` sees more than the one module it names. `engine.use(terrain(), { replaces: 'terrain' })` now installs the new `terrainDraw` too, where the old drawing part stayed on a terrain that had gone and the new one was dropped with a warning; weather and vegetation act alike. A hold a rig opened on the camera ends with the rig, so the next rig moves. A live ragdoll gives its character back when rigid leaves. A swap, failed or not, leaves the game on the level it stood on, and a pack's older level no longer takes it back; a newcomer with its own `url` or `scene` still opens there
149
+ - A module that leaves takes what it registered with it. `unuse('characters')` used to hang the world step with a near NPC; `unuse('rigid')` broke `raycast({ targets: 'all' })`; `unuse('level')` left record nodes in the scene and in rays; `unuse('inventory')` left its touch button. `input.touchButton` and `assets.onSwap` now return `{ remove() }`; a button two parties asked for stays until the last one leaves
150
+ - A template's physics prop comes back from a load as it was saved: turned, moving, asleep or in the air. It used to land upright on the ground. A load no longer writes a change for a crate nothing touched, and a crate that was nudged stays nudged in a save (a nudge under 5 cm used to count as settling and was lost). A body keeps the speed it fell asleep with.
151
+ - `engine.unuse('rigid')` or replacing it stands a limp character back up. It used to stay held by the old physics for good.
152
+ - Weather set with `seconds: 0` reads the same after a load.
153
+ - `thing.set` with no height stands a template's physics prop on the ground. It used to go half into the floor and could fall through it.
154
+ - `stream.teleport` belongs to the state it was asked in: a new game or load (`saves.load` too) that goes through during the trip abandons it. It rejects with `stream-removed` and the player stays. It used to land on the new state, below ground at the old door's destination. A `flow.transition` still fading out is dropped the same way, and `engine.skip` is now cancelled by `saves.load` as well.
155
+ - Autosave no longer overwrites a save after `session.quit()` with no title part: `session.playing` stays false until a new playthrough starts.
156
+ - Every load entry acts alike. `saves.apply` ends a walk and rebuilds what `saves.load` does; any save put back closes the title; a rolled-back `saves.load` or `saves.apply` fires `session:failed` with `kind: 'quick'`. A rollback keeps rigid velocities and quest markers.
157
+ - A new game leaves no run state behind: holds taken in play, `world.anchor`, `audio.state` (a new save part, `audio`), a level loaded after a code-built opening scene.
158
+ - A module's function timer follows the module at a new game: gone with it, kept when it was used after `start()`.
159
+ - What joins after `start()` joins the new-game state: a player where it began, a part as its `init` left it, a pack's `startItems`.
160
+ - The title track plays after quit whichever of `flow` and `music` was installed first. `session.load` keeps the vehicle camera and a view saved on a switched rig.
161
+ - `flow.transition` goes on across a load that fails, as `stream.teleport` does. An atomic op's rollback puts a `NaN` back as it was.
162
+ - A second `engine.skip` during one under way rejects, as its doc says; its end used to unfreeze the game during the first one's fade.
163
+ - Dev warns when a second `saves.register` takes a key another part holds. A dev gameplay error stays frozen until reload, a new game included: documented, and guarded by a test.
164
+
165
+ - `stream.teleport` belongs to the state it was asked in: it waits out a running load, and a new game or load (`saves.load` too) that goes through abandons it. It rejects with `stream-removed` and the player stays. It used to land on the new state, below ground at the old door's destination. A load that fails leaves the trip going, and a level change does not touch it. A `flow.transition` running or in line is dropped the same way, without bringing the old track back, and `engine.skip` is now cancelled by `saves.load` as well.
166
+ - `saves.apply` fires `save:loaded`, as `saves.load` does: a walk ends on it, and the HUD quest list and calendar ranges rebuild. Its `slot` argument is what the event carries.
167
+ - A save part named `__proto__` is refused at `saves.register`. Its data used to be lost without a word.
168
+ - `saves.save` refuses data with `NaN` or `Infinity` at any depth, naming the part and the path, and the slot keeps its last good save. It used to answer true and store `null`. A game with a field like `hp: Infinity` saves a finite number or leaves the field out.
169
+ - A longer view distance builds stream entries and world models without the player moving.
170
+ - A delete the store refused lists the slot again.
171
+ - `saves.apply(x); saves.save('s'); saves.apply(y)` stores x on a page with `afterLoad` hooks too.
172
+ - A save part may be named like an Object method (`constructor`, `toString`).
173
+ - A `commits.request` made during a failed `session` load's rollback lands.
174
+ - `views.current` is declared `string | null`, as it is at runtime.
175
+
176
+ - New event `level:unloaded { source }`: a level left, by `unload()` or a switch just before the new one commits. On it the navmesh goes (`nav.ready` false, no path of any size from the old level), hlod lets the level go, grid tiles and A* rasters drop what they read from it. `level.ready` stays true after `unload()` because nothing is loading; `level.root` says whether a level stands, and `level.playable` is false.
177
+ - `walkTo` ends with its playthrough: `session.newGame`, `session.load` and `quit` settle it as `cancelled` and give the control slot back. It used to go on walking in the new game.
178
+ - The level's walls reach a replaced `collision` while the engine is frozen or skipping, not only on the next fixed step.
179
+ - `engine.unuse('cameraRig')` puts back the perspective view and the fov it found.
180
+ - A replaced provider no longer leaves consumers on the old one. After `replaces` on `rigid`, a template's crates get bodies in the new module where play left them (a template reload that changes, adds or removes `body` reaches built copies too), riders leave the old module's car by the normal exit, and rapier movers build anew. NPC agents, `findPathAsync`, weather drawing, interaction entries of props, NPCs, pickups and cars, and a replaced camera rig all follow the provider installed now. Version numbers no longer decide this: they count per module, so compare the object. Game code that keeps a handle does the same (recipes/55).
181
+ - `replaces: 'world'` and `unuse('world')` are refused (`module-replaces`, `module-unuse`) once a module that uses the world is installed or the game has started, and nothing changes: it used to break the game. Install your world before the modules that need it.
182
+ - One way to an orthographic view: a real `THREE.OrthographicCamera` in `engine.camera`. A rig's `projection: 'orthographic'` now does exactly that, and the next perspective view brings the first camera back, so the camera class that acted as both is gone: `engine.camera` is a plain three.js camera, always. `camera.orthoSize` and `camera.isEngineCamera` are gone (`MIGRATING-1.0.md`).
183
+ - Navmesh paths fit the body that asks: a `radius` on `findPath` or `findPathAsync`, and `walkTo` and NPCs with theirs, gets a mesh of that size, built on first ask and rebuilt with the level. Small bodies take gaps a large one cannot; a body too wide for every way gets `noPath` where its `walkTo` used to end `'stuck'` at the gap. One size costs nothing extra. Recipe 12 section 5.
184
+ - `findPathAsync` on A* sees every floor of a level: ground under a bridge or a lower storey is walked as `findPath` walks it. It used to read only the top one, so a steep roof closed the road under it and a slope under a deck did not count.
185
+ - `level({ url })` with a pack that sets `level`: `content.load` before `start()` now ends as it does after `start()`, the pack whole and its level up, and the url file is not fetched. The url load used to overtake the pack and drop all of it, in silence. If the pack's level cannot load, the url is the level.
186
+ - A pack whose `level` is overtaken by a newer `level.load`, save load or unload is no longer lost: only its `level` gives way, and its other sections commit on the level that won, once that load has ended. A newer load that fails leaves the old level, and the pack's other sections still go in. An overtaken `level.load` now resolves when the newer load has ended.
187
+ - Two engines on a page: gamepads follow the keyboard, so only the engine last pressed or focused (the first one until then) reads them, seats included. An engine alone on a page reads a pad as before.
188
+ - The level's `col_` walls and solid props go into whichever `collision` is installed, tilted props into whichever `collider3d`: after a `replaces`, a failed one, or a module that came late or came back. They used to stay behind in the old module, so a character walked through. `module:restored` now fires after every swap, with the fresh modules, once their `init` is done, and content sections load into a newcomer that declares them, as a `content.load` on a running game would. A newcomer with its own format that refuses a pack written for the old holder gets a warning naming the pack, and the game runs on.
189
+ - `level({ url })` with a pack that sets `level`: `content.load` before `start()` now ends as it does after `start()`, the pack whole and its level up, and the url file is not fetched. The url load used to overtake the pack and drop all of it, in silence. If the pack's level cannot load, the url is the level. A pack overtaken by a newer `level.load` still goes, and now warns.
190
+ - Two engines on a page: gamepads follow the keyboard, so only the engine last pressed or focused (the first one until then) reads the pads no seat is bound to. A seat hears the pad it was given on any engine, and the owner leaves that pad alone. An engine alone on a page reads a pad as before.
191
+ - The level's `col_` walls and solid props go into whichever `collision` is installed, tilted props into whichever `collider3d`: after a `replaces`, a failed one, or a module that came late or came back. They used to stay behind in the old module, so a character walked through. `module:restored` now fires after every swap, with the fresh modules, once their `init` is done, and content sections load into a newcomer that declares them, as a `content.load` on a running game would.
192
+ - Recipe 66 has two more whole examples, both run by its test: two areas built in code that a save returns to by their manifest names, and a ladder that goes on after a load mid-climb.
193
+ - Rule R40 no longer calls a `subtitle` option and a canvas lookup on one `createEngine` line a dialogue box.
194
+ - `thing.set`, `world.set` and `world.move` on a live character (the player, an NPC with a model) are its `placeAt`: they used to answer ok and be undone by the next step.
195
+ - A write to a record with `positionFrom: 'view'` moves its model and any rigid body on it, instead of being overwritten at the end of the step; `rot` and `scale` on a template with a `body` build a new body.
196
+ - `rot` and `scale` written to a character's record (`world.set`, `thing.set`) reach the character and survive a rebuild and a load; what it cannot obey is refused by name. `thing.set` no longer drops the x and z of `rotation` and `scale` arrays.
197
+ - Undo of a `thing.set` that ended a ride seats the character again, or answers `ownerRefuses` if the seat is gone or taken; `ops.define` takes `canUndo` for such answers. `placeAt` on a ragdoll carries the whole body there at rest, where the next step used to put it back.
198
+ - `placeAt` on a seated character, and so any write to its record's position, ends the ride and puts it there: the seat used to pull it back on the next step.
199
+ - One entry each: `stream.setRadius`, `weather.setAuto` and `post.setAntialias` are gone; assign `stream.radius`, `weather.auto` and `post.antialias`, which do the same. The command `threedog eval` is gone; `threedog js` is the one name.
200
+ - `threedog test` no longer counts a check labelled `skipped:` as passed: the summary names it and says how many did not run.
201
+ - `engine.skip(null)` fails with `skip-amount` like `engine.skip({})`, not a TypeError. Bad arguments throw at the call, and the docs now say so.
202
+ - The perf island example opens again: its op name was refused by the `noun.verb` rule.
203
+ - `engine.camera = cam` takes a real `THREE.PerspectiveCamera` or `THREE.OrthographicCamera`: rendering, post, picking, shadows, audio, rigs and `pixelSnap` go on with it, and resize keeps its frustum. Other classes are refused with `camera-option`. The type of `engine.camera` is now the union of the two, so TypeScript code reading `.fov` narrows first.
204
+ - Terrain: `terrain.setViewChunks` and `terrain.setDensity` are gone; assign `terrain.viewChunks = n` and `terrain.density = d`, which do the same. Density thins plants without a collider only, so it never changes collision.
205
+ - Declarations: `terrain()` and `vegetation()` are declared as the two modules they return, like `weather()`; nothing changes in a game that passes them to `engine.use`. The class names `Ambience`, `Budget`, `Calendar`, `DebugPanel`, `Grid`, `Grids`, `Layer`, `Music`, `Net`, `Particles`, `PostFX`, `Sky`, `SoundHandle`, `Swarm`, `Timeline`, `Water`, `Weather`, `WeatherDraw` and `World` are types only, as they always were: nothing can import them as values. The `weather.*` names (`weather.auto`, `weather.current`, `weather.defineField`, `weather.label`, `weather.lightningBrightness`, `weather.name`, `weather.overcastColor`, `weather.particles`, `weather.set`, `weather.setAuto`, `weather.types`) are unchanged, now counted as a module's.
206
+ - `compositeGround` with `rigid`: terrain inside a level's region was solid but not on the ground. The hills stood as invisible collision inside the level, so a dropped box stopped in mid-air over a lake. The terrain's physics triangles now stop at the regions where another part answers.
207
+ - `mover: 'rapier'`: a swimmer moved to a place with no water, or whose water was removed, froze the game with a NaN position. It falls and lands now.
208
+ - A content pack with a `level` file now commits as a whole once the file is here: `{ place: 'npc_home' }` reads the new level's marker, and a later pack of the same load, or a later `content.load`, waits for it. If the file fails, nothing of the pack commits. Code right after `content.load` cannot read such a pack's sections yet; wait for `start()` or `level:loaded`. A pack refused by a section leaves the level as it was, a load in flight included. A section may declare `cancel(prepared, c)` to let go of what its `prepare` holds.
209
+ - A save that names the current level now drops a `level.load` still downloading. Before, the file landed on top of the loaded save.
210
+ - `engine.unuse('level')` and `{ replaces: 'ground' }` take the level with the module: its scene, `col_` walls and what `level.track` holds. Before, they stayed behind.
211
+ - Object contracts (`mover`, `vehicle`, `ground`, `collider3d`) list their members under `api` like every other contract; a replacement's own `contract.js` with `methods` should rename it.
212
+ - A content section's `fields` key is gone: nothing read it for a section. A game kind's and a template's `fields` are unchanged.
213
+ - A template with a `body` and a per-axis `scale` builds: the array went into its resting height and the model failed to appear. A place turned on a reload now turns a record with an `[x, y, z]` rot too, and the editor's turn handle keeps the three numbers.
214
+ - `compositeGround`: `terrain:void` fires for rigid bodies and ragdolls again when one part is a level. The void height comes from the parts that have one.
215
+ - `compositeGround` region: `(x, z) => boolean` or `{ volume }`, the shape water and trigger zones take. `{ circle }` and `{ rect }` are gone: write them as a function.
216
+ - `slope` and `groundType` with a `refY` pick the layer on a level, as `surface` always did, so walkability and footsteps under a bridge read the ground under the bridge.
217
+ - `quests.list()`: a step counts as done once the quest left it. A step `next` jumped over stays not done, and a step a loop came back to is current and not done.
218
+ - A* (`findPath` without `nav`): a goal on a floor the walker can't reach is `noPath`, and `walkTo` ends with that status. It used to be `ok` with a path that ended under the goal.
219
+ - `compositeGround({ parts })` could not be installed: its only option was refused as unknown. It works now; recipe 10 section 6 shows it.
220
+ - Water goes by height: a character, `describe().player.inWater` and buoyant rigid bodies now pass their own height to `waterAt`. Before, a character walking under a lake was lifted through the ceiling to swim. A game's `addWaterBody({ query })` now gets `y` from these too.
221
+ - `docs/MIGRATING-1.0.md`: every change an existing game can hit since 0.9.0, as what you will see and what to do. A `preventDefault` on `character:fall` and a `thing.explain()` now answer with the fix instead of a bare TypeError.
222
+
223
+ - Local players on one screen: `engine.input.seat({ pad, keys })` is one player's own keys and gamepad, read like `engine.input`; `createPlayer({ id, input })` adds a player with that seat and its own world record (no `id`: the one player, as before); `characters.moveInput` takes an optional seat (no argument: as before); `removePlayer(id)`; `engine.player` stays the first player. Interactions, footstep sounds and NPCs giving way still follow `engine.player` only. Recipe 58.
224
+ - Data checks that ran only in development now hold in release: a NaN or short position (`world.add`, `move`, `set`) is refused and writes nothing; an op with a missing required arg or an `id` with no record fails with `badArgs` before `run`; `world.set` cannot change a record's id or kind; two NPCs with one name and no id, a `once` interaction with no stable id, and a template state value outside its fields all throw. A game that passes its development run is unaffected.
225
+ - Contracts state position authority: the characters, mover and vehicle contracts have a `position` entry naming who may write a character's position, and `@threedog/tools/contract` checks any contract that has one. Nothing changes at run time.
226
+ - A `picture` or `ui` module disabled after an error now gives back what it borrowed with `ctx.borrow`, as unloading does: a value someone else set meanwhile stands. Before, its fog or tone mapping stayed on the screen with nothing maintaining it.
227
+ - Skip: a module says how `engine.skip` advances it with `skipKind`: `exact`, `approx`, `step` or `none`. Every engine module declares it (rule R57), `engine.catalog` shows it and reports a module with a `fixed` or `skip` hook that has none, and an unknown word stops `engine.use`. The `skip` hook and `noSkip` stay.
228
+ - Metadata: `threedog map` now writes one generated file of module, content section, contract and placement field facts (`threedog/metadata`). `catalog`, `how` (engine modules and options by name, with no page running), the editor, rules R38 and R50 and the content loader read it instead of keeping their own lists. A content section can declare `live: true`; field specs take `label` and `rare`. A pack with a `level` section and no `level()` module now gets the named error instead of being dropped. The code map, rule R51 and the content file list now read it too: a content section states what it holds in its own `desc`, and `describe().content.sections` also names `actions`, `places`, `audio`, `views`, `renames` and `rules`. Rule R6 now also fails when an option or contract name in it is missing from the types; a contract name a game should not call is marked `@internal` at its source.
229
+ - Asset tool chain: `npm audit` flagged `glob`/`minimatch` under `@gltf-transform/cli` (moderate, build time only). This repo overrides them to the fixed `glob` 14; a game that installs `@gltf-transform/cli` for `threedog assets optimize` adds the same `overrides` entry (recipe 46). `threedog assets optimize` itself is unchanged.
230
+ - Capabilities and readiness: `before` / `after` can name a capability (`after: ['ground']` follows whichever module provides it, also across a `replaces`); `engine.explain({ module })` and `{ capability }` say whether one can be called now. `engine.has(name)` now also answers for a capability a module provides. Development and test builds compare a bound provider's API with the capability's contract, on module changes only: a gap is one `module-contract` warning and a line in `engine.catalog(name).problems`, and the module still runs.
231
+ - `engine.explain` is the one way to ask why: `{ thing: id }` replaces `engine.thing(id).explain()` (`detail` holds the same object), `{ module }` and `{ capability }` are new, and `threedog explain thing <id> --full` replaces `threedog thing <id>` (MCP: `explain` with `about: "thing"`). The CLI word for a value is `threedog explain value fog.far`.
232
+ - Dev server: who writes a value now covers the values the engine writes on its own and shared points, not only picture values; `engine.debug.watch(name, object, key)` adds any value the game names (does nothing in release). `engine.explain({ value })` replaces `explain({ picture })` and also gives the value's short history; two writers taking turns across frames are reported too, in a one-line `[picture-conflict]` hint whose fix moved to `explain`; a yield warning and `describe().owned` name the line that took the value. Only watched values are seen, so no conflict seen is not proof of none.
233
+ - Water asked at a height: characters, rigid bodies, `describe().player.inWater` and spawn search now pass their height to `waterAt`, so a game's `addWaterBody({ query })` or `{ volume }` that depends on `y` (a pool upstairs, a waterfall) works for them. Before, they asked with no height and saw no water.
234
+ - `collider3d.sweep`: a ball that starts touching a solid and moves out of it is clear, so a flying mover can take off from the ground it stands on.
235
+ - `walkTo`: a vertical leg of a path (a path source for a flyer) is progress and goes straight; before, it drifted sideways and ended `stuck`.
236
+ - `mover: 'rapier'` NPC: while another mover has it, its capsule leaves the world and comes back at the character. Before, it stayed at the take-off spot as an invisible wall and blocked the new mover's own sweeps. A mover may give an optional `leave()` for this (`mover.contract.js`).
237
+ - Types: `player.move` and `player.mover` now show the `y` a control step passes (the code already took it); nothing to change in a game.
238
+ - A failed `replaces` leaves the game as it was: the old modules come back in their old places, also when one requires another, and content sections load into them again, so definitions and progress are back. Game code that defined things by hand does so again on the new event `module:restored` `{ modules }`.
239
+ - `session.newGame` / `quit` could be refused for good after a late `replaces` by a part of a lower version: the new-game state now takes the new part's data when the part cannot read what is there.
240
+ - A failed load also rolls back a part whose `save()` gave nothing just before it: it goes to its new-game state. Without one, a soft error names the part.
241
+ - A load taken over by a newer one on the next line can no longer roll back over it, and a taken-over `saves.load` no longer emits `save:loaded`.
242
+ - A content section may say `once: true`: its commit gives state, not definitions (`startItems`), so it is not replayed.
243
+ - `engine.use(x(), { replaces: 'slot' })` with a module named `x` already installed that does not hold the slot is now `[module-replaces]`. Before, the newcomer was ignored and the slot's holder unloaded for nothing.
244
+ - `engine.setPixelSize(null)` leaves a ratio the game took with `renderer.setPixelRatio`; before, it was overwritten.
245
+ - `ctx.borrow`: a module's handles now end newest first when it leaves, so two borrows of one property give back the original value (before: the first borrow's value stayed).
246
+ - Control: two owners taking one character on one layer now throw `[control-conflict]` in release builds too (was: warn once, the later owner won), and the first keeps the character.
247
+ - Shared values: two owners `set` one point on one layer, or a second provider of an exclusive slot, now throw `[shared-conflict]` / `[shared-taken]` in release builds too (was: warn once, the later write won). Development and release behave the same and the earlier value stays.
248
+ - Placement: a prop's `rot` and `scale` also take `[x, y, z]` (numbers act as before), `ground: false` keeps the written `y` instead of snapping to the ground, and `collide` on a model turned about x or z is held by `engine.collider3d` (a named error without one). `triggers.add({ volume: { contains(p), bounds? } })` takes the same plain volume as water.
249
+ - Ground: `slope`, `groundType` and `waterAt` (and a provider's `ground.slope` / `ground.type`) take `refY` like `surface` (existing calls unchanged); `core/scene/ground.contract.js` states what a ground provider gives; `compositeGround({ parts: [{ of, region, priority }] })` holds the ground slot over `terrain({ part: true })` / `level({ part: true })` so both can run; `engine.addWaterBody({ query(x, z, y), bounds, mesh })` or `{ volume, level }` is water you draw yourself; `describe().spatial` shows the ground holder and water.
250
+ - `engine.collider3d`, a new slot with a contract (`modules/rigid/collider3d.contract.js`): `addSolid`, `overlap`, `sweep` on all three axes. `rigid` is the first holder. Nothing changes for a game that does not call it. A module of yours that `provides: ['collider3d']` now needs `{ replaces: 'collider3d' }` next to `rigid`.
251
+ - Ragdolls take any body: the rule `ragdoll.graph` is `'humanoid'` (default, unchanged), a graph `{ part: { bone, parent, limits, mass } }` for four legs or a tail, or `false` (then `rigid.ragdoll` returns null). Recipe 11. A hit without `position` lands on the root part, hips on a human. `rigid.ragdoll({ mass })` is now the exact total (a human came out 1% over).
252
+ - Falling is one rule, `fall`, covering characters and rigid bodies; the default is unchanged (`'rescue'`). `engine.mod('fall', { owner, id?, set: false })` leaves it to the game, and a function `(facts, engine) => 'rescue' | false` decides per fall (`facts.kind`: `'character'` or `'body'`). It is asked once per fall.
253
+ - Migration: `preventDefault` on `character:fall` is gone (calling it now throws `not a function`). Replace `events.on('character:fall', e => e.preventDefault())` with `engine.mod('fall', { owner: 'game', id: 'player', set: false })`, or a function for a decision per fall. `character:fall` still fires first, with `{ character, safe }`.
254
+ - `rigid({ fallbackFloor: false })` removes the flat plane at y = 0 that a ground without collision of its own got; default unchanged.
255
+ - Assets: a model copy now holds its asset's data: `release`, `trim` and a replaced build wait for the last copy, and `describe().assets` lists `leases` and `waiting`. Nothing to do in a game.
256
+ - New games and starter pictures: `picture/index.js` is now a `type: 'picture'` module. Write `engine.use(createPicture()); const { picture } = engine;` and switch looks at run time with `engine.use(next(), { replaces: 'picture' })`; meshes holding old materials must take the new ones. A hand-written `createPicture(engine)` keeps working; a newly pulled starter picture needs the new line.
257
+ - Modules: `ctx.borrow(obj, values)` writes properties on an object the module does not own and restores them when it goes, unless something else wrote them meanwhile. Replace a hand-written save and restore with it; nothing else changes.
258
+ - Vegetation: at low quality, plants with `collider` are drawn thinned again, as many as before they were placed in full. Plants not drawn still block. Nothing to do in a game.
259
+ - `characters.path` rule: `engine.mod('characters.path', { owner, id?, set: ({ from, to, o }, engine) => points | null | 'walk' })` is where `findPath`, `findPathAsync`, `walkTo` and NPCs get paths (default `'walk'`, `false` for none), for flight or anything off the ground; `findPath(a, b, { id })` picks a character's entry.
260
+ - `character.mover` rule: `engine.mod('character.mover', { owner, id, set })` swaps how a character moves until the handle goes, and `mover` (`player.mover` too) takes `(character, engine) => ({ name, move(x, z, run, dt, y) })` (`mover.contract.js`, `engine.characters.kit`, recipe 57). `control.take` steps and `handle.move(x, z, run, dt, y)` gain `y`, default 0. A mover name that does not exist now throws `character-option` instead of warning and walking with `'simple'`: fix the name.
261
+ - XYZ: paths from `findPath` / `findPathAsync` / `engine.nav` are `{ x, y, z }`; schedule stops keep a `y` you give (`{ x, z }` still means the ground) and it picks the floor, also for where the NPC starts; `walkTo` and NPC stops arrive only at the height asked for. A height near no walkable surface at that spot (a stop written `[x, 0, z]` on ground at 8) goes to the nearest surface and warns once `[nav-height]`, so nothing needs rewriting; a height near a surface picks that floor. `collision.addBox({ y })` stops only a body overlapping `y .. y + height`, so a wall upstairs leaves the floor below free (`y` omitted: as before). `collision.walkable` with a `y` and `walkableAt(x, z, radius, y)` read boxes the same way, and so does A*, on the walker's floor; a wall on a level file's upper floor no longer blocks A* paths below it. A navmesh path that only gets under a goal cut off upstairs is now `noPath`, not a path ending a floor below. NPCs on different floors no longer push each other, or yield to a player on another floor.
262
+ - World stays the same at any quality or position: scattered plants with `collider` are placed identically at every `density` (only collider-free species thin); terrain edit, height and shape keys no longer alias far from the origin; `engine.nav` / `findPathAsync` / NPC crowd goals go to the floor the height you pass picks (the ground answers only when none is given); rigid bodies under a moved or rotated parent register at the world pose and write back through the parent (a parent scaled differently per axis throws `rigid-misuse`); standing at the exact centre of a circle or box collider is pushed out towards +x; buoyancy no longer clears forces the game adds to the same body.
263
+ - Containers: `add`, `remove`, `setData`, `transfer` and `trade` throw `[container]` for a quantity that is not a whole number >= 1 (before, `remove("apple", -2)` added stock). `{ op }` and `{ can }` content words run as the actor given to `content.run` / `content.test`, like `give` / `take`. A swarm `capacity` must be a whole number, and a damaged swarm save part is refused whole instead of half-loaded. Weather fields that are not finite numbers, terrain paint types that are not strings and grid layer payloads that are not objects are no longer loaded from a save.
264
+ - `threedog new-game name --pixel` (and `init --pixel`): a sprite-character starting point (`pixelSize`, `pixelSprite`, a `pixelSnap` camera, input, interactions, dialogue, autosave and start screen), gray placeholders; not together with `--open-world`. Recipe 13 gains 3d (which modules need an engine character, run on a sprite) and its `c.facing < 0` mirror test is replaced: `facing` is an angle, not a left/right sign.
265
+ - Release and recovery: a trigger zone's `remove()` inside its own `onExit` no longer deletes a neighbouring zone, and a second `remove()` does nothing. A water normal map swapped for another frees the old texture. A throwing particle depth pass puts the scene back. Unloading the light pool puts back the glow of the stand-ins it borrowed. Unloading `timeline` ends running cutscenes (camera and actors go back) and `flow` stops a transition that has not swapped the scene yet. Modules get `ctx.signal`, which aborts when their install ends, for async work started in `install`.
266
+ - Branching quests: a step can have `next` (a step id, `e => id`, or `false` to finish), and `quests.state(id).visited` lists the steps passed. Save version 3 adds `visited`; older saves load as before.
267
+ - `dialogue({ bubbleChoice: 'ask' })`: a bubble line with choices stays up and waits for `dialogue.choose { index, run }` (run is in `dialogue.bubbles()`); the default still warns and ends the script.
268
+ - `triggers.add({ occupancy: 'each' })`: an enter, stay and exit per actor instead of one for the whole zone (default `'zone'`).
269
+ - Modules own their content sections: a module field `content: { section: { fields, references, validate, prepare, commit, effects } }` decides a section's format, so replacing a module replaces its format. A replacement quests, dialogue or inventory module must declare its own section to read content data. A pack is checked and prepared whole before anything commits. Data for a module that is not installed is a `module-needs` error naming it.
270
+ - `level.load` builds the new level first: on failure the old level stays, `level:failed` fires instead of `level:loaded`, and the Promise rejects, so a save that names a broken level rolls back. Catch the rejection if you called it without `await`. New events `level:loading` and `level:playable`, new field `level.playable`; `level:loaded` means the state is committed.
271
+ - `saves.save` during a load waits for it to end; `saves.collect` during a load throws `save-busy`.
272
+
273
+ - `threedog check`: the bypass hints (rule R40) now show without `--verbose` (the first 5; `--rule R40` lists all) and the last line counts them ("check passed, 3 bypasses"). R40 also catches `new Promise(r => setTimeout(r, ms))` (use `engine.clock.after`), every `localStorage.setItem` that is not an obvious preference, raw `keydown` / `keyup` listeners, `AudioContext` / `new Audio`, hand-made dialogue boxes, interact-distance checks and box-overlap collision. The game template's CLAUDE.md starts with "name the engine system before writing a new system file".
274
+ - Pixel games: `threedog/pixel` adds `pixelGrid`, `pixelSprite` and `spriteFrame`, and `followCamera` and `fixedCamera` take `pixelSnap: { pixelsPerMeter, bounds }`. Camera and sprites round on one grid along the screen's axes, so a turned view moves by whole art pixels, also along a level's edge. Recipe 62 section 4b.
275
+ - With `pixelSize`, the pointer's `ndcX` / `ndcY` ran across the padding at the right and bottom as well, up to k real pixels off; they now run across the picture.
276
+
277
+ - Replacing the game state is now one transaction. `saves.apply`, `saves.load` and `session.newGame` / `load` / `quit` take turns in the order asked, so two overlapping loads end as one whole save instead of a mix of both, and a load that fails rolls back to the whole state before it. Idle, a save with only synchronous parts still applies before `apply` returns. What a game may notice:
278
+ - A second `apply` / `load` asked while one runs now waits for it (async parts or a running `afterLoad`). Do not await one inside a part's `load()` or an `afterLoad`: it cannot start until they return, so it would wait forever (dev warns, `save-nested`). Start it from a `save:loaded` or `session:start` listener.
279
+ - `ops.run`, `ops.can` and `ops.undo` now answer `'loading'` and change nothing for the whole replacement: also during a synchronous part's `load()`, a `world:load` listener, a running `afterLoad` and a rollback (before, only while an async part loaded). An `afterLoad` or `load()` that ran an op to rebuild should write directly, inside `engine.ops.allow(...)`. A game's own `engine.freeze` (a menu) keeps allowing ops.
280
+ - During a failed load in dev, ops answer `'loading'` until the rollback ended, then `'halted'` (before, `'halted'` at once).
281
+ - `session.load` of a missing or unreadable slot asked during a replacement now answers after its turn, not at once.
282
+ - The load's freeze owners `threedog:load` and `threedog:load-parts` are one owner, `threedog:state-replace`. Code that looked for those names reads the new `engine.saves.replacing`.
283
+ - A module's registrations now leave with it. `ctx.ops.define`, `ctx.saves.register`, `ctx.ui.define`, `ctx.stream.addReadyCheck`, `ctx.budget.metric`, `ctx.things.addSource` / `explainWith` and `ctx.ground.provide` / `addColliders` take the same arguments as the engine calls; `engine.unuse`, a `use()` batch that throws and a failed `init` all remove them, so `use(inventory())`, `unuse('inventory')`, `use(inventory())` works. Your own modules keep working unchanged; move their registrations to `ctx` to get this. `engine.catalog(name).resources` lists what a module owns.
284
+ - A save part that leaves keeps its data: it rides in later saves and goes back to a part registered under that key. So `engine.use(mine(), { replaces })` where `mine` registers the same part key now receives the old module's data through `load`; give `mine` its own key if it uses another format. `saves.register` and `ui.define` now return a handle (they returned nothing, so no code changes).
285
+ - A module whose `init` failed loses its ops, save parts and UI parts with its other handles. Calling one of its ops now answers that the op is unknown.
286
+ - `ground` is one exclusive capability, held by `terrain` and `level`. Installing both now fails at `use()` with `shared-taken` instead of the later `setGround` winning: keep one, or swap with `engine.use(terrain(), { replaces: 'ground' })`. `level` no longer sorts after `terrain`. A module of your own giving the ground declares `provides: ['ground']` and calls `ctx.ground.provide(...)` instead of `engine.setGround`. When a provider leaves, the flat ground comes back. `engine.setGround` from game code still works over a module's ground, with a dev warning.
287
+ - `use`, `unuse`, `replaces` and `engine.plugins.on` / `off` now go through one check: the module list after the change is worked out and every module in it must still find what it `requires`, before anything is touched. A `replaces` that drops a capability another module needs now throws `module-replaces` instead of leaving that module broken: add the capability to `provides` of the module that takes over. `engine.plugins.off` throws `module-unuse` and stays on when a module outside the plugin needs it; a plugin owning both provider and consumer goes off as a set.
288
+ - `requires` now means the provider works. Until a required provider runs (still initializing, failed, or blocked), a module is `'blocked'`: its `init` waits and its hooks do not run, and `engine.catalog(name).blockedBy` and `describe().moduleStates` say why. If a provider fails, a `critical` module requiring it stops `start()` with `module-critical`, and others stay blocked; modules that do not depend on it go on. A later `engine.use(mine(), { replaces })` of the failed provider starts them. A module that can live without the provider lists it in `optional`. Inits of one late `use()` batch now run provider first instead of side by side.
289
+ - A second provider of an exclusive slot is now refused in every build, before anything is touched. A release build used to warn and let the later one win.
290
+
291
+ - `threedog check` and the runtime error for a guessed pause (`engine.time.pause()`, `engine.pause()`, `engine.time.stop()`, `resume`) now point to `engine.freeze(owner)`.
292
+ - A game in `games/` of a clone no longer breaks `npm install` after an engine upgrade. `threedog new-game` now writes `"*"` for `threedog` and `@threedog/*` (the workspace copies), and `threedog doctor` reports a game whose range does not accept the current engine, or that has its own copy of the engine in `node_modules`; `threedog doctor --fix` rewrites the ranges. `threedog init` outside a clone keeps `^version`.
293
+ - Test tools: a spec file that cannot be imported (for example its top level touches `document` or `window`) is now named with the file that threw, the cause and the fix; the other spec files still run and the round ends failed, instead of one bare "document is not defined" stopping everything. New warning rule R56: a test item that fails on a measured time (`ms < 100`) without `serial: true`.
294
+ - `createEngine({ pixelSize: k })` and `engine.setPixelSize(k)`: one art pixel is k real screen pixels, every one the same width at any display scale, on WebGL and WebGPU, through page zoom and moves to another display. Replaces working out `devicePixelRatio / k` by hand (recipe 62 section 4b). Every engine write of the pixel ratio now goes through one place, so settings that clash are an error naming which to keep (`pixel-conflict`).
295
+
296
+ ## 0.9.0 (2026-11-06)
297
+
298
+ A game on 0.8.0 upgrades with no code changes, apart from the three points below: a particle list of three or more stops now uses every stop, `engine.start()` after `dispose()` rejects, and a save damaged in the listed ways is refused. Run `threedog doctor --fix` to move the `threedog` and `@threedog/*` pins in `package.json` (a `^0.8.0` range does not reach 0.9, so a game in `games/` of a clone would get a second engine from npm).
299
+
300
+ - Picture check, checked against what seven games really show. `shadow-jag` now moves the shadow map's pixel grid by half a pixel and reads what follows it, in place of counting corners, which stayed the same with a map four times finer. `shadow-stripes` needs at least two bands, and glowing lines through a shadow no longer split it. Moving film grain is no longer read as shadow.
301
+ - `nav({ crowd: true })` NPCs walk to a link's end before crossing, as other walkers do: they started about 1 m short, so a climb cut through the deck. One whose goal lay just past the landing no longer stops short of it.
302
+ - Docs from a real trial: recipe 12 gives where a hatch's ends really sit, in place of the unchecked 0.4 m, a `linkPose` for a hatch, and says a link has no queue; recipe 02 says crowd NPCs walk through the player; recipe 57's ladder read an action that does not exist (`moveBack`), so it could not go down; recipe 64 shows a flipbook on both routes.
303
+ - Tools: a headless browser is closed after 2 idle minutes (was 10), and every tool that opens one first stops what a dead browser left behind, such as a stuck page whose tool was killed.
304
+ - `engine.start()` always answers after `dispose()`: it rejects at once with `engine-disposed`. It used to stay pending for good when `dispose()` ran while it waited on a model, the preload or a module's `init`, and a `start()` after the `dispose()` of a running engine answered as if the engine were alive.
305
+ - `whenReady` of the built-in stream sources, and any `stream.source` or `stream.teleport` asked for after `dispose()`, reject with `stream-removed` instead of waiting for a frame. Waits in game code (`assets.model`, `jobs.add`, `nextFixed`) stay pending after `dispose()`, as before.
306
+ - A damaged save is refused in more cases: a `containers`, `inventory`, `quests`, `terrain` or `grids` part of the wrong shape, and a world `step` that is not a whole number. Each is `save-bad-record` at load (load false, game rolled back) instead of a code error, a game frozen one step later, or a bag emptied without a word. Found by the long fuzz runs.
307
+ - New games' `CLAUDE.md` and recipes 16 and 32 ask for a scenario for every end state (lose, die and respawn, retry, reload mid-run) and a read of `threedog verify`'s "ops never run" list.
308
+ - Recipe 56 lists what draws wrong on WebGPU without a thrown error (`Points` size, `LineLoop`, `linewidth`, `customDepthMaterial`, `MeshDepthMaterial`, `toneMapped`, `dithering`, `texture(map, uv)` and `map.repeat`).
309
+ - The docs no longer say the navigation library can be swapped: a module in the `nav` slot is Recast underneath (CONVENTIONS.md "What can be replaced"). Recipe 12 gives Recast's real download size.
310
+ - `nav({ links: [{ id, from, to, oneWay, radius }] })` (experimental): NPCs path across jumps and ladders. These are Recast off-mesh connections: a path point that starts one has `link: { id, from, to }`, tiles rebuilt by obstacles keep them, and `findPathAsync` sees the same ones. A link that attaches nowhere warns `nav-link` at the build.
311
+ - NPCs, `character.walkTo` and `nav({ crowd: true })` NPCs cross links in a straight line at walking speed unless the game says otherwise: `link:enter` and `link:exit` tell it when (`crossing.seconds` sets how long), `engine.characters.linkPose` bends the line. No default animation. An NPC saved mid-link goes on from the same spot after a load. Recipe 12, section 6.
312
+ - `characters.findPath`, `characters.findPathAsync` and `nav.findPath` now type their points as `NavPathPoint`: `{ x, z }` plus `link` on a point that starts a link. A game without links gets the same points as before and changes nothing; code that walks a path by hand past a link should stop at that point, or use `character.walkTo`.
313
+ - Particles: `size`, `color` and `opacity` take more than two stops, evenly spaced `[a, b, c]` or timed `[[0, a], [0.2, b], [1, c]]`, so a fade-in is possible. The two-point form reads as before; a list of three or more used to drop the rest and now uses them. A bad list throws `[module-params]` at `define`, `emit`, `attach` or `particles()`.
314
+ - Particles: the geometry attribute `aLife` holds each particle's life fraction (0 birth, 1 death) for a game's own material.
315
+ - Particles: `ratePerMeter` (effect option, option of `particles.attach`, live on the handle) emits per meter the emitter moves, spread along the path of the step, on top of `rate`. Default 0.
316
+ - Particles: `soft` fades a particle where it meets what writes depth, default 0, off. On WebGLRenderer it costs a depth-only draw of the scene per render while a soft effect is on screen; on WebGPURenderer's WebGL2 backend it works only with post and antialias on, and warns otherwise.
317
+
318
+ ## 0.8.0 (2026-11-06)
319
+
320
+ npm never had 0.7.1: coming from 0.7.0, read this section and the 0.7.1 section below it, and follow `docs/MIGRATING-0.8.md`, which goes from 0.7.0 straight to 0.8.0.
321
+
322
+ - Decoded sounds no longer pile up: they are assets now, so `assets.release` takes a sound (name or path), `assets.trim()` and level changes free long ones, and long sounds over a memory budget go by themselves, the longest unused first. Playing sounds play on, a freed one loads again when played, effects under 10 s stay cached, `preload: true` keeps a track. A failed file by path now reads `Asset failed to load`, same code `asset-load`.
323
+ - Characters, vehicles and rigid bodies draw between fixed steps (`engine.stepBlend`), and the camera rigs follow that drawn place, so motion stays smooth on a screen faster than 60 Hz or when a frame runs no step or two. `root.position` and `mesh.position` stay the step's truth: gameplay reads what it read before, and the drawn pose is one step behind it, as swarms already were.
324
+ - `jumpBuffer: 0` means "this step only" instead of never jumping, a press now gets its whole `jumpBuffer` (one step more than before), and with `coyoteTime: 0` walking off an edge spends the ground jump instead of leaving a free air jump.
325
+ - `character.walkTo` no longer counts a long leg after a corner as being stuck: a path of several long legs used to replan at each one and ended `'stuck'` after `maxRepaths`.
326
+ - `session.load` asked while a new game is still running (right after a page opened with `?play`) waits and then loads; it used to join the new game, answer `true` and load nothing.
327
+ - `threedog types`: a name declared and never read is a hint in a game's code and an error in `packages/`. `shot <url>` on a built page keeps its fog, shadow, key and light facts and names what it could not read there (no three.js for the tools on a built page).
328
+ - `quests.define` refuses a quest without a `steps` list when it is defined; it used to throw on every check after `start`.
329
+ - The engine gives no help for this version's old names: a stale uniform name in shader text reads 0 with no warning, and an old `sky()` or `water()` option is an ordinary unknown option. See `docs/MIGRATING-0.8.md`.
330
+ - `saves.register({ movedFrom })` is removed; only the calendar used it. The time and day of a 0.2 save under the old `sky` part are no longer read. Every released sample save from 0.7.0 on still loads.
331
+ - `engine.sky.uniforms` is public, like `engine.water.uniforms`: the live handle for the uniforms given to `engine.sky.clouds()` and `engine.sky.layer()`, on both renderers (`engine.sky.dome.material.uniforms` only ever worked on WebGL).
332
+ - The field `calendar.daysPerSeason` is removed: nothing read it and writing it did nothing. The `calendar({ daysPerSeason })` option stays.
333
+ - `engine.THREE` is removed: `import { THREE } from 'threedog'`. Holding the whole of three.js on the engine kept every class in every game's bundle, and the package now has a `sideEffects` list: a bare `createEngine()` page went from 1561 KB to 1336 KB (470 KB to 397 KB gzipped). A dev page holds three.js under a private name for the engine's own tools (the picture check), a production build does not.
334
+ - The contract files are importable from an install: `import contract from 'threedog/modules/gameplay/inventory.contract.js'`, as `@threedog/tools/contract` says. They are plain data for checking a replacement.
335
+ - A model's clips moved from `model.userData.animations` to `model.animations`, three's own place. A game that cloned a model and then animated the clone crashed: three copies `userData` through JSON, which breaks the clips. A model with clips is now never batched, as the batching rule always said.
336
+ - `phase` on the engine has one more value, `'starting'`, while modules run their `init`; `'loading'` now starts after them.
337
+ - `uiFocus` is marked experimental: its shape may still change. `engine.input.push` is the stable route.
338
+
339
+ - 249 public names are now `@experimental`, so 1.0 does not freeze them: the ones no game, recipe, example or template uses, and the coordination features no test game has used (`engine.stacks`, `engine.wrap`, `engine.mod`, `time.channel`). None is removed; `docs/api-surface.txt` lists each one. They sit in: `adaptive`, `assets`, `audio`, `batching`, `budget`, `calendar`, `characters`, `checkOptions`, `collision`, `control`, `decoders`, `dialogue`, `error`, `firstPersonCamera`, `fixedCamera`, `flow`, `followCamera`, `ground`, `i18n`, `inRange`, `input`, `interactions`, `inventory`, `jobs`, `level`, `materialPatches`, `mod`, `music`, `nav`, `ops`, `page`, `particles`, `photo`, `pickups`, `player`, `post`, `quests`, `random`, `rays`, `rigid`, `rtsCamera`, `runState`, `saves`, `session`, `settings`, `sky`, `stacks`, `startup`, `stateApplied`, `stateRefused`, `stream`, `terrain`, `terrainMaterial`, `time`, `timeline`, `toggleOnKey`, `ui`, `uniforms`, `urlState`, `validate`, `vars`, `vegetation`, `water`, `weather`, `world`, `wrap`.
340
+ - NPCs and `character.walkTo` follow a path by one rule: an NPC skips points it has passed and no longer stands still for a step at each point, so it runs a few centimetres ahead of where it was mid-walk.
341
+ - `inventory.slotsUsed` is gone: read `inventory.of().slotsUsed`.
342
+ - `settings({ sections })` takes an entry `{ id: 'graphics', omit: [...] }` that leaves graphics rows out; an omitted row stays the game's value, and no preset or stored value moves it. A fixed pixel look omits `pixelRatio`, `antialias`, `adaptive` (recipe 62 section 4b).
343
+ - The WebGPU renderer no longer asks for `powerPreference` on Windows, where Chrome ignores it and warned on every page load.
344
+ - A damaged save is refused in more cases: an NPC `nav` that is not an object or a path that is not a list of points, a character speed that is not a sane number, a record with no `position`, content marks or an interactions part of the wrong shape, a physics body past ±1e7 (it hung the page for good). Each is `save-bad-record` at load (load false, game rolled back) instead of freezing the game. Found by the long fuzz runs.
345
+ - Docs: recipe 28 section 4b, a road laid on terrain: the road and the height function read the same data.
346
+ - A KTX2 model or texture asked for before `engine.start()` loads on WebGPU: the engine waits for the renderer's init itself, and `await engine.renderer.init()` is no longer needed.
347
+ - `engine.setCamera(kind, options)` before play (boot code, or with the title up) keeps its options when play starts.
348
+ - A moving physics body that freezes outside `rigid({ terrainRing })` warns once in dev, by name (`rigid-misuse`); recipe 11 explains the freeze.
349
+ - `hud.counter` with no label shows the value alone; it used to show the id.
350
+ - `inspect.perf()` on a halted page: `cpuMs` and `fps` are null and the text says they are not measured (they read 0). Its `lights` line says it counts point and spot lights.
351
+ - `input.holders` and `runState.blockedBy` count pushes and removes that wait for the next fixed step, so the status line of a halted page no longer names a closed window.
352
+ - Saves now hold the camera view: a new save part `cameraRig` (yaw, pitch), so Continue no longer loses a first-person view. Old saves load as before. `session.load` / `newGame` rebuild the installed rig on the same object, so a `const rig = engine.cameraRig` kept at boot stays the camera and a save part's `load()` that writes the rig keeps its write.
353
+ - Error codes merged before 1.0, one code per failure: `options-object` is now `bad-position`; `npc-option` is `character-option`; `pickup-prop-id` is `world-id`; `session-handle` is `module-handle`; `world-missing` is `module-needs`; `load-failed` is `asset-load`. `bad-arg` is gone: `input.bind` raises `input-keys`, `characters.support` raises `character-option`, `settings({ presets })` raises `module-params`.
354
+ - Some raises moved to the code that says what went wrong: `engine.stacks.define` of a known name raises `engine-misuse` (was `mod-owner`), `swarm.onStep` with no function raises `swarm-step`, `weather.set` with bad seconds raises `weather-option` (both were `module-params`), a damaged saved swarm raises `save-bad-record` (was `save-refused`).
355
+ - Four throws that protected nothing are now one dev warning: `engine.wrap` on a `_private` method works, `createEngine({ fallback })` without WebGPU starts, a vegetation `rule` beside `positions` plants the listed spots, `ui.theme.promptHeight` starts.
356
+ - Error text follows the current names: `shared-layer` no longer lists a `style` layer, `input-bound-twice` no longer mentions a module keys option, `rigid-misuse` covers the ragdoll cases, `quest-step` covers definitions, and other fixes that named the wrong call.
357
+ - Editor test fixes: the test pickup sat under the editor panel and could not be clicked (moved), the grid-item test model now turns with its record, and a drag where the outer turn ring would stand is checked to move the camera and write nothing (the turn handle shows the yaw ring only).
358
+ - Editor, first walked through by hand on a new game: opening it closes the title screen, Esc no longer opens the game's menu over the scene, the buttons stay in one place, a save says "Saved", a refusal is colored, a second Add lands beside the first, yes/no fields are lists (an unset `static` no longer looks like "no"), and a value the game cannot load (a `place` that does not exist) is taken back from the file at once instead of breaking the next start. `threedog content add` to a list written on one line opens it, one entry per line.
359
+ - `threePatches.off('lod-view-camera')` now works: LOD objects made after it keep three's own `update` and `clone`.
360
+ - `threedog how`: a sentence that only points at a recipe no longer ranks its row, and a text line joins the ranking only if it holds the typed word itself, so "webgpu", "node material" and "climb" reach their recipes again.
361
+ - A module's `type` is optional: without one it is `'rules'`. A module going against its type (a `ui` module binding keys, a `picture` module defining an op) now warns once in dev and the call goes through; it used to throw. An unknown type name still throws.
362
+ - `threedog state` and `threedog snap` (also `snap --play`) move no game time: they used to add a tick or two.
363
+ - Animators update in a core step right after the `onFrame` list, so an `anim.sync` / `go` / `set` from any `onFrame` shows the same frame.
364
+ - `engine.step()` during an unawaited `start()` or session change warns once in dev (`step-during-load`).
365
+ - `views.show` writes the fov through the engine's owner, so `autoView.manual('fov')` keeps the game's value, and `release()` gives the fov back.
366
+ - `assets.report` and `inspect.materials` share one texture slot table: `specularMap` is data in both, and a `lightMap` may be linear or sRGB in both.
367
+ - `createEngine({ audio: { music } })` key spelling is checked by `music()` when it installs, not in core.
368
+ - Removed: the error messages for names gone since 0.4 and earlier (`createEngine({ post })`, `createEngine({ style })`, `engine.elapsed`, a fourth `clock.after` argument): the first two are now plain unknown options. Error codes `renamed-field` and `shadow-type`, and `withHint` from `threedog/error-hints` (`hintText` stays).
369
+ - Removed before 1.0, nothing implemented it: the ground API's optional `ground.navGeometry`. The navmesh comes from `staticTrimeshes()`.
370
+ - `content.load` reads a pack's own `places` file; the `places` option goes on top, and `{ places: data.places }` is no longer needed.
371
+ - `weather()` no longer needs `sky()`: rain and snow fall without it, or under a game's own sky, which reads `weather.current.grey` and `weatherDraw.flash`.
372
+ - A low-tier device changes only defaults. `particles.define` `max`, `weather({ particles })`, a weather `count` and `sky.environment({ interval })` stand as the game gave them, as `colorResolution` already did.
373
+ - `sky.replace(false)` is in the type: it draws no sky. A skybox now reaches full brightness at the brightest row of the game's keyframes, not at ambient 1.2.
374
+ - `hlod` puts everything back when the module unloads. The shadows switch reaches near-only plants and plants on vegetation's own ground. `terrain({ viewFog })` keeps working under a replaced `terrain-draw`.
375
+ - `music.play`, `music.stinger`, `hud.counter`, `hud.bar`, `calendar.at`, `calendar.daily`, `calendar.between` and `vegetation.removeInstance` check their option keys.
376
+ - Removed, no reader anywhere: `settings.saved`.
377
+ - New in `threedog/tsl`: `noise`, `hash` (the engine's value noise, until now only in sky hooks) and `instanceOffset` (an offset through the instance's rotation and scale). `ctx.fx` in patches, sky hooks and post effect nodes now holds the same full list.
378
+ - `#include <threedog_uniforms>` declares every name on `engine.uniforms`, `uNight` and the sky values included. A shader that also declares one of them itself drops its own line.
379
+ - `engine.shadows.cache`: a batch now answers for its originals, so `{ static: cityRoot }` covers batched copies, and an InstancedMesh whose instances change, or that leaves the scene, redraws the kept map by itself.
380
+ - New: `adaptive.base`, the ratio this device or game starts at. A settings preset's `pixelRatio` is a share of it.
381
+ - Removed before 1.0, no game used them (`MIGRATING-0.8.md`): `adaptive.paused`, `settings.removeSection`.
382
+ - `hlod` hides a far original on the batch layer, the way `engine.batching` does. The `hlod-visible` patch and `userData.rayVisible` are gone: `mesh.visible` on a registered mesh is plain three.js again, and reads the game's value near and far. The full model of a far `assets.lod` waits on the same layer, so read `getCurrentLevel()` to see what is drawn.
383
+ - Occlusion culling keeps a game's `mesh.layers` write made while the mesh was hidden; showing it used to put the old mask back.
384
+ - Settings store only what the player changed, like `input.rebound()` for keys: one volume change no longer pins the render scale and every graphics value for later launches, and a preset is stored by name. A preset's `pixelRatio` is a share of the device's default ratio, so `medium` is no longer blurry on a 2x screen and `high` no longer renders 1.5x on a 1x one. `settings.values` is read only and `settings.get('pixelRatio')` is the real ratio. Stored files of version 1 are read: a value equal to the default lets go.
385
+ - `engine.setPixelRatio(p)` is now the top adaptive resolution climbs back to: it was undone within two minutes while the raw three.js call stayed. Adaptive may still lower it under load.
386
+ - New, off unless called, `@experimental`: `engine.rigid.ragdoll(character, { impulse, position, bones, limits, mass })` turns a skinned character limp and `rd.remove()` returns it to animation (recipe 11, section 3b). Reads common skeletons by itself, names what it cannot read; the mover, animator, capsule and camera yield and come back; the pose goes to the plain three.js bones in fixed steps; not saved. Partial or blended ragdoll is left out. `control.take` has a new layer, `physics`, between `cutscene` and `net`.
387
+ - Swarm: a handle kept in a field now stays good. Handles pass 2^24 after 16 births, and a Float32 column rounded them, so `row()` answered -1 as if the target had died. A game's own `fields` are `Float64Array` now (twice the memory per field); `x`, `y`, `z` and `r`, `g`, `b` stay `Float32Array`.
388
+ - `audio.buses.master` exists, as recipe 31 always said. A name that is no bus warns once with `[unknown-name]` and gives `master`, so `node.connect(audio.buses.wrong)` no longer throws and freezes gameplay in dev.
389
+ - Pure functions: a number such as `1e9` or `0xff` is no longer read as an outer variable named `e9` or `xff`, so `terrain({ height })` accepts them.
390
+ - `content.load`'s `unknown content` error now says `rules` must be listed in `content/index.js` too, and recipe 20 says the same.
391
+ - Docs: `n.fbm`, `noise` and `hash` run 0 to 1 (recipe 28); every `bloom` option with its default (52); pool lights and walls (09); `onBeforeCompile` on WebGPU and a node-material sky (54, 08); where the canvas is (01); `vegetation.define` order and keeping plants off a line (36); how `describe` nests a part (19). Recipes 02 and 04 no longer send a game to engine source or engine tests.
392
+ - Tools tell the truth, from four AI-built games. `check` reads `content/index.js`, what the page really loads: a kind listed there without `rules` is now an error instead of a green check and a dead page, and a file left out is a warning. A kind's `load` is optional: a game that imports its own file no longer writes an empty function. Valid TSL (`p.xy`, `.mul` on a `uniformArray` element) is a hint, not "engine API misused", and the worker check no longer reads `1e9` as a variable `e9`.
393
+ - `applyState({ fresh, play, pos })` keeps `pos` (a new run used to undo it while `state` printed Set). A view moves `engine.focus` to its target and waits for the world there, so `shot --view` no longer needs a `--pos` beside it. `threedog perf -w game` measures a game's page, as its usage line always said.
394
+ - `threedog test` says before the run, and again on a timeout, that a spec with `page.screenshot` left the GPU for software rendering; `software: false` keeps it on the GPU for a real picture. COMMANDS.md: a steering test holds the loop and advances with `engine.step`, so machine load cannot change its path.
395
+ - Picture check: edges are not read when the picture changes by itself between two identical renders (moving film grain read as "shadow stripes on 92%"); a line over a default budget says why the number exists and that nothing is cut at it. `threedog how` no longer prints a GLSL sample under a row in a WebGPU game. New games: CLAUDE.md names `threedog play`, STATUS.md no longer asks for three versions against "build it".
396
+
397
+ - Physics follows the `world` time channel: `engine.mod('time.world', { mul: 0.2 })` slows rigid bodies and vehicles with everything else, and a hit-stop at speed 0 holds them. To keep bodies at full speed, slow a channel of your own instead of `world`.
398
+ - The press that opens a window or dialogue from a fixed step no longer also acts on it. `h.fresh` counts input frames, ended by `input.endFrame()`, so it holds at any frame rate and no longer depends on who called `uiFocus` first.
399
+ - Renamed before 1.0 (`MIGRATING-0.8.md`): `engine.pause` is `engine.haltLoop` and `engine.paused` is `engine.halted`, because it stops rendering and an AI asked to pause a game reached for it and got a dead screen; a game freezes (`engine.freeze`, flow `'paused'`). The `pause` stack is `halt` and the error code `pause-owner` is `halt-owner`. `runState.state` is `'loading' | 'title-frozen' | 'halted' | 'frozen' | 'running'`: `'test-paused'` and `'paused'` go, and so does the `kind: 'test'` option.
400
+ - `engine.freeze(owner, { ambient: true })` is now a real still: skeletal animation, character animation and particles stop with `uTime`. A plain freeze, as behind a pause menu, keeps them moving as before. `engine.still` is true during one, for a game's own frame code.
401
+ - A page hold is a freeze (`MIGRATING-0.8.md`): a window in the background or a lost graphics device freezes gameplay by owner `'page'`, a full still. Cutscene tweens and camera moves used to run on over a stopped world, and `runState` said `running`. `page.held` is removed (`engine.frozen`, `runState.owners`), and `describe().page.held` goes with it. `step()` obeys it like any freeze; a page with the loop stopped has no hold, so tools still step a background window.
402
+ - Removed: error code `character-hook`. Nothing raises it: assigning `player.onStep` or `player.onLand` gets no warning; use the events `character:step` and `character:land`.
403
+ - Marked experimental, no promise at 1.0: `nav.crowd`. It hands out the raw Recast object, like `nav.navMesh`, `query` and `tileCache`.
404
+ - New, off unless called: `engine.shadows.cache(light, { static })` draws what does not move once and redraws only the rest, by copying a kept depth map into the light's shadow map on WebGPU (recipe 45). One plain map only, no cascades; other renderers draw everything, with a warning. Marked `@experimental`: no frame time has been measured yet.
405
+ - `threedog assets optimize --lod` writes lower-detail levels of each model (meshoptimizer simplification, geometry only) and reports triangles per level; skinned, morphing, animated and small models are skipped with the reason. `engine.assets.lod(name)` (experimental) or `lod: true` on a prop or template draws them as a plain `THREE.LOD`; off by default, and rays, collision and saves keep the full model. A LOD object is never batched.
406
+ - `threedog assets optimize` no longer needs the external `ktx` program: when it is not on PATH the textures are encoded by `ktx2-encoder` (npm, MIT, Basis Universal as WebAssembly), still by slot (normal / occlusion / roughness as linear UASTC, color as sRGB ETC1S). `ktx` on PATH stays the first choice; the output names the encoder and the encoding time. The "`ktx` is required" error is gone; with no encoder at all it says `npm i -D ktx2-encoder`. Field page `docs/testing/field/2026-11-05-ktx/`.
407
+ - Saves survive upgrades, now guarded: fixed sample saves from 0.7.0 and from 0.7.1 (`packages/engine/tests/save-compat/samples/`, every save part plus the stored settings) are loaded by a test on every run, and a save from a newer engine is checked to be refused with a message and no change. Nothing in the engine needed fixing. Every release now adds a sample and old ones are never edited (`docs/plans/release-checklist.md`).
408
+ - `engine.batching.tint` on a batch that had already drawn did nothing on real WebGPU: three built the batch's shader before the batch had any instance color, so the first tint never reached the GPU. The first tint now rebuilds the batch material once. Guard in bundles.mjs reads pixels on real WebGPU.
409
+ - `engine.batching` batches are no longer `DynamicDrawUsage`: on `WebGPURenderer` that refreshed every batch in full, every pass, every frame. City flight on a real GPU: frame median about 10.6 to 8.7 ms (one pair). Writes to a batch reach the screen as before.
410
+ - Three's `BundleGroup` works beside the engine, no new API: `engine.batching` leaves a mesh under a `BundleGroup` alone, `hlod.add` skips it with a warning, `describe().render.bundles` and the `inspect.scene()` reason `in-bundle` report it. It gained nothing on the city scene; recipe 05 says when it may pay.
411
+ - `engine.stream` unloads through `engine.jobs`, behind every build, so a row of blocks no longer leaves in one frame. An entry out of range can stay a few frames longer in the real-time loop; `engine.step` still finishes in the same frame.
412
+ - `engine.remove` counts the scene only when a part is held by neither `assets.shared` nor `batching.held`. Batching relists only the parents that changed.
413
+ - A damaged world save record whose `motion` is not an object (e.g. the number 25) is now refused at load as `save-bad-record` (load false, game rolled back) instead of throwing `Cannot create property 'vx' on number` in the fixed step and freezing the game; `motion: null` and game-own fields stay allowed.
414
+ - A hang the fuzz found: a position far past float precision (`applyState({ pos })` with z = -3.6e178, or any `placeAt` / ground call) froze the page for good, because the chunk loops (`cx = floor(x / size); ...; cx++`) stop advancing once `x / size` passes 2^53. Positions with |x| or |z| above 1e9 are now refused with the `bad-position` code and the position in the message (`xzOf`), so `applyState` reports `pos` as refused and the game goes on. Each fuzz case also has a time limit now (`FC_CASE_MS`; 60 s in the browser items, 30 s in the writer item): a case over it is a failure that prints its input, seed and path. Dev warning, once: a world record whose `jump` or `safe` is the wrong kind of value (a damaged or hand-edited save) is still repaired when the character writes its motion, but the warning `character motion: the world record's 'jump' is ...` now names the field.
415
+ - Fuzz tests (fast-check, fixed seed, short in the normal suite): the content writer now refuses values that are not data (NaN, Infinity, undefined, functions, bigints) by name instead of writing them as code, and writes a carriage return and -0 correctly; a damaged `scene` save part is refused as `save-bad-record` (load false, game rolled back, no frozen gameplay) instead of throwing a code error. Long run for a release: `FC_RUNS=300 threedog test Fuzz` (see `docs/plans/release-checklist.md`).
416
+ - Editor (dev server only): pickups get a height handle and can be added from the panel (items the game defines); a grid item turns in quarter turns and writes `rotation`; undo of a cleared field puts it back in front of the property that followed it (the content write takes an optional `spot`); an entry with computed values can be deleted and the delete undone; the turn handle's outer rings no longer tip the anchor. NPC facing is not content data, so NPCs get no turn handle, and schedules are still edited by hand.
417
+ - Dev warning, once: the game added its own light while the engine's placeholder lights (`engine.lights.sun`, `engine.lights.hemi`) are still in the scene, so the two add up. It names the fix, `createEngine({ lights: false })`; nothing is refused or changed, and there is no warning with `lights: false`, with the placeholders removed, or for a module's or pool's lights. New field page `docs/testing/field/2026-11-05-many-lights/` (frame time vs light count, lightPool, shadows, adding a light mid-play).
418
+ - Fewer freezes from hooks: a quest reward that throws (`content-place`, `ground-missing`) no longer leaves the quest half finished. `content.run` runs every effect of a list and rethrows the first error, the quest still finishes (`quest:done`, toast) and the failure is reported softly. A job that fails inside its commit tick no longer freezes the fixed step a second time; its promise rejects once. `ground-missing` (a prop, spawn or `snapToGround` beyond `terrain({ shape })`) and `swarm-disposed` (`spawn()` after `dispose()`, returns -1) are warnings now: the fallback was already safe.
419
+ - Surface names these changes touch, as the API lock lists them: `decoders`, `openWindows`, `uniforms.uCloud`, `uniforms.uCloudScale`, `uniforms.uCloudSpeed`, `uniforms.uCover`, `uniforms.uCurve`, `uniforms.uMoonPower`, `uniforms.uSunPower`, `sky.gradientCurve`, `sky.moonSize`, `sky.orbitSway`, `sky.orbitTilt`, `sky.starScale`. See `MIGRATING-0.8.md`.
420
+ - Removed before 1.0 (`MIGRATING-0.8.md`): `rays.cast`, `rays.pick`, `i18n.t`, `engine.openWindows`, `engine.decoders`, `EASINGS`, `assets.reportText` and `assets.users`.
421
+ - Removed and renamed before 1.0 (`MIGRATING-0.8.md`): `player.object` is `player.root`, `player.addTo` is `engine.add(player.root)`, `hud.add` is `hud.bump`, `dialogue.cps` is `dialogue.charsPerSecond`, `rtsCamera({ angle })` is `pitch`, `weather.define` is `weather.defineField`, `terrain.T` is `terrain.generator`, `terrain.CHUNK` is `terrain.chunkSize`.
422
+ - Marked experimental, no promise at 1.0: `player.saveMotion`, `player.loadMotion`, `engine.terrainDraw`, `engine.vegetationDraw`, `engine.weatherDraw`.
423
+ - Removed or renamed before 1.0 (`MIGRATING-0.8.md`): `rigid.R` is `rigid.rapier`; `collision.circles` and `collision.boxes` go (use `collision.forEachStatic`); `stream.readyCheck` is `stream.addReadyCheck`; `music.addTracks` is `music.define(name, track)`; `debug.startBench`, `debug.benchmarking` and the panel's stress button go (use `threedog stress`); the types `Object3D`, `Vector3`, `Vector2`, `Color`, `Quaternion`, `Material`, `BufferGeometry` and `Texture` are no longer exported from `threedog` (import them from `three`). `threedog assets` needs a verb (`optimize` or `check`). `doctor --json` prints `{ ok, summary, items }`.
424
+ - One meaning for `@experimental`: the name may change or go with no migration note. `api-count` reads the tag, a tag on a module or an engine member covers what hangs off it, and `docs/api-surface.txt` ends the line with it, so rule R55 lets it move and requires a note when a stable name gets marked. Newly marked: `net`, `Net`, `fakeNetwork`, `webSocket`, `threads`, `grids`, `Grids`, `Grid`, `Layer`, `hlod`, `ops.guard`, `ops.allow`, `terrain.edit`, `stream.source`, `stream.sources`, `stream.teleport`, `post.get`, `post.list`, `post.own`, `post.setAntialias` (tagged before, read by the lock only now), `rigid.rapier`, `rigid.world`, `rigid.playerBody`, `rigid.playerCollider`, `nav.navMesh`, `nav.query`, `nav.tileCache`, `nav.helper`, `assets.gltf`, `assets.draco`, `assets.ktx2`, `post.object`, `post.targets`, `shadows.csm`, `commits`, `swarm`, `terrainDraw`, `vegetationDraw`, `weatherDraw`, `bakeProbes`, `loadProbes`, `loadLightmap`, `moduleOrder`, `moduleStates`, `disabledModules`, `player.saveMotion`, `player.loadMotion`, `jobs.loadingMs`, `jobs.maxSteps`, `jobs.slowStepMs`, `stream.unloadFactor`, `batching.held`, `world.steps`, `level.heightfield`, all of `threedog/tsl` (`wind`, `cloudShadow`, `season`, `objectOrigin`, `uniforms`, `celLighting`, `detailBump`, `detailNoise`, `rim`, `shadowTint`, `waterFresnel`, `waterSurface`, `waterWave`, `wrapDiffuse`), `voxelGI`, `temporalAA`, `sunShafts`, `lightVolumes`. Only `--json` and MCP shapes are an interface; printed text may change.
425
+ - Uniforms renamed (`MIGRATING-0.8.md`): `uCloudScale` to `uCloudShadowScale`, `uCloudSpeed` to `uCloudShadowSpeed`, `uCloud` to `uWeatherCloud`, `uCurve` to `uSkyCurve`, `uCover` to `uGroundCover`, `uSunPower` to `uSunBrightness`, `uMoonPower` to `uMoonBrightness`. The dome's own `uCloudScale` and `uCloudSpeed` are now `uSkyCloudScale` and `uSkyCloudSpeed`, on `engine.sky.uniforms` and in sky hooks.
426
+ - `engine.batching`: the default cell is now four stream cells (256 m), not one (64 m). A cell no wider than a streamed block could not batch across blocks, so a model used a few times per block drew every copy alone. The city field run on WebGPU went from 19.8 ms to 9.4 ms a frame (real GPU, 14.4 km flight). Culling is coarser: 13-25% more triangles drawn there. A game with heavy props can set `createEngine({ batching: { cell: 64 } })`.
427
+ - Removed or renamed before 1.0 (`MIGRATING-0.8.md`): `engine.tick` is `engine.time.tick`; `engine.cpuMs`, `cpuMs`, `engine.cpuPhases`, `cpuPhases`, `cpuPhases.fixed`, `cpuPhases.frame`, `cpuPhases.render`, `cpuPhases.afterRender` are read through `engine.inspect.perf()`; `engine.terms`, `terms`, `terms.cloudShadow`, `terms.season` are `engine.shaderTerms`; `engine.view`, `view`, `view.manual` are `engine.autoView`; `terrain.isReadyAround` and `rigid.groundReady` are gone (`engine.stream.addReadyCheck` already waits on them); `lightPool.usage` is `engine.describe().lightPool`; `saves.queue` and `saves.prefix` are private (new `saves.putAttachment`, `saves.removeAttachment`, `saves.attachments`, `saves.storageKey`).
428
+ - Failure and "not found" have one shape (`MIGRATING-0.8.md`): `inventory.add` returns `{ ok: true, key, added }`, or `{ ok: false, code: 'full', facts }`, also on containers. `grids.get`, `inventory.get`, `interactions.get` give `undefined` when there is none, and `interactions.get` and `interactions.items` are typed.
429
+ - `clock.after(seconds, fnOrEvent, { data, channel })`: the third argument is options, as in `clock.every`; the old form throws.
430
+ - `player.onStep` and `player.onLand` were one-slot properties, and a second system silently took the slot: they are gone. Listen to the new `character:step` and to `character:land`.
431
+ - Writing `stream.radius`, `terrain.viewChunks`, `terrain.density`, `post.antialias` or `weather.auto` now takes effect like its `setXxx`.
432
+ - `engine.moduleOrder`, `moduleStates`, `disabledModules`, `bakeProbes`, `loadProbes` and `loadLightmap` are marked experimental.
433
+ - Tools: a second `tune write` always takes effect: a line with a hand comment or a Windows line ending used to run after the new value and win while the tool said "Written". The file keeps its line endings, and code in a material literal (`side: THREE.DoubleSide`) stays.
434
+ - Editor: steps run one at a time, each from the file as the last step left it, so an overlapping save, drag or Ctrl+Z no longer corrupts the undo history or gets refused as a conflict. A drag or a row being typed in survives a save landing under it; a dead dev server is a refused step. A file put back to the editor's last text now reloads the page. Add skips an id only the file has; a broken list in a json row is refused; a field written as `null` can be edited; key order no longer counts as a conflict; a failed check leaves a hand save alone; removing an NPC reloads the page.
435
+ - Tools: `threedog stress` stops on a lost WebGPU device or an uncaptured GPU error (it read as spare capacity), frees each step's instanced mesh, and keeps the load inside the view. Both stress pages now share `@threedog/tools/stress-load`, so a game on WebGL gets gpu ms too.
436
+ - `engine.stateRefused`: what the URL parameters or the latest `applyState` could not do. `shot` and `capture` fail on a value you named that the page refused (`--weather rian`). A weather refused early and accepted late is no longer reported, and a hook refusing `at` is a refusal, not a position error.
437
+ - `describe().world.changed` leaves out where a record with motion stands (a walking NPC), so the Changed line keeps what a command did; runtime rows hold a copy of the position.
438
+ - `check` in a game: file size (R1), copied passages in game docs (R22), paths, commands and links in game docs (R18), a module with no key (R51) and setup-time creation (R33) are warnings now. R33 stays an error only for `{ initial: true }`, and its fix names `// runtime: <reason>`. A stale GAMEMAP warns in a game and still fails for the engine's examples. `lib` no longer reads `createEngine(cfg)` as WebGL.
439
+ - No key is not an error: `interaction-no-key` is a dev warning and play goes on. `interaction.use` runs when code asks, `ops` does not offer it, and the `noKey` code is gone. `engine.input.bind('interact', [])` says no key on purpose.
440
+ - Sky: a second `engine.sky.environment()` replaces the first. `engine.sky.replace(false)` means no drawn sky. `sky({ time })` with a calendar warns once in either install order. `engine.sky.layer` takes any non-empty name. `engine.sky.sunDir` is the same vector as `uSunDir`, and a game's write stays (`engine.autoView.manual('sunDir', false)` gives it back). `camera.aspect` is the owned value `view.aspect`. A direct write to `uSkyTop`, `uSkyHorizon`, `uDaylight` or `uTimeOfDay` warns once (`signal-overwritten`) with the entry to use.
441
+ - `applyState`: `season` with no calendar and an `at` nothing knows go into `refused` instead of throwing after a partial apply. The `state-at` code is gone.
442
+ - `world`: `{ save: false }` records may hold anything, unless the kind is simulated with `worker: true`. A class instance in a saved record (`Vector3`, `Color`) is refused at once instead of failing after a load, and the error gives the line to copy.
443
+ - Fewer freezes from the loop: an `approach` interaction on a held character is refused with `cannotWalk`, an NPC yields when a game holds it on the base layer, a WebGL-only material added after start is reported without stopping play.
444
+ - New games: the template colors the engine's background instead of assigning one, so `sky()` shows and `palette.background` still works. Style advice in the template reads as defaults, with plain three.js named as equally valid.
445
+
446
+ - Loading: a model whose textures failed to decode (KTX2 transcoder, bad image) now counts as loaded with missing references: `describe().loading.ok` is false, `warnings` names the file, and `threedog loading` says "N partial" instead of "N/N ok". Before, GLTFLoader swallowed the failure and everything read ok.
447
+ - Audio: `describe().audio` (present while a bus is ducked or a voice plays) and `engine.audio.info` (now documented) report the duck level the active ducks ask for, not the gain node's value mid-fade, so a fade reads right on a headless page where the audio clock stands still.
448
+ - Errors: the `asset-load` hint tells "called before the backend is initialized" (a load before `engine.start()`) from a real 404; the `not-installed` hint says it is a plain TypeError and when engine.<module> is the cause. The error log names an Event or an empty-message rejection instead of `{"isTrusted":true}`.
449
+ - Tools: `shot --keep --out name.png` writes exactly `name.png` (the timestamp is only for generated names); the scenario line uses ground and weather ids, not the translated names. Recipes 16, 26 and 34 note the position formats, that `bloom` / `ao` rows already exist, and that occlusion culling hides nothing in step mode.
450
+ - Pathfinding: without a navmesh, `characters.findPath` returns `null` (`noPath` when detailed) for a target inside a wall or water, and its straight legs are sampled every 0.12 m, so a route no longer clips wall corners (up to 0.3 m before).
451
+ - Describe: records without a name (props, template instances) now appear in `nearby` by id with their kind, the nearest 8 only.
452
+ - Describe: `ambience` carries `audioLocked` while its rules wait for a click or key press, so an empty `on` on a bridge page is not read as "no rule matches here".
453
+ - Tools: `play --stop` asks the server up to three times and stops a stuck one named in dev.json, instead of removing the record and leaving the process alive.
454
+ - Docs: recipe 26 covers hiding the interface for a photo mode (engine ui and plain three.js), custom title items closing the title, and the HUD unit following the engine locale.
455
+
456
+ - Library: `lib pull` refuses an entry that cannot draw on the game's renderer, with nothing copied, and `lib check` fails on such a copy (GLSL in a WebGPU game, a node material in a WebGL game). `--force` copies it to port by hand; the check reads the copy, so a port clears it. Node materials and TSL now count as WebGPU only when an entry's `backends` are read from its code, and an entry without `backends` gets them from its files.
457
+ - Library: `lib pull` prints the import path where the file landed, not the path stored from the game the entry came from.
458
+ - Assets: `assets.texture()` and models with textures before `start()` work on the WebGPU route. The upload waits for the first frame instead of throwing "initTexture() called before the backend is initialized".
459
+ - Docs: COMMANDS.md says where each kind of library entry lands; the `modular-building` README says what `examples pull` copies and that the demo page stays in the engine repository.
460
+ - `threedog capture` works on WebGPU games: it hooks the draws of WebGPURenderer, prints the renderer it measured, skips Spector on real WebGPU and says so, and fails on a frame with no draws. It now prefers the hardware GPU.
461
+ - `threedog stress` measures the game: from a game folder or with `-w` the load goes on top of the game's scene on its own renderer. A WebGPU game without real WebGPU is refused. The neutral page stays for the engine repo and is named as such.
462
+ - `engine.inspect.perf()` says "nothing measured yet" before any draw is counted: new field `measured`, `ok` is false, no tick on frame metrics.
463
+ - `threedog bake light` traces rays through a BVH instead of a probe grid: sky no longer leaks into rooms through walls, and pillars shade the floor. `--spacing` is gone, `--samples` now means rays per texel (default 128). The sky now matches the strength of the hemisphere light it stands for, so bake again and compare. A map with no light fails and writes nothing; a failed shader is printed.
464
+ - `threedog tune write` merges into the earlier block instead of replacing it; the block passes `threedog types`; `tune` takes `-w`; with no file it names the values that need one.
465
+ - Docs: tuning without a mouse (COMMANDS), turning the ambient off after a bake and the `?bake=1` flag (recipe 34).
466
+
467
+ - Input: pressing the interact key with nothing to use is no longer silent. The press lands in the op history as a refused `interaction.use` (`inputLocked` with the context holding the input, or `nothingNear`), and `threedog test` prints it, the input lock and the open dialogue under a failed spec. `describe().ui.dialogue.advance` names the keys that advance a dialogue.
468
+ - `threedog init`: leaves a game that passes its first `threedog check` (it writes GAMEMAP.md; the extra `map` step is gone from the READMEs and recipe 01); a package already in `devDependencies` is not also added to `dependencies`; files the template layers wrote are no longer reported as "existing files kept".
469
+ - `threedog check -w <game>` reads that game alone: tsc and R18 no longer go through every game, example, spec and engine doc only to throw the results away, the generated-doc checks of the engine stay in the root check, and the other parts run beside the rules instead of after them. The line that counted other workspaces' type errors is gone with it.
470
+ - Characters and NPCs take `model: [name, ...args]` like props (it crashed inside `Object3D.add` and `check` could not see it); arguments on a file or async model stop with `character-option`. The open-world template declares `home` in `content/places.js`, so `{ place: 'home' }` passes `check`. `art board` and `lib` run in a repository root stop and ask for `-w <game>`. Recipe 02 says `humanoid` is your own asset, and the game template says how to set `locale`.
471
+ - Editor (dev server only, F2): first version done. Edit the selected entry's properties from its field table, add an entry from the game's templates and named models, delete one, undo and redo (Ctrl+Z, Ctrl+Y; the file comes back byte for byte, a hand edit in between refuses it). Moves now cover height and rotation, the real model follows the drag, and `static: false` entries, physics bodies, grid items (`cell`) and NPCs (`start`) can be picked and moved. `threedog content` write-back gained `unset` and `restore` in `contentWrite` for this; the CLI is unchanged.
472
+ - `engine.applyState` resolves to `{ ok, refused: [{ key, value, reason }] }`: a weather name the game lacks or a key no module handles is reported, not dropped. A module hook refuses with `{ refused: { key: reason } }` and lists its keys in `stateKeys`. `fresh: 1` now means yes; a `fresh`, `wait` or `pos` value it cannot read throws `state-value`.
473
+ - `describe()` has `vars` (story flags and counters) and `world.changed` / `world.removed` (what play changed, capped at 50 with the rest counted), so a snapshot and `expectDescribe` see them. Snapshots drop `picture.writers` (frame counters), compare story counters exactly, and an `--only` path found nowhere fails instead of matching nothing.
474
+ - A bad position is refused, not an engine error: `thing.set` answers `badPosition` in `can`, and an op whose argument is that position fails with that code, so gameplay no longer freezes on it. A NaN an op worked out itself is still an engine error, where it happened.
475
+ - Bridge commands report what took effect: `state` fails with the reason and exit 1, `step` and `hold` say how many seconds really passed and fail when short, `press` fails when the engine stopped, scenarios stop on a refused state or a stopped engine. `op` refuses a value that does not fit its shape, and accepts `position=3,0,4` for an untyped argument. `press` and `op` print a `Changed:` line.
476
+ - Bridge output: every cut says so and how to see the rest; `ops` no longer prints `[object Object]`; `log()` shows in `js` checks scripts and when a script throws; `status` counts only errors since `threedog reload`; `catalog --find` searches the library and says when nothing is found; `threedog --help` and `<bridge command> --help` exit 0.
477
+ - A page that died at start answers in seconds, not over 100: the wait counts errors from before the command, and the bridge's headless page records them from its first line.
478
+ - `new-game --open-world` games start with `presets.weather.temperate`, so `state weather=rain` works in them.
479
+ - `threedog how`: searches the api pages and every docs line, not only the AI.md rows and recipe headings; handles word forms (`pixelate`, `arrangement`); orders GLSL or TSL answers by the game's renderer (from `main.js`); says "the docs never use" a word only after a search of every docs line.
480
+ - Calls that did nothing and said nothing now warn or leave a record, none is refused: container start items that do not fit (warn, names the container), `quests.start` on a done quest (warn), a swarm spawned before the first new game or load and cleared by it (warn), `music.stinger` with audio not running (the `music:stinger` event still fires, with `played: false`; it also gets `played: true` when it sounded).
481
+ - Settings: `settings.reset(key?)` puts one value (or all) back to the engine's or the game's default; `resetBindings()` still does keys.
482
+ - Docs: `readParams` throws on a wrong type in every build (only an unknown key is dev-only); `heightScale` wording; recipe 11 sample car drives 20 m in 3 s; swarm in the new game's CLAUDE.md and GAMEMAP "Not used yet".
483
+
484
+ - Assets: manifest entries whose `fallback` names loop back (a to b to a) now fail once with `asset-fallback-cycle` naming the chain, instead of waiting on each other forever.
485
+ - Sky: removed the options `moonSize`, `starScale`, `gradientCurve`, `orbitTilt`, `orbitSway`. They only set the start value of a uniform or field that stays writable (`engine.uniforms.uMoonSize` etc.), so the engine keeps one entry, not two; using one throws `sky-option` naming the entry. Notes in `docs/MIGRATING-0.8.md`.
486
+ - `engine.remove` keeps a geometry or material another object in the scene still uses, and disposes it with its last user. `stream.add`'s default unload goes through it, so unloading one block no longer makes the renderer rebuild every block that shares its models. Code that relied on `remove` disposing a shared geometry at once should dispose it itself. On WebGPU the records of loaded objects now stay until those objects leave the scene, so peak GPU memory is higher (about 110 MB in the city stress run) and levels off.
487
+ - Batching: its per-frame check is bounded in meshes instead of roots, and batched originals stay out of three's walks during the engine's draw (`describe().threePatches`: `batching-draw-walk`). A district of streamed blocks went from about 60-70 ms to about 22 ms a frame.
488
+ - API lock for 1.0: `docs/api-surface.txt` lists every public name with its signature (engine repository only). `threedog check` rule R55 fails when the surface differs from it; a removed or retyped name also needs a line naming it under this heading. `threedog api-count --lock` rewrites the snapshot. The old `api count` total guard is gone (the snapshot covers it).
489
+
490
+ ## 0.7.1 (2026-11-05)
491
+
492
+ Never on npm: it reaches users inside 0.8.0. Bug fixes for asset lifetime, WebGPU memory and `assets optimize`, plus new optional tools; nothing public was removed. Upgrade notes are in `docs/MIGRATING-0.8.md`.
493
+
494
+ - Asset lifetime: a load now owns its data. Copies of a model that fell back count on the entry that really has the data, so `assets.trim()` and `release` no longer free what those copies use, and `modelNow` works for such a name. `users('shrub')` is the copies asked for by that name; `users('rock')`, the name it fell back to, counts them too. When the fallback's data is freed, the name loads again on its next use.
495
+ - A load ended while it runs (`release`, `trim`, a palette write, a name registered again, `dispose`) is freed when it arrives and never written back; a download is aborted, and a font never reaches `document.fonts`. Code awaiting it: after `release` and the like it gets a fresh load, never freed data; after `dispose` the promise stays pending for good, and so does any later `model()` / `texture()` / `font()`, so nothing rejects during teardown or resumes against a dead engine.
496
+ - A palette write no longer leaves a generated model's old build behind: it is freed with its last copy, or at once with none. Registering a name again does the same. Generated textures and internal `cached()` builds stay as they were, because nothing counts who uses them.
497
+ - Recipe 18 §4b follows one object from creation to removal and says who owns what at each step.
498
+ - New `--json` on `threedog check` and `threedog test`: one result on stdout, `{ ok, summary, items: [{ code, level, file, line, message, fix }] }` (fields only when known); the text goes to stderr and the exit code is unchanged. Items carry the rule id, the TS code, `content` or `test`, and the rule's fix. The MCP `check` tool reads this shape instead of parsing text.
499
+ - `new-game` and `init` write `AGENTS.md` beside `CLAUDE.md` (the same text) for tools that do not read CLAUDE.md; an existing `AGENTS.md` is kept.
500
+ - New optional module `swarm()`: many same-kind gameplay objects (bullets, enemy crowds, pickups, debris) in typed arrays, one `InstancedMesh` each. `engine.swarm({ name, capacity, geometry, material, fields })`, then `spawn`, `free`, `row`, `onStep`, `near`, `clear`, `dispose`. Stable handles, fixed-step update on a time channel, drawing smoothed between fixed steps, opt-in saves. Recipe 65. Nothing changes for a game that does not install it.
501
+ - New `engine.stepBlend`: how far the drawn frame is between two fixed steps, for drawing fixed-step state smoothly.
502
+ - New `threedog content stamp`, `content set --source` and `content capture`: copy an arrangement (`content/arrangements/<name>.js`, read by tools only) into plain entries, batch-edit every copy explicitly, and capture a named group from the running game into an arrangement. Rule R52 warns while a captured and stamped group is still named in code.
503
+ - Recipe 65 shows pure-picture bulk with TSL compute on WebGPU (plain three.js, no engine API).
504
+ - WebGPU memory: a mesh dropped while its material stayed in use kept its render record, geometry arrays and GPU buffers until the renderer died. The engine now sweeps these records every few seconds, for engine paths and plain `scene.remove` alike, so a game has nothing to do (recipe 56): a plain three.js scene dropping 60,000 meshes went from 1.1 GB of heap to a flat 200-260 MB, and a 7.8 km terrain flight from +72 MB to +25 MB, flat to 15.6 km. It reads a private three.js list; if an upgrade moves it, the sweep turns off with the warning `webgpu-records-unread`. `threePatches.off('webgpu-record-sweep')` switches it off.
505
+ - Dev warning `geometry-undisposed`: geometries nothing in the scene uses keep piling up on the renderer. The fix is `geometry.dispose()` when a mesh is gone for good.
506
+ - `threedog check` rule R53 fails on merge conflict markers committed in any tracked text file.
507
+ - `threedog assets optimize`: the optimized pack now comes last in `assets.js` (a game rewritten by the old command is moved over), so `/optimized/x.glb` wins over an original of the same name, and that override no longer prints the "replaced by manifest" warning. A cached model is no longer skipped from the problem count: `--strict` and a lower `--budget` judge it like a fresh run. `module-cycle` no longer fails with an internal TypeError when the first module in the list only waits behind a cycle.
508
+
509
+ ## 0.7.0 (2026-11-05)
510
+
511
+ - Public surface audit (`threedog api-count --unused`): removed `engine.level.object` (same as `level.root`); dropped from the public types (code stays, engine-internal) `engine.triggers.action`, `engine.settings.action`, `engine.interactions.action` (copies of the module option), `engine.inventory.defs`, `engine.quests.defs` (use `inventory.item(id)` and `quests.list()`). 98 more unused names are kept on purpose, each with a reason in `packages/tools/api-count.mjs`
512
+ - Follow camera: `collision({ cameraOcclusion })` now defaults to `'both'`: meshes registered with `engine.rays.addStatic(mesh, { occluder: true })` stop the arm without a gameplay collider (a crown, an eave). Level buildings count too; `'colliders'` keeps the old test.
513
+ - `character.placeAt` over a registered support stands on it; `mover: 'manual'` runs the `states` hook. Recipe 57 "Moved by script" (ride, lift, ladder), recipe 32 says what a support needs.
514
+ - Script runs: `?fresh` / `applyState({ fresh })` / `threedog state fresh=1` delete the saves for a clean start; `inputLocked` carries `facts.by`; `snap --play`; `shot` and `snap` name the backend that drew the picture; `snap` timeouts say what the page was doing; a `js` script waiting on a stopped clock ends with the reason; the WebGPU fallback is one line in errors.log.
515
+ - `threedog assets optimize [--dry]`: Meshopt + KTX2 copies of art/models/ in public/optimized/, textures encoded by slot (a normal map is never compressed as color), `assets.js` pointed at the results, reruns skip unchanged files, per-file size / GPU memory / problems. `npm run assets` crashed on start (a name used twice); fixed.
516
+ - Light probes: `engine.bakeProbes` now builds three's per-pixel probe grid on both renderers, stored in half precision; `follow`, `height`, `probes.probe` and `own()` are gone, probe files are version 2 (MIGRATING-0.7.md). `describe().render.probes` reports lit objects outside the grid and light counted twice.
517
+ - Real-time light on WebGPU: `@threedog/post-effects/tsl` adds `voxelGI`, `temporalAA`, `sunShafts`, `lightVolumes`. Post effects gain `needsBuffers` (normal, diffuse, velocity merged into one scene render), `backend`, `skipOnLowTier` and `facts`; `describe().render.post` says `held` and why.
518
+ - Occlusion culling: `engine.occlusion.enabled` skips hlod cells and batched groups while hidden, on both renderers; `describe().render.occlusion`.
519
+ - Lightmaps: `threedog bake light` (system Chrome, real WebGPU) and `engine.loadLightmap(file)`; `describe().render.lightmap`.
520
+ - `celLighting` in `threedog/tsl`: colored cel bands on `MeshToonNodeMaterial`, cast shadows in the same bands. `paletteLut` in `@threedog/post-effects`: a fixed palette for `lut()`. Docs no longer say `rampTexture` colors work on three's toon: it reads only the red channel.
521
+ - New games start on WebGPU with TSL: `threedog new-game` and `init` write `import 'threedog/tsl'` and `createEngine({ renderer: 'webgpu' })`; `--webgl` starts the GLSL form instead. `--example` and `templates/example` are removed. `createEngine` called with no `renderer` still builds the WebGL renderer. With no WebGPU in the browser the game runs on three's WebGL2 backend, slower.
522
+ - `engine.hud.value(id)` reads the current value of a counter or bar. `describe().renderer` gives `requested`, `backend`, `reason`, and `gpu`, `tsl`, `glsl`, `compute` (what that backend can run).
523
+ - `threedog/layers` exports `RESERVED_LAYERS`, the one table of the three.js layers the engine keeps (26 to 29 and 31); a game's own layers are 1 to 25.
524
+ - `threedog js --wait <seconds>`: a script waiting on the game clock on a page nobody steps ends with the reason instead of a silent timeout.
525
+
526
+ ## 0.6.0 (2026-11-04)
527
+
528
+ - Fixed: on WebGPU, cascades on a light whose `target` has a parent took the target's local position, so shadows fell another way than the light shone; they use its world position now, as WebGL does.
529
+ - Breaking: `grids.preview({ look })` is `{ draw }` and a layer's `tiles: { look }` is `tiles: { color }`; an unknown `tiles` key now throws.
530
+ - New: picture parts. `PICTURE_SLOTS` and the type `PictureSlot` name the picture values only one writer may hold (sky, fog, tone, environment, background, sun); `describe('picture').picture.slots` shows the holders; `engine.unuse(name)` removes a module. On the dev server a write to a value another part holds warns `picture-held`, and a removed picture part's leftovers warn `picture-leftover` (recipes/62-picture-code.md 3e).
531
+ - Fixed: the sky dome stayed in the scene after `engine.use(mySky(), { replaces: 'sky' })`.
532
+ - Breaking: `look` no longer names picture things. The game folder is `picture/` and `createPicture(engine)`, gameplay calls `picture.lamp(id)`; the module type is `'picture'`; the drawing parts are `terrainDraw`, `vegetationDraw`, `weatherDraw` with slots `terrain-draw`, `vegetation-draw`.
533
+ - Breaking: the look check is the picture check: `--no-picture`, `picture` and `pictureMs` in `shot --json`, the `Picture intent:` line in DESIGN.md, `lib add --kind picture`, `@threedog/tools/picture-check`. Seven recipes and the `plain-picture` example are renamed.
534
+ - New (dev server only): `describe('picture').writers` and `engine.explain({ picture: 'fog.far' })` (`threedog explain picture fog.far`) name the file:line that last changed a light, fog, tone, environment, background or material value; a value not tracked says so. Two places writing one value in one frame with different results give one warning (`picture-conflict`) naming both. The look check adds measured facts: a `ShaderMaterial` that ignores fog or tone, a light layout changed during play, transparent meshes whose pixels depend on draw order. Recipe 62 "Wiring `picture/` parts".
535
+ - Breaking: `makeMaterial`, `engine.makeMaterial`, `look.materials`, `look.surface` and the glow verb are gone, and so are the material and patch plugin slots: materials are plain three.js. New: `applyEffects(mat, { lighting })`, `rampTexture`, the `uNight` signal.
536
+ - Breaking: `createEngine({ style })` is gone and throws with the fix: the look is plain three.js in the game's `picture/` code, UI colors go in `createEngine({ ui })`, season tints are `engine.sky.seasonTints`; `types/style.d.ts` and `core/styleParts.js` are deleted.
537
+ - Docs: recipes 09 (style folder) and 48 (makeMaterial) are merged into `recipes/09-materials-lights-models.md`: materials are plain three.js in `picture/`, module looks are `.material`, the UI look is `createEngine({ ui })`. Recipe 43 teaches shader code through `applyEffects` only; the `lighting` spec key becomes a plain `lighting` slot patch there.
538
+ - Breaking: the dev panel (`?panel=1`) reads and writes three.js objects directly; its style export, "apply and rebuild" and `?ov=` are gone, `engine.styleWorkbench` is `engine.devPanel`, and the `threedog tune` block holds plain three.js writes.
539
+ - Breaking: `threedog style check` is removed; `threedog style palette | compare` are now `threedog picture palette | compare` (bridge `picture-palette`, `picture-compare`; MCP `picture_palette`, `picture_compare`).
540
+ - Breaking: `style.character` is gone: `characters({ animation })`, and `engine.characters.material` is the plain three.js material of every placeholder capsule.
541
+ - Breaking: `style.triggers` is gone: `triggers({ debugColor, debugOpacity })`.
542
+ - Breaking: `style.palette` is gone: `engine.assets.palette`, a plain writable object that generators read as `this.palette`; a write rebuilds what is asked for after it.
543
+ - Breaking: cached and baked models read their materials back as recorded (plain three.js, `neutralMaterial`), no longer rebuilt from a material role. `assets.report()` says `madeByEngine`; `explain().materials` lost `keys`.
544
+ - Breaking: `style.grid` is gone: `grids({ ok, bad, previewOpacity, previewHeight, tiles, tileLift })`; the preview's and tiles' plain three.js materials are `pv.material` and `layer.material`.
545
+ - Breaking: `style.pickup` is gone: `pickups({ color, size, lift })`, and `engine.pickups.material` is the plain three.js material of boxes and geometry-only models.
546
+ - Breaking: `style.ui` is gone; the UI look sits in `createEngine({ ui: { theme, css, fonts, templates } })` beside the part names, and `engine.ui.templates` is writable.
547
+ - Breaking: `look.ground` and `style.terrain` are gone. The ground's look is `terrain({ colors, biomeColors, steep, variation, detail })`, `engine.terrain.material` (get / set), `.uniforms`, `.patches`, `.recolor()` (recipe 36).
548
+ - Breaking: `look.water` and `style.water` are gone. The water's look is `engine.water.material` (get / set), `.uniforms`, `.patches`, `.shader()`, `.normalMap()` (recipe 44).
549
+ - Breaking: `style.particles` is gone: `particles({ effects, default })`; an effect's `.material` is get / set and drawn as given, `.uniforms` its `{ value }` objects (recipe 64).
550
+ - Breaking: weather looks are `weather({ rain, snow, area, lightning, lightningBrightness, overcastColor })` options; `engine.weather.define(field, spec)` and `engine.weather.particles` (plain `.material`, `.uniforms`, `.spec`) replace `look.weather`.
551
+ - Breaking: plants take plain materials. `engine.vegetation.material`, `.patches`, `.sway()` and `.color()` replace `look.wind` and `look.vegetation`; wind strength and speed are `engine.uniforms.uWindAmp` / `uWindFreq`.
552
+ - `threedog art board`: every art resource of a game on one page, with where it is used, what is unused, missing or not traced, and copy lines for the AI; `--json` is the same data, `--live` and the dev panel's "art" folder show what the running game really loaded.
553
+ - `?at=<place>` (`threedog shot --at <place>`, `applyState({ at })`): skips the start screen and stands the player at a named place with the game's camera on it at once. `?pos` no longer opens on a camera glide either (new event `state:placed`).
554
+ - `interactions.add(mesh, { label, onUse, once, counter })`: `once` hides the mesh after a use, `counter` adds to a HUD counter (new `hud.add(name, n)`), both saved in the new `interactions` save part; pick-and-count things no longer need pickups and an inventory. Recipe 03 says which to use when.
555
+ - `createEngine({ ui: { theme } })` is the one place to reskin: every default part (dialogue, prompt, HUD, toast, menus, title) reads its variables, and recipe 26 "Reskin" lists them on one screen. The HUD now follows `bg` / `fg` / `accent` unless `hudBg` / `hudFg` / `hudAccent` are set; new `radiusSmall` and `shadowSmall` replace the corners and shadows that were fixed in the CSS (the default toast is no longer a pill).
556
+ - Breaking: the sky writes no light, fog, exposure or environment; it computes the signals and draws the dome. Your `picture/` code reads `engine.uniforms` and writes three.js (recipe 62).
557
+ - Breaking: `sky({ sun | hemisphere | fog })` throw naming what to write; delete the option. `createEngine({ lights: false })` drops the placeholder lights, which are now still.
558
+ - Breaking: no fog by default. `style.sky.fog` and `look.fog.set` write `scene.fog` once; a fog that changes over the day is yours.
559
+ - Breaking: no default tone curve (`renderer.toneMapping` stays three.js's default unless `style.toneMapping` names one), and no room environment map unless `look.lights` `env.intensity` is above 0. `env.share` is gone.
560
+ - Breaking: `style.exposure` and `look.tone` exposure are numbers, and `look.lights` keys take no function: exposure and light over the day are your `picture/` code.
561
+ - Breaking: weather no longer multiplies `look.lights.*` or `look.fog.far`; it writes the signals `uWeatherLight` and `uWeatherFog`. `uViewDistance` is new (stream radius without terrain, a fog's far; `terrain({ viewFog: true })` writes it).
562
+ - Breaking: plain game materials get the cloud-shadow patch only once the game turns cloud shadow on, in one recompile at that moment.
563
+ - Breaking: `style.sky.groundTint` and `part.author.drive / driven / feed` are gone (nothing left reads them).
564
+ - `describe().render.defaults` lists what the engine itself still puts on the picture, each with how to stop it.
565
+ - The `look.*` verbs are deprecated: no new features, recipe 52 says what to write instead. Removal is a later step.
566
+ - `threedog new-game`: `main.js` wires a start screen, autosave and Esc pause + settings menu (delete a line to drop one), the template's CLAUDE.md opens with an "Already here" table, recipe 63 is a 16-line third-person start. R40 hints at a hand-written localStorage save or pause; `shot` says when the start screen covers the picture.
567
+ - Esc under pointer lock opens the menu on the first press: the browser keeps that key, so a lock the player ended counts as the back key when nothing else is open and the game is running. `page:pointerlock` also says `byEngine`.
568
+ - `threedog lib add --kind look` stores one file from `picture/` (or a `.glsl`) in the library and `lib pull` puts it back under `picture/` (`picture/shaders/` for `.glsl`); a look file that imports siblings is refused at add. `art copy` of a folder takes `.glsl` files along. Recipe 62 section 3c.
569
+ - `engine.shadows.cascades(light, { count: 3 })`: cascaded shadows for a game's own DirectionalLight, with or without a sky, on both renderers; returns a handle (`set`, `remove`). `look.shadow.set({ cascades })` runs on the same code; the look check's usage line for a game's own light points here; recipe 45.
570
+ - The look check points the way: over-budget facts (new budget entries `shadowMaps`, `shadowMapSize`), usage lines for cascaded shadows and `lightPool`, new facts for near-black shadows, shadow stripes and stepped edges, and fog named first when it is most of the picture. They read the game's own lights too. Recipe 60 "When the look check names a feature".
571
+ - `threedog new-game` generates a `picture/` folder instead of `style/`: the gray starting picture as plain three.js the game owns (`index`, `palette`, `lights`,
572
+ `materials`), with `createEngine({ lights: false })`; recipe 62. Styles keep working. Water with no fog reflects the sky's horizon color, not a fixed gray.
573
+ - Prop and template `collide: 'circle'` now stands on the model's base (the lowest fifth of its height above the ground), not on its widest extent: a lamp's arm or a tree's crown no longer blocks walkers or pulls the follow camera in. Characters can walk closer to such models; a box is unchanged. New form: `collide: { circle: 0.25, occluder: false }`. A mistyped `collide` is refused at load.
574
+ - `lightPool`: a camera cut (`engine.views.show`, a fixed-camera shot) moves the lights at once, without the fade; `shot --view` drew the old spot's lamps. `views.show` emits `camera:shot`.
575
+ - `threedog shot <url>`: a local dev server of another game's folder is refused; one that cannot say is reported. The scene is counted again after the picture, with a warning if it changed.
576
+ - Black-frame hint lists shader programs that failed to compile. Test runner: a second argument to `ev` fails.
577
+ - `threedog shot` and `threedog capture` wait for the game's code after `await engine.start()` (lamps added after a later await): no request in
578
+ flight and the scene's objects / lights / materials unchanged for 0.3 s, at most 10 s; shot says how long it waited and what was added.
579
+ - `presets.camera.overShoulder` looks up (minPitch -1.05) like `thirdPersonAction`; every camera preset that locks the mouse can look up (tested).
580
+ - The look check names the material whose hiding brings a black frame back (a ShaderMaterial with NaN / Inf, spread by bloom), and reports fog
581
+ that is most of the color in a large share of the picture, with its near / far and color.
582
+ - Deploying under a sub-path: `threedog build my-game --base /my-game/` (Git Bash's rewrite of `/my-game/` is undone), and root-relative
583
+ manifest paths (`'/models/x.glb'`) now follow the build's base; recipes/61-deploy.md. The pack test builds and serves under a sub-path.
584
+ - `threedog describe` and the other bridge commands: when a threedog dev server of another folder answers, the message says so instead of
585
+ "no dev server".
586
+ - Dev error log: a repeated warning (warned again after each reload) is counted, not written again.
587
+ - Recipe 32: bullet time needs `engine.time.channel('enemies')` first, and world records follow it through `world.simulate(kind, { channel })`.
588
+
589
+ ## 0.5.0 (2026-11-04)
590
+
591
+ - Install instructions agree everywhere (README, package READMEs, COMMANDS.md): until 0.4.0 is on npm, use the engine from the repository;
592
+ after that, `npm install threedog@0.4 three@~0.187.0` and `@threedog/tools@0.4`. Each says which version it describes.
593
+ - Node: every package.json (and a new game's) declares `^20.19.0 || >=22.12.0`, the range vite 8 needs. `threedog dev / build / preview /
594
+ test / shot / perf / stress / capture / gallery / bake` stop first on an older Node, printing the version found, the range and how to fix it;
595
+ `threedog doctor` reports the same check.
596
+ - New-game CLAUDE.md: a clear request is built directly (no confirmation round); the AI asks only about choices that change the result and
597
+ cannot be inferred, writes its other picks as "(picked, not asked)" and lists them in its report; a change updates only the records it makes wrong.
598
+
599
+ - After-await fixes (outside review of 0.4.0). A module unloaded while its async init awaited (replaces, a plugin removed) can no longer act on a
600
+ same-named module installed after it: each install has its own identity; what the old init tracks or `ctx.mod`s afterwards is removed at once, its queued `ctx.whileCompiling` warm-ups do not run
601
+ (dev warning `[module-handle]`), and its completion or failure leaves the newcomer's state and handles alone.
602
+ - `saves.apply`: a listener that throws after an `await` inside an async `load()` now fails and rolls back the load like one that throws before
603
+ it (the capture lasts until the load settles, one scope per load). The rollback point is a copy of every part's `save()`, so
604
+ `save: () => state, load: d => Object.assign(state, d)` rolls back correctly; `save()` data that cannot be copied refuses the load
605
+ (`[save-part-threw]`, MIGRATING-0.5).
606
+ - Plugins composed: a post effect keeps its place across `plugins.off` / `on` (equal `order`s keep the order the names were first added in,
607
+ plugin effects are placed in plugin-list order), so A, B no longer come back B, A. `look.post.set({ A: false })` pauses in place,
608
+ `plugins.off` unloads. Each style-pack plugin is its own owner (`style:<pack>/<file>`): switching B off no longer drops A's material. Two
609
+ plugins writing the same key on one layer are a dev `[shared-conflict]` naming both, unless one file says `export const replaces = '<file>'`.
610
+ `plugins.off` / `on` return `{ off | on, reach, rebuilt, note }`; `plugins.list()` and `describe().slots` give each plugin's reach (`live` or
611
+ `new materials only`); `off('<pack>')` says the pack's starting values stay. New `engine.look.materials.rebuild()`: materials already made
612
+ are made again from the current layers (patches, replace, type) and swapped in place, keeping call params, hand-set colors and wind / cloud
613
+ shadow; `plugins.off` / `on` of a material or patch plugin calls it (`{ rebuild: false }` skips it) (MIGRATING-0.5).
614
+
615
+ - Turning shadows off (look.shadow, the settings menu) is the renderer switch only: `renderer.shadowMap.enabled`. No light's `castShadow` is
616
+ written any more, so a game that changes `castShadow` while shadows are off keeps its value when they come back. `describe().owned['shadows.off']`
617
+ is gone; budget `shadowLights` is 0 while shadows are off (MIGRATING-0.5).
618
+ - `threedog lib pull` of a code entry writes a working plugin: the code in `plugins/<name>/`, plus the wiring file `plugins/<name>.js` that calls
619
+ its factory, from the entry's new `plug` line (`lib add --plug "makeIt({ ... })"`, else the exported function; `pull --plug` overrides).
620
+ - `[plugin-shape]` errors name the file, what it exports and the exact fix: a factory function, a module with no `type` or no hook, an effect
621
+ with no name.
622
+ - One entry per look value: `water()`, `sky()` and `terrain()` options that were look values are gone; each is a `look.water` / `look.sky` /
623
+ `look.ground` param (style layer: `style.water`, `style.sky`, `style.terrain.config`). New params: `look.water` `normalMap normalScale
624
+ normalRepeat normalSpeed shininess specular`; `look.sky` `keyframes sunSize sunGlow sunBrightness moonSize moonColor moonBrightness
625
+ starDensity starScale gradientCurve groundTint orbitTilt orbitSway dim.tint dim.stars`; `look.ground` `normals`. `sky({ skybox })` →
626
+ `look.sky.replace`. The old options throw in dev naming the call (MIGRATING-0.5).
627
+ - `water({ material })` is gone: the water surface material has one entry, `engine.look.water.replace(fn)` (style layer: `style.water.material`).
628
+ It throws in dev naming the call. `water({ uniforms })` stays: it declares the uniforms the `look.water.patch` hooks read (MIGRATING-0.5).
629
+ - Type declarations: `look.clouds`, the leaked three.js `Light` export, the `.engine` back-references (terrain, characters, cameraRig, control,
630
+ views) and three test-only readouts (`audio.info`, `ambience.info`, `level.buildMs`) are gone from the types; runtime unchanged (MIGRATING-0.5).
631
+ - Shared values check number values the same way on `engine.mod` and on `handle.change()`: set / add / mul are finite numbers; clamp is
632
+ `{ min?, max? }` with each given bound a finite number and min <= max; `stacks.define({ min, max })` the same. A wrong one throws `[shared-value]`
633
+ naming what was given and the fix, instead of making the value NaN (`clamp: { max: 'oops' }`, `{ max: NaN }`) or holding a reversed range.
634
+ - Colliders take `occluder: false` (`collision.addCircle` / `addBox` / `addSegment` / `addObject`): walkers are still stopped, the follow
635
+ camera's occlusion check ignores it. A forest of trunk colliders no longer collapses the camera onto the player.
636
+ - `shot --play` starts straight in play: the engine's new `?play` URL key (`applyState({ play })`) does what the title's Start does
637
+ (`engine.session.newGame()`, the title part closes; flow leaves its start state). Games no longer need a `?play` key of their own.
638
+ - Page arguments rewritten by Git Bash are also undone from its `EXEPATH` root, and `shot` prints the page it really opens when the argument
639
+ was rewritten (`npm run shot -- /` echoes `> threedog shot C:/Git/`, which read like the wrong page).
640
+ - `threedog how "game test"` finds how to write a game's own test (a CONVENTIONS.md entry row pointing at COMMANDS.md "A game's tests").
641
+ - The api page of `collision.addBlocked` gives the `bounds` shape `{ minX, maxX, minZ, maxZ }`.
642
+ - The repository `.gitignore` no longer ignores every `shots/` folder: tool output stays under `.threedog/`, a game's own screenshots can be committed.
643
+ - Follow camera `ground: 'shorten'` samples the arm at most 0.2 m apart (capped at 160 samples, so 0.2 m up to a 32 m arm) instead of 12 fixed
644
+ samples: a narrow rise in the ground height (a 0.25 m bump in the middle of an 8 m arm) now shortens the arm instead of being stepped over.
645
+
646
+ ## 0.4.0 (2026-11-04)
647
+
648
+ - Sky colors for a game shader: `engine.uniforms.uSkyHorizon` / `uSkyTop` hold the colors the sky draws this frame (tint and lightning included);
649
+ the default fog color is the same horizon. `weather.set(name, { seconds: 0 })` switches at once (before any step); negative seconds throw.
650
+ The type check names the expression a call was made on (`` `engine.random` is not a function ... (it is Random; call one of its methods) ``).
651
+ - One small look API: every `engine.look.<part>` has `set` / `patch(hook)` / `add` / `replace(thing)` / `manual` / `value`, and `patch` only
652
+ swaps a named hook. `look.materials.patch` is now `look.materials.add`; `look.fog.replace` is removed (a fog of your own is `scene.fog = ...`,
653
+ the engine yields); the module plumbing (`write`, `extend`, `drive`, `tick` ...) moved to `part.author`. Removed verbs throw naming the new call
654
+ (MIGRATING-0.4).
655
+ - Post effects have one entry, `engine.look.post.add(x, { name, slot, order, owner })`: a plain three.js Pass, a WebGPU node function or an effect
656
+ `{ name, create, node, fuse }`; the plugins folder and a style's plugins go through it, so every effect switches with `look.post.set`. Removed:
657
+ `engine.post.addPass / insertPass / removePass`, `look.post.patch`, `style.post`, `postAdd / postRemove`, `createEngine({ post })` (each throws or
658
+ is gone, see MIGRATING-0.4). A function exported by a plugin file is a `[plugin-shape]` error on both renderers (it was a WebGPU post pass).
659
+ A Pass that renders the scene itself replaces the scene render (it drew the scene twice). WebGPU: removing an effect frees its nodes (leak fixed).
660
+ - Material roles have one entry, `engine.look.materials`: the style's `materials` table is its style layer and `makeMaterial` reads nothing else
661
+ (look.materials.set also reaches Material-instance roles). Style packs bundle look plugins (`style.plugins`, plugged by `engine.plugins` on the
662
+ style layer, `plugins.off('<style>')`). The world example's `lowpoly` style is replaced by a small `world` style; its models moved to `examples/world/art/`.
663
+
664
+ ### Breaking (module types, leftovers)
665
+
666
+ - A module's `type` decides how its errors are handled: a `look` or `ui` module that throws is switched off and the game keeps running; the
667
+ `presentation: true` flag is gone. `stage` only orders hooks; the stages `world` / `presentation` are renamed `ground` / `effects`.
668
+ - `engine.time.manual` is gone (`engine.mod('time.<channel>', { owner, set })`).
669
+ - The terrain data part reads no style: chunk colors and the `viewFog` fog distance belong to the terrain look (owner `terrainLook`, removed with it).
670
+ - The 0.2 rename traps (`[renamed-field]` on `clock.timeScale`, sky calendar fields, `.reason`, `runState.by`, `describe().ui.inputContexts`,
671
+ dialogue `{ lock }`, `style.pickup.model`, item `mesh`) are removed; `[item-mesh]` is gone.
672
+ - New-game template: the style lists `plugins` (with a `style/plugins/` folder) instead of `post: []`; the blank game no longer depends on
673
+ `@threedog/post-effects`. `threedog how` labels THREE.md rows that name engine APIs `engine + three.js`, not `plain three.js`.
674
+
675
+ ### Breaking (time, input, character control)
676
+
677
+ - One time source: `engine.time` counts fixed steps (`engine.tick`); `real`, `ambient`, the calendar and channels are views (`engine.time.now(name)`). `engine.elapsed` and `engine.time.real` are gone (`engine.time.now('real')`); `describe().time` has `tick / real / ambient / calendar`; the `clock` save part is folded into `time` (old saves load).
678
+ - Input by context: modules declare actions (`input.action`, `ctx.input.action`), the game binds keys (`input.bind`, `createEngine({ bindings })`), the player rebinds on the settings layer (`input.rebind`, `input.rebound()`). `input.define` and `createEngine({ padBindings })` are gone; the base context is `walk` (was `gameplay`). F3, F4, dialogue 1-9, RTS Q / R and the cutscene skip keys are no longer bound by default (`presets.bindings.debug / dialogNumbers / rtsRotate / cutsceneSkip`).
679
+ - Character control: one control slot per character (`engine.control.take(ch, { owner, layer, step })`, layers base < script < cutscene < net). Gone: control `'none'`, writable `player.control`, `presets.player.none`, timeline `lockInput` (`actors`).
680
+
681
+ ### Added (plugins folder)
682
+
683
+ - `plugins/` next to a page's html: each file is plugged at `engine.start()` by what it exports (Object3D, Pass / node pass, Material, ShaderPatch, module); order by file name or `plugins/plugins.json`; `engine.plugins.off(name)` / `on(name)`; a wrong shape is `[plugin-shape]`.
684
+ - `describe().slots`: what is plugged where, from which file, what it affects.
685
+ - Plain `PointLight` / `SpotLight`: counted by `engine.budget` `lights` (limit 8) / `shadowLights`, listed in `describe().render.lights`; a casting light at intensity 0 stops redrawing its shadow map.
686
+ - `threedog lib pull` puts code entries (shader, material, effect, module) in `plugins/` by default (models and textures still in `art/`).
687
+
688
+ ### Breaking (physics, nav, weather, collision)
689
+
690
+ - `weather.set(name, seconds)` is `weather.set(name, { seconds })`; a number throws `[module-params]` in dev.
691
+ - `engine.collision.circles` / `.boxes` are Sets (insertion order, O(1) remove): `.length` is `.size`, `.filter` / `.map` need `[...set]`.
692
+ - `engine.interactions.items` is a read-only array built on each read (insertion order); writing to it does nothing. `get(id)` is the fast lookup.
693
+ - New `engine.collision.mirror({ add, remove })`: one add / remove diff of the static colliders, used by rigid and nav (their own copies are gone).
694
+ - New `engine.assets.useTexture(name, use, { where, instead, opts })`: fetch a texture for a stand-in; a failed load is one `[load-failed]` warning
695
+ naming the slot. detail, surface, particles, weather particles and water use it (sky still has its own).
696
+ - rigid rebuilds its physics world once per new game / load (it rebuilt on `session:end` and again on `world:load`); a refused load leaves physics as it was.
697
+ - New options with the old values as defaults: `weather({ lightningFirst: 5, lightningInterval: [6, 20] })`, `nav({ maxObstacles: 1024, maxAgents: 128, arrive: 0.6 })`.
698
+ - `nav()` declares `optional: { collision }`.
699
+
700
+ ### Breaking (per-frame waste, save loads, look write paths)
701
+
702
+ - The weather look's entries on the look points are owned by the module `weatherLook` (was owner `'weather'`): `holders().find(h => h.owner === 'weatherLook')`. It takes each entry once through `ctx.mod` and rewrites it with the new `handle.change(value)`, so a frame adds no entry and no cleanup handle.
703
+ - While a save part's `load()` is still pending (it returned a Promise), gameplay is frozen: no fixed step runs and `ops.run` / `ops.can` fail with code `loading` until every part is applied.
704
+ - `ops.list({ available: true })` (and so `describe().actions`) no longer throws for an op whose `offers` throws or offers an arg set that fails its args check: such an op shows as an entry with code `offersFailed` / `badOffer` and `facts.error`.
705
+ - Post effects have a fifth slot, `tone` (exclusive, between `hdr` and `ldr`): an effect there replaces the engine's tone-mapping output (OutputPass on WebGL, renderOutput on WebGPU) and must output display color; `describe().render.toneMapping` then names it.
706
+
707
+ ### Added (per-frame waste, save loads, look write paths)
708
+
709
+ - `handle.change(value)` on every `engine.mod` / `ctx.mod` handle: rewrites that entry's value in place (same op and layer); false on a stale handle.
710
+ - `describe().look.<part>.<key>.pack`: the style part that set a style-layer value when `createEngine({ style: [...] })` merged several (its `name`, else `style[<index>]`).
711
+ - Rule R48: engine code writes `toneMappingExposure`, `shadowMap.enabled / type` and `environmentIntensity` only inside the owning look part's apply (allowlist with reasons in the rule file).
712
+ - Rule R49: every shader patch and post fuse the engine and its add-ons ship has a `tsl` form next to `glsl`, so it draws on WebGPURenderer (WebGL-only-by-design patches listed with reasons in the rule file).
713
+ - Camera rigs are no longer wrapped method by method (a pose compare on every call, `forward()` read every fixed step included): the built-in rigs mark their own placement once (fixed `cut`, rts `moveTo({ instant })`).
714
+ - Staged content templates no longer serialize each copy's model every frame; an open menu with an idle cursor reads no layout per frame (the control list is cached and re-read on a move, a confirm or a DOM change).
715
+
716
+ ### Breaking (plain three.js is adopted)
717
+
718
+ - `engine.scene.add(obj)` registers the root like `engine.add` (thing registry, describe, thing.set); engine modules mark their own objects with `engineOwned`.
719
+ - `engine.post.addPass(pass)` / `insertPass(pass, i)` / `removePass(pass)`: a plain three.js Pass (WebGL) or `(input, ctx) => node` (WebGPU) joins the chain; RenderPass / OutputPass of the engine's own are skipped.
720
+ - A game rendering the canvas itself takes the frame: the engine stops drawing its own and warns once `[own-frame]`; removing the call hands it back.
721
+ - Plain lit three.js materials (Lambert / Phong / Standard / Physical / Toon) that enter the scene take the engine's cloud shadow (and a `look.cloudShadow.replace`), on both renderers, sharing one program per type. Opt out per material with `material.userData.cloudShadow = false`; materials already given engine patches are left alone; listed in `describe().owned['cloudShadow.plain']`. Snow / season cover stays opt-in: `applyEffects(mat, { season: 'ground' })`.
722
+ - Vegetation on its own ground (no terrain): adding a species places only that species on the loaded chunks (it dropped and rebuilt every chunk). Terrain and own-ground chunks stream through one helper (`core/chunkStream.js`).
723
+
724
+ ### Breaking (consistency sweep)
725
+
726
+ - `music.stop(fade)` is `music.stop({ fade })` (like `play`); a number throws `[module-params]` in dev.
727
+ - `setValidate` is gone; `createEngine({ validate })` is per engine (`engine.validate`). Page-wide warnings stay on while any live engine has checks on (it was: the last `createEngine` decided for the page).
728
+ - The event-name spelling check (`[event-typo]`) now also runs in the `npm test` bundle (it read raw `import.meta.env.DEV` and was off there).
729
+ - Dev notes print through `note(text, key?)` (core/validate.js); R45 flags a bare `console.info` in engine code.
730
+ - No three.js prototype is changed for rays: `Mesh.prototype.raycast` and `BufferGeometry.prototype.computeBoundsTree / disposeBoundsTree` are three's again. Registered static meshes still get a BVH (own `mesh.raycast`). A game that relied on BVH for its own `THREE.Raycaster` adds three-mesh-bvh's setup itself.
731
+ - New `threePatches` export and `describe().threePatches`: the remaining class changes (`shadow-accessors`, `node-setup-position`), each undone page-wide with `threePatches.off(id)`.
732
+ - AI.md: the "When something happens -> which tool" list moved to recipe 16 §11 (the MCP server reads it there).
733
+ - No module option takes keys any more; modules only declare their actions and the game binds them (`createEngine({ bindings })` / `engine.input.bind`). Gone: `inventory({ keys, pad })`, `quests({ keys, pad })`, `photo({ keys, pad })`, `interactions({ keys })`, `grids.preview({ rotateKeys })`, `characters({ brakeKeys, brakePad })`, `createPlayer({ jumpKeys, runKeys })` (each now `[module-params]`). `presets.keys` is gone; its maps are `presets.bindings.inventory / quests / photo / gridRotate / brake`, plus new `presets.bindings.walk` (run / jump, what `presets.player.*` used to carry) and `presets.bindings.interact` (E / gamepad X, what `presets.interactions.*` used to carry). `presets.player.*` and `presets.interactions.*` hold no keys now. Migrate: `createEngine({ bindings: { ...presets.bindings.walk, ...presets.bindings.interact, ...presets.bindings.inventory } })`; "no key" is a binding to `[]`.
734
+ - `createEngine` options are typed in their schema (`engine.catalog('core').params` shows `bool`, `number`, `object|array` ... instead of `any`): a wrong shape such as `batching: 'yes'` or `fov: 'wide'` now throws `[module-params]` at the call (it used to pass and fail later or be ignored). An unknown `fallback` is `[module-params]` too (was `[engine-misuse]`). Param schemas accept several shapes as `'bool|object'`.
735
+ - R6 (options tables) is an error now: a module's schema and its d.ts options interface must name the same keys; a schema default written again as a destructuring default in the same function fails; a modules/ options table with `keys` / `pad` / `xKeys` fails.
736
+ - `inventory({ pauseGame })` of the wrong type is `[module-params]` (was `[inventory-misuse]`; the schema already checked it).
737
+ - Timing arguments are options objects (a number in their place throws `[module-params]` in dev): sound handle `h.fade(to, s)` / `h.stop(s)` are `h.fade({ to, seconds })` / `h.stop({ fade })`; `timeline.tween(t, to, duration, ease)` is `tween(t, to, { duration, ease })`; `fadeScreen(engine, to, seconds)` is `fadeScreen(engine, to, { seconds })`; `anim.go(state, fade)` / `anim.action(name, fade)` take `{ fade }`; fixed camera `blend(name, seconds, ease)` is `blend(name, { seconds, ease })`.
738
+ - Handles end with `remove()`: a tween promise's `cancel()` and a `dialogue.say()` promise's `stop()` are `remove()`; a sound handle gains `remove()` (same as `stop()`); a look part's `dispose()` is `remove()` (it owns no GPU resource). R7 now fails (was a warning) on any returned object with `stop()` / `cancel()` and no `remove()`, with no allowlist.
739
+ - `flow.transition` called `music.stop(fade)` positionally (it threw in dev since `music.stop({ fade })`); fixed.
740
+ - An unbound module action no longer throws at `engine.use` (`interactions()` without keys, `inventory()` without keys); reading it warns `[input-unbound]` once in dev, so binding after `use` works.
741
+ - Actions a module declares outside its ctx leave with it: the rts camera's `rotateLeft / rotateRight` (declared by the camera module), the player's `jump / run / brake` (declared at `characters()` install, optional), a grid preview's `rotate` (removed with the preview).
742
+
743
+ ### Breaking (module types and capabilities)
744
+
745
+ - Every module declares `type`: `'world' | 'look' | 'actor' | 'rules' | 'ui' | 'net' | 'tool'` (what it may own; `stage` still says when it runs). A module without one throws `[module-type]` with the fix: add `type: 'rules'` for game logic.
746
+ - Dev checks by type throw `[module-type-rule]` with the fix: a `look` module may not `ops.define` or write world records; a `ui` module may not `input.bind` or `saves.register`. A `world` module's file may not draw (rule R47).
747
+ - `requires` names a capability (`'world'`, `'inventory'`, `'sky'`), provided by a module's `provides`; a missing one names both fixes (install the engine part, or your own provider). Built-ins provide theirs (world, level, collision, rigid, nav, calendar, weather, sky, particles, inventory, quests, dialogue, interactions). After `{ replaces }`, `engine.<capability>` is the new provider's API.
748
+ - `describe().modules` is a list of `{ name, type, provides?, requires? }` (was a list of names).
749
+ - `weather()` returns two modules, installed by the same `engine.use(weather(...))`: `weather` (state, `engine.weather`: types, current, set, auto, save, events) and `weatherLook` (look, `engine.weatherLook`: particles `systems`, `flash`, `apply`, `particles`, `area`; `describe().weatherLook.rainVisible / snowVisible`). `engine.weather.systems / flash / apply / particles / area` and `describe().weather.rainVisible / snowVisible` are gone.
750
+ - Calendar: `timeOfDay`, `day` and `dayLength` are views of the `'calendar'` time channel (an origin plus `engine.clock.now`), not a counter of their own; writing them moves the origin. `day:start` / `season:change` / clock-time timers fire right after time moves (new `engine.time.onMove(fn)`), on a step and on a skip. `calendar.tick()` is gone; the save part also stores `at` (older saves still load).
751
+
752
+
753
+ ### Breaking (module boundaries)
754
+
755
+ - Core, render and ui name no module; modules register what core needs. A module's loading-screen name `module.<name>` is registered by the module with its own text (`engine.i18n.add` in install); `describe().player` drops `running` / `jumping` (compare `state` yourself); the light-count warning skips lights marked `userData.fixedCount` (light pools set it) instead of names starting `lightPool_`; night glow reads the `daylight` measure (`engine.audio.measure`: calendar, or the sky without one); the baseline sun follow steps aside for whoever holds `shadow.follow`; the title's Settings button comes from `engine.ui.titleItem('settings', ...)` (an unknown string in title `items` throws, listing the added ids); the water surface numbers moved to `render/fxNumbers.js`.
756
+ - New: `saves.register(key, { checkNewGame(data) })` (dev check of a part's new-game data; the world's "records placed by code" warning moved there), `engine.ops.route(fn)` / `engine.ops.refused(name, args, { reason, actor })`, `engine.world.pauseSimulation()`, `engine.inventory.contents()` / `setContents(data, { only })`. net uses only these; a game's own inventory provider needs `contents` / `setContents` for net to sync it.
757
+ - Checks: R25 follows a module held in a local (`const inv = e.inventory; inv._x`); R46 (another module's internal files) is an error; R27 also flags module names kept in `core/I18n.js`; R3 looks for `module.<name>` in the module's own folder.
758
+
759
+ ### Breaking (look values on shared points)
760
+
761
+ - Every `engine.look.<part>.<key>` is a shared point (`describe().shared['look.fog.far']`): the game's value is the base, effects multiply on top, the settings menu can only restrict. A game's `look.lights.set({ sun: { intensity: 3 } })` now dims in rain and fades at sunset (it used to cover both); for the exact number use `look.lights.manual('sun')` or `{ layer: 'system' }`.
762
+ - Two owners `set` one look value on one layer throw `[shared-conflict]` in dev (was: the later write won). Fix: one owner, `mul` / `add`, or another `layer`.
763
+ - `engine.mod('sky.sunLight' | 'sky.ambient' | 'sky.fog' | 'sky.tint' | 'sky.flash' | 'sky.cover')` are now `look.lights.sun.intensity`, `look.lights.hemi.intensity`, `look.fog.far`, `look.sky.tint`, `look.sky.flash`, `look.ground.cover`; `engine.sky.modifiers` is gone (read `engine.stacks.get(name).value()` or `describe().shared`).
764
+ - Shadows: `createEngine({ shadows, shadowType })`, `engine.setShadows`, `engine.shadows`, `engine.shadowType` and `look.lights` `sun.shadow` are gone; use `engine.look.shadow.set({ enabled, type })` (core, works without a sky; a sky adds cascades, extent ...).
765
+ - Fog: `createEngine({ fogFar })`, `engine.setFogFar` and `engine.fogFar` are gone; the start value is `style.sky.fog.far` / `sky({ fog: { far } })`, a game sets `look.fog.set({ far })`, `terrain({ viewFog: true })` makes the terrain look write the layer below it (owner `terrainLook`, removed with that module).
766
+ - Fog: an explicit `near` or `density` is kept as given; the weather multiplies `far` only (it used to scale density too).
767
+ - Settings menu: shadows / bloom / ao off is a `set: false` on the settings layer; on removes it, so a scene that turned them off stays off and a low-tier device's bloom stays off.
768
+ - `look.<part>.set(...)`'s handle `remove()` returns whether it removed anything.
769
+
770
+ ### Breaking (terrain and vegetation: data and look)
771
+
772
+ - `terrain()` and `vegetation()` each install two modules: data (`engine.terrain`, `engine.vegetation`) and look (`engine.terrainLook`, slot
773
+ `'terrain-look'`; `engine.vegetationLook`, slot `'vegetation-look'`). A game draws either its own way with
774
+ `engine.use(mine, { replaces: 'terrain-look' })` + `engine.terrain.view({ add, change, remove, show })` (or `'vegetation-look'` +
775
+ `engine.vegetation.view({ species, change, ring, show, drop })`) and keeps collision, paths, felling and saves (recipe 28 sections 6 and 7).
776
+ Code that lists module names (`openWorld().map(m => m.name)`) now sees `terrainLook` and `vegetationLook` too.
777
+ - Chunk records hold data only. Removed: `c.terrain` / `c.group` (terrain meshes: `engine.terrainLook.meshes.get(c)`), `c.veg` / `c.vegGroup`
778
+ (plant meshes: `engine.vegetationLook.mesh(c, name)`; placement data: `c.plants[name]`, felled slots `c.hidden[name]`),
779
+ `im.userData.hidden` / `im.userData.ids` (use `c.hidden[name]` and `c.plants[name].ids`).
780
+ - `vegetation.define()` returns the species' data; `geometry`, `lodGeometry`, `material` and `fadeUniforms` moved to
781
+ `engine.vegetationLook.kind(name)`. `Vegetation.levelOf` / `updateFade` and the terrain look internals `mountTerrain.js`, `chunkLevels.js`,
782
+ `terrainMat` / `sideMat` are gone.
783
+ - A chunk job that keeps failing is tried 3 times, then reported (`terrain:chunkFailed`, `[terrain-chunk-failed]`,
784
+ `describe().perf.chunks.failed`); `engine.terrain.retry()` sends it again (it used to sit in loading for ever).
785
+ - `terrain.setDensity` places only the plants again (ground collision is kept); `look.ground.replace` swaps the material in place.
786
+
787
+ ## 0.3.0 (2026-11-03)
788
+
789
+ WebGL renderer. Upgrade steps for a 0.2 game, most common first, with the error each old form now gives: [docs/MIGRATING-0.3.md](docs/MIGRATING-0.3.md).
790
+
791
+ ### Breaking
792
+
793
+ - Options: more option bags go through one schema (`readParams`): an unknown or removed option throws `[module-params]` in dev (release: warns once, ignored). This covers `createEngine`, `openWorld`, module factories, `npcs.add`, `createPlayer`, `triggers.add`, `addWheeled`, `audio.addBus`.
794
+ - Calendar: time of day, days, seasons, clock-time timers and their save moved from `sky()` to the new `calendar()` module (`engine.calendar`). `sky({ dayLength | day | seasons | daysPerSeason | hoursPerDay })` throws `[sky-option]`; `engine.sky.timeOfDay / day / season / ...` throw `[renamed-field]` in dev; `engine.sky.at / between / daily / onSeason` are gone. `openWorld` installs `calendar` (object form `calendar: {}`, was `sky: {}`).
795
+ - Pickups: new `pickups()` module. `inventory.spawnPickup / nearestPickup` and `inventory({ pickupRadius, bobDistance })` are gone (`pickups.spawn(position, { give })`, `pickups({ radius, showDistance })`). Event `item:pickup` → `pickup:take`; `container:add / remove` removed (`item:add / remove` carry `container`, `actor`). Pickup handle `id` is the world record id. `style.pickup.model` is not read (the shape is an asset model by name). Content pickups need `pickups()` `[module-needs]`.
796
+ - NPCs: `talk / talkLabel / talkRadius` → `interact: { op: 'npc.talk', label, radius, args }`.
797
+ - Clock and holds: `engine.clock.timeScale` removed (`engine.mod('clock.rate', { owner, set })`; `clock.rate` is read-only). `engine.resume / unfreeze` removed: `pause` / `freeze` return `{ owner, remove() }` (no chaining). `defineState` returns a handle. `runState.by` → `runState.owners`.
798
+ - Sky and lights: `engine.sky.sun / hemi` → `engine.lights.sun / hemi`; `sky.modify` removed (`engine.look.*`, `engine.mod`); `sky({ sun | hemisphere | fog: 'manual' })` throws `[sky-option]` (`look.lights.manual`, `look.fog.manual`). `look.tone` has no `mapping` (the engine writes `renderer.toneMapping` once at creation; change it in three.js). `setFogFar` no longer writes `scene.fog`.
799
+ - Style shader keys moved to look hooks: `style.sky.fog.glsl`, `style.sky.clouds.glsl / uniforms`, `style.wind.glsl / uniforms`, `style.water.glsl`, `water({ glsl })` throw and name `look.<part>.patch(slot, ...)`. Style functions (`backdrop`, fog `color`, tone `exposure`) receive `{ time, weather, season, state, sky }` instead of the sky.
800
+ - Audio: `audio.register(name, synth)` removed; a synth is an asset (`assets.manifest({ sounds: { name: fn } })`). `audio.sounds` rules `'synth'` / `{ synth }` throw `[audio-synth-gone]`. `audio.addBus(name, { level, owner })` returns a handle.
801
+ - Assets: model `params` in a manifest is a schema (`{ h: { type: 'number', default: 3 } }`), not values. `assets.cached` is no longer public.
802
+ - Characters: `canSwim` → `water: 'swim' | 'block' | 'wade' | fn`; the speed argument of `move()` and `moveInput.speed` are ignored (`engine.mod('move.speed', ...)`).
803
+ - Vehicles: `rigid.addVehicle` → `rigid.addWheeled`; `seat` → `seats: []`; `seatPosition / exitPosition` take a seat index; `vehicle:enter / exit` carry a `Rideable`.
804
+ - Removed: `entities` module, `engine.entities`, events `entity:spawn / remove / state / stage` (content templates with `stages`, event `template:stage`); `engine.spawn` (`engine.content.spawn`); `vegetation.add` (`vegetation.define`); `triggers({ debug })` / `setDebug` (`engine.debug.view('triggers')`); dialogue `lock` option (`channel: 'bubble'`).
805
+ - Changed shapes: `quests.state` is a method `state(id)`; `trade()` and grid `check / preview / place` results use `code` (was `reason`) plus `facts`, `nextActions`; `describe().ui.inputContexts` → `describe().holds.input`.
806
+ - The 0.2 rename stubs (`[renamed-api]` for `setExposure`, `setToneMapping`, `sky.setEnvironment / setShadow`, `weather.define`, `post.add / enable`, `look.clouds`, `cameraOverride`, views `pos`, `style.character`) are removed; those names are now plain `TypeError` / `undefined` (renamed result fields are the exception below: a dev-only error pointing at the new name, no compatibility).
807
+ - 0.2 names that used to do the wrong thing silently now throw `[renamed-field]` in dev naming the new form, all through one rename table helper (`renamed` in `core/validate.js`; release builds skip it): `dialogue.say / start({ lock })` → `channel: 'bubble'`; `engine.clock.timeScale` → `engine.mod('clock.rate')`; the names that moved from `engine.sky` to `engine.calendar` (an explicit list); `style.pickup.model`; result `.reason`, `runState.by`, `describe().ui.inputContexts`. Writing `clock.rate` throws `[mod-owner]` (it is read-only).
808
+
809
+ ### Added
810
+
811
+ - `calendar()` (`at / between / daily / onSeason / untilMark`, `isDay`, `daylight`) and `pickups()` modules, both in the `index.js` exports.
812
+ - `engine.mod` / `engine.stacks`: owned, timed, saved modifiers for any quantity (`move.speed`, `clock.rate`, sky multipliers), event `mod:end`; `engine.time` channels; `onFixed(fn, { channel, phase })`; `onRender(fn)`; `engine.wrap(target, method, fn)`; `input.gate(action, owner)`, `input.push({ owner })`, `describe().holds`.
813
+ - Look: `look.<part>.manual(keys)`, `look.state(patch)`, `look.shadow.include(material)`, `look.materials.glow` (emissive that follows daylight), `look.view`, `lights.env.intensity` / `lights.env.share`, sun `shadow`, hemi `ground`; sky `top` / `horizon`; `style.sky.dim: { tint, stars }` (default on; false keeps a sky.tint at full color at night, or stars through cloud cover); `replace(m, { effects: false })`; `terrain({ material, effects: false })`. `describe().owned` and `describe().look.<part>.<key>.writer` say who writes each value; the engine yields to a game's direct three.js write.
814
+ - Shaders: named patch slots (`{ slot, pars, glsl }`), callable `#include <threedog_detail>` / `<threedog_lighting>`, uniforms `uSunDir`, `uDaylight`, `uTimeOfDay`; material texture slots (`{ texture, channel, repeat, wrap, colorSpace }`), `aoMap`, `lightMap`, screen projection.
815
+ - Rendering: light probe bake scaffold (`engine.bakeProbes` / `loadProbes`); `bakeVertexAO`; post `ao({ radius, intensity })`; dev views `overdraw` / `shaderCost`, `debug.defineView`, `debug.reloadGlsl`, `debug.reloadAssets`; `inspect.materials()` / `inspect.perf()`.
816
+ - Assets: `manifest([packs])`, `paramsOf / setParams` (hot swap), per-entry `cache: false`, `castShadow`, `receiveShadow`; textures as a Texture or factory; sounds as synth functions.
817
+ - Content: `contentParts` (one kind split over files), `engine.content.fields()`, `content.spawn`, field tables checked by content-check, content write-back.
818
+ - Characters: `maxJumps`, `airJumpSpeed`, `jumpBuffer`, `fall`, `states`, `channel`, `id`, mover `'manual'` (switchable at runtime), `launch`, `addJumps`, `resetJumps`, `jumpState`, `stat()`, `characters.support` (moving platforms), `safeGround`; events `character:launch`, `character:fall`, `character:water`. Anything can be ridden (`Rideable`, several seats, passengers).
819
+ - Gameplay: hold / approach interactions (events `interaction:hold`, `interaction:interrupt`), per-actor bags `inventory.of(actor)`, `quests.advance`, dialogue bubbles (`channel: 'bubble'`, event `dialogue:bubble`), UI focus navigation and choice cursor, HUD anchors, grid levels / occupancy layers, `npcs.add({ channel })`.
820
+ - Cameras: follow camera `projection` / `size`, `ground`, `mouseLook`, `hideTargetNear`, `setView / getView`, preset `thirdPersonAction`; `screenToGround` on every camera rig.
821
+ - Saves: `saves.register({ movedFrom })`; `dispose({ keepContext })`; net WebSocket heartbeat / reconnect; worker watchdog.
822
+ - Exports: `calendar`, `pickups`, `contentParts`, `bakeVertexAO`. Tools package exports `@threedog/tools/browser`, `look`, `contract`, `panel`, `gallery`.
823
+ - Optional technique examples, copied into a game rather than installed as modules (`threedog examples list`).
824
+ - World: near tiers `world.simulate(kind, { fullRadius, nearEvery })` (records beyond `fullRadius` run near once every `nearEvery` seconds with the accumulated dt). NPCs use them: those farther than half of `world.radius` now step 15 times a second instead of every fixed step.
825
+ - Assets: `assets.modelNow(name)` of a registered model nothing has loaded yet (code-built ones included) warns once in dev `[asset-not-loaded]`, naming `modelNow(name) ?? await model(name)` and `preload: true`.
826
+ - Grids: default player text `grid.<code>` (zh-CN, en) for every built-in failure code (`outOfBounds`, `occupied`, `wrongGround`, `notFlat`, `noGrid`, `idTaken`, `unknown`, `notPlaced`, `noTarget`, `badFields`), registered by `grids()`; `engine.t('grid.' + r.code)` no longer warns `[unknown-name]`.
827
+ - Light pool: `lightPool.add(at, { dusk })` lets a source follow the time of day on the same daylight curve as `look.materials.glow` (street lamps off at noon, their light given to lit sources); default off.
828
+ - HUD: `hud.counter(id, { value })` takes text too (a clock, a quest step); without a value it shows the label alone instead of "0".
829
+
830
+ ### Changed defaults
831
+
832
+ - Lighting (changes every game's default look under a sky): the style's ambient column is now the whole diffuse fill. The neutral room environment takes its share (`look.lights` `env.share`, 0..1, default 0.5) and the hemisphere light the rest (`env.intensity` stays the absolute `scene.environmentIntensity`, also under a sky: a game's value is written as given); before, the room map added about four times the ambient on top, so sunlit and shaded faces looked alike (rainy-street noon: shadows 19% darker -> 50%). Packs tuned against the old fill may want a higher ambient column.
833
+ - Post effects: a listed effect is on. `lut`, `grain`, `vignette`, `chromatic`, `dof`, `ao` and `outline` no longer default to `enabled: false` (placed in `style.post` they silently did nothing); pass `enabled: false` to list one off. `style check` counts on-effects by the same rule.
834
+ - Lighting: under a sky the neutral room environment follows the sky's day curve (nights darker on PBR); sun shadow bias is a few centimeters in world terms (contact shadows); neutral sky keyframes hold night longer.
835
+ - Post: on the low tier `look.post.set({ '<effect>.enabled': false })` turns off a costly effect the game added (it was a no-op). Photo bloom follows the game's post chain.
836
+ - `freeze()` keeps `uTime` moving (`{ ambient: true }` stops it). `jump()` is buffered. `item:add / remove` fire for every container.
837
+ - Batching merges only engine-placed content; game meshes opt in with `userData.batch = true`.
838
+ - i18n locale matched by language (`'zh'` → `'zh-CN'`); unknown locale warns once. `input.simulate` throws on an unknown action.
839
+ - Cold start: nothing renders before ready; shaders compile for the real target.
840
+ - NPCs: near tiers are off by default (every near NPC walks every fixed step; before, NPCs beyond half `world.radius` moved every 4th step in visible jumps). Large crowds opt in with `characters({ npcTiers: { fullRadius, nearEvery } })` or `engine.npcs.tiers(opts)`.
841
+
842
+ ### Fixed
843
+
844
+ - Interactions: an interaction on a model the game moved away from its world record is found where the model stands (was missed beyond 2 m). One xz index keyed by each item's world position, re-filed only when it moved.
845
+ - Scene delta (cascades, fog, glow): a class with its own `material` accessor (troika-three-text) keeps it; the engine's material-swap hook calls the original getter / setter instead of shadowing them.
846
+ - UI display timers (toasts) run on the page's own clock: wall clock in the game, the stepped time on a headless page, so `threedog step` then `snap` no longer shows every toast from the step.
847
+ - Sky: stars sit behind the drawn clouds and dim with the weather's cloud cover (`uCloud`), so a rainy or overcast night shows no starry sky (without weather the default cover 0.25 leaves them at 75%).
848
+ - Adaptive resolution changes the render scale before a frame draws, not after: the frame of the change was presented blank (a screenshot caught it black).
849
+ - Weather grey (and any `sky.tint`) follows the sky's light: the tint color is dimmed by how bright the sky is now, so a rainy night stays dark instead of turning lit grey; the brightest sky row is unchanged.
850
+ - Under a sky the room environment follows the sky's light (ambient column x sky color), not the ambient column alone: Standard / Lambert / Phong no longer stay day-lit at night while Toon goes dark.
851
+ - `describe()` shows set values (post params, exposure, light intensity) as set (`0.25`, `1.12`), not rounded to one decimal.
852
+
853
+ ### Saves
854
+
855
+ - 0.2 saves load. The calendar takes the old `sky` part (`movedFrom`); saved NPC `talk` fields become `interact`; the `world` part is version 5 (migrated on load). 0.2 builds refuse 0.3 saves as `'tooNew'`.
856
+ - A save with a `null` part is refused as corrupt; a load error in any part, `world:load` listener or `afterLoad` rolls the game back.
857
+ - Physics: new save part `rigid`. Bodies added with `addBox / addBall / addHull({ id })`, and every vehicle, save pose, rotation, velocities and sleep; a load restores them (before, a toppled crate came back upright and at rest, and a car stayed where it was at load time). Ids are unique across bodies and vehicles (`[rigid-misuse]`). Not synced by `net()`. newGame / load rebuild the physics world and emit `rigid:rebuilt { world, player, bodies }` once the bodies are back: a game re-creates its own joints there (they used to vanish silently). In dev, a rebuild that dropped joints with none re-created by the next step warns `[rigid-misuse]`.
858
+
859
+ ### Tools
860
+ - `threedog snap` on a paused (step-driven) page draws the current state once before reading, without advancing game time: at tick 0 it saved a black picture.
861
+ - `threedog how`: among equal matches an AI.md row (the one recommended entry) ranks before recipe sections and technique examples; the recipe column no longer counts as task words. `docs/CONVENTIONS.md` "One task, which entry" says which entry is first where a task has several.
862
+
863
+ - Removed: `threedog new-style`, `--style` on `new-game` / `init`, positional `content set <id> <field> <json>` (now `field=value`). A game's look lives in its own `style/` folder; no published style packages.
864
+ - Game folder: a command run inside a game acts on that game wherever it sits (nested in another repo's npm workspaces, or outside `games/` here); `-w .` and `-w <path>` name a game by its folder. `threedog init [folder]` takes the folder to create (was a name for the current folder) and refuses a workspaces root.
865
+ - Errors: `engine.error.at` is the first stack line of a gameplay error (also on the describeText error line); bridge commands print `engine error [code] where: message (at …)` instead of `engine error [object Object]`.
866
+ - Error summaries (the dev log's repeat line, `threedog errors`, play / verify / test results) keep the end of a long message, where engine errors put the requirement and `[code]` (was cut at 100–220 characters).
867
+ - `new-game` starts blank; `--open-world` gives terrain, sky, follow camera and a player.
868
+ - Added: `threedog stress`, `tune show | write`, `gallery [--shots]`, `art list | copy`, `content add | remove`, `--gpu` / `--software`, `doctor --json`, `map -w <game>`. `threedog shot` prints the look numbers after every shot (`--ref`, `--no-look`, `--json`).
869
+ - The look check reaches every picture: `threedog snap` (dev bridge / MCP) runs it on the live page (`--no-look` skips it); `threedog shot http://localhost:5173/` opens a running page without building; `threedog shot --image file.png` gives the pixel-only part for a picture taken any other way and says what needs the live page. Glare is printed as `fact:` with the detail lost under it (on vs off), a `contradiction:` only where DESIGN.md says no glare (`Look intent: no-glare`).
870
+ - Look check: large clipped areas, large near-black areas and a night not dark from lighting (`clipped`, `crushed`, `time-flat`) are now `fact:` lines, a `contradiction:` only where DESIGN.md declares the opposite. DESIGN.md takes an optional `Look intent:` line of listed words (`no-glare`, `no-pitch-black`, `dark-nights`, `bright-nights`, `strong-light`, `bright`, `muted`, ...), the only source of a look wish: the free words of the "Look and controls" table and "Not for this game" are no longer read; an unknown word is reported. `style check` no longer warns above 2 post effects: it notes which are on, which are costly, and how to see each one's cost.
871
+ - content-check: fields of props, templates, pickups and kinds; model names from the game's `assets.js`; old NPC `talk` and `'synth'` sound rules are errors. Rules R41–R45 (engine code); R39 removed.
872
+ - Template: a new game's package.json depends on `@threedog/post-effects` (the style's `post` line uses it); the outside-the-repo check installs exactly the template's dependencies.
873
+ - Template: a new game has the `shot`, `types`, `perf`, `bake`, `assets` and `doctor` scripts the docs name (`npm run shot` works in a standalone game).
874
+ - Error hints: a property read on `null` no longer gets the "module not installed" hint (`null-value`: a lookup or helper such as three.js `mergeGeometries` returned null).
875
+ - Look check: a `light:` fact (key vs fill share of the brightness, how much darker shadows are; a contradiction only under a DESIGN.md "strong / dramatic light"), a fact when the camera stands inside a closed mesh, each exposure next to noon / midnight when a style's exposure curve differs; the printed block is short (at most four one-sentence hints, ranked; `--json` keeps all).
876
+ - `threedog shot` / `snap` print only what bears on the picture under it (time, weather, camera; `threedog describe` for the rest, `--json` / `--describe-only` keep the whole state). `threedog check` prints warnings as one count line per rule (`--verbose` lists them).
877
+ - Ops `interaction.use` / `pickup.take`: a `tooFar` result carries `facts: { distance, radius, at }`. `presets.keys.gridRotate` is in the types. GAMEMAP counts an action named by an interaction as used. The dev model-cache warning names the plugin's error instead of "no model cache".
878
+
879
+ ## 0.1.0 (unreleased)