create-threenative 0.2.18 → 0.2.21

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 (186) hide show
  1. package/agent-docs/references/assertion-reference.md +1 -1
  2. package/agent-docs/references/capability-reference.md +792 -5
  3. package/agent-docs/references/kit-racing.md +4 -2
  4. package/agent-docs/references/performance-basics.md +2 -1
  5. package/agent-docs/references/terrain-authoring.md +25 -7
  6. package/agent-files/.agents/skills/prd-creator/SKILL.md +24 -0
  7. package/dist/index.js +268 -237
  8. package/dist/quality.d.ts +5 -1
  9. package/dist/quality.js +75 -6
  10. package/dist/terrain-kit.js +1 -1
  11. package/dist/threenative.js +7 -5
  12. package/dist/web-engine-post-effects.js +6 -0
  13. package/dist/web-engine-runtime.js +407 -38
  14. package/package.json +6 -6
  15. package/template-assets/assets/floor-fern-0.glb +0 -0
  16. package/template-assets/assets/floor-litter-0.glb +0 -0
  17. package/template-assets/assets/floor-log-0.glb +0 -0
  18. package/template-assets/assets/floor-log-1.glb +0 -0
  19. package/template-assets/assets/floor-stump-0.glb +0 -0
  20. package/template-assets/assets/floor-twig-0.glb +0 -0
  21. package/template-assets/patches/three@0.187.0.patch +108 -21
  22. package/template-assets/quality/eslint.config.js +1 -1
  23. package/templates/action-rpg/package.json +7 -7
  24. package/templates/action-rpg/src/loot/drops.ts +3 -7
  25. package/templates/action-rpg/src/render/camera.ts +2 -2
  26. package/templates/action-rpg/src/render/clouds.ts +3 -1
  27. package/templates/action-rpg/src/render/materials.ts +3 -2
  28. package/templates/action-rpg/src/render/touch-controls.ts +7 -6
  29. package/templates/action-rpg/src/scenes/Play.ts +1 -15
  30. package/templates/adventure/AGENTS.md +3 -3
  31. package/templates/adventure/CLAUDE.md +3 -3
  32. package/templates/adventure/native-playtests/survives.playtest.json +12 -0
  33. package/templates/adventure/native-playtests/woodland-floor.playtest.json +61 -0
  34. package/templates/adventure/package.json +7 -7
  35. package/templates/adventure/playtests/grass.playtest.json +61 -0
  36. package/templates/adventure/playtests/performance.playtest.json +1 -1
  37. package/templates/adventure/playtests/survives.playtest.json +2 -2
  38. package/templates/adventure/playtests/woodland-floor.playtest.json +61 -0
  39. package/templates/adventure/src/entities/LockOn.ts +42 -4
  40. package/templates/adventure/src/entities/Warden.ts +12 -3
  41. package/templates/adventure/src/level/Vale.ts +241 -16
  42. package/templates/adventure/src/render/camera.ts +2 -2
  43. package/templates/adventure/src/render/foliage.ts +64 -20
  44. package/templates/adventure/src/render/grass.ts +325 -0
  45. package/templates/adventure/src/render/materials.ts +3 -2
  46. package/templates/adventure/src/render/palette.ts +3 -0
  47. package/templates/adventure/src/render/touch-controls.ts +4 -1
  48. package/templates/adventure/src/scenes/Play.ts +96 -1
  49. package/templates/collectathon/package.json +7 -7
  50. package/templates/collectathon/src/level/Course.ts +2 -7
  51. package/templates/collectathon/src/level/terrain.ts +2 -1
  52. package/templates/collectathon/src/render/camera.ts +2 -2
  53. package/templates/collectathon/src/render/ground.ts +4 -4
  54. package/templates/collectathon/src/render/hero.ts +1 -1
  55. package/templates/collectathon/src/render/materials.ts +0 -1
  56. package/templates/collectathon/src/render/sky.ts +4 -3
  57. package/templates/kart/package.json +6 -6
  58. package/templates/kart/src/entities/Kart.ts +2 -1
  59. package/templates/kart/src/render/course.ts +2 -1
  60. package/templates/kart/src/track/Course.ts +3 -1
  61. package/templates/minimal/package.json +6 -6
  62. package/templates/minimal/src/render/camera.ts +2 -2
  63. package/templates/minimal/src/render/clouds.ts +3 -1
  64. package/templates/minimal/src/render/materials.ts +3 -2
  65. package/templates/minimal/src/render/touch-controls.ts +7 -6
  66. package/templates/platformer/package.json +7 -7
  67. package/templates/platformer/playtests/collect.playtest.json +4 -1
  68. package/templates/platformer/src/level/Stage.ts +2 -6
  69. package/templates/platformer/src/scenes/Play.ts +2 -1
  70. package/templates/puzzle/package.json +7 -7
  71. package/templates/puzzle/src/entities/Warden.ts +3 -3
  72. package/templates/puzzle/src/render/camera.ts +2 -2
  73. package/templates/puzzle/src/render/touch-controls.ts +7 -6
  74. package/templates/racing/AGENTS.md +2 -2
  75. package/templates/racing/CLAUDE.md +2 -2
  76. package/templates/racing/CREDITS.md +29 -0
  77. package/templates/racing/assets/engine-loop.wav +0 -0
  78. package/templates/racing/assets/grass/Grass004_color.jpg +0 -0
  79. package/templates/racing/assets/grass/Grass004_normal.jpg +0 -0
  80. package/templates/racing/assets/grass/Grass004_roughness.jpg +0 -0
  81. package/templates/racing/assets/nitro-burst.wav +0 -0
  82. package/templates/racing/assets/tyre-squeal.wav +0 -0
  83. package/templates/racing/package.json +7 -7
  84. package/templates/racing/playtests/drift-natural.playtest.json +68 -0
  85. package/templates/racing/playtests/drift.playtest.json +100 -0
  86. package/templates/racing/playtests/hud.playtest.json +117 -0
  87. package/templates/racing/playtests/launch-pose.playtest.json +34 -0
  88. package/templates/racing/playtests/nitro.playtest.json +158 -0
  89. package/templates/racing/playtests/outcome.playtest.json +4 -4
  90. package/templates/racing/playtests/performance.playtest.json +1 -1
  91. package/templates/racing/playtests/steady-camera.playtest.json +88 -0
  92. package/templates/racing/src/audio/engine.ts +138 -0
  93. package/templates/racing/src/entities/CarBody.ts +83 -10
  94. package/templates/racing/src/entities/Drift.ts +243 -0
  95. package/templates/racing/src/entities/LineDriver.ts +2 -2
  96. package/templates/racing/src/entities/Nitro.ts +72 -0
  97. package/templates/racing/src/entities/RacingCar.ts +86 -21
  98. package/templates/racing/src/entities/Rival.ts +35 -21
  99. package/templates/racing/src/game.ts +6 -0
  100. package/templates/racing/src/gauges.ts +74 -0
  101. package/templates/racing/src/render/camera.ts +29 -4
  102. package/templates/racing/src/render/clouds.ts +3 -1
  103. package/templates/racing/src/render/effects.ts +244 -0
  104. package/templates/racing/src/render/materials.ts +43 -8
  105. package/templates/racing/src/render/shapes.ts +37 -0
  106. package/templates/racing/src/render/skids.ts +84 -0
  107. package/templates/racing/src/render/touch-controls.ts +10 -10
  108. package/templates/racing/src/scenes/Race.ts +277 -25
  109. package/templates/racing/src/state.ts +35 -0
  110. package/templates/racing/src/style.css +3 -0
  111. package/templates/racing/src/track/Ranking.ts +8 -4
  112. package/templates/racing/src/track/Track.ts +132 -58
  113. package/templates/racing/src/track/TrackSector.ts +19 -1
  114. package/templates/racing/src/track/circuit.ts +21 -15
  115. package/templates/racing/src/ui/GameUi.tsx +0 -2
  116. package/templates/racing/src/ui/Hud.tsx +417 -50
  117. package/templates/racing/threenative.config.ts +15 -0
  118. package/templates/racing/tools/make-racing-audio.mjs +388 -0
  119. package/templates/rain/package.json +6 -6
  120. package/templates/rain/src/render/noise-volume.ts +2 -1
  121. package/templates/rain/src/state.ts +3 -1
  122. package/templates/rain/src/ui/GameUi.tsx +1 -1
  123. package/templates/rain/src/ui/automation.ts +10 -8
  124. package/templates/rain/src/ui/tempest.ts +3 -4
  125. package/templates/rts/package.json +6 -6
  126. package/templates/rts/src/sim/terrain.ts +1 -0
  127. package/templates/rts/src/sim/types.ts +1 -0
  128. package/templates/runner/package.json +7 -7
  129. package/templates/runner/src/render/clouds.ts +3 -1
  130. package/templates/runner/src/render/materials.ts +3 -2
  131. package/templates/runner/src/render/touch-controls.ts +7 -6
  132. package/templates/runner/src/scenes/Run.ts +4 -9
  133. package/templates/sailing/package.json +7 -7
  134. package/templates/sailing/src/render/touch-controls.ts +7 -6
  135. package/templates/shooter/package.json +7 -7
  136. package/templates/shooter/src/render/clouds.ts +3 -1
  137. package/templates/snow/package.json +7 -7
  138. package/templates/snow/src/entities/Explorer.ts +6 -12
  139. package/templates/snow/src/render/bootPrint.ts +3 -1
  140. package/templates/snow/src/render/camera.ts +3 -2
  141. package/templates/snow/src/render/scenery.ts +3 -3
  142. package/templates/snow/src/render/touch-controls.ts +7 -6
  143. package/templates/snow/src/render/weather.ts +3 -5
  144. package/templates/snow/src/terrain.ts +2 -1
  145. package/templates/starter/native-playtests/render-chain.playtest.json +9 -9
  146. package/templates/starter/package.json +7 -7
  147. package/templates/starter/src/entities/Player.ts +10 -2
  148. package/templates/starter/src/render/camera.ts +2 -2
  149. package/templates/starter/src/render/clouds.ts +3 -1
  150. package/templates/starter/src/render/materials.ts +3 -2
  151. package/templates/starter/src/render/touch-controls.ts +7 -6
  152. package/templates/starter/src/scenes/Play.ts +1 -14
  153. package/templates/tower-defense/package.json +7 -7
  154. package/templates/tower-defense/src/render/shapes.ts +1 -2
  155. package/templates/tower-defense/src/scenes/Battle.ts +3 -8
  156. package/template-assets/terrain/alpine/assets.json +0 -12
  157. package/template-assets/terrain/alpine/bake.mjs +0 -6
  158. package/template-assets/terrain/alpine/credits.json +0 -164
  159. package/template-assets/terrain/alpine/heightmap.r16 +0 -0
  160. package/template-assets/terrain/alpine/recipe.json +0 -119
  161. package/template-assets/terrain/alpine/surface.json +0 -53
  162. package/template-assets/terrain/coastal/assets.json +0 -11
  163. package/template-assets/terrain/coastal/bake.mjs +0 -6
  164. package/template-assets/terrain/coastal/credits.json +0 -117
  165. package/template-assets/terrain/coastal/heightmap.r16 +0 -0
  166. package/template-assets/terrain/coastal/recipe.json +0 -113
  167. package/template-assets/terrain/coastal/surface.json +0 -41
  168. package/template-assets/terrain/desert/assets.json +0 -12
  169. package/template-assets/terrain/desert/bake.mjs +0 -6
  170. package/template-assets/terrain/desert/credits.json +0 -164
  171. package/template-assets/terrain/desert/heightmap.r16 +0 -0
  172. package/template-assets/terrain/desert/recipe.json +0 -108
  173. package/template-assets/terrain/desert/surface.json +0 -54
  174. package/template-assets/terrain/forest/assets.json +0 -65
  175. package/template-assets/terrain/forest/bake.mjs +0 -8
  176. package/template-assets/terrain/forest/credits.json +0 -225
  177. package/template-assets/terrain/forest/heightmap.r16 +0 -0
  178. package/template-assets/terrain/forest/recipe.json +0 -350
  179. package/template-assets/terrain/forest/surface.json +0 -79
  180. package/template-assets/terrain/tundra/assets.json +0 -12
  181. package/template-assets/terrain/tundra/bake.mjs +0 -6
  182. package/template-assets/terrain/tundra/credits.json +0 -164
  183. package/template-assets/terrain/tundra/heightmap.r16 +0 -0
  184. package/template-assets/terrain/tundra/recipe.json +0 -277
  185. package/template-assets/terrain/tundra/surface.json +0 -54
  186. package/templates/racing/src/ui/Menu.tsx +0 -7
@@ -18,9 +18,9 @@
18
18
  "format:check": "biome format src"
19
19
  },
20
20
  "dependencies": {
21
- "@threenative/core": "0.3.13",
22
- "@threenative/physics": "0.3.13",
23
- "@threenative/ui": "0.3.13",
21
+ "@threenative/core": ">=0.3.16",
22
+ "@threenative/physics": ">=0.3.16",
23
+ "@threenative/ui": ">=0.3.16",
24
24
  "react": "19.2.0",
25
25
  "react-dom": "19.2.0",
26
26
  "three": "0.187.0"
@@ -28,13 +28,13 @@
28
28
  "devDependencies": {
29
29
  "@gltf-transform/cli": "4.4.2",
30
30
  "@tailwindcss/vite": "4.3.3",
31
- "@threenative/assets": "0.3.14",
32
- "@threenative/playtest": "0.3.13",
31
+ "@threenative/assets": ">=0.3.17",
32
+ "@threenative/playtest": ">=0.3.16",
33
33
  "@types/react": "19.2.0",
34
34
  "@types/react-dom": "19.2.0",
35
35
  "@types/three": "0.187.0",
36
36
  "@vitejs/plugin-react": "6.0.5",
37
- "create-threenative": "0.2.18",
37
+ "create-threenative": "0.2.21",
38
38
  "esbuild": "0.27.0",
39
39
  "playwright": "1.62.1",
40
40
  "tailwindcss": "4.3.3",
@@ -44,7 +44,7 @@
44
44
  "eslint": "10.13.0"
45
45
  },
46
46
  "optionalDependencies": {
47
- "@threenative/runtime-native": "0.3.13"
47
+ "@threenative/runtime-native": ">=0.3.16"
48
48
  },
49
49
  "overrides": {
50
50
  "sharp": ">=0.35.4",
@@ -399,11 +399,10 @@ export function reactor(): Group {
399
399
  export function lcg(seed: number): () => number {
400
400
  let state = seed >>> 0;
401
401
  return () => {
402
- state = (Math.imul(state, 1664525) + 1013904223) >>> 0;
402
+ state = (state * 1664525 + 1013904223) >>> 0;
403
403
  return state / 4294967296;
404
404
  };
405
405
  }
406
-
407
406
  function scatter(
408
407
  geometry: BufferGeometry,
409
408
  material: Material,
@@ -68,11 +68,6 @@ const STRIKE_BOUNDS = { x: 19, z: 12 } as const;
68
68
  const LEFT_SHIFT = "ShiftLeft";
69
69
  const RIGHT_SHIFT = "ShiftRight";
70
70
 
71
- function sameState(a: GameState, b: GameState): boolean {
72
- for (const key of Object.keys(a) as (keyof GameState)[]) if (a[key] !== b[key]) return false;
73
- return true;
74
- }
75
-
76
71
  export class Battle extends Scene<GameState, IPhysicsContext> {
77
72
  #environmentSample: IEnvironmentSample | undefined;
78
73
  #materialLighting: ReturnType<typeof createMaterialLighting> | undefined;
@@ -514,8 +509,8 @@ export class Battle extends Scene<GameState, IPhysicsContext> {
514
509
  ghost.visible = true;
515
510
  };
516
511
 
517
- // Publish only what changed: the HUD is another process on native, and a frame that changed
518
- // nothing should cost it nothing.
512
+ // The store publishes only what changed: the HUD is another process on native, and a frame
513
+ // that changed nothing costs it nothing.
519
514
  const next: GameState = { ...INITIAL_STATE };
520
515
  const publish = (frameCtx: FrameCtx, speed: number): void => {
521
516
  const previous = frameCtx.state.getState();
@@ -556,7 +551,7 @@ export class Battle extends Scene<GameState, IPhysicsContext> {
556
551
  next.towers = towers.size;
557
552
  next.uiReady = previous.uiReady;
558
553
  next.wave = waves.wave;
559
- if (!sameState(next, previous)) frameCtx.state.set(next);
554
+ frameCtx.state.set(next);
560
555
  };
561
556
 
562
557
  this.#materialLighting = ctx.entities.add(
@@ -1,12 +0,0 @@
1
- {
2
- "boulder": {
3
- "near": "boulder_01/boulder-near.glb",
4
- "mid": "boulder_01/boulder-mid.glb",
5
- "midDistance": 35,
6
- "maxDistance": 300,
7
- "bounds": {
8
- "min": [-0.716, 0, -0.991],
9
- "max": [0.557, 1.004, 0.841]
10
- }
11
- }
12
- }
@@ -1,6 +0,0 @@
1
- // Run with [--assets <dir>] [--out <dir>]; defaults to installed assets and ./world.
2
- import { bakeKit } from "@threenative/terrain/kit";
3
-
4
- await bakeKit(import.meta.url, {
5
- sky: "hdri/kloofendal_48d_partly_cloudy_1k.hdr",
6
- });
@@ -1,164 +0,0 @@
1
- {
2
- "version": 1,
3
- "kit": "alpine",
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
- "rock_boulder_dry": {
11
- "asset": "Rock Boulder Dry",
12
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
13
- "license": "CC0",
14
- "groundLayer": null,
15
- "metresPerTile": null,
16
- "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."
17
- },
18
- "forest_ground_04": {
19
- "asset": "Forest Ground 04",
20
- "author": "Rob Tuytel, Rico Cilliers",
21
- "license": "CC0",
22
- "groundLayer": "dirt",
23
- "metresPerTile": 3.4,
24
- "note": null
25
- },
26
- "snow_02": {
27
- "asset": "Snow 02",
28
- "author": "Rob Tuytel",
29
- "license": "CC0",
30
- "groundLayer": "snow",
31
- "metresPerTile": 12,
32
- "note": null
33
- }
34
- },
35
- "files": [
36
- {
37
- "set": "rock_boulder_dry",
38
- "asset": "Rock Boulder Dry",
39
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
40
- "license": "CC0",
41
- "map": "diff",
42
- "file": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
43
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_diff_1k.jpg",
44
- "bytes": 87707,
45
- "dimensions": "512x512",
46
- "colourSpace": "srgb",
47
- "metresPerTile": null,
48
- "groundLayer": null,
49
- "sampledByTemperateGround": false,
50
- "sha256": "dde5d4cf88dce2a3bcde0490c509f0a5f375c4aa002aa08f96afa6e0fb4f6c7b"
51
- },
52
- {
53
- "set": "rock_boulder_dry",
54
- "asset": "Rock Boulder Dry",
55
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
56
- "license": "CC0",
57
- "map": "nor_gl",
58
- "file": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg",
59
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_nor_gl_1k.jpg",
60
- "bytes": 60524,
61
- "dimensions": "512x512",
62
- "colourSpace": "linear",
63
- "metresPerTile": null,
64
- "groundLayer": null,
65
- "sampledByTemperateGround": false,
66
- "sha256": "5039f885b242fdb9f4b15b1cde8d09dca53ec50d37544ffb72154505ba2fc136"
67
- },
68
- {
69
- "set": "forest_ground_04",
70
- "asset": "Forest Ground 04",
71
- "author": "Rob Tuytel, Rico Cilliers",
72
- "license": "CC0",
73
- "map": "diff",
74
- "file": "forest_ground_04/forest_ground_04_diff_1k.jpg",
75
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/forest_ground_04/forest_ground_04_diff_1k.jpg",
76
- "bytes": 1113899,
77
- "dimensions": "1024x1024",
78
- "colourSpace": "srgb",
79
- "metresPerTile": 3.4,
80
- "groundLayer": "dirt",
81
- "sampledByTemperateGround": true,
82
- "sha256": "50a4dda30875020c64385261aa7e00e2155b592302fa6794165f58fae73cbd2c"
83
- },
84
- {
85
- "set": "forest_ground_04",
86
- "asset": "Forest Ground 04",
87
- "author": "Rob Tuytel, Rico Cilliers",
88
- "license": "CC0",
89
- "map": "nor_gl",
90
- "file": "forest_ground_04/forest_ground_04_nor_gl_1k.jpg",
91
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/forest_ground_04/forest_ground_04_nor_gl_1k.jpg",
92
- "bytes": 1326812,
93
- "dimensions": "1024x1024",
94
- "colourSpace": "linear",
95
- "metresPerTile": 3.4,
96
- "groundLayer": "dirt",
97
- "sampledByTemperateGround": true,
98
- "sha256": "9c3a0200e02ce40edffbbf9f5f623ef08ea9b1b7812b556182ec978f88887151"
99
- },
100
- {
101
- "set": "snow_02",
102
- "asset": "Snow 02",
103
- "author": "Rob Tuytel",
104
- "license": "CC0",
105
- "map": "diff",
106
- "file": "snow_02/snow_02_diff_1k.jpg",
107
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/snow_02/snow_02_diff_1k.jpg",
108
- "bytes": 325497,
109
- "dimensions": "1024x1024",
110
- "colourSpace": "srgb",
111
- "metresPerTile": 12,
112
- "groundLayer": "snow",
113
- "sampledByTemperateGround": true,
114
- "sha256": "523a4e69c90b96d787dd69b897f29a2b3761a017024405c60aa630d1e8e9009a"
115
- },
116
- {
117
- "set": "snow_02",
118
- "asset": "Snow 02",
119
- "author": "Rob Tuytel",
120
- "license": "CC0",
121
- "map": "nor_gl",
122
- "file": "snow_02/snow_02_nor_gl_1k.jpg",
123
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/snow_02/snow_02_nor_gl_1k.jpg",
124
- "bytes": 1081858,
125
- "dimensions": "1024x1024",
126
- "colourSpace": "linear",
127
- "metresPerTile": 12,
128
- "groundLayer": "snow",
129
- "sampledByTemperateGround": false,
130
- "sha256": "9495ec680616b8340e2cbecbd151bff84c690cfad4209e90cc98d2d0ba81f810"
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
- }
@@ -1,119 +0,0 @@
1
- {
2
- "version": 1,
3
- "recipe": {
4
- "version": 1,
5
- "config": {
6
- "size": 512,
7
- "resolution": 257,
8
- "seed": 41
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": 1.2,
22
- "max": 6554.7
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": 48,
50
- "iterations": 1,
51
- "rate": 0.004
52
- }
53
- },
54
- {
55
- "enabled": true,
56
- "opacity": 1,
57
- "id": "surfaces",
58
- "type": "materials",
59
- "params": {
60
- "rules": [
61
- {
62
- "material": "rock",
63
- "mask": {
64
- "type": "all"
65
- }
66
- },
67
- {
68
- "material": "dirt",
69
- "mask": {
70
- "type": "slope",
71
- "min": 20,
72
- "max": 38,
73
- "fade": 6
74
- },
75
- "strength": 0.4
76
- },
77
- {
78
- "material": "snow",
79
- "mask": {
80
- "type": "and",
81
- "masks": [
82
- {
83
- "type": "height",
84
- "min": 80,
85
- "max": 1000000000,
86
- "fade": 60
87
- },
88
- {
89
- "type": "slope",
90
- "min": 0,
91
- "max": 42,
92
- "fade": 8
93
- }
94
- ]
95
- }
96
- }
97
- ]
98
- }
99
- },
100
- {
101
- "enabled": true,
102
- "opacity": 1,
103
- "id": "scree",
104
- "type": "scatter",
105
- "params": {
106
- "asset": "boulder",
107
- "count": 90,
108
- "minDistance": 6,
109
- "minSlope": 15,
110
- "maxSlope": 45,
111
- "scale": [
112
- 0.6,
113
- 1.6
114
- ]
115
- }
116
- }
117
- ]
118
- }
119
- }
@@ -1,53 +0,0 @@
1
- {
2
- "base": {
3
- "id": "rock",
4
- "tile": 3.8,
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": "dirt",
21
- "tile": 3.4,
22
- "tint": [0.8, 0.72, 0.62],
23
- "normal": true,
24
- "mask": "dirt",
25
- "lo": 0.45,
26
- "hi": 0.85
27
- },
28
- {
29
- "id": "snow",
30
- "tile": 4.5,
31
- "tint": [1, 1, 1],
32
- "normal": true,
33
- "mask": "snow",
34
- "lo": 0.3,
35
- "hi": 0.7
36
- }
37
- ],
38
- "textures": "textures",
39
- "sources": {
40
- "rock": {
41
- "diff": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
42
- "nrm": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg"
43
- },
44
- "dirt": {
45
- "diff": "forest_ground_04/forest_ground_04_diff_1k.jpg",
46
- "nrm": "forest_ground_04/forest_ground_04_nor_gl_1k.jpg"
47
- },
48
- "snow": {
49
- "diff": "snow_02/snow_02_diff_1k.jpg",
50
- "nrm": "snow_02/snow_02_nor_gl_1k.jpg"
51
- }
52
- }
53
- }
@@ -1,11 +0,0 @@
1
- {
2
- "fir": {
3
- "near": "fir_tree_01/fir-b-lod2.glb",
4
- "maxDistance": 600,
5
- "bounds": {
6
- "min": [-2.869, 0, -3.619],
7
- "max": [2.763, 14.078, 2.465]
8
- },
9
- "tree": true
10
- }
11
- }
@@ -1,6 +0,0 @@
1
- // Run with [--assets <dir>] [--out <dir>]; defaults to installed assets and ./world.
2
- import { bakeKit } from "@threenative/terrain/kit";
3
-
4
- await bakeKit(import.meta.url, {
5
- sky: "hdri/kloofendal_48d_partly_cloudy_1k.hdr",
6
- });
@@ -1,117 +0,0 @@
1
- {
2
- "version": 1,
3
- "kit": "coastal",
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
- "sand_01": {
11
- "asset": "Sand 01",
12
- "author": "Rob Tuytel",
13
- "license": "CC0",
14
- "groundLayer": "sand",
15
- "metresPerTile": 3.2,
16
- "note": "The 1K diffuse and GL normal map are seam-blended for tiling: each cross-fades its edges with a half-shifted copy. Diffuse left-right seam ratio 1.51 to 0.95; top-bottom 1.43 to 1.13. Only the edges changed; the source is Poly Haven, CC0."
17
- },
18
- "rock_boulder_dry": {
19
- "asset": "Rock Boulder Dry",
20
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
21
- "license": "CC0",
22
- "groundLayer": null,
23
- "metresPerTile": null,
24
- "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."
25
- }
26
- },
27
- "files": [
28
- {
29
- "set": "sand_01",
30
- "asset": "Sand 01",
31
- "author": "Rob Tuytel",
32
- "license": "CC0",
33
- "map": "diff",
34
- "file": "sand_01/sand_01_diff_1k.jpg",
35
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/sand_01/sand_01_diff_1k.jpg",
36
- "bytes": 485088,
37
- "dimensions": "1024x1024",
38
- "colourSpace": "srgb",
39
- "metresPerTile": 3.2,
40
- "groundLayer": "sand",
41
- "sampledByTemperateGround": true,
42
- "sha256": "a73b90eaa6d675ef57e7d48a8cf23e1f412e353ab2e29cf73930b8ecd4e76875"
43
- },
44
- {
45
- "set": "sand_01",
46
- "asset": "Sand 01",
47
- "author": "Rob Tuytel",
48
- "license": "CC0",
49
- "map": "nor_gl",
50
- "file": "sand_01/sand_01_nor_gl_1k.jpg",
51
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/sand_01/sand_01_nor_gl_1k.jpg",
52
- "bytes": 877821,
53
- "dimensions": "1024x1024",
54
- "colourSpace": "linear",
55
- "metresPerTile": 3.2,
56
- "groundLayer": "sand",
57
- "sampledByTemperateGround": false,
58
- "sha256": "73984aecdc35b1ffbc322d64b7f8d8165b06970d11f37dd47010609fcb532704"
59
- },
60
- {
61
- "set": "rock_boulder_dry",
62
- "asset": "Rock Boulder Dry",
63
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
64
- "license": "CC0",
65
- "map": "diff",
66
- "file": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
67
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_diff_1k.jpg",
68
- "bytes": 87707,
69
- "dimensions": "512x512",
70
- "colourSpace": "srgb",
71
- "metresPerTile": null,
72
- "groundLayer": null,
73
- "sampledByTemperateGround": false,
74
- "sha256": "dde5d4cf88dce2a3bcde0490c509f0a5f375c4aa002aa08f96afa6e0fb4f6c7b"
75
- },
76
- {
77
- "set": "rock_boulder_dry",
78
- "asset": "Rock Boulder Dry",
79
- "author": "Dimitrios Savva (Photography), Rico Cilliers (Processing)",
80
- "license": "CC0",
81
- "map": "nor_gl",
82
- "file": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg",
83
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/rock_boulder_dry/rock_boulder_dry_nor_gl_1k.jpg",
84
- "bytes": 60524,
85
- "dimensions": "512x512",
86
- "colourSpace": "linear",
87
- "metresPerTile": null,
88
- "groundLayer": null,
89
- "sampledByTemperateGround": false,
90
- "sha256": "5039f885b242fdb9f4b15b1cde8d09dca53ec50d37544ffb72154505ba2fc136"
91
- },
92
- {
93
- "set": "kloofendal_48d_partly_cloudy",
94
- "asset": "Kloofendal 48d Partly Cloudy",
95
- "author": "Greg Zaal",
96
- "license": "CC0",
97
- "map": "hdri",
98
- "file": "hdri/kloofendal_48d_partly_cloudy_1k.hdr",
99
- "url": "https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/kloofendal_48d_partly_cloudy_1k.hdr",
100
- "bytes": 1637206,
101
- "dimensions": "1024x512",
102
- "colourSpace": "linear",
103
- "sha256": "5477b7dbb2aea4a6947cb36b96339c119f90bf36a03b039af3254b5e6a22896d"
104
- }
105
- ],
106
- "prepared": {
107
- "assets": [
108
- {
109
- "asset": "Fir Tree 01",
110
- "authors": "Rob Tuytel, Rico Cilliers",
111
- "license": "CC0",
112
- "url": "https://polyhaven.com/a/fir_tree_01",
113
- "note": "Poly Haven's own authored LOD2 of tree b (fir_tree_01_b_LOD2, 54,927 triangles, full crown), exported by examples/strata-terrain-preview/scripts/prep-polyhaven-fir.py from the 1k .blend; the forest starter kit's fir."
114
- }
115
- ]
116
- }
117
- }