create-threenative 0.2.17 → 0.2.18

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 (310) hide show
  1. package/agent-docs/kit-mcp.md +1 -1
  2. package/agent-docs/kit-router.md +1 -1
  3. package/agent-docs/references/assertion-reference.md +54 -110
  4. package/agent-docs/references/capability-reference.md +580 -22
  5. package/agent-docs/references/conventions.md +28 -0
  6. package/agent-docs/references/performance-basics.md +8 -4
  7. package/agent-files/.agents/skills/ponytail/SKILL.md +1 -1
  8. package/agent-files/.agents/skills/threenative-capabilities/SKILL.md +7 -4
  9. package/agent-files/.claude/hooks/discovery-gate.mjs +2 -2
  10. package/dist/index.d.ts +97 -6
  11. package/dist/index.js +769 -277
  12. package/dist/threenative.js +96 -17
  13. package/dist/web-engine-ccd-ik-solver.js +127 -0
  14. package/dist/web-engine-gltf-loader.js +52 -14
  15. package/dist/web-engine-post-effects.js +5 -10
  16. package/dist/web-engine-runtime.js +3648 -546
  17. package/package.json +8 -7
  18. package/template-assets/clearwater/README.md +1 -1
  19. package/template-assets/patches/manifest.json +18 -0
  20. package/template-assets/terrain/alpine/assets.json +12 -0
  21. package/template-assets/terrain/alpine/bake.mjs +6 -0
  22. package/template-assets/terrain/alpine/credits.json +164 -0
  23. package/template-assets/terrain/alpine/heightmap.r16 +0 -0
  24. package/template-assets/terrain/alpine/recipe.json +119 -0
  25. package/template-assets/terrain/alpine/surface.json +53 -0
  26. package/template-assets/terrain/coastal/assets.json +11 -0
  27. package/template-assets/terrain/coastal/bake.mjs +6 -0
  28. package/template-assets/terrain/coastal/credits.json +117 -0
  29. package/template-assets/terrain/coastal/heightmap.r16 +0 -0
  30. package/template-assets/terrain/coastal/recipe.json +113 -0
  31. package/template-assets/terrain/coastal/surface.json +41 -0
  32. package/template-assets/terrain/desert/assets.json +12 -0
  33. package/template-assets/terrain/desert/bake.mjs +6 -0
  34. package/template-assets/terrain/desert/credits.json +164 -0
  35. package/template-assets/terrain/desert/heightmap.r16 +0 -0
  36. package/template-assets/terrain/desert/recipe.json +108 -0
  37. package/template-assets/terrain/desert/surface.json +54 -0
  38. package/template-assets/terrain/forest/assets.json +65 -0
  39. package/template-assets/terrain/forest/bake.mjs +8 -0
  40. package/template-assets/terrain/forest/credits.json +225 -0
  41. package/template-assets/terrain/forest/heightmap.r16 +0 -0
  42. package/template-assets/terrain/forest/recipe.json +350 -0
  43. package/template-assets/terrain/forest/surface.json +79 -0
  44. package/template-assets/terrain/tundra/assets.json +12 -0
  45. package/template-assets/terrain/tundra/bake.mjs +6 -0
  46. package/template-assets/terrain/tundra/credits.json +164 -0
  47. package/template-assets/terrain/tundra/heightmap.r16 +0 -0
  48. package/template-assets/terrain/tundra/recipe.json +277 -0
  49. package/template-assets/terrain/tundra/surface.json +54 -0
  50. package/templates/action-rpg/AGENTS.md +8 -4
  51. package/templates/action-rpg/CLAUDE.md +8 -4
  52. package/templates/action-rpg/package.json +7 -7
  53. package/templates/action-rpg/src/game.ts +1 -1
  54. package/templates/action-rpg/src/render/atmosphere.ts +6 -0
  55. package/templates/action-rpg/src/render/backlightControls.ts +10 -0
  56. package/templates/action-rpg/src/render/backlightMaterial.ts +4 -4
  57. package/templates/action-rpg/src/render/clouds.ts +13 -0
  58. package/templates/action-rpg/src/render/materialLighting.ts +5 -5
  59. package/templates/action-rpg/src/render/quality.ts +7 -32
  60. package/templates/action-rpg/src/scenes/Play.ts +4 -1
  61. package/templates/action-rpg/src/style.css +4 -0
  62. package/templates/action-rpg/vite.config.ts +2 -0
  63. package/templates/adventure/AGENTS.md +7 -2
  64. package/templates/adventure/CLAUDE.md +7 -2
  65. package/templates/adventure/kit.json +5 -1
  66. package/templates/adventure/package.json +7 -7
  67. package/templates/adventure/src/game.ts +1 -1
  68. package/templates/adventure/src/style.css +4 -0
  69. package/templates/adventure/tsconfig.json +1 -1
  70. package/templates/adventure/vite.config.ts +2 -0
  71. package/templates/collectathon/AGENTS.md +7 -2
  72. package/templates/collectathon/CLAUDE.md +7 -2
  73. package/templates/collectathon/package.json +7 -7
  74. package/templates/collectathon/src/game.ts +1 -1
  75. package/templates/collectathon/src/level/Course.ts +55 -9
  76. package/templates/collectathon/src/level/terrain.ts +27 -6
  77. package/templates/collectathon/src/main.ts +1 -0
  78. package/templates/collectathon/src/render/foliage.ts +359 -98
  79. package/templates/collectathon/src/render/sky.ts +76 -12
  80. package/templates/collectathon/src/render/water.ts +32 -10
  81. package/templates/collectathon/src/scenes/Play.ts +18 -5
  82. package/templates/collectathon/src/style.css +4 -0
  83. package/templates/collectathon/tsconfig.json +1 -1
  84. package/templates/collectathon/vite.config.ts +2 -0
  85. package/templates/kart/AGENTS.md +7 -2
  86. package/templates/kart/CLAUDE.md +7 -2
  87. package/templates/kart/package.json +6 -6
  88. package/templates/kart/src/game.ts +1 -1
  89. package/templates/kart/src/main.ts +1 -0
  90. package/templates/kart/src/style.css +4 -0
  91. package/templates/kart/tsconfig.json +1 -1
  92. package/templates/kart/vite.config.ts +2 -0
  93. package/templates/minimal/AGENTS.md +8 -3
  94. package/templates/minimal/CLAUDE.md +8 -3
  95. package/templates/minimal/package.json +6 -6
  96. package/templates/minimal/playtests/stands-still.playtest.json +30 -0
  97. package/templates/minimal/src/game.ts +1 -1
  98. package/templates/minimal/src/render/atmosphere.ts +6 -0
  99. package/templates/minimal/src/render/backlightControls.ts +10 -0
  100. package/templates/minimal/src/render/backlightMaterial.ts +4 -4
  101. package/templates/minimal/src/render/camera.ts +13 -2
  102. package/templates/minimal/src/render/clouds.ts +13 -0
  103. package/templates/minimal/src/render/lighting.ts +4 -2
  104. package/templates/minimal/src/render/materialLighting.ts +5 -5
  105. package/templates/minimal/src/render/materials.ts +10 -0
  106. package/templates/minimal/src/render/quality.ts +7 -32
  107. package/templates/minimal/src/scenes/Play.ts +4 -1
  108. package/templates/minimal/vite.config.ts +7 -1
  109. package/templates/platformer/AGENTS.md +9 -4
  110. package/templates/platformer/CLAUDE.md +9 -4
  111. package/templates/platformer/index.html +1 -1
  112. package/templates/platformer/main.html +12 -0
  113. package/templates/platformer/package.json +7 -7
  114. package/templates/platformer/playtests/gamepad-idle.playtest.json +21 -0
  115. package/templates/platformer/playtests/gamepad.playtest.json +30 -0
  116. package/templates/platformer/src/entities/Fox.ts +21 -6
  117. package/templates/platformer/src/game.ts +1 -1
  118. package/templates/platformer/src/main.ts +1 -0
  119. package/templates/platformer/src/render/backlightControls.ts +10 -0
  120. package/templates/platformer/src/render/backlightMaterial.ts +4 -4
  121. package/templates/platformer/src/render/materialLighting.ts +5 -5
  122. package/templates/platformer/src/render/quality.ts +7 -32
  123. package/templates/platformer/src/scenes/Play.ts +2 -1
  124. package/templates/platformer/src/style.css +4 -0
  125. package/templates/platformer/src/worker-page.ts +29 -0
  126. package/templates/platformer/src/worker.ts +5 -0
  127. package/templates/platformer/tsconfig.json +1 -1
  128. package/templates/platformer/vite.config.ts +4 -0
  129. package/templates/puzzle/AGENTS.md +7 -2
  130. package/templates/puzzle/CLAUDE.md +7 -2
  131. package/templates/puzzle/package.json +7 -7
  132. package/templates/puzzle/src/game.ts +1 -1
  133. package/templates/puzzle/src/render/backlightControls.ts +10 -0
  134. package/templates/puzzle/src/render/backlightMaterial.ts +4 -4
  135. package/templates/puzzle/src/render/materialLighting.ts +5 -5
  136. package/templates/puzzle/src/render/quality.ts +7 -32
  137. package/templates/puzzle/src/scenes/Play.ts +1 -1
  138. package/templates/puzzle/src/style.css +4 -0
  139. package/templates/puzzle/tsconfig.json +1 -1
  140. package/templates/puzzle/vite.config.ts +2 -0
  141. package/templates/racing/AGENTS.md +7 -2
  142. package/templates/racing/CLAUDE.md +7 -2
  143. package/templates/racing/package.json +7 -7
  144. package/templates/racing/src/game.ts +1 -1
  145. package/templates/racing/src/render/atmosphere.ts +6 -0
  146. package/templates/racing/src/render/backlightControls.ts +10 -0
  147. package/templates/racing/src/render/backlightMaterial.ts +4 -4
  148. package/templates/racing/src/render/clouds.ts +13 -0
  149. package/templates/racing/src/render/materialLighting.ts +5 -5
  150. package/templates/racing/src/render/quality.ts +7 -32
  151. package/templates/racing/src/scenes/Race.ts +4 -1
  152. package/templates/racing/src/style.css +4 -0
  153. package/templates/racing/tsconfig.json +1 -1
  154. package/templates/racing/vite.config.ts +2 -0
  155. package/templates/rain/AGENTS.md +6 -2
  156. package/templates/rain/CLAUDE.md +6 -2
  157. package/templates/rain/package.json +6 -6
  158. package/templates/rain/src/game.ts +1 -1
  159. package/templates/rain/vite.config.ts +6 -0
  160. package/templates/rts/AGENTS.md +6 -2
  161. package/templates/rts/CLAUDE.md +6 -2
  162. package/templates/rts/package.json +6 -6
  163. package/templates/rts/src/game.ts +1 -1
  164. package/templates/rts/src/render/backlightControls.ts +10 -0
  165. package/templates/rts/src/render/backlightMaterial.ts +4 -4
  166. package/templates/rts/src/render/materialLighting.ts +5 -5
  167. package/templates/rts/src/render/quality.ts +7 -31
  168. package/templates/rts/src/scenes/Play.ts +1 -1
  169. package/templates/rts/src/style.css +4 -0
  170. package/templates/rts/vite.config.ts +2 -0
  171. package/templates/runner/AGENTS.md +7 -2
  172. package/templates/runner/CLAUDE.md +7 -2
  173. package/templates/runner/package.json +7 -7
  174. package/templates/runner/src/game.ts +1 -1
  175. package/templates/runner/src/render/atmosphere.ts +6 -0
  176. package/templates/runner/src/render/backlightControls.ts +10 -0
  177. package/templates/runner/src/render/backlightMaterial.ts +4 -4
  178. package/templates/runner/src/render/clouds.ts +13 -0
  179. package/templates/runner/src/render/materialLighting.ts +5 -5
  180. package/templates/runner/src/render/quality.ts +7 -32
  181. package/templates/runner/src/scenes/Run.ts +4 -1
  182. package/templates/runner/src/style.css +4 -0
  183. package/templates/runner/tsconfig.json +1 -1
  184. package/templates/runner/vite.config.ts +2 -0
  185. package/templates/sailing/AGENTS.md +7 -2
  186. package/templates/sailing/CLAUDE.md +7 -2
  187. package/templates/sailing/package.json +7 -7
  188. package/templates/sailing/src/game.ts +1 -1
  189. package/templates/sailing/src/render/backlightControls.ts +10 -0
  190. package/templates/sailing/src/render/backlightMaterial.ts +4 -4
  191. package/templates/sailing/src/render/environmentSetup.ts +1 -1
  192. package/templates/sailing/src/render/materialLighting.ts +5 -5
  193. package/templates/sailing/src/render/quality.ts +7 -32
  194. package/templates/sailing/src/style.css +5 -0
  195. package/templates/sailing/vite.config.ts +6 -0
  196. package/templates/shooter/AGENTS.md +6 -2
  197. package/templates/shooter/CLAUDE.md +6 -2
  198. package/templates/shooter/package.json +7 -7
  199. package/templates/shooter/src/game.ts +3 -2
  200. package/templates/shooter/src/render/atmosphere.ts +6 -0
  201. package/templates/shooter/src/render/backlightControls.ts +10 -0
  202. package/templates/shooter/src/render/backlightMaterial.ts +4 -4
  203. package/templates/shooter/src/render/clouds.ts +13 -0
  204. package/templates/shooter/src/render/materialLighting.ts +5 -5
  205. package/templates/shooter/src/render/quality.ts +7 -32
  206. package/templates/shooter/src/scenes/Play.ts +4 -1
  207. package/templates/shooter/src/style.css +4 -0
  208. package/templates/shooter/vite.config.ts +2 -0
  209. package/templates/snow/AGENTS.md +7 -2
  210. package/templates/snow/CLAUDE.md +7 -2
  211. package/templates/snow/package.json +7 -7
  212. package/templates/snow/src/game.ts +1 -1
  213. package/templates/snow/src/render/backlightControls.ts +10 -0
  214. package/templates/snow/src/render/backlightMaterial.ts +4 -4
  215. package/templates/snow/src/render/materialLighting.ts +5 -5
  216. package/templates/snow/src/render/quality.ts +7 -32
  217. package/templates/snow/src/style.css +5 -0
  218. package/templates/snow/vite.config.ts +6 -0
  219. package/templates/starter/AGENTS.md +8 -3
  220. package/templates/starter/CLAUDE.md +8 -3
  221. package/templates/starter/package.json +7 -7
  222. package/templates/starter/src/entities/Crate.ts +5 -2
  223. package/templates/starter/src/game.ts +4 -3
  224. package/templates/starter/src/render/adaptiveQuality.ts +17 -0
  225. package/templates/starter/src/render/atmosphere.ts +6 -0
  226. package/templates/starter/src/render/backlightControls.ts +10 -0
  227. package/templates/starter/src/render/backlightMaterial.ts +4 -4
  228. package/templates/starter/src/render/clouds.ts +13 -0
  229. package/templates/starter/src/render/contactShadow.ts +1 -1
  230. package/templates/starter/src/render/materialLighting.ts +5 -5
  231. package/templates/starter/src/render/postprocessing.ts +11 -10
  232. package/templates/starter/src/render/quality.ts +14 -1
  233. package/templates/starter/src/scenes/Play.ts +12 -3
  234. package/templates/starter/src/state.ts +2 -0
  235. package/templates/starter/src/style.css +4 -0
  236. package/templates/starter/src/ui/Menu.tsx +5 -1
  237. package/templates/starter/vite.config.ts +2 -0
  238. package/templates/tower-defense/AGENTS.md +7 -2
  239. package/templates/tower-defense/CLAUDE.md +7 -2
  240. package/templates/tower-defense/package.json +7 -7
  241. package/templates/tower-defense/src/game.ts +1 -1
  242. package/templates/tower-defense/src/render/backlightControls.ts +10 -0
  243. package/templates/tower-defense/src/render/backlightMaterial.ts +4 -4
  244. package/templates/tower-defense/src/render/materialLighting.ts +5 -5
  245. package/templates/tower-defense/src/render/quality.ts +7 -32
  246. package/templates/tower-defense/src/scenes/Battle.ts +1 -1
  247. package/templates/tower-defense/src/style.css +4 -0
  248. package/templates/tower-defense/tsconfig.json +1 -1
  249. package/templates/tower-defense/vite.config.ts +2 -0
  250. package/templates/action-rpg/src/render/environmentContribution.ts +0 -188
  251. package/templates/action-rpg/src/render/environmentRadiance.ts +0 -36
  252. package/templates/action-rpg/src/render/environmentSampleCache.ts +0 -43
  253. package/templates/action-rpg/src/render/environmentSampling.ts +0 -193
  254. package/templates/action-rpg/src/render/environmentSnapshot.ts +0 -53
  255. package/templates/minimal/src/render/environmentContribution.ts +0 -188
  256. package/templates/minimal/src/render/environmentRadiance.ts +0 -36
  257. package/templates/minimal/src/render/environmentSampleCache.ts +0 -43
  258. package/templates/minimal/src/render/environmentSampling.ts +0 -193
  259. package/templates/minimal/src/render/environmentSnapshot.ts +0 -53
  260. package/templates/platformer/src/render/environmentContribution.ts +0 -188
  261. package/templates/platformer/src/render/environmentRadiance.ts +0 -36
  262. package/templates/platformer/src/render/environmentSampleCache.ts +0 -43
  263. package/templates/platformer/src/render/environmentSampling.ts +0 -193
  264. package/templates/platformer/src/render/environmentSnapshot.ts +0 -53
  265. package/templates/puzzle/src/render/environmentContribution.ts +0 -188
  266. package/templates/puzzle/src/render/environmentRadiance.ts +0 -36
  267. package/templates/puzzle/src/render/environmentSampleCache.ts +0 -43
  268. package/templates/puzzle/src/render/environmentSampling.ts +0 -193
  269. package/templates/puzzle/src/render/environmentSnapshot.ts +0 -53
  270. package/templates/racing/src/render/environmentContribution.ts +0 -188
  271. package/templates/racing/src/render/environmentRadiance.ts +0 -36
  272. package/templates/racing/src/render/environmentSampleCache.ts +0 -43
  273. package/templates/racing/src/render/environmentSampling.ts +0 -193
  274. package/templates/racing/src/render/environmentSnapshot.ts +0 -53
  275. package/templates/rts/src/render/environmentContribution.ts +0 -188
  276. package/templates/rts/src/render/environmentRadiance.ts +0 -36
  277. package/templates/rts/src/render/environmentSampleCache.ts +0 -43
  278. package/templates/rts/src/render/environmentSampling.ts +0 -193
  279. package/templates/rts/src/render/environmentSnapshot.ts +0 -53
  280. package/templates/runner/src/render/environmentContribution.ts +0 -188
  281. package/templates/runner/src/render/environmentRadiance.ts +0 -36
  282. package/templates/runner/src/render/environmentSampleCache.ts +0 -43
  283. package/templates/runner/src/render/environmentSampling.ts +0 -193
  284. package/templates/runner/src/render/environmentSnapshot.ts +0 -53
  285. package/templates/sailing/src/render/environmentContribution.ts +0 -188
  286. package/templates/sailing/src/render/environmentRadiance.ts +0 -36
  287. package/templates/sailing/src/render/environmentSampleCache.ts +0 -43
  288. package/templates/sailing/src/render/environmentSampling.ts +0 -193
  289. package/templates/sailing/src/render/environmentSnapshot.ts +0 -53
  290. package/templates/shooter/src/render/environmentContribution.ts +0 -188
  291. package/templates/shooter/src/render/environmentRadiance.ts +0 -36
  292. package/templates/shooter/src/render/environmentSampleCache.ts +0 -43
  293. package/templates/shooter/src/render/environmentSampling.ts +0 -193
  294. package/templates/shooter/src/render/environmentSnapshot.ts +0 -53
  295. package/templates/snow/src/render/environmentContribution.ts +0 -188
  296. package/templates/snow/src/render/environmentRadiance.ts +0 -36
  297. package/templates/snow/src/render/environmentSampleCache.ts +0 -43
  298. package/templates/snow/src/render/environmentSampling.ts +0 -193
  299. package/templates/snow/src/render/environmentSnapshot.ts +0 -53
  300. package/templates/starter/src/render/environmentContribution.ts +0 -188
  301. package/templates/starter/src/render/environmentRadiance.ts +0 -36
  302. package/templates/starter/src/render/environmentSampleCache.ts +0 -43
  303. package/templates/starter/src/render/environmentSampling.ts +0 -193
  304. package/templates/starter/src/render/environmentSnapshot.ts +0 -53
  305. package/templates/starter/src/render/rendererGate.ts +0 -36
  306. package/templates/tower-defense/src/render/environmentContribution.ts +0 -188
  307. package/templates/tower-defense/src/render/environmentRadiance.ts +0 -36
  308. package/templates/tower-defense/src/render/environmentSampleCache.ts +0 -43
  309. package/templates/tower-defense/src/render/environmentSampling.ts +0 -193
  310. package/templates/tower-defense/src/render/environmentSnapshot.ts +0 -53
@@ -0,0 +1,164 @@
1
+ {
2
+ "version": 1,
3
+ "kit": "tundra",
4
+ "purpose": "Credits for the sets, textures, props and sky this kit cites. Each record is copied from starter-assets/credits.json.",
5
+ "source": "Poly Haven",
6
+ "sourceUrl": "https://polyhaven.com",
7
+ "license": "CC0 1.0 Universal (public domain dedication)",
8
+ "licenseUrl": "https://polyhaven.com/license",
9
+ "sets": {
10
+ "mossy_rock": {
11
+ "asset": "Mossy Rock",
12
+ "author": "Poly Haven / Dario Barresi",
13
+ "license": "CC0",
14
+ "groundLayer": "moss",
15
+ "metresPerTile": 3.6,
16
+ "note": "Substituted for the shortlist's Rock Moss Set 02: that set's 1K diffuse is an atlas of seven rocks over black unused cells with starburst edges, not a tileable ground map. Mossy Rock (CC0, Poly Haven) is tileable, mossy and stony."
17
+ },
18
+ "snow_02": {
19
+ "asset": "Snow 02",
20
+ "author": "Rob Tuytel",
21
+ "license": "CC0",
22
+ "groundLayer": "snow",
23
+ "metresPerTile": 12,
24
+ "note": null
25
+ },
26
+ "rock_boulder_dry": {
27
+ "asset": "Rock Boulder Dry",
28
+ "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
29
+ "license": "CC0",
30
+ "groundLayer": null,
31
+ "metresPerTile": null,
32
+ "note": "The dry grey granite-ish boulder set. Its 1K diffuse is tileable stone, not an atlas: the seam column differs from the last by 5.7 grey levels against an interior neighbour difference of 7.5, so it wraps as well as the map averages."
33
+ }
34
+ },
35
+ "files": [
36
+ {
37
+ "set": "mossy_rock",
38
+ "asset": "Mossy Rock",
39
+ "author": "Poly Haven / Dario Barresi",
40
+ "license": "CC0",
41
+ "map": "diff",
42
+ "file": "mossy_rock/mossy_rock_diff_1k.jpg",
43
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/mossy_rock/mossy_rock_diff_1k.jpg",
44
+ "bytes": 1124438,
45
+ "dimensions": "1024x1024",
46
+ "colourSpace": "srgb",
47
+ "metresPerTile": 3.6,
48
+ "groundLayer": "moss",
49
+ "sampledByTemperateGround": true,
50
+ "sha256": "4dbf37f1b0465c9c8914213163923be159716f5b97fb6946437b6c5e143ef540"
51
+ },
52
+ {
53
+ "set": "mossy_rock",
54
+ "asset": "Mossy Rock",
55
+ "author": "Poly Haven / Dario Barresi",
56
+ "license": "CC0",
57
+ "map": "nor_gl",
58
+ "file": "mossy_rock/mossy_rock_nor_gl_1k.jpg",
59
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/mossy_rock/mossy_rock_nor_gl_1k.jpg",
60
+ "bytes": 995727,
61
+ "dimensions": "1024x1024",
62
+ "colourSpace": "linear",
63
+ "metresPerTile": 3.6,
64
+ "groundLayer": "moss",
65
+ "sampledByTemperateGround": true,
66
+ "sha256": "232cdd6a9fdfd01bb8bb1f8f604c53dbca79fa0d3d7995edf85c9945757aa8df"
67
+ },
68
+ {
69
+ "set": "snow_02",
70
+ "asset": "Snow 02",
71
+ "author": "Rob Tuytel",
72
+ "license": "CC0",
73
+ "map": "diff",
74
+ "file": "snow_02/snow_02_diff_1k.jpg",
75
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/snow_02/snow_02_diff_1k.jpg",
76
+ "bytes": 325497,
77
+ "dimensions": "1024x1024",
78
+ "colourSpace": "srgb",
79
+ "metresPerTile": 12,
80
+ "groundLayer": "snow",
81
+ "sampledByTemperateGround": true,
82
+ "sha256": "523a4e69c90b96d787dd69b897f29a2b3761a017024405c60aa630d1e8e9009a"
83
+ },
84
+ {
85
+ "set": "snow_02",
86
+ "asset": "Snow 02",
87
+ "author": "Rob Tuytel",
88
+ "license": "CC0",
89
+ "map": "nor_gl",
90
+ "file": "snow_02/snow_02_nor_gl_1k.jpg",
91
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/snow_02/snow_02_nor_gl_1k.jpg",
92
+ "bytes": 1081858,
93
+ "dimensions": "1024x1024",
94
+ "colourSpace": "linear",
95
+ "metresPerTile": 12,
96
+ "groundLayer": "snow",
97
+ "sampledByTemperateGround": false,
98
+ "sha256": "9495ec680616b8340e2cbecbd151bff84c690cfad4209e90cc98d2d0ba81f810"
99
+ },
100
+ {
101
+ "set": "rock_boulder_dry",
102
+ "asset": "Rock Boulder Dry",
103
+ "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
104
+ "license": "CC0",
105
+ "map": "diff",
106
+ "file": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
107
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_diff_1k.jpg",
108
+ "bytes": 87707,
109
+ "dimensions": "512x512",
110
+ "colourSpace": "srgb",
111
+ "metresPerTile": null,
112
+ "groundLayer": null,
113
+ "sampledByTemperateGround": false,
114
+ "sha256": "dde5d4cf88dce2a3bcde0490c509f0a5f375c4aa002aa08f96afa6e0fb4f6c7b"
115
+ },
116
+ {
117
+ "set": "rock_boulder_dry",
118
+ "asset": "Rock Boulder Dry",
119
+ "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
120
+ "license": "CC0",
121
+ "map": "nor_gl",
122
+ "file": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg",
123
+ "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_nor_gl_1k.jpg",
124
+ "bytes": 60524,
125
+ "dimensions": "512x512",
126
+ "colourSpace": "linear",
127
+ "metresPerTile": null,
128
+ "groundLayer": null,
129
+ "sampledByTemperateGround": false,
130
+ "sha256": "5039f885b242fdb9f4b15b1cde8d09dca53ec50d37544ffb72154505ba2fc136"
131
+ },
132
+ {
133
+ "set": "kloofendal_48d_partly_cloudy",
134
+ "asset": "Kloofendal 48d Partly Cloudy",
135
+ "author": "Greg Zaal",
136
+ "license": "CC0",
137
+ "map": "hdri",
138
+ "file": "hdri/kloofendal_48d_partly_cloudy_1k.hdr",
139
+ "url": "https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/kloofendal_48d_partly_cloudy_1k.hdr",
140
+ "bytes": 1637206,
141
+ "dimensions": "1024x512",
142
+ "colourSpace": "linear",
143
+ "sha256": "5477b7dbb2aea4a6947cb36b96339c119f90bf36a03b039af3254b5e6a22896d"
144
+ }
145
+ ],
146
+ "prepared": {
147
+ "assets": [
148
+ {
149
+ "asset": "Boulder 01",
150
+ "authors": "Rob Tuytel",
151
+ "license": "CC0",
152
+ "url": "https://polyhaven.com/a/boulder_01",
153
+ "note": "A second source, so a meadow's stones are not one rock copied."
154
+ },
155
+ {
156
+ "asset": "Boulder 01",
157
+ "authors": "Poly Haven",
158
+ "license": "CC0",
159
+ "url": "https://polyhaven.com/a/boulder_01",
160
+ "note": "Authored LOD1 (33,060 tris) and LOD2 (16,530 tris) with base, normal and roughness maps, exported by examples/strata-terrain-preview/scripts/prep-polyhaven-rock.py; the forest starter kit's boulder."
161
+ }
162
+ ]
163
+ }
164
+ }
@@ -0,0 +1,277 @@
1
+ {
2
+ "version": 1,
3
+ "recipe": {
4
+ "version": 1,
5
+ "config": {
6
+ "size": 512,
7
+ "resolution": 257,
8
+ "seed": 131
9
+ },
10
+ "layers": [
11
+ {
12
+ "enabled": true,
13
+ "opacity": 1,
14
+ "id": "usgs-3dep",
15
+ "type": "heightmap",
16
+ "params": {
17
+ "data": {
18
+ "width": 257,
19
+ "height": 257,
20
+ "raw16": "heightmap.r16",
21
+ "min": 9.3,
22
+ "max": 6562.8
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "enabled": true,
28
+ "opacity": 1,
29
+ "id": "surface-runoff",
30
+ "type": "erode",
31
+ "params": {
32
+ "method": "hydraulic",
33
+ "droplets": 20000,
34
+ "maxSteps": 45,
35
+ "capacity": 2,
36
+ "erosion": 0.015,
37
+ "strength": 0.002,
38
+ "deposition": 0.2,
39
+ "evaporation": 0.035
40
+ }
41
+ },
42
+ {
43
+ "enabled": true,
44
+ "opacity": 1,
45
+ "id": "loose-talus",
46
+ "type": "erode",
47
+ "params": {
48
+ "method": "thermal",
49
+ "talus": 38,
50
+ "iterations": 1,
51
+ "rate": 0.004
52
+ }
53
+ },
54
+ {
55
+ "enabled": true,
56
+ "opacity": 1,
57
+ "id": "near-kettle-bed",
58
+ "type": "flatten",
59
+ "params": {
60
+ "at": [
61
+ 65,
62
+ 80
63
+ ],
64
+ "radius": 30,
65
+ "height": 27,
66
+ "falloff": 0.65
67
+ }
68
+ },
69
+ {
70
+ "enabled": true,
71
+ "opacity": 1,
72
+ "id": "far-kettle-bed",
73
+ "type": "flatten",
74
+ "params": {
75
+ "at": [
76
+ -65,
77
+ -50
78
+ ],
79
+ "radius": 42,
80
+ "height": 28,
81
+ "falloff": 0.65
82
+ }
83
+ },
84
+ {
85
+ "enabled": true,
86
+ "opacity": 1,
87
+ "id": "meltwater",
88
+ "type": "river",
89
+ "params": {
90
+ "points": [
91
+ [
92
+ -210,
93
+ 36,
94
+ -135
95
+ ],
96
+ [
97
+ -125,
98
+ 33,
99
+ -80
100
+ ],
101
+ [
102
+ -100,
103
+ 30,
104
+ -90
105
+ ],
106
+ [
107
+ -65,
108
+ 30,
109
+ -50
110
+ ],
111
+ [
112
+ -30,
113
+ 30,
114
+ -15
115
+ ],
116
+ [
117
+ 0,
118
+ 29.3,
119
+ 5
120
+ ],
121
+ [
122
+ 38,
123
+ 28.8,
124
+ 47
125
+ ],
126
+ [
127
+ 65,
128
+ 28.8,
129
+ 80
130
+ ],
131
+ [
132
+ 100,
133
+ 28.8,
134
+ 100
135
+ ],
136
+ [
137
+ 160,
138
+ 27,
139
+ 140
140
+ ],
141
+ [
142
+ 250,
143
+ 26,
144
+ 150
145
+ ]
146
+ ],
147
+ "width": 7,
148
+ "depth": 1.5,
149
+ "shoulder": 18,
150
+ "enforceDownhill": true
151
+ }
152
+ },
153
+ {
154
+ "enabled": true,
155
+ "opacity": 1,
156
+ "id": "braid",
157
+ "type": "river",
158
+ "params": {
159
+ "points": [
160
+ [
161
+ -65,
162
+ 30,
163
+ -50
164
+ ],
165
+ [
166
+ -40,
167
+ 30,
168
+ -18
169
+ ],
170
+ [
171
+ -30,
172
+ 29.4,
173
+ 40
174
+ ],
175
+ [
176
+ 15,
177
+ 28.8,
178
+ 105
179
+ ],
180
+ [
181
+ 65,
182
+ 28.8,
183
+ 80
184
+ ]
185
+ ],
186
+ "width": 4,
187
+ "depth": 1.2,
188
+ "shoulder": 12,
189
+ "enforceDownhill": true
190
+ }
191
+ },
192
+ {
193
+ "enabled": true,
194
+ "opacity": 1,
195
+ "id": "near-kettle",
196
+ "type": "water",
197
+ "params": {
198
+ "kind": "lake",
199
+ "at": [
200
+ 65,
201
+ 80
202
+ ],
203
+ "radius": 34,
204
+ "level": 28.8
205
+ }
206
+ },
207
+ {
208
+ "enabled": true,
209
+ "opacity": 1,
210
+ "id": "far-kettle",
211
+ "type": "water",
212
+ "params": {
213
+ "kind": "lake",
214
+ "at": [
215
+ -65,
216
+ -50
217
+ ],
218
+ "radius": 46,
219
+ "level": 30
220
+ }
221
+ },
222
+ {
223
+ "enabled": true,
224
+ "opacity": 1,
225
+ "id": "surfaces",
226
+ "type": "materials",
227
+ "params": {
228
+ "rules": [
229
+ {
230
+ "material": "moss",
231
+ "mask": {
232
+ "type": "all"
233
+ }
234
+ },
235
+ {
236
+ "material": "snow",
237
+ "mask": {
238
+ "type": "noise",
239
+ "scale": 85,
240
+ "threshold": 0.68,
241
+ "seed": 131,
242
+ "fade": 0.3
243
+ },
244
+ "strength": 0.6
245
+ },
246
+ {
247
+ "material": "rock",
248
+ "mask": {
249
+ "type": "slope",
250
+ "min": 23,
251
+ "max": 90,
252
+ "fade": 8
253
+ }
254
+ }
255
+ ]
256
+ }
257
+ },
258
+ {
259
+ "enabled": true,
260
+ "opacity": 1,
261
+ "id": "erratics",
262
+ "type": "scatter",
263
+ "params": {
264
+ "asset": "boulder",
265
+ "count": 70,
266
+ "minDistance": 8,
267
+ "maxSlope": 30,
268
+ "avoidWater": true,
269
+ "scale": [
270
+ 0.6,
271
+ 1.8
272
+ ]
273
+ }
274
+ }
275
+ ]
276
+ }
277
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "base": {
3
+ "id": "moss",
4
+ "tile": 3.6,
5
+ "tint": [1, 1, 1],
6
+ "normal": true,
7
+ "triplanar": true
8
+ },
9
+ "breakup": {
10
+ "scale": 0.05,
11
+ "push": 0.12
12
+ },
13
+ "macro": {
14
+ "scale": 0.006,
15
+ "min": 0.75,
16
+ "max": 1.1
17
+ },
18
+ "layers": [
19
+ {
20
+ "id": "snow",
21
+ "tile": 4.5,
22
+ "tint": [1, 1, 1],
23
+ "normal": true,
24
+ "mask": "snow",
25
+ "lo": 0.3,
26
+ "hi": 0.7
27
+ },
28
+ {
29
+ "id": "rock",
30
+ "tile": 3.8,
31
+ "tint": [1, 1, 1],
32
+ "normal": true,
33
+ "triplanar": true,
34
+ "mask": "rock",
35
+ "lo": 0.25,
36
+ "hi": 0.75
37
+ }
38
+ ],
39
+ "textures": "textures",
40
+ "sources": {
41
+ "moss": {
42
+ "diff": "mossy_rock/mossy_rock_diff_1k.jpg",
43
+ "nrm": "mossy_rock/mossy_rock_nor_gl_1k.jpg"
44
+ },
45
+ "snow": {
46
+ "diff": "snow_02/snow_02_diff_1k.jpg",
47
+ "nrm": "snow_02/snow_02_nor_gl_1k.jpg"
48
+ },
49
+ "rock": {
50
+ "diff": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
51
+ "nrm": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg"
52
+ }
53
+ }
54
+ }
@@ -11,7 +11,7 @@ Detail for each step: `threenative-capabilities` skill. Do the steps in order. A
11
11
 
12
12
  1. **Kit** (new game only): `engine_search_capabilities {situation: "<the whole request>", scope: "request"}` returns the matching starter kit first. This folder is already a kit.
13
13
  2. **Mechanics**: per mechanic, `engine_search_references {situation}`, then `engine_reference_detail` on each hit for pinned constants and feel. To see a mechanic move, `engine_watch_reference {query: "<game> <mechanic>"}` returns a contact sheet of real gameplay. Borrow mechanics only: no code, level layouts, character names or art. Cite `file:line`.
14
- 3. **Built-ins**: per mechanic, system or symptom, `engine_search_capabilities {situation, scope: "mechanic"}`, then `engine_capability_detail {symbol, importPath}` on every hit. Constraints are binding. `verdict: "none"` means the game writes it in `src/`.
14
+ 3. **Built-ins**: per mechanic, system or symptom, `engine_search_capabilities {situation, scope: "mechanic"}`; rows answer; `engine_capability_detail` only for omitted symbols. Constraints are binding. `verdict: "none"` means the game writes it in `src/`.
15
15
  4. **Plan** (new game, or a change to several systems): `prd-creator` with the kit, references and built-ins. With a user, wait for explicit approval, then implement. With no user (`claude -p`, a script), record the plan and assumptions, then continue.
16
16
  5. **Assets**: `asset_search_sources`, the source's search tool, then `asset_download_file`; record source and licence in `CREDITS.md`. Nothing fits: `sculpt_plan`. A rigged GLB: `animation_inspect` (`threenative-assets` skill).
17
17
  6. **Build**: gameplay in `src/`, look in `src/render/` (`threenative-context` and `threenative-ui` skills). For parallel work, give each subagent one area and its files, then integrate.
@@ -30,7 +30,7 @@ A change to an existing game repeats steps 2-3 for that change, then steps 5-8.
30
30
  - `threenative-assets`: a texture, HDRI, sound or model. `asset_search_sources`, `asset_download_file`, `audio_search_assets`, `mesh_optimize`.
31
31
  - `threenative-sculpt`: a bespoke mesh or character from a reference image. `sculpt_plan`, `sculpt_spec_gate`, `sculpt_compare`, `sculpt_pass_gate`.
32
32
  - `threenative-animation`: a rigged GLB with a held prop, foot slide or loop seam. `animation_inspect`, `animation_attach`, `animation_verify`.
33
- - `threenative-terrain`: a starter terrain kit. `terrain_generate`.
33
+ - `threenative-terrain`: any terrain, from words. `terrain_generate`.
34
34
  - `threenative-devtools`: after `npx @threenative/playtest trace` names no cause. `performance_start_trace`, `performance_analyze_insight`.
35
35
  <!-- /shared -->
36
36
 
@@ -43,8 +43,8 @@ Exposure policy: `src/render/exposure.ts` (`node_modules/create-threenative/agen
43
43
  Kit notes: `node_modules/create-threenative/agent-docs/references/kit-action-rpg.md`.
44
44
  <!-- /shared -->
45
45
 
46
- This repository owns the dungeon, combat, stats, inventory, persistence and every visual decision. `src/game.ts` stays portable; `src/main.ts` is the web-only React mount.
47
- Controls: WASD or arrows move; Space or F attacks; E casts Arcane Surge; Shift rolls; Q or U equips or unequips; C or R sets a checkpoint.
46
+ This game owns dungeon, combat, stats, inventory, persistence and look; `src/game.ts` is portable, `src/main.ts` the web React mount.
47
+ Keys: WASD/arrows move; Space/F attack; E Arcane Surge; Shift roll; Q/U equip toggle; C/R checkpoint.
48
48
 
49
49
  <!-- shared: kit-commands -->
50
50
  ## Commands
@@ -55,6 +55,7 @@ pnpm test # typecheck, lint, format, then every playtest
55
55
  pnpm build --target desktop # also: web, android, ios
56
56
  pnpm test:native # native proof
57
57
  npx threenative doctor # build, import, device or blank-frame failure
58
+ npx threenative doctor --fix # refresh agent files
58
59
  ```
59
60
  <!-- /shared -->
60
61
 
@@ -92,12 +93,15 @@ Each is on by default with a named override. Detail: `node_modules/create-threen
92
93
  - **Spells** `#spells`: every factory ships a stock look. Override: per-call options on `@threenative/core/spells`.
93
94
  - **Multiplayer** `#net`: none; unsupported transport rejects. Override: `connect` from `@threenative/core/net` with four limits. Marker: `TN_NET_UNAVAILABLE`.
94
95
  - **Desktop window** `#desktop-mode`: CLI, then `display.fullscreen`, then `window.maximized`. Override: `--windowed`; `--maximized`; `--fullscreen`.
96
+ - **CPU priority** `#cpu-priority`: game threads first. Override: `display.priority: "normal"`. Marker: `TN_PROCESS_PRIORITY`.
95
97
  - **Terrain** `#terrain`: authored in the game. Override: optional `@threenative/terrain`; `references/terrain-authoring.md`.
96
98
  - **Navigation** `#navigation`: none; browser-only WASM. Override: import `@threenative/physics/navigation` on purpose.
99
+ - **Controller** `#gamepad`: W3C standard mapping on every pad, radial dead zone `0.2`, and a button press or a decisive stick move claims which pad is read. Override: `gamepadDeadZone: 0` for raw axes. Marker: `TN_GAMEPAD`.
97
100
  - **Move input** `#move-axis`: `input.vector("move").y` is +up. Override: one explicit `-move.y` conversion.
98
101
  - **Scene change** `#scene-change`: `ctx.goto(name)` keeps state. Override: `game.goto(name)` resets state.
99
102
  - **Randomness** `#seed`: unseeded. Override: `defineGame({ seed })`.
100
103
  - **Engine** `#engine`: owned C++ engine. Override: `engine: "threejs"` only when the user asks. Marker: `TN_NATIVE_ENGINE_UNBOUND`.
104
+ - **Refused imports** `#engine-catalog`: refused `three` imports fail at their line. Override: `createEngineCatalogPlugin({ mode: "warn" })`. Marker: `TN_ENGINE_CATALOG`.
101
105
  <!-- /shared -->
102
106
 
103
107
  <!-- shared: kit-stuck -->
@@ -13,7 +13,7 @@ Detail for each step: `threenative-capabilities` skill. Do the steps in order. A
13
13
 
14
14
  1. **Kit** (new game only): `engine_search_capabilities {situation: "<the whole request>", scope: "request"}` returns the matching starter kit first. This folder is already a kit.
15
15
  2. **Mechanics**: per mechanic, `engine_search_references {situation}`, then `engine_reference_detail` on each hit for pinned constants and feel. To see a mechanic move, `engine_watch_reference {query: "<game> <mechanic>"}` returns a contact sheet of real gameplay. Borrow mechanics only: no code, level layouts, character names or art. Cite `file:line`.
16
- 3. **Built-ins**: per mechanic, system or symptom, `engine_search_capabilities {situation, scope: "mechanic"}`, then `engine_capability_detail {symbol, importPath}` on every hit. Constraints are binding. `verdict: "none"` means the game writes it in `src/`.
16
+ 3. **Built-ins**: per mechanic, system or symptom, `engine_search_capabilities {situation, scope: "mechanic"}`; rows answer; `engine_capability_detail` only for omitted symbols. Constraints are binding. `verdict: "none"` means the game writes it in `src/`.
17
17
  4. **Plan** (new game, or a change to several systems): `prd-creator` with the kit, references and built-ins. With a user, wait for explicit approval, then implement. With no user (`claude -p`, a script), record the plan and assumptions, then continue.
18
18
  5. **Assets**: `asset_search_sources`, the source's search tool, then `asset_download_file`; record source and licence in `CREDITS.md`. Nothing fits: `sculpt_plan`. A rigged GLB: `animation_inspect` (`threenative-assets` skill).
19
19
  6. **Build**: gameplay in `src/`, look in `src/render/` (`threenative-context` and `threenative-ui` skills). For parallel work, give each subagent one area and its files, then integrate.
@@ -32,7 +32,7 @@ A change to an existing game repeats steps 2-3 for that change, then steps 5-8.
32
32
  - `threenative-assets`: a texture, HDRI, sound or model. `asset_search_sources`, `asset_download_file`, `audio_search_assets`, `mesh_optimize`.
33
33
  - `threenative-sculpt`: a bespoke mesh or character from a reference image. `sculpt_plan`, `sculpt_spec_gate`, `sculpt_compare`, `sculpt_pass_gate`.
34
34
  - `threenative-animation`: a rigged GLB with a held prop, foot slide or loop seam. `animation_inspect`, `animation_attach`, `animation_verify`.
35
- - `threenative-terrain`: a starter terrain kit. `terrain_generate`.
35
+ - `threenative-terrain`: any terrain, from words. `terrain_generate`.
36
36
  - `threenative-devtools`: after `npx @threenative/playtest trace` names no cause. `performance_start_trace`, `performance_analyze_insight`.
37
37
  <!-- /shared -->
38
38
 
@@ -45,8 +45,8 @@ Exposure policy: `src/render/exposure.ts` (`node_modules/create-threenative/agen
45
45
  Kit notes: `node_modules/create-threenative/agent-docs/references/kit-action-rpg.md`.
46
46
  <!-- /shared -->
47
47
 
48
- This repository owns the dungeon, combat, stats, inventory, persistence and every visual decision. `src/game.ts` stays portable; `src/main.ts` is the web-only React mount.
49
- Controls: WASD or arrows move; Space or F attacks; E casts Arcane Surge; Shift rolls; Q or U equips or unequips; C or R sets a checkpoint.
48
+ This game owns dungeon, combat, stats, inventory, persistence and look; `src/game.ts` is portable, `src/main.ts` the web React mount.
49
+ Keys: WASD/arrows move; Space/F attack; E Arcane Surge; Shift roll; Q/U equip toggle; C/R checkpoint.
50
50
 
51
51
  <!-- shared: kit-commands -->
52
52
  ## Commands
@@ -57,6 +57,7 @@ pnpm test # typecheck, lint, format, then every playtest
57
57
  pnpm build --target desktop # also: web, android, ios
58
58
  pnpm test:native # native proof
59
59
  npx threenative doctor # build, import, device or blank-frame failure
60
+ npx threenative doctor --fix # refresh agent files
60
61
  ```
61
62
  <!-- /shared -->
62
63
 
@@ -94,12 +95,15 @@ Each is on by default with a named override. Detail: `node_modules/create-threen
94
95
  - **Spells** `#spells`: every factory ships a stock look. Override: per-call options on `@threenative/core/spells`.
95
96
  - **Multiplayer** `#net`: none; unsupported transport rejects. Override: `connect` from `@threenative/core/net` with four limits. Marker: `TN_NET_UNAVAILABLE`.
96
97
  - **Desktop window** `#desktop-mode`: CLI, then `display.fullscreen`, then `window.maximized`. Override: `--windowed`; `--maximized`; `--fullscreen`.
98
+ - **CPU priority** `#cpu-priority`: game threads first. Override: `display.priority: "normal"`. Marker: `TN_PROCESS_PRIORITY`.
97
99
  - **Terrain** `#terrain`: authored in the game. Override: optional `@threenative/terrain`; `references/terrain-authoring.md`.
98
100
  - **Navigation** `#navigation`: none; browser-only WASM. Override: import `@threenative/physics/navigation` on purpose.
101
+ - **Controller** `#gamepad`: W3C standard mapping on every pad, radial dead zone `0.2`, and a button press or a decisive stick move claims which pad is read. Override: `gamepadDeadZone: 0` for raw axes. Marker: `TN_GAMEPAD`.
99
102
  - **Move input** `#move-axis`: `input.vector("move").y` is +up. Override: one explicit `-move.y` conversion.
100
103
  - **Scene change** `#scene-change`: `ctx.goto(name)` keeps state. Override: `game.goto(name)` resets state.
101
104
  - **Randomness** `#seed`: unseeded. Override: `defineGame({ seed })`.
102
105
  - **Engine** `#engine`: owned C++ engine. Override: `engine: "threejs"` only when the user asks. Marker: `TN_NATIVE_ENGINE_UNBOUND`.
106
+ - **Refused imports** `#engine-catalog`: refused `three` imports fail at their line. Override: `createEngineCatalogPlugin({ mode: "warn" })`. Marker: `TN_ENGINE_CATALOG`.
103
107
  <!-- /shared -->
104
108
 
105
109
  <!-- shared: kit-stuck -->
@@ -19,9 +19,9 @@
19
19
  "format:check": "biome format src"
20
20
  },
21
21
  "dependencies": {
22
- "@threenative/core": "0.3.12",
23
- "@threenative/physics": "0.3.12",
24
- "@threenative/ui": "0.3.12",
22
+ "@threenative/core": "0.3.13",
23
+ "@threenative/physics": "0.3.13",
24
+ "@threenative/ui": "0.3.13",
25
25
  "react": "19.2.0",
26
26
  "react-dom": "19.2.0",
27
27
  "three": "0.187.0"
@@ -29,13 +29,13 @@
29
29
  "devDependencies": {
30
30
  "@gltf-transform/cli": "4.4.2",
31
31
  "@tailwindcss/vite": "4.3.3",
32
- "@threenative/assets": "0.3.13",
33
- "@threenative/playtest": "0.3.12",
32
+ "@threenative/assets": "0.3.14",
33
+ "@threenative/playtest": "0.3.13",
34
34
  "@types/react": "19.2.0",
35
35
  "@types/react-dom": "19.2.0",
36
36
  "@types/three": "0.187.0",
37
37
  "@vitejs/plugin-react": "6.0.5",
38
- "create-threenative": "0.2.17",
38
+ "create-threenative": "0.2.18",
39
39
  "esbuild": "0.27.0",
40
40
  "playwright": "1.62.1",
41
41
  "tailwindcss": "4.3.3",
@@ -45,7 +45,7 @@
45
45
  "eslint": "10.13.0"
46
46
  },
47
47
  "optionalDependencies": {
48
- "@threenative/runtime-native": "0.3.12"
48
+ "@threenative/runtime-native": "0.3.13"
49
49
  },
50
50
  "overrides": {
51
51
  "sharp": ">=0.35.4",
@@ -33,7 +33,7 @@ const game = defineGame<GameState, IPhysicsContext>({
33
33
  },
34
34
  plugins: [rapier({ gravity: { x: 0, y: 0, z: 0 } }), playtest({ events: drainPlaytestEvents })],
35
35
  display: config.display,
36
- render: config.renderer,
36
+ renderer: config.renderer,
37
37
  scenes: { play: Play },
38
38
  seed: 93093,
39
39
  start: "play",
@@ -235,7 +235,13 @@ function march(
235
235
  * approximation in RenderMultiScatteredLuminanceLutCS); the full sphere gather overestimated the
236
236
  * ground bounce against the Unreal frames by up to 1.6x, so this uses the same two rays.
237
237
  */
238
+ // The table depends on no input: build it once a run, not once a sky refresh.
239
+ let multipleScattering: Multi | undefined;
238
240
  function multipleScatteringTable(): Multi {
241
+ multipleScattering ??= buildMultipleScatteringTable();
242
+ return multipleScattering;
243
+ }
244
+ function buildMultipleScatteringTable(): Multi {
239
245
  const nh = 12;
240
246
  const nc = 16;
241
247
  const dirs: Vec3[] = [