threedog 2.2.2 → 2.3.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 (194) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -4
  3. package/core/assets/Animator.js +66 -12
  4. package/core/assets/ik.js +144 -18
  5. package/core/assets/maskLayer.js +377 -0
  6. package/core/assets/rootMotion.js +148 -0
  7. package/core/audio/Audio.js +100 -4
  8. package/core/base/errorCodes.js +6 -369
  9. package/core/base/errorCodesModules.js +378 -0
  10. package/core/engine/Engine.js +8 -5
  11. package/core/engine/Loading.js +8 -4
  12. package/core/engine/copies.js +1 -1
  13. package/core/engine/headlessLoad.js +15 -4
  14. package/core/engine/lifecycle.js +1 -0
  15. package/core/engine/loop.js +22 -3
  16. package/core/engine/moduleSlots.js +3 -7
  17. package/core/engine/modules.js +30 -58
  18. package/core/engine/startup.js +3 -3
  19. package/core/input/Input.js +7 -3
  20. package/core/input/inputContext.js +3 -2
  21. package/core/input/inputSeat.js +1 -1
  22. package/core/inspect/DebugOverrides.js +1 -1
  23. package/core/inspect/Describe.js +7 -2
  24. package/core/inspect/describeRender.js +4 -1
  25. package/core/inspect/describeText.js +2 -2
  26. package/core/inspect/metadata.generated.js +371 -74
  27. package/core/inspect/pictureMenu.js +2 -0
  28. package/core/inspect/pictureWriters.js +4 -3
  29. package/core/ops/Ops.js +9 -3
  30. package/core/ops/actor.js +10 -0
  31. package/core/ops/control.js +17 -6
  32. package/core/ops/holds.js +1 -1
  33. package/core/ops/opsAtomic.js +6 -1
  34. package/core/ops/opsGuard.js +2 -2
  35. package/core/ops/owned.js +37 -11
  36. package/core/ops/sharedPoint.js +5 -1
  37. package/core/ops/stacks.js +30 -7
  38. package/core/saves/Saves.js +0 -2
  39. package/core/saves/saveApply.js +7 -7
  40. package/core/saves/session.js +6 -3
  41. package/core/saves/stateReplace.js +71 -41
  42. package/core/scene/Rays.js +74 -26
  43. package/core/scene/gameLights.js +19 -11
  44. package/core/scene/sceneDelta.js +8 -4
  45. package/core/stream/chunkStream.js +21 -0
  46. package/core/stream/dirtyWatch.js +37 -0
  47. package/core/time/skip.js +9 -6
  48. package/core/time/time.js +72 -18
  49. package/docs/AI.md +22 -21
  50. package/docs/API.md +5 -4
  51. package/docs/CODEMAP.md +16 -10
  52. package/docs/COMMANDS.md +5 -5
  53. package/docs/CONVENTIONS.md +9 -25
  54. package/docs/api/ambience.md +1 -0
  55. package/docs/api/assets.md +10 -3
  56. package/docs/api/audio.md +5 -3
  57. package/docs/api/decals.md +16 -0
  58. package/docs/api/engine.md +1 -0
  59. package/docs/api/tools.md +3 -1
  60. package/docs/api/water.md +3 -0
  61. package/docs/recipes/09-materials-lights-models.md +15 -1
  62. package/docs/recipes/13-animation.md +51 -10
  63. package/docs/recipes/16-dev-bridge.md +1 -1
  64. package/docs/recipes/31-audio.md +15 -9
  65. package/docs/recipes/34-environment-lighting.md +11 -1
  66. package/docs/recipes/44-water-weather-hooks.md +1 -0
  67. package/examples/action/.threedog/content-index.json +1 -0
  68. package/examples/perf-island/.threedog/content-index.json +1 -0
  69. package/examples/plain-picture/.threedog/content-index.json +1 -0
  70. package/examples/rc2d/.threedog/content-index.json +1 -0
  71. package/examples/styletest/.threedog/content-index.json +1 -0
  72. package/examples/techniques/outlines-and-rim/main.js +1 -1
  73. package/examples/techniques/procedural-surface/main.js +1 -1
  74. package/examples/techniques/stylized-shading/main.js +1 -1
  75. package/examples/webgpu-tsl/.threedog/content-index.json +1 -0
  76. package/examples/world/.threedog/content-index.json +1 -0
  77. package/index.d.ts +6 -2
  78. package/index.js +3 -2
  79. package/llms.txt +11 -10
  80. package/modules/ambience/Ambience.js +97 -15
  81. package/modules/camera/common.js +18 -12
  82. package/modules/characters/Character.js +30 -3
  83. package/modules/characters/NPC.js +2 -5
  84. package/modules/characters/astar.js +45 -14
  85. package/modules/characters/movers/rapier.js +53 -41
  86. package/modules/characters/movers/simple.js +37 -24
  87. package/modules/characters/npcView.js +2 -2
  88. package/modules/characters/pathAsync.js +3 -3
  89. package/modules/collision/contract.js +2 -2
  90. package/modules/content/index.js +3 -0
  91. package/modules/content/models.js +11 -4
  92. package/modules/content/templates.js +11 -11
  93. package/modules/debug/DebugPanel.js +1 -0
  94. package/modules/decals/Decals.js +393 -0
  95. package/modules/decals/index.js +1 -0
  96. package/modules/gameplay/Container.js +2 -0
  97. package/modules/gameplay/Containers.js +17 -3
  98. package/modules/gameplay/Dialogue.js +1 -1
  99. package/modules/gameplay/Interactions.js +7 -6
  100. package/modules/gameplay/Inventory.js +5 -1
  101. package/modules/gameplay/Quests.js +4 -3
  102. package/modules/gameplay/inventoryOps.js +2 -2
  103. package/modules/gameplay/pickups.js +32 -12
  104. package/modules/gameplay/questSave.js +2 -2
  105. package/modules/grid/index.js +8 -2
  106. package/modules/hud/index.js +1 -1
  107. package/modules/level/heightfield.js +1 -0
  108. package/modules/level/index.js +3 -2
  109. package/modules/level/nodes.js +2 -1
  110. package/modules/lights/index.js +27 -4
  111. package/modules/lights/slots.js +33 -16
  112. package/modules/nav/contract.js +4 -4
  113. package/modules/nav/index.js +6 -2
  114. package/modules/net/Client.js +24 -11
  115. package/modules/net/Host.js +73 -20
  116. package/modules/net/index.js +33 -21
  117. package/modules/net/sync.js +38 -8
  118. package/modules/net/transports.js +7 -3
  119. package/modules/particles/Particles.js +11 -4
  120. package/modules/particles/contract.js +6 -6
  121. package/modules/particles/effect.js +0 -1
  122. package/modules/rigid/RigidBodies.js +69 -57
  123. package/modules/rigid/Vehicles.js +8 -7
  124. package/modules/rigid/ragdoll.js +4 -6
  125. package/modules/rigid/rapierCompat.js +90 -0
  126. package/modules/rigid/sync.js +2 -5
  127. package/modules/settings/Settings.js +10 -4
  128. package/modules/sky/Sky.js +10 -2
  129. package/modules/sky/environment.js +29 -13
  130. package/modules/sky/frame.js +2 -2
  131. package/modules/sky/shader.js +5 -2
  132. package/modules/sky/skyModule.js +2 -2
  133. package/modules/swarm/Swarm.js +3 -2
  134. package/modules/swarm/grid.js +12 -7
  135. package/modules/terrain/ChunkManager.js +16 -26
  136. package/modules/triggers/index.js +5 -6
  137. package/modules/vegetation/draw.js +62 -26
  138. package/modules/vegetation/groundChunks.js +8 -22
  139. package/modules/water/Water.js +152 -24
  140. package/modules/water/surface.js +43 -20
  141. package/modules/weather/weatherDraw.js +4 -1
  142. package/modules/world/World.js +21 -2
  143. package/modules/world/index.js +5 -0
  144. package/modules/world/persist.js +1 -0
  145. package/modules/world/records.js +3 -1
  146. package/modules/world/sim.js +3 -2
  147. package/modules/world/simFar.js +4 -2
  148. package/modules/world/state.js +7 -1
  149. package/package.json +2 -2
  150. package/presets.js +30 -0
  151. package/render/PostFX.js +24 -17
  152. package/render/backend.js +72 -31
  153. package/render/cascades.js +25 -14
  154. package/render/cascades.tsl.js +32 -21
  155. package/render/fogLook.js +2 -1
  156. package/render/fx/library.tsl.js +1 -1
  157. package/render/fx/particles.tsl.js +4 -18
  158. package/render/fx/pcss.tsl.js +2 -2
  159. package/render/fx/postWebGPU.tsl.js +47 -25
  160. package/render/fx/sky.tsl.js +6 -18
  161. package/render/fx/uniforms.tsl.js +16 -0
  162. package/render/fx/water.tsl.js +24 -5
  163. package/render/fxNumbers.js +2 -0
  164. package/render/impostor.tsl.js +10 -6
  165. package/render/lights.js +6 -6
  166. package/render/occlusion.js +17 -6
  167. package/render/patches.js +40 -28
  168. package/render/postWebGL.js +6 -4
  169. package/render/reflectionProbes.js +302 -0
  170. package/render/shaderErrors.js +18 -8
  171. package/render/shadowCache.tsl.js +10 -5
  172. package/render/shadows.js +70 -49
  173. package/render/threeCompat.js +166 -0
  174. package/types/core.d.ts +33 -3
  175. package/types/gameplay.d.ts +80 -0
  176. package/types/generated/core/audio/Audio.d.ts +18 -1
  177. package/types/generated/core/ops/Ops.d.ts +2 -1
  178. package/types/generated/core/ops/control.d.ts +7 -3
  179. package/types/generated/core/saves/session.d.ts +4 -1
  180. package/types/generated/modules/ambience/Ambience.d.ts +6 -0
  181. package/types/generated/modules/debug/DebugPanel.d.ts +1 -0
  182. package/types/generated/modules/grid/index.d.ts +27 -3
  183. package/types/generated/modules/net/index.d.ts +8 -3
  184. package/types/generated/modules/sky/Sky.d.ts +1 -0
  185. package/types/generated/modules/water/Water.d.ts +15 -0
  186. package/types/generated/modules/world/index.d.ts +5 -0
  187. package/types/generated/render/patches.d.ts +5 -0
  188. package/types/physics.d.ts +66 -9
  189. package/types/tsl.d.ts +2 -0
  190. package/types/world.d.ts +2 -0
  191. package/ui/Parts.js +3 -2
  192. package/docs/MIGRATING-0.7.md +0 -39
  193. package/docs/MIGRATING-0.8.md +0 -171
  194. package/modules/rigid/refresh.js +0 -10
@@ -59,6 +59,7 @@
59
59
  - `engine.renderOnce(target?: import('three').RenderTarget | null, camera?: import('three').Camera)` — Draw one picture now, outside the loop, on either renderer. `renderOnce()`: the frame the player sees, onto the canvas through engine.post (read the canvas in the same task, as photo mode does). `renderOnce(target)`: that frame through engine.post into a render target (the canvas's pixels: tone mapped, in the output color space, display values). `renderOnce(target, camera)` with another camera: the scene from that camera, without post, as three draws into a target: linear and not tone mapped (right as a texture on a material, which three then tone maps and encodes; read back as image pixels it looks dark). On WebGPURenderer each call is a fresh node frame, so two calls in one task give two pictures (a RenderPipeline draws its scene pass once per frame). Example: `engine.renderOnce(); const url = engine.renderer.domElement.toDataURL('image/png'); engine.renderOnce(rt, mapCamera); // a minimap / thumbnail into your own render target`
60
60
  - `engine.bakeProbes(opts: { bounds, spacing, resolution?, include?, owner? }) → Promise<ProbeSet>` — (experimental) Bake a grid of light probes from the scene as it is now: three's probe grid renders a cube at every grid point and keeps spherical harmonics, and every lit pixel inside the grid then takes its own interpolated light, on WebGL and WebGPU alike. The grid adds to whatever ambient light the scene has (hemi, environment), which the bake also saw: lower those where the probes take over (a warning and describe().render.probes say so). Outside the grid there is no probe light. A load-time cost, not per frame: 6 renders per probe, a few probes per task so the page keeps drawing; ship the result with `toJSON()` + `engine.loadProbes(json)` instead of baking at every start. Adding a grid recompiles the lit materials once: bake at start-up, not mid-play. Example: `const probes = await engine.bakeProbes({ bounds: { min: [-20, 0, -20], max: [20, 6, 20] }, spacing: 4, include: o => !o.userData.moving }); saveFile('probes.json', JSON.stringify(probes.toJSON()));`
61
61
  - `engine.loadProbes(json: ProbeData, opts?: { owner?: string }) → ProbeSet` — (experimental) A probe set from a file made by `handle.toJSON()` (no baking), on either renderer whichever one baked it. A wrong shape is refused with code `probes-data` and nothing is added. Example: `const probes = engine.loadProbes(await (await fetch('probes.json')).json());`
62
+ - `engine.addReflectionProbe(opts: { bounds, position?, resolution?, near?, far?, intensity?, … }) → ReflectionProbe` — (experimental) Capture a local prefiltered PMREM reflection probe for `bounds` (rooms, caves, tunnels, courtyards) so metallic and glossy surfaces inside `bounds` reflect their local surroundings instead of the outdoor sky. Nested bounds pick the smallest enclosing volume; moving objects added with `probe.addTarget(player.root)` transition between zones automatically. Example: `const roomProbe = engine.addReflectionProbe({ bounds: { min: [-8, 0, -8], max: [8, 4, 8] } });`
62
63
  - `engine.loadLightmap(file: string | ArrayBuffer, opts?: { owner?: string }) → Promise<Lightmap>` — (experimental) Put a baked lightmap on the scene: `threedog bake light` wrote the file from the meshes the game marked `userData.static = true`; this rebuilds each with its second UV set and sets plain `material.lightMap`, on WebGL and WebGPU alike. Call it once the level is built, with its lights as they will be played. Nothing runs per frame. Keep the sun real-time; the ambient light the bake saw (hemisphere, environment) has to go, or it counts twice. A wrong file is refused with code `lightmap-data` and nothing is changed. `material.lightMapIntensity` is yours. describe().render.lightmap says what was skipped, moved or doubled. Example: `const light = await engine.loadLightmap('light/level.lightmap');`
63
64
  - `engine.setPixelRatio(p: number)` — Render resolution, and the top adaptive resolution climbs back to. A ratio the player chose in settings below the device default caps it. Throws while pixelSize is on
64
65
  - `engine.setPixelSize(k: number | null)` — One art pixel becomes k real screen pixels (createEngine({ pixelSize }) at runtime). While on, adaptive resolution stops, engine.setPixelRatio throws and a photo keeps the art pixels. null turns it off and brings the ratio from before back. Example: `engine.setPixelSize(3);`
package/docs/api/tools.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Utility functions (imported from threedog)
2
2
 
3
3
  - `PICTURE_SLOTS: Readonly<Record<PictureSlot, { readonly what: str…` — The picture slots: what each one is and which describe('picture').picture.writers names it covers (a name ending in '.' covers everything under it)
4
- - `presets: { weather, calendar, player, interactions, bindings, camera }` — Opt-in gameplay presets: named option objects a game picks on purpose (the engine never applies one itself). Each only bundles options the game could write; spread and override: weather({ ...presets.weather.temperate, autoPool: ['clear', 'rain'] })
4
+ - `presets: { weather, calendar, player, interactions, bindings, camera, … }` — Opt-in gameplay presets: named option objects a game picks on purpose (the engine never applies one itself). Each only bundles options the game could write; spread and override: weather({ ...presets.weather.temperate, autoPool: ['clear', 'rain'] })
5
5
  - `world(opts?: { cellSize?, radius?, farEvery?, farMaxPerTick?, buildPerFrame? }) → import("../../../core").ModuleDef…` — World data module: installed as engine.world. Put things here that must be saved, survive level changes and keep changing while far away; models are only built while nearby
6
6
  - `net(opts?: { role, transport, sync?, syncEvery?, keepAlive?, rate?, … }) → import("../../../core").ModuleDef…` — (experimental) Optional co-op multiplayer: one host owns the state, clients mirror it and ask for changes through ops. Installed as engine.net. Host: peers' requests run as `ops.run(name, args, { source: 'net', actor })` only for ops defined with net: 'peer', with the op's args shape checked, the optional owner check, and a per-peer rate limit; the result comes back after the state diff that contains it. State: world records, containers, vars and the other save parts are sent as a snapshot on join and as diffs every syncEvery steps. Client: ops.run of a peer op returns { ok: true, pending: true, seq } (watch state or the net:result event, not the return value); its own avatar moves locally and is sent to the host (clamped to maxSpeed); other avatars glide between updates.
7
7
  - `fakeNetwork(opts?: { latency?, jitter?, loss?, seed?, manual? }) → { host, connect, advance, now, loss, latency, … }` — (experimental) An in-process network for tests and offline demos: one host and any number of clients in the same page, with optional latency, jitter and loss. Messages are deep-copied on send (no shared objects, like a real wire). Order per link is kept, as on a WebSocket. manual: true delivers only when you call advance(ms) (deterministic tests); otherwise messages land after real time. connect({ heartbeat }) turns on the ping / pong check for that client (off by default here so loss and jitter replay the same); a client's cut() kills its link silently in both directions, which only the heartbeat notices (then the client gets 'close' and the host 'leave').
@@ -22,6 +22,7 @@
22
22
  - `rampTexture(ramp: (number | import("../../common").…)[], soften?: number) → THREE.DataTexture` — The gradientMap of a toon material from `ramp` (grays or colors, dark to light) and `soften` (0 = hard bands, 1 = bands melt into each other). A gray number n is the light's strength in that band. three's toon reads only the red channel of this texture on both renderers; color entries tint the band under `celLighting` of threedog/tsl (WebGPU route).
23
23
  - `bakeVertexAO(geometry: THREE.BufferGeometry, { samples, radius, strength, bias, occluders, seed }?: { samples?, radius?, strength?, bias?, occluders?, seed? }) → THREE.BufferGeometry` — Bake ambient occlusion into a geometry's vertex colors: each vertex casts `samples` rays over the hemisphere around its normal, and the share that hits the geometry (or an occluder) within `radius` darkens it. Creases, insides and parts tucked under other parts go dark; open sides stay as they were. The result multiplies the existing `color` attribute (white is added when there is none), so it works on `mergeColored` output and on any geometry drawn with `vertexColors: true`. Deterministic for a seed, so cached and baked models stay identical. Cost is vertices x samples ray casts (a 5k-vertex model at 32 samples is ~160k casts); run it inside a model generator, where it is cached. Resolution is per vertex: a large flat face with four corners gets no contact shadow in its middle (subdivide it, or bake a texture in Blender).
24
24
  - `materialPatches(material: THREE.Material) → string[]` — (experimental) Names of the patches on a material (in order), e.g. ['clouds', 'tint', 'wind']
25
+ - `cloneMaterial(from: M) → M` — Clone a material keeping engine shader patches and instance hooks (`material.clone()` drops them).
25
26
  - `toast(engine: Engine, text: string, { kind, ms }?: { kind?: string; ms?: number })` — Show a short message through the 'toast' UI part (default: top of the screen, gone after ms). A game restyles it, filters it by kind or turns it off with createEngine({ ui: { toast: false } }). kind says where it came from: 'info' (default), 'quest', 'item', 'save', 'error'.
26
27
  - `makeWindow(engine: Engine, opts: WindowOptions) → UIWindow` — A toggleable window
27
28
  - `worldToScreen(engine: Engine, pos: PositionLike) → ScreenPoint` — World coordinates (position or object) -> pixels from the canvas's top-left corner { x, y, onScreen, behind } (the UI root covers the canvas, so these place UI elements directly)
@@ -76,6 +77,7 @@
76
77
  - `celLighting() → import('three/webgpu').LightingMo…` — (experimental) The lighting model for cel bands with colored ramps: assign it to a MeshToonNodeMaterial, whose gradientMap holds the ramp (rampTexture). A shadowed pixel reads the dark end of the ramp, so a cast shadow takes the same flat band and color as the side turned away. Without a gradientMap: two levels, as three's toon.
77
78
  - `pcss(o?: { lightSize?, samples?, maxDistance? }) → any` — (experimental) A shadow filter for a DirectionalLight whose edge softens with the distance from caster to receiver (PCSS). The game assigns it before the first frame; it reaches the engine's cascades too. lightSize: edge width per world unit of that distance; samples: filter taps; maxDistance: where the edge stops growing. A spot or point light throws by name.
78
79
  - `waterWave(p: Node, t: Node | number) → Node` — (experimental) GLSL float threedogWaterWave(vec3 p, float t): the built-in wave sum (height before waveHeight). p = world position * waveScale, t = time * waveSpeed.
80
+ - `waterRipple(xz: Node, count: Node | number, slots: Node[]) → Node` — (experimental) Concentric expanding wave-packet sum over the water ripple slots (0 when count <= 0.5)
79
81
  - `waterSurface(spec?: { depth?, foam?, waveMax? }) → (base, wave, facing, worldPos, time) => Node` — (experimental) The built-in water surface as TSL: returns a function with the GLSL signature threedogWaterSurface(base, wave, facing, worldPos, time) -> vec4 (rgb, opacity). Only the parts given exist (depth: shallow / deep by viewing angle or wave height; foam on crests); values are numbers / colors or nodes. wave is waterWave's height, facing = 1 looking straight down.
80
82
  - `waterFresnel(color: Node, normal: Node, viewDir: Node, strength: Node | number, towards: Node) → Node` — (experimental) The water's fresnel blend: color mixed toward `towards` (the engine uses the fog color) by pow(1 - /viewDir . normal/, 3) * strength, view space
81
83
  - `lightShaft(engine: { renderer, uniforms, tier }, opts?: LightShaftOptions) → LightShaft` — (experimental) A cheap visible light beam (ceiling hole, window, stage light): an additive open cone, top at the mesh origin pointing down -Y, sides softened by view angle, faded where it meets geometry and near the camera, dimmed (not tinted) by scene fog. Occluders do not cut it (for that: sunShafts / lightVolumes). WebGPURenderer only (both backends); WebGLRenderer throws by name. Add / move / remove it like any mesh; engine.remove frees it.
package/docs/api/water.md CHANGED
@@ -8,8 +8,10 @@ Water surface (water() module)
8
8
  - `flat?: boolean` Flat shading (low poly), default true
9
9
  - `size?: number` Edge length of the global water plane (meters), default 900
10
10
  - `segments?: number` Mesh subdivision of the global water, default 150
11
+ - `ripples?: boolean` Automatic wading wakes and raindrop rings, default true
11
12
 
12
13
  ## Methods and properties
14
+ - `water.ripple(position: PositionLike, opts?: { strength?, speed?, duration? })` — Spawn an expanding concentric ripple ring at `position` (`[x, y, z]`, `{ x, z }`, `Vector3` or `Object3D`), visible on both the global sea and water bodies. Example: `engine.water.ripple(engine.player.position, { strength: 1.2, duration: 2.5 });`
13
15
  - `water.shader(opts?: WaterShaderOptions)` — Which GLSL the water has. Keys left out keep what an earlier call gave; null takes one back to the built-in. Refreshes engine.water.patches and engine.water.uniforms and patches the engine's own material again (one recompile). A game's material is the game's to patch again. uWave, uWaveScale, uWaveSpeed and uFresnel stay the same objects. Example: `engine.water.shader({ depthColor: { shallow: 0x55ddcc, deep: 0x082040 }, foam: true }); engine.water.shader({ uniforms: { uBands: 4 }, surface: `vec4 threedogWaterSurface(vec4 base, float wave, float facing, vec3 worldPos, float time) { return vec4(base.rgb * floor(facing * uBands) / uBands, base.a); }` });`
14
16
  - `water.normalMap(name: string | null, opts?: { scale?, repeat?, speed? }) → THREE.Texture | null` — Normal map by asset name (null = none): a flat-normal placeholder until the asset loads, then it takes the asset's image source (shared, not copied; goes through asset management, so it can be preloaded and released). Goes on the engine's own material; a game's material takes the returned texture (also engine.water.normalTexture). The tiling and the scroll apply whatever material draws. Keys left out keep their value (defaults scale 0.4, repeat 0.05, speed [0.01, 0.006]). Example: `engine.water.normalMap('water-n', { scale: 0.6, repeat: 0.1, speed: [0.02, 0.01] });`
15
17
  - Properties:
@@ -18,6 +20,7 @@ Water surface (water() module)
18
20
  - `uniforms: Record<string, { value: any }>` Shader values, written directly and live: uWave, uWaveScale, uWaveSpeed, uFresnel, uTime; with depthColor / foam uWaterShallow, uWaterDeep, uWaterCurve, uFoamColor, uFoamStart, uFoamEnd, uFoamOpacity; and what shader({ uniforms }) declared
19
21
  - `bodies: Map<WaterBody, THREE.Mesh>` Water body → mesh
20
22
  - `sea: THREE.Mesh | null` (experimental) Global water mesh (null when absent)
23
+ - `activeRipples: number` Number of currently expanding ripple rings (0..8)
21
24
  - `material: THREE.Material` Water material, shared by all water. Reading gives the plain three.js material in use (a neutral MeshLambertMaterial until you set one); setting swaps it on every water mesh and draws it as given: no engine patch is added, so a material that should keep the waves goes through applyEffects(m, { patches: engine.water.patches })
22
25
 
23
26
  ## Data structures
@@ -3,7 +3,7 @@
3
3
  > **Covers:** the game's own materials, lights and models in plain three.js, which material kind looks how.
4
4
  > **Use when:** giving things their look.
5
5
  > **Shortest:** `new THREE.MeshStandardMaterial({ color, roughness })` in `picture/materials.js`.
6
- > **Sections:** 0 Where the picture · 1 Materials are plain · 1a The engine's big · 1b Lights and stalls · 1c The UI's picture · 2 Using your own · 2b Wind, cloud shadows · 3 When the engine · 4 Verify
6
+ > **Sections:** 0 Where the picture · 1 Materials are plain · 1a The engine's big · 1b Lights and stalls · 1c The UI's picture · Surface decals · 2 Using your own · 2b Wind, cloud shadows · 3 When the engine · 4 Verify
7
7
 
8
8
  ```js
9
9
  // picture/materials.js: the game's materials are its own three.js objects
@@ -128,6 +128,20 @@ lights) can copy the optional 2D radiance cascades example instead: `examples/rc
128
128
  `createEngine({ ui: { theme, css, fonts, templates } })`: `theme` sets the colors and the `font` of the default parts (they are CSS variables), `css` adds your own
129
129
  rules, `fonts` lists font asset names to load at start (the files sit in an asset pack: recipe 05 §3b), `templates` replace a whole UI piece. Parts and their keys: recipe 26.
130
130
 
131
+ ## Surface decals
132
+ Marks projected onto walls, stairs, moving crates or uneven terrain (bullet holes, footprints, scorch marks, AoE rings): install `decals()`, define a kind once, and pass a raycast hit or a position to `engine.decals.add`.
133
+ ```js fragment
134
+ import { decals, presets } from 'threedog';
135
+ engine.use(decals({ max: 128 }));
136
+ engine.decals.define('scorch', { ...presets.decals.marks, size: 1.2, color: 0x222222 });
137
+ const hit = engine.pick(0, 0);
138
+ if (hit) engine.decals.add(hit, { kind: 'scorch', roll: engine.random.next() * Math.PI * 2 });
139
+ const ring = engine.decals.add([12, 0, -6], { ...presets.decals.indicator, size: 3.5, color: 0xffaa44 });
140
+ ring.remove();
141
+ ```
142
+ - Over a mesh (`hit.object`, `target`, or a registered static mesh found along `-normal`), `DecalGeometry` clips to the surface and parents to moving targets; over procedural terrain it conforms a grid patch to `engine.surface(x, z)` with `polygonOffset`.
143
+ - Pool caps (`max` on `decals()` and per `define`) evict the oldest decal automatically; `lifetime` and `fade` fade opacity out before removal (`engine.decals.remove(kind)` clears live ones).
144
+
131
145
  ## 2. Using your own models instead of procedural ones
132
146
  Models are assets: content names them, an asset pack maps the names to files or generators. Register a later manifest with the same
133
147
  name to swap one:
@@ -1,9 +1,9 @@
1
1
  # Animation state machine (skeletal animation)
2
2
 
3
- > **Covers:** skeletal animation: clips mapped to game actions, skinned and sprite characters, objects that animate, look-at and foot IK.
3
+ > **Covers:** skeletal animation: clips mapped to game actions, 8-way 2D blend spaces, upper/lower bone-mask layers, IK (aim, slope feet, limb) and root motion.
4
4
  > **Use when:** a model should move its body.
5
5
  > **Shortest:** `engine.assets.animate(model, config)`.
6
- > **Sections:** 1 The model · 2 Mapping game action · 3 A character with · 3b Procedural bodies are · 3c Sprite characters a · 3d Which modules need · 3e IK heads that · 4 Non-character objects a · 5 Gameplay controls progress · 6 Verify
6
+ > **Sections:** 1 The model · 2 Mapping game action · 3 A character with · 3b Procedural bodies · 3c Sprite characters · 3d Which modules need · 3e IK · 3f Root motion · 3g Bone-mask layers · 4 Non-character objects · 5 Gameplay controls progress · 6 Verify
7
7
 
8
8
  There is a single entry point: `engine.assets.animate(model, config)` -> Animator (advanced every frame by the engine; never call mixer.update yourself).
9
9
  For characters (player, NPCs), passing `model` builds the Animator automatically and switches clips by character state (idle walk run swim jump fall drive).
@@ -73,6 +73,15 @@ engine.characters.addPlayer({ ...presets.player.thirdPerson, model: hero, animat
73
73
  jump: { clip: 'Jump', loop: false },
74
74
  } } });
75
75
  ```
76
+ For **8-directional strafing** (`presets.player.lockOn` or `presets.player.aim`), use `blend2d` (`Character` updates `moveX` and `moveZ` in local space automatically, or spread `presets.animation.eightWay`):
77
+ ```js fragment
78
+ move: { params: ['moveX', 'moveZ'], sync: true, blend2d: [
79
+ { clip: 'Idle', at: [0, 0] }, { clip: 'Walk_F', at: [0, 1] }, { clip: 'Walk_B', at: [0, -1] },
80
+ { clip: 'Walk_L', at: [-1, 0] }, { clip: 'Walk_R', at: [1, 0] },
81
+ { clip: 'Walk_FL', at: [-0.707, 0.707] }, { clip: 'Walk_FR', at: [0.707, 0.707] },
82
+ { clip: 'Walk_BL', at: [-0.707, -0.707] }, { clip: 'Walk_BR', at: [0.707, -0.707] },
83
+ ] }
84
+ ```
76
85
  The default transition time for every character is `characters({ animation: { fade: 0.15 } })`; a model's manifest mapping and the character's own
77
86
  `animation` win over it.
78
87
 
@@ -152,16 +161,48 @@ Tried with a `pixelSprite` mesh and a `Character` whose `model` is one (`threedo
152
161
  | `makeWindow(engine, opts)` | no object | created a window object (`open`, `toggle`, `remove`) |
153
162
  Needs an engine character: `addPlayer`, `walkTo`, `onPose`, schedules, characters' collision and ground. Everything else above takes a position or any `THREE.Object3D`. A sprite that only stands there (a signpost, an NPC that never walks) needs no `Character`; one that walks, follows ground or is scheduled does.
154
163
 
155
- ## 3e. IK: heads that look, feet on the ground
156
- Two layers after the clips on any Animator, off until added:
164
+ ## 3e. IK: heads that look, feet on the ground and slopes, hands that reach
165
+ Three layers after the clips (and after `addLayer`) on any Animator, off until added:
166
+ ```js fragment
167
+ const look = npc.anim.addAim({ bones: ['Spine', 'Neck', 'Head'], weights: [0.2, 0.3, 0.5], target: engine.player.root, limit: 70 });
168
+ const feet = engine.player.anim.addFeet({ alignSlope: true, maxTilt: 35, footOffset: 0 }); // feet on stairs and slopes
169
+ const grip = engine.player.anim.addLimb({ limb: 'leftArm', target: weaponForegrip, alignRotation: true });
170
+ ```
171
+ - `set({ weight })` fades over `fade` s; weight 0 leaves the animation pose exactly, `remove()` restores it at once; `target: null` fades out.
172
+ - `addAim`: `weights` splits the turn across spine/neck/head; `forward: [x, y, z]` overrides bind-pose forward.
173
+ - `addFeet`: tilts ankles onto sloped terrain within `maxTilt` degrees while rejecting stair drop-offs; `legs: [[upper, lower, foot], ...]` names custom rigs.
174
+ - `addLimb`: `limb: 'leftArm' | 'rightArm' | 'leftLeg' | 'rightLeg'` or `bones: [upper, mid, end]`, optional `pole` and `alignRotation` (`true` matches target `Object3D` rotation).
175
+
176
+ ## 3f. Root motion (`rootMotion`, `rootDelta`)
177
+ For rolls, lunges or swings whose distance comes from the clip, set `rootMotion: true` (or a bone name / `{ bone, y: true }`) on a state or `AnimatorOptions`: the root/hips bone's horizontal offset is pinned to bind pose each frame, and `anim.rootDelta(state, fromT, toT, opts?)` analytically integrates keyframe displacement in fixed steps (deterministic even with `render: false`).
157
178
  ```js fragment
158
- const look = npc.anim.addAim({ bones: ['Neck', 'Head'], target: engine.player.root, limit: 70 });
159
- const feet = engine.player.anim.addFeet(); // feet on stairs and slopes
179
+ Object.assign(engine.player.anim.states, { roll: { clip: 'Roll', loop: false, timing: 0.6, rootMotion: true } });
180
+ let t = 0;
181
+ const hold = engine.control.take(engine.player, {
182
+ owner: 'roll', layer: 'script',
183
+ step(dt, ch) {
184
+ const prev = t; t += dt;
185
+ ch.anim.sync('roll', t);
186
+ const d = ch.anim.rootDelta('roll', prev, t, { yaw: ch.facing });
187
+ if (t >= 0.6) { ch.anim.sync(null); hold.remove(); }
188
+ return { dx: d.x, dz: d.z };
189
+ },
190
+ });
191
+ ```
192
+ Options: `{ local: true }` for bone-local delta, `{ out }` to reuse a `{ x, y, z }`. Returning `{ dx, dz, dy? }` from `control.take` `step` moves through collision and ground alignment while skipping `walkSpeed` clamping and auto-facing.
193
+
194
+ ## 3g. Bone-mask layers (`anim.addLayer`)
195
+ Play upper-body attacks, aiming, reload or wave clips while the legs continue running or strafing without diluting lower-body stride:
196
+ ```js fragment
197
+ const upper = engine.player.anim.addLayer({
198
+ ...presets.animation.upperBody, // mask: 'upper', fade: 0.15
199
+ states: { aim: { clip: 'Rifle_Aim' }, slash: { clip: 'Sword_Slash', loop: false, timing: 0.55 } },
200
+ });
201
+ upper.go('aim'); // loop on upper body; upper.go(null) crossfades back to base locomotion
202
+ upper.action('slash'); // one-shot on upper body (or upper.sync('slash', t) from onFixed)
203
+ upper.remove(); // restores unmasked pose cleanly
160
204
  ```
161
- - `set({ weight })` fades over `fade` s; weight 0 leaves the animation pose exactly, `remove()` restores it at once; `target: null` looks ahead.
162
- - `forward: [x, y, z]` (the last bone's axes): a head facing another axis than the bind pose says.
163
- - `legs: [[upper, lower, foot], ...]` when it cannot tell the legs by bone name (it throws, listing them).
164
- - Feet use the character's ground, platforms included (`ground: (x, z, y) => h` overrides); off while it jumps or swims, beyond `far`, or hidden.
205
+ `mask` accepts `'upper'`, `'lower'`, a bone name / array of names (includes their subtree by default), or `{ include, exclude, subtree }`. Layers run after base locomotion and before IK, so `addAim` / `addLimb` compose on top of the masked pose.
165
206
 
166
207
  ## 4. Non-character objects (a dog, a windmill, a door)
167
208
  ```js
@@ -83,7 +83,7 @@ The same steps as a file: `tests/scenarios/<name>.json` with `{ "press": … }`,
83
83
 
84
84
  Playing a game through from a script, the four things that cost the most time:
85
85
  - **Advance time yourself.** On a headless page the clock moves only on `step`, `press` and `hold`, so `await player.walkTo(spot)` never returns. Start it,
86
- step, then await: `const w = engine.player.walkTo(spot); step(5); return await w`. A `js` script whose page clock stands still for 20 s ends with that reason.
86
+ step, then await: `const w = engine.player.walkTo(spot); step(5); return await w`. A `js` script whose page clock stands still for 120 s ends with that reason.
87
87
  - **Continue finishes after `press` returns.** The load is async, so the first lines of `press` on a title still say `windows open title`; the `Changed:` line and the next command show it closed. A load that waits on frames needs a `step` on a halted page.
88
88
  - **Read why it was refused.** `interaction.use` fails with `inputLocked` and `facts: { by }` (`title`, `dialogue`, `settings`...), `tooFar` with the distance.
89
89
  - **Press real keys when input is the question** (title menu, a hold); rules go through `op` and `state`. Neither shows how the game feels or sounds, and a headless picture is software WebGL2 where no hardware GPU is reachable (the `shot` / `snap` line says): report those as not verified.
@@ -1,9 +1,9 @@
1
1
  # Sound: buses, sounds by name, ambience rules, music, footsteps, ducking
2
2
 
3
- > **Covers:** sound: buses, sounds by name, ambience rules, music, footsteps, ducking, settings, reverb.
3
+ > **Covers:** sound: buses, sounds by name, ambience rules, music, footsteps, ducking, settings, reverb, low-pass filter and acoustic zones.
4
4
  > **Use when:** anything the player hears.
5
5
  > **Shortest:** `createEngine({ audio: { levels: { music: 0.4 } } })`, then sounds by name.
6
- > **Sections:** 1 Config in one · 2 Buses and sounds · 3 Ambience sounds by place · 4 Music rules, cross-fade · 5 Footsteps by surface · 6 Ducking · 7 Settings · 8 Sounds as content · 9 Reverb
6
+ > **Sections:** 1 Config in one · 2 Buses and sounds · 3 Ambience sounds by place · 4 Music rules, cross-fade · 5 Footsteps by surface · 6 Ducking · 7 Settings · 8 Sounds as content · 9 Reverb and acoustic zones
7
7
 
8
8
  Everything you hear is the game's. The engine ships no sound files and plays nothing the game did not name; built-in synths (`footstep`, `shutter`,
9
9
  `thunder`, `wind`, `rain`, `water`, `birds`, `crickets`) stay silent until `audio.sounds` asks for them. Signatures: `api/audio.md`,
@@ -154,14 +154,20 @@ engine.content.load([base, forest]); // each pack's audio merges in
154
154
  Loading a named pack again replaces its rules (hot reload).
155
155
  - `levels` (bus volumes) stay in `createEngine({ audio })`: they are settings, not content.
156
156
 
157
- ## 9. Reverb (echo of a cave or a hall)
158
- One reverb send/return on the buses, off until asked:
157
+ ## 9. Reverb, low-pass filter and acoustic zones
158
+ One reverb send/return on the buses, off until asked (`decay` s to -60 dB, `size` 0-1, `wet` 0-1; `null` turns off; `size`/`decay` rebuild the impulse, `wet`/`sends` fade):
159
159
  ```js
160
- engine.audio.reverb({ sends: { sfx: 0.5, ambience: 0.8 }, decay: 3, size: 0.8, wet: 0.4 }); // which buses echo and how much; the room
161
- engine.audio.reverb({ wet: 0.1, fade: 1 }); // later calls change only what they name; null turns it off
160
+ engine.audio.reverb({ sends: { sfx: 0.5, ambience: 0.8 }, decay: 3, size: 0.8, wet: 0.4 });
161
+ engine.audio.reverb({ wet: 0.1, fade: 1 });
162
162
  ```
163
- `decay` is the seconds to fall 60 dB, `size` (0-1) the pre-gap and build-up, `wet` how much comes back (api/audio.md). Size or decay rebuilds the impulse; wet and sends only fade. Cost: one convolution for any number of sounds. A place can set wet with an ambience rule (same `when`; content packs too):
163
+ **Low-pass filter (`audio.filter`)** muffles buses (`80..20000` Hz across `sfx`/`ambience`/`music`, or `{ bus: Hz }`; lowest active cutoff per bus wins; `remove()` restores `20000` Hz):
164
164
  ```js fragment
165
- { reverb: 0.7, when: { zone: 'cave' }, fade: 2 }, // in audio.ambience; the highest holding rule wins, none gives the game's wet back
165
+ const underwater = engine.audio.filter(600, { fade: 0.4 });
166
+ underwater.set({ sfx: 450, music: 900 }, 0.3);
167
+ underwater.remove();
168
+ ```
169
+ **Acoustic zones** set `reverb` and/or `filter` in data-only ambience rules (no `sound`/`volume`/`every`/`bus`); `engine.audio.info` exposes `reverb` (`place`) and `filters`:
170
+ ```js fragment
171
+ { when: { zone: 'cave' }, reverb: 0.7, filter: 1200, fade: 1.5 },
172
+ { when: { zone: 'underwater' }, filter: { sfx: 500, ambience: 400 }, fade: 0.5 },
166
173
  ```
167
- `engine.audio.info.reverb` shows the targets (`place` while a rule holds). A reverb rule plays no sound (no sound / volume / every / bus on it).
@@ -3,7 +3,7 @@
3
3
  > **Covers:** lights, fog, exposure, environment maps, probes, lightmaps, light you can see in the air (light beams, shafts).
4
4
  > **Use when:** lighting a scene or making its light change.
5
5
  > **Shortest:** your own `THREE.DirectionalLight` added in `picture/`.
6
- > **Sections:** Lights the placeholders, and · A light the player carries · Fog plain three.js, signals · Exposure and the tone · Environment maps · Light probes baked indirect · Lightmaps baked light on · Real-time bounced light WebGPU · Reflections · Light you can see · Soft shadows, area lights · Occlusion culling
6
+ > **Sections:** Lights the placeholders, and · A light the player carries · Fog plain three.js, signals · Exposure and the tone · Environment maps · Light probes baked indirect · Lightmaps baked light on · Real-time bounced light WebGPU · Reflections · Reflection probes local indoor · Light you can see · Soft shadows, area lights · Occlusion culling
7
7
 
8
8
  Lights, fog and exposure are your own three.js code ([recipe 62](62-picture-code.md)): the sky computes signals and draws its dome, it writes none of them. The sky itself is `08-weather-sky.md`.
9
9
 
@@ -173,6 +173,16 @@ shine.set({ intensity: 0.8 }); // in place
173
173
  - Known limits: where a ray hits, the environment's specular stays and the reflection adds on top (indoors lower the mirror's `envMapIntensity`, under open sky `intensity`, until a dark thing on it reads dark). Added after fog, a far wet road shows through thick fog: lower `intensity` or `maxDistance`.
174
174
  - Cost: a screen-filling mirror at 1080p on an integrated GPU: +2.9 ms at the default `resolutionScale: 0.5`, +12.5 at 1 (sharp). It grows with pixels (pixel ratio too), `maxDistance` and `quality`.
175
175
 
176
+ ## Reflection probes (local indoor reflections)
177
+
178
+ `scene.environment` reflects one global sky everywhere, so metal inside a cave or room reflects outdoor clouds. `engine.addReflectionProbe` captures a local prefiltered PMREM map from `position` (default: center of `bounds`) on both WebGL and WebGPU, assigning it to reflective static meshes inside `bounds` (smallest enclosing volume wins when nested):
179
+ ```js fragment
180
+ const caveProbe = engine.addReflectionProbe({ bounds: { min: [-12, 0, -12], max: [12, 6, 12] }, include: o => !o.userData.moving });
181
+ const trackPlayer = caveProbe.addTarget(engine.player.root); // switches envMap automatically when walking indoors/outdoors
182
+ // caveProbe.bake(); // re-capture if doors open or lights change; caveProbe.remove() restores materials
183
+ ```
184
+ - Zero per-frame render cost; inspect with `describe().render.reflectionProbes` and `engine.debug.view('reflectionProbes')`.
185
+
176
186
  ## Light you can see in the air: a beam of daylight through a hole or window, sun shafts, lamp cones
177
187
 
178
188
  Pick by cost and by what must cut the light. All three need WebGPURenderer; a game on `WebGLRenderer` keeps the depth haze of recipe 59.
@@ -23,6 +23,7 @@ uniform, a GLSL function you replace, or your own material.
23
23
  `engine.water.material` is shared by every water mesh and is a `MeshLambertMaterial` by default: color, opacity and anything else three.js has on it are
24
24
  plain writes. Lambert has no highlight; for `shininess` / `specular` set your own Phong material (below). `engine.water.uniforms` are `{ value }` objects:
25
25
  `uWave` multiplies the wave function (0 = flat), `uWaveScale` scales the world position fed to it, `uWaveSpeed` the time; all three default to 1. `uFresnel` (default 0.5, 0 = off) blends grazing angles toward the fog color, or the sky's horizon with no fog.
26
+ - **Interactive ripples**: `engine.water.ripple(position, { strength: 1, speed: 2.6, duration: 2.2 })` spawns an expanding concentric ring packet across the sea and water bodies (both renderers, 8 pooled slots). While `water({ ripples: true })` (default) is on, wading characters and rain (`uRain`) emit wakes automatically.
26
27
 
27
28
  ## Water: depth color and crest foam
28
29
  ```js fragment
@@ -0,0 +1 @@
1
+ {"version":1,"files":{"content/actions.js":{"kind":"actions","mtime":1793675685311.2039,"size":481,"from":0,"count":4,"indexIds":0,"positional":[]},"content/audio.js":{"kind":"audio","mtime":1793581180973.159,"size":430,"from":0,"count":1,"indexIds":0,"positional":[]},"content/items.js":{"kind":"items","mtime":1793474023931.3142,"size":204,"from":0,"count":1,"indexIds":0,"positional":[]},"content/places.js":{"kind":"places","mtime":1793836055871.274,"size":209,"from":0,"count":1,"indexIds":0,"positional":[]},"content/props.js":{"kind":"props","mtime":1793836055874.2656,"size":707,"from":0,"count":8,"indexIds":0,"positional":[]},"content/templates.js":{"kind":"templates","mtime":1793474023936.313,"size":835,"from":0,"count":4,"indexIds":0,"positional":[]},"content/views.js":{"kind":"views","mtime":1793520971375.8142,"size":539,"from":0,"count":2,"indexIds":0,"positional":[]}},"ids":{"attack":[{"file":"content/actions.js","kind":"actions","line":4,"placed":false}],"retry":[{"file":"content/actions.js","kind":"actions","line":5,"placed":false}],"save":[{"file":"content/actions.js","kind":"actions","line":6,"placed":false}],"load":[{"file":"content/actions.js","kind":"actions","line":7,"placed":false}],"sounds":[{"file":"content/audio.js","kind":"audio","line":4,"placed":false}],"gem":[{"file":"content/items.js","kind":"items","line":3,"placed":false}],"room":[{"file":"content/places.js","kind":"places","line":3,"placed":false}],"floor":[{"file":"content/props.js","kind":"props","line":3,"placed":true},{"file":"content/templates.js","kind":"templates","line":4,"placed":false}],"wall-n":[{"file":"content/props.js","kind":"props","line":4,"placed":true}],"wall-s":[{"file":"content/props.js","kind":"props","line":5,"placed":true}],"wall-w":[{"file":"content/props.js","kind":"props","line":6,"placed":true}],"wall-e":[{"file":"content/props.js","kind":"props","line":7,"placed":true}],"pillar-1":[{"file":"content/props.js","kind":"props","line":8,"placed":true}],"pillar-2":[{"file":"content/props.js","kind":"props","line":9,"placed":true}],"slime-1":[{"file":"content/props.js","kind":"props","line":10,"placed":true}],"wall":[{"file":"content/templates.js","kind":"templates","line":5,"placed":false}],"pillar":[{"file":"content/templates.js","kind":"templates","line":6,"placed":false}],"slime":[{"file":"content/templates.js","kind":"templates","line":9,"placed":false}],"corner":[{"file":"content/views.js","kind":"views","line":4,"placed":false}],"door":[{"file":"content/views.js","kind":"views","line":5,"placed":false}]}}
@@ -0,0 +1 @@
1
+ {"version":1,"files":{"content/props.js":{"kind":"props","mtime":1793863414351.9172,"size":1370,"from":0,"count":15,"indexIds":0,"positional":[]},"content/templates.js":{"kind":"templates","mtime":1793863414352.9143,"size":232,"from":0,"count":2,"indexIds":0,"positional":[]},"content/vegetation.js":{"kind":"vegetation","mtime":1793863414355.423,"size":522,"from":0,"count":1,"indexIds":0,"positional":[]}},"ids":{"tree-1":[{"file":"content/props.js","kind":"props","line":4,"placed":true}],"tree-2":[{"file":"content/props.js","kind":"props","line":5,"placed":true}],"tree-3":[{"file":"content/props.js","kind":"props","line":6,"placed":true}],"tree-4":[{"file":"content/props.js","kind":"props","line":7,"placed":true}],"tree-5":[{"file":"content/props.js","kind":"props","line":8,"placed":true}],"tree-6":[{"file":"content/props.js","kind":"props","line":9,"placed":true}],"tree-7":[{"file":"content/props.js","kind":"props","line":10,"placed":true}],"sheep-1":[{"file":"content/props.js","kind":"props","line":11,"placed":true}],"sheep-2":[{"file":"content/props.js","kind":"props","line":12,"placed":true}],"sheep-3":[{"file":"content/props.js","kind":"props","line":13,"placed":true}],"sheep-4":[{"file":"content/props.js","kind":"props","line":14,"placed":true}],"sheep-5":[{"file":"content/props.js","kind":"props","line":15,"placed":true}],"sheep-6":[{"file":"content/props.js","kind":"props","line":16,"placed":true}],"sheep-7":[{"file":"content/props.js","kind":"props","line":17,"placed":true}],"sheep-8":[{"file":"content/props.js","kind":"props","line":18,"placed":true}],"tree":[{"file":"content/templates.js","kind":"templates","line":3,"placed":false}],"sheep":[{"file":"content/templates.js","kind":"templates","line":4,"placed":false}],"wheat":[{"file":"content/vegetation.js","kind":"vegetation","line":6,"placed":false}]}}
@@ -0,0 +1 @@
1
+ {"version":1,"files":{},"ids":{}}
@@ -0,0 +1 @@
1
+ {"version":1,"files":{},"ids":{}}
@@ -0,0 +1 @@
1
+ {"version":1,"files":{"content/items.js":{"kind":"items","mtime":1793491078829.9421,"size":471,"from":0,"count":3,"indexIds":0,"positional":[]},"content/npcs.js":{"kind":"npcs","mtime":1793535264778.7915,"size":352,"from":0,"count":1,"indexIds":0,"positional":[]},"content/places.js":{"kind":"places","mtime":1793491078841.9878,"size":345,"from":0,"count":2,"indexIds":0,"positional":[]},"content/props.js":{"kind":"props","mtime":1793491078845.493,"size":1208,"from":0,"count":12,"indexIds":0,"positional":[]},"content/templates.js":{"kind":"templates","mtime":1793684405490.8225,"size":394,"from":0,"count":6,"indexIds":0,"positional":[]},"content/vegetation.js":{"kind":"vegetation","mtime":1793684405493.822,"size":1840,"from":0,"count":5,"indexIds":0,"positional":[]}},"ids":{"apple":[{"file":"content/items.js","kind":"items","line":3,"placed":false}],"key":[{"file":"content/items.js","kind":"items","line":4,"placed":false}],"wood":[{"file":"content/items.js","kind":"items","line":5,"placed":false},{"file":"content/props.js","kind":"props","line":10,"placed":true}],"guide":[{"file":"content/npcs.js","kind":"npcs","line":3,"placed":false}],"stage":[{"file":"content/places.js","kind":"places","line":3,"placed":false}],"water":[{"file":"content/places.js","kind":"places","line":4,"placed":false}],"pine":[{"file":"content/props.js","kind":"props","line":4,"placed":true}],"round-tree":[{"file":"content/props.js","kind":"props","line":5,"placed":true}],"rock":[{"file":"content/props.js","kind":"props","line":6,"placed":true}],"flower-a":[{"file":"content/props.js","kind":"props","line":7,"placed":true}],"flower-b":[{"file":"content/props.js","kind":"props","line":8,"placed":true}],"flower-c":[{"file":"content/props.js","kind":"props","line":9,"placed":true}],"stone":[{"file":"content/props.js","kind":"props","line":11,"placed":true}],"metal":[{"file":"content/props.js","kind":"props","line":12,"placed":true}],"glass":[{"file":"content/props.js","kind":"props","line":13,"placed":true}],"shadow-stage":[{"file":"content/props.js","kind":"props","line":14,"placed":true}],"room":[{"file":"content/props.js","kind":"props","line":15,"placed":true},{"file":"content/templates.js","kind":"templates","line":8,"placed":false}],"woodBlock":[{"file":"content/templates.js","kind":"templates","line":3,"placed":false}],"stoneBlock":[{"file":"content/templates.js","kind":"templates","line":4,"placed":false}],"metalBall":[{"file":"content/templates.js","kind":"templates","line":5,"placed":false}],"glassPanes":[{"file":"content/templates.js","kind":"templates","line":6,"placed":false}],"shadowStage":[{"file":"content/templates.js","kind":"templates","line":7,"placed":false}],"松树":[{"file":"content/vegetation.js","kind":"vegetation","line":4,"placed":false}],"圆树":[{"file":"content/vegetation.js","kind":"vegetation","line":10,"placed":false}],"石头":[{"file":"content/vegetation.js","kind":"vegetation","line":16,"placed":false}],"草":[{"file":"content/vegetation.js","kind":"vegetation","line":20,"placed":false}],"野花":[{"file":"content/vegetation.js","kind":"vegetation","line":25,"placed":false}]}}
@@ -52,7 +52,7 @@ const labels = document.getElementById('labels');
52
52
  if (labels) {
53
53
  const tags = columns.map(c => labels.appendChild(Object.assign(document.createElement('div'), { textContent: c.name })));
54
54
  engine.onFrame(() => columns.forEach((c, i) => {
55
- const v = new THREE.Vector3(c.x, 0, 2.6).project(engine.camera);
55
+ const v = new THREE.Vector3(c.x, 0, 2.6).project(engine.camera); // hint-off(hud): gallery column caption, no hud module
56
56
  tags[i].style.cssText = `position:fixed;left:${(v.x + 1) / 2 * innerWidth}px;top:${(1 - v.y) / 2 * innerHeight}px;transform:translateX(-50%)`;
57
57
  }));
58
58
  }
@@ -56,7 +56,7 @@ if (labels) {
56
56
  const items = [...walls.map(w => ({ name: w.name, at: [w.x, 2.9, -1.2] })), { name: 'one color', at: [-4, 0, 4] }, { name: 'per-instance jitter', at: [4, 0, 4] }];
57
57
  const tags = items.map(c => labels.appendChild(Object.assign(document.createElement('div'), { textContent: c.name })));
58
58
  engine.onFrame(() => items.forEach((c, i) => {
59
- const v = new THREE.Vector3(...c.at).project(engine.camera);
59
+ const v = new THREE.Vector3(...c.at).project(engine.camera); // hint-off(hud): gallery column caption, no hud module
60
60
  tags[i].style.cssText = `position:fixed;left:${(v.x + 1) / 2 * innerWidth}px;top:${(1 - v.y) / 2 * innerHeight}px;transform:translate(-50%,-100%)`;
61
61
  }));
62
62
  }
@@ -53,7 +53,7 @@ const labels = document.getElementById('labels');
53
53
  if (labels) {
54
54
  const tags = columns.map(c => labels.appendChild(Object.assign(document.createElement('div'), { textContent: c.name })));
55
55
  engine.onFrame(() => columns.forEach((c, i) => {
56
- const v = new THREE.Vector3(c.x, 0, 2.7).project(engine.camera);
56
+ const v = new THREE.Vector3(c.x, 0, 2.7).project(engine.camera); // hint-off(hud): gallery column caption, no hud module
57
57
  tags[i].style.cssText = `position:fixed;left:${(v.x + 1) / 2 * innerWidth}px;top:${(1 - v.y) / 2 * innerHeight}px;transform:translateX(-50%)`;
58
58
  }));
59
59
  }
@@ -0,0 +1 @@
1
+ {"version":1,"files":{},"ids":{}}
@@ -0,0 +1 @@
1
+ {"version":1,"files":{"content/actions.js":{"kind":"actions","mtime":1793427223918.3787,"size":458,"from":0,"count":4,"indexIds":0,"positional":[]},"content/audio.js":{"kind":"audio","mtime":1793791208382.4546,"size":2152,"from":0,"count":3,"indexIds":0,"positional":[]},"content/bodies.js":{"kind":"bodies","mtime":1793455621172.1804,"size":838,"from":0,"count":8,"indexIds":0,"positional":[]},"content/containers.js":{"kind":"containers","mtime":1793434037728.0505,"size":252,"from":0,"count":1,"indexIds":0,"positional":[]},"content/dialogues.js":{"kind":"dialogues","mtime":1793434037731.0527,"size":1861,"from":0,"count":1,"indexIds":0,"positional":[]},"content/items.js":{"kind":"items","mtime":1793791208385.4556,"size":589,"from":0,"count":4,"indexIds":0,"positional":[]},"content/npcs.js":{"kind":"npcs","mtime":1793592912848.488,"size":654,"from":0,"count":1,"indexIds":0,"positional":[]},"content/pickups.js":{"kind":"pickups","mtime":1793427223935.725,"size":699,"from":0,"count":8,"indexIds":8,"positional":[0,1,2,3,4,5,6,7]},"content/places.js":{"kind":"places","mtime":1793455621177.1812,"size":498,"from":0,"count":3,"indexIds":0,"positional":[]},"content/props.js":{"kind":"props","mtime":1793791208388.4526,"size":1123,"from":0,"count":8,"indexIds":0,"positional":[]},"content/quests.js":{"kind":"quests","mtime":1793450935800.7036,"size":825,"from":0,"count":1,"indexIds":0,"positional":[]},"content/templates.js":{"kind":"templates","mtime":1793791208390.4536,"size":484,"from":0,"count":1,"indexIds":0,"positional":[]},"content/vegetation.js":{"kind":"vegetation","mtime":1793791208393.4578,"size":1967,"from":0,"count":5,"indexIds":0,"positional":[]}},"ids":{"save":[{"file":"content/actions.js","kind":"actions","line":4,"placed":false}],"load":[{"file":"content/actions.js","kind":"actions","line":5,"placed":false}],"kick":[{"file":"content/actions.js","kind":"actions","line":6,"placed":false}],"chop":[{"file":"content/actions.js","kind":"actions","line":7,"placed":false}],"sounds":[{"file":"content/audio.js","kind":"audio","line":7,"placed":false}],"ambience":[{"file":"content/audio.js","kind":"audio","line":14,"placed":false}],"footsteps":[{"file":"content/audio.js","kind":"audio","line":23,"placed":false}],"crate-0":[{"file":"content/bodies.js","kind":"bodies","line":4,"placed":false}],"crate-1":[{"file":"content/bodies.js","kind":"bodies","line":5,"placed":false}],"crate-2":[{"file":"content/bodies.js","kind":"bodies","line":6,"placed":false}],"crate-3":[{"file":"content/bodies.js","kind":"bodies","line":7,"placed":false}],"crate-4":[{"file":"content/bodies.js","kind":"bodies","line":8,"placed":false}],"crate-5":[{"file":"content/bodies.js","kind":"bodies","line":9,"placed":false}],"ball":[{"file":"content/bodies.js","kind":"bodies","line":10,"placed":false}],"barrel":[{"file":"content/bodies.js","kind":"bodies","line":11,"placed":false}],"fisher-basket":[{"file":"content/containers.js","kind":"containers","line":3,"placed":false}],"fisher":[{"file":"content/dialogues.js","kind":"dialogues","line":4,"placed":false},{"file":"content/npcs.js","kind":"npcs","line":3,"placed":false}],"film":[{"file":"content/items.js","kind":"items","line":3,"placed":false}],"berry":[{"file":"content/items.js","kind":"items","line":4,"placed":false}],"feather":[{"file":"content/items.js","kind":"items","line":5,"placed":false}],"wood":[{"file":"content/items.js","kind":"items","line":6,"placed":false}],"pickup:feather:0":[{"file":"content/pickups.js","kind":"pickups","line":3,"placed":true}],"pickup:berry:1":[{"file":"content/pickups.js","kind":"pickups","line":4,"placed":true}],"pickup:berry:2":[{"file":"content/pickups.js","kind":"pickups","line":5,"placed":true}],"pickup:feather:3":[{"file":"content/pickups.js","kind":"pickups","line":6,"placed":true}],"pickup:berry:4":[{"file":"content/pickups.js","kind":"pickups","line":7,"placed":true}],"pickup:berry:5":[{"file":"content/pickups.js","kind":"pickups","line":8,"placed":true}],"pickup:feather:6":[{"file":"content/pickups.js","kind":"pickups","line":9,"placed":true}],"pickup:berry:7":[{"file":"content/pickups.js","kind":"pickups","line":10,"placed":true}],"home":[{"file":"content/places.js","kind":"places","line":3,"placed":false}],"river":[{"file":"content/places.js","kind":"places","line":4,"placed":false}],"water":[{"file":"content/places.js","kind":"places","line":5,"placed":false}],"prop:pine:0":[{"file":"content/props.js","kind":"props","line":4,"placed":true}],"prop:pine:1":[{"file":"content/props.js","kind":"props","line":5,"placed":true}],"prop:roundTree:2":[{"file":"content/props.js","kind":"props","line":6,"placed":true}],"prop:rock:3":[{"file":"content/props.js","kind":"props","line":7,"placed":true}],"prop:rock:4":[{"file":"content/props.js","kind":"props","line":8,"placed":true}],"prop:flower:5":[{"file":"content/props.js","kind":"props","line":9,"placed":true}],"prop:flower:6":[{"file":"content/props.js","kind":"props","line":10,"placed":true}],"cabin":[{"file":"content/props.js","kind":"props","line":11,"placed":true},{"file":"content/templates.js","kind":"templates","line":4,"placed":false}],"first-light":[{"file":"content/quests.js","kind":"quests","line":4,"placed":false}],"松树":[{"file":"content/vegetation.js","kind":"vegetation","line":5,"placed":false}],"圆树":[{"file":"content/vegetation.js","kind":"vegetation","line":11,"placed":false}],"石头":[{"file":"content/vegetation.js","kind":"vegetation","line":17,"placed":false}],"草":[{"file":"content/vegetation.js","kind":"vegetation","line":21,"placed":false}],"野花":[{"file":"content/vegetation.js","kind":"vegetation","line":26,"placed":false}]}}
package/index.d.ts CHANGED
@@ -31,7 +31,7 @@ import type {
31
31
  import type {
32
32
  CharactersApi, CharactersOptions, Interactions, InteractionsOptions, Dialogue, DialogueOptions, Inventory, InventoryOptions, Pickups, PickupsOptions,
33
33
  Quests, QuestsOptions, Photo, PhotoOptions, Ambience, AmbienceOptions, DebugPanel, Level, LevelOptions, Triggers, TriggersOptions,
34
- Particles, Settings, SettingsOptions, SettingsTools, Music, MusicOptions,
34
+ Particles, Decals, DecalsOptions, DecalKindOptions, DecalAddOptions, DecalHandle, Settings, SettingsOptions, SettingsTools, Music, MusicOptions,
35
35
  Timeline, TimelineOptions, Character, NPC, UIWindow, WindowOptions,
36
36
  Content, Flow, FlowOptions, Hud, HudOptions, ScreenPoint, UIFocus, FocusHandle,
37
37
  } from './types/gameplay';
@@ -139,6 +139,8 @@ export const presets: {
139
139
  /** Key maps for the actions modules declare (no module option takes keys): engine.input.bind(map) or createEngine({ bindings: { ...map } }) */
140
140
  readonly bindings: { readonly [K in 'walk' | 'interact' | 'inventory' | 'quests' | 'photo' | 'gridRotate' | 'brake' | 'dialogNumbers' | 'rtsRotate' | 'cutsceneSkip' | 'debug']: Readonly<Record<string, readonly string[]>> };
141
141
  readonly camera: { readonly follow: import('./types/physics').FollowCameraOptions; readonly overShoulder: import('./types/physics').FollowCameraOptions; readonly thirdPersonAction: import('./types/physics').FollowCameraOptions };
142
+ readonly decals: { readonly marks: DecalKindOptions; readonly footprints: DecalKindOptions; readonly indicator: DecalKindOptions };
143
+ readonly animation: { readonly upperBody: import('./types/physics').MaskLayerOptions; readonly eightWay: import('./types/physics').AnimatorState };
142
144
  };
143
145
  // Migrated: water() is generated from the JSDoc in modules/water/Water.js
144
146
  export { water } from './types/generated/modules/water/Water';
@@ -189,6 +191,8 @@ export function level(opts?: LevelOptions): ModuleDef<Level>;
189
191
  export function triggers(opts?: TriggersOptions): ModuleDef<Triggers>;
190
192
  // Migrated: particles() is generated from the JSDoc in modules/particles/Particles.js
191
193
  export { particles } from './types/generated/modules/particles/Particles';
194
+ /** Conforming surface decals (bullet holes, footprints, ground rings, stains) -> engine.decals */
195
+ export function decals(opts?: DecalsOptions): ModuleDef<Decals>;
192
196
  // swarm() and the Swarm class are generated from the JSDoc in modules/swarm/Swarm.js
193
197
  export { swarm } from './types/generated/modules/swarm/Swarm';
194
198
  /** Settings menu -> engine.settings */
@@ -262,7 +266,7 @@ export function createTerrain(cfg?: Partial<TerrainConfig>): TerrainGen;
262
266
  export { terrainMaterial, mergeColored, applyEffects } from './types/generated/render/materials';
263
267
  export { rampTexture } from './types/generated/render/lighting';
264
268
  export { bakeVertexAO } from './types/generated/render/modeling';
265
- export { materialPatches } from './types/generated/render/patches';
269
+ export { materialPatches, cloneMaterial } from './types/generated/render/patches';
266
270
 
267
271
  // ---------- UI ----------
268
272
  // Migrated: declarations are generated from the JSDoc in packages/engine/ui/UI.js and Focus.js (npm run map), not written by hand here
package/index.js CHANGED
@@ -36,6 +36,7 @@ import { debug } from './modules/debug/DebugPanel.js';
36
36
  import { level } from './modules/level/index.js';
37
37
  import { triggers } from './modules/triggers/index.js';
38
38
  import { particles } from './modules/particles/Particles.js';
39
+ import { decals } from './modules/decals/index.js';
39
40
  import { swarm } from './modules/swarm/Swarm.js';
40
41
  import { settings } from './modules/settings/index.js';
41
42
  import { music } from './modules/music/index.js';
@@ -75,7 +76,7 @@ for (const c of [calendarContract, cameraContract, charactersContract, collision
75
76
  export { THREE, Engine };
76
77
  export { Animator } from './core/assets/Animator.js';
77
78
  export { terrain, vegetation, calendar, sky, weather, water, collision, rigid, followCamera, characters, interactions, dialogue, inventory, pickups, quests, photo, ambience, debug,
78
- level, triggers, particles, swarm, settings, music, firstPersonCamera, fixedCamera, rtsCamera, timeline, nav, hlod, lightPool, content, flow, hud, world, grids };
79
+ level, triggers, particles, decals, swarm, settings, music, firstPersonCamera, fixedCamera, rtsCamera, timeline, nav, hlod, lightPool, content, flow, hud, world, grids };
79
80
  export { net, fakeNetwork, webSocket } from './modules/net/index.js';
80
81
  export { screenToGround } from './core/scene/screenToGround.js';
81
82
  export { ease } from './core/base/easing.js';
@@ -91,7 +92,7 @@ export { presets } from './presets.js'; // opt-in gameplay presets (weather ta
91
92
  export { terrainMaterial, mergeColored, applyEffects } from './render/materials.js';
92
93
  export { rampTexture } from './render/lighting.js'; // a toon material's gradientMap from grays or colors (recipes/09)
93
94
  export { bakeVertexAO } from './render/modeling.js'; // procedural-modeling gaps three.js lacks (THREE.md lists what three already has)
94
- export { materialPatches } from './render/patches.js';
95
+ export { materialPatches, cloneMaterial } from './render/patches.js';
95
96
  export { toast, makeWindow, worldToScreen, fadeScreen, uiFocus, toggleOnKey } from './ui/UI.js';
96
97
  export { parseClock, formatClock, inRange } from './core/time/dayTime.js';
97
98
  export { pickTarget, switchTarget } from './core/scene/targeting.js';
package/llms.txt CHANGED
@@ -5,10 +5,10 @@
5
5
  ## Start a game (the one way, in an empty folder)
6
6
 
7
7
  ```sh
8
- npm install threedog@1 three@~0.187.0
9
- npm install -D @threedog/tools@1 # the threedog commands: init, shot, check, how, dev, play, test
8
+ npm install threedog three@~0.187.0
9
+ npm install -D @threedog/tools # the threedog commands: init, shot, check, how, dev, play, test
10
10
  npx playwright install chromium # once per machine: the headless browser behind shot, play and test
11
- npx threedog init # writes the game (main.js, picture/, content/) and its CLAUDE.md; never overwrites a file
11
+ npx threedog init # writes the game (main.js, picture/, content/) and AGENTS.md / CLAUDE.md; never overwrites a file
12
12
  npm install
13
13
  npx threedog play # runs the game and reports it (--stop ends it); npm run dev opens it for a person
14
14
  ```
@@ -28,7 +28,7 @@ engine.start();
28
28
 
29
29
  ## Read next
30
30
 
31
- 1. The game's CLAUDE.md (init writes it): what the engine already has, the loop, the checklist before calling it done.
31
+ 1. The game's AGENTS.md / CLAUDE.md (init writes both): what the engine already has, the loop, the checklist before calling it done.
32
32
  2. `npx threedog how "<task words>"` prints the recipe section for a task. Taking over a game: its STATUS.md first.
33
33
  3. The picture: docs/recipes/62-picture-code.md (code), docs/recipes/60-judge-the-picture.md (judge it with `npx threedog shot`), `bloom()`, `ao()`, `lut()`, `outline()`, `dof()` of @threedog/post-effects added with `engine.post.add`. Speed: `npx threedog perf -w .` (average FPS, 1% low). shot and perf use the discrete GPU and say GPU or software.
34
34
  4. [AI.md](docs/AI.md): entry table, commands, verification rules, conventions. [API.md](docs/API.md): one page per module in docs/api/.
@@ -53,9 +53,10 @@ The rest of this file maps tasks to recipe sections.
53
53
  - Picture, writers; try a value: docs/recipes/52-around-the-picture.md §"Who writes it", 62-picture-code.md §3c
54
54
  - Materials, textures, a module's picture: docs/recipes/09-materials-lights-models.md §1
55
55
  - Own material or shader (toon, cel shading): docs/recipes/43-shader-patches-surfaces.md §"Your own material", 56-webgpu-tsl.md §"A minimal TSL material"
56
- - WebGPU (new games' default), TSL node materials, WebGL fallback: docs/recipes/56-webgpu-tsl.md §"WebGPU or WebGL"
56
+ - WebGPU, TSL node materials, WebGL fallback: docs/recipes/56-webgpu-tsl.md §"WebGPU or WebGL"
57
57
  - three.js idioms, own renderer: docs/recipes/50-own-renderer.md
58
58
  - Dust, smoke (lit: true): docs/recipes/64-particles.md
59
+ - Bullet holes, footprints, ground rings (decals): docs/recipes/09-materials-lights-models.md §"Surface decals"
59
60
  - Sky, season tints, weather, wet roads: docs/recipes/08-weather-sky.md §1
60
61
  - Water, rain, snow cover (own rain: THREE.md): docs/recipes/44-water-weather-hooks.md
61
62
  - Shadows: blur, follow, cost: docs/recipes/45-cascaded-shadows.md
@@ -65,7 +66,7 @@ The rest of this file maps tasks to recipe sections.
65
66
  - Many lights (torches); windows, signs at night: docs/recipes/09-materials-lights-models.md §1b
66
67
  - Picture from a reference; judge: docs/recipes/35-picture-from-reference.md §"The loop", 60-judge-the-picture.md
67
68
  - Reuse effects, models of old games: docs/recipes/05-props-bake.md
68
- - Sound, music, ambience, bus nodes: docs/recipes/31-audio.md
69
+ - Sound, music, ambience, reverb, filter, bus nodes: docs/recipes/31-audio.md
69
70
 
70
71
  ## Rules, state, time
71
72
 
@@ -73,8 +74,8 @@ The rest of this file maps tasks to recipe sections.
73
74
  - Quests, objective markers: docs/recipes/04-quests.md §1
74
75
  - What can the player do here, why not: docs/recipes/51-capability-catalog.md §1
75
76
  - New game / continue, scene flow, fades, pause for a menu, cutscenes: docs/recipes/07-flow-scenes-pause.md §4
76
- - Slow or speed up time, bullet time: docs/recipes/55-mods-time-wrap.md §"Time channels"
77
- - Time of day, day / night, seasons: docs/recipes/08-weather-sky.md §4, 06-clock-events.md
77
+ - Slow motion, speed up time, bullet time: docs/recipes/55-mods-time-wrap.md §"Time channels"
78
+ - Time of day, day / night, seasons: docs/recipes/08-weather-sky.md §4, 06-clock-events.md §"The time table"
78
79
  - Multiplayer: docs/recipes/27-net.md §1
79
80
 
80
81
  ## Characters, input, UI
@@ -85,7 +86,7 @@ The rest of this file maps tasks to recipe sections.
85
86
  - Camera: followCamera (third person), first person, fixedCamera, rts; setCamera: docs/recipes/21-camera.md §1
86
87
  - 2D, side-scroller, orthographic; 2D lights: docs/recipes/21-camera.md §6
87
88
  - Pixel art: docs/recipes/62-picture-code.md §4b
88
- - Skeletal animation, IK: docs/recipes/13-animation.md §3, 15-perf.md
89
+ - Skeletal animation, IK, bone mask, blend2d, root motion: docs/recipes/13-animation.md §3, 15-perf.md
89
90
  - Pathfinding, navmesh, NPC jumps and gaps, gates: docs/recipes/12-navmesh.md §2
90
91
  - Physics, ragdoll, collision, vehicles: docs/recipes/11-physics.md §3
91
92
  - Ray / mouse picking, shooting, lock-on: docs/recipes/19-shooting-picking.md §1
@@ -126,7 +127,7 @@ The rest of this file maps tasks to recipe sections.
126
127
  ## Advanced
127
128
 
128
129
  - Own ground or plant drawing, keep collision: docs/recipes/28-terrain.md §6
129
- - Worker results, far records' models, raw navmesh or physics, content sections, own mover: docs/recipes/15-perf.md, 18-world.md, 12-navmesh.md, 11-physics.md, 14-custom-module.md, 57-control.md
130
+ - Workers, far models, raw nav/physics, own mover: docs/recipes/15-perf.md, 18-world.md, 12-navmesh.md, 11-physics.md, 57-control.md
130
131
 
131
132
  ## Troubleshooting and speed
132
133