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
@@ -1,113 +0,0 @@
1
- {
2
- "version": 1,
3
- "recipe": {
4
- "version": 1,
5
- "config": {
6
- "size": 512,
7
- "resolution": 257,
8
- "seed": 73
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": -2.6,
22
- "max": 6550.9
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": "slope",
65
- "min": 35,
66
- "max": 90,
67
- "fade": 10
68
- }
69
- },
70
- {
71
- "material": "sand",
72
- "mask": {
73
- "type": "height",
74
- "min": -1000,
75
- "max": 6,
76
- "fade": 4
77
- }
78
- }
79
- ]
80
- }
81
- },
82
- {
83
- "enabled": true,
84
- "opacity": 1,
85
- "id": "ocean",
86
- "type": "water",
87
- "params": {
88
- "kind": "ocean",
89
- "level": 1.5,
90
- "radius": 512
91
- }
92
- },
93
- {
94
- "enabled": true,
95
- "opacity": 1,
96
- "id": "stand",
97
- "type": "scatter",
98
- "params": {
99
- "asset": "fir",
100
- "count": 80,
101
- "minDistance": 8,
102
- "minHeight": 4,
103
- "maxSlope": 35,
104
- "avoidWater": true,
105
- "scale": [
106
- 0.9,
107
- 1.4
108
- ]
109
- }
110
- }
111
- ]
112
- }
113
- }
@@ -1,41 +0,0 @@
1
- {
2
- "base": {
3
- "id": "sand",
4
- "tile": 3.4,
5
- "tint": [1, 1, 1],
6
- "normal": true,
7
- "triplanar": false
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": "rock",
21
- "tile": 3.8,
22
- "tint": [1, 1, 1],
23
- "normal": true,
24
- "triplanar": true,
25
- "mask": "rock",
26
- "lo": 0.25,
27
- "hi": 0.75
28
- }
29
- ],
30
- "textures": "textures",
31
- "sources": {
32
- "sand": {
33
- "diff": "sand_01/sand_01_diff_1k.jpg",
34
- "nrm": "sand_01/sand_01_nor_gl_1k.jpg"
35
- },
36
- "rock": {
37
- "diff": "rock_boulder_dry/rock_boulder_dry_diff_512.jpg",
38
- "nrm": "rock_boulder_dry/rock_boulder_dry_nor_gl_512.jpg"
39
- }
40
- }
41
- }
@@ -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": "desert",
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
- "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
- "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": "sand_01",
38
- "asset": "Sand 01",
39
- "author": "Rob Tuytel",
40
- "license": "CC0",
41
- "map": "diff",
42
- "file": "sand_01/sand_01_diff_1k.jpg",
43
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/sand_01/sand_01_diff_1k.jpg",
44
- "bytes": 485088,
45
- "dimensions": "1024x1024",
46
- "colourSpace": "srgb",
47
- "metresPerTile": 3.2,
48
- "groundLayer": "sand",
49
- "sampledByTemperateGround": true,
50
- "sha256": "a73b90eaa6d675ef57e7d48a8cf23e1f412e353ab2e29cf73930b8ecd4e76875"
51
- },
52
- {
53
- "set": "sand_01",
54
- "asset": "Sand 01",
55
- "author": "Rob Tuytel",
56
- "license": "CC0",
57
- "map": "nor_gl",
58
- "file": "sand_01/sand_01_nor_gl_1k.jpg",
59
- "url": "https://dl.polyhaven.org/file/ph-assets/Textures/jpg/1k/sand_01/sand_01_nor_gl_1k.jpg",
60
- "bytes": 877821,
61
- "dimensions": "1024x1024",
62
- "colourSpace": "linear",
63
- "metresPerTile": 3.2,
64
- "groundLayer": "sand",
65
- "sampledByTemperateGround": false,
66
- "sha256": "73984aecdc35b1ffbc322d64b7f8d8165b06970d11f37dd47010609fcb532704"
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": "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
- }
@@ -1,108 +0,0 @@
1
- {
2
- "version": 1,
3
- "recipe": {
4
- "version": 1,
5
- "config": {
6
- "size": 512,
7
- "resolution": 257,
8
- "seed": 97
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": 60,
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": "sand",
63
- "mask": {
64
- "type": "all"
65
- }
66
- },
67
- {
68
- "material": "dirt",
69
- "mask": {
70
- "type": "noise",
71
- "scale": 40,
72
- "threshold": 0.7,
73
- "seed": 97,
74
- "fade": 0.2
75
- },
76
- "strength": 0.25
77
- },
78
- {
79
- "material": "rock",
80
- "mask": {
81
- "type": "slope",
82
- "min": 28,
83
- "max": 90,
84
- "fade": 8
85
- }
86
- }
87
- ]
88
- }
89
- },
90
- {
91
- "enabled": true,
92
- "opacity": 1,
93
- "id": "scrub",
94
- "type": "scatter",
95
- "params": {
96
- "asset": "boulder",
97
- "count": 140,
98
- "minDistance": 5,
99
- "maxSlope": 25,
100
- "scale": [
101
- 0.7,
102
- 1.3
103
- ]
104
- }
105
- }
106
- ]
107
- }
108
- }
@@ -1,54 +0,0 @@
1
- {
2
- "base": {
3
- "id": "sand",
4
- "tile": 3.4,
5
- "tint": [1, 1, 1],
6
- "normal": true,
7
- "triplanar": false
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": "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
- "sand": {
42
- "diff": "sand_01/sand_01_diff_1k.jpg",
43
- "nrm": "sand_01/sand_01_nor_gl_1k.jpg"
44
- },
45
- "dirt": {
46
- "diff": "forest_ground_04/forest_ground_04_diff_1k.jpg",
47
- "nrm": "forest_ground_04/forest_ground_04_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
- }
@@ -1,65 +0,0 @@
1
- {
2
- "fir": {
3
- "near": "fir_tree_01/fir-b-lod1.glb",
4
- "maxDistance": 600,
5
- "bounds": {
6
- "min": [-2.869, 0, -3.619],
7
- "max": [2.763, 14.078, 2.465]
8
- },
9
- "mid": "fir_tree_01/fir-b-lod2.glb",
10
- "midDistance": 45,
11
- "tree": true
12
- },
13
- "boulder": {
14
- "near": "boulder_01/boulder-near.glb",
15
- "mid": "boulder_01/boulder-mid.glb",
16
- "midDistance": 35,
17
- "maxDistance": 300,
18
- "bounds": {
19
- "min": [-0.716, 0, -0.991],
20
- "max": [0.557, 1.004, 0.841]
21
- }
22
- },
23
- "fir-c": {
24
- "near": "fir_tree_01/fir-c-lod1.glb",
25
- "maxDistance": 600,
26
- "bounds": {
27
- "min": [-2.727, 0, -3.498],
28
- "max": [3.623, 14.552, 2.508]
29
- },
30
- "mid": "fir_tree_01/fir-c-lod2.glb",
31
- "midDistance": 45
32
- },
33
- "fern-a": {
34
- "near": "fern_02/fern-a.glb",
35
- "maxDistance": 50,
36
- "bounds": {
37
- "min": [-0.699, 0, -0.744],
38
- "max": [0.764, 0.62, 0.802]
39
- }
40
- },
41
- "fern-b": {
42
- "near": "fern_02/fern-b.glb",
43
- "maxDistance": 50,
44
- "bounds": {
45
- "min": [-0.758, 0, -0.879],
46
- "max": [0.655, 0.687, 0.643]
47
- }
48
- },
49
- "boulder-small-a": {
50
- "near": "rock_moss_set_01/pebble-a.glb",
51
- "maxDistance": 80,
52
- "bounds": {
53
- "min": [-1.029, 0, -1.712],
54
- "max": [1.137, 1.462, 1.683]
55
- }
56
- },
57
- "boulder-small-b": {
58
- "near": "rock_moss_set_01/pebble-b.glb",
59
- "maxDistance": 80,
60
- "bounds": {
61
- "min": [-0.955, 0, -0.784],
62
- "max": [1.128, 1.736, 1.09]
63
- }
64
- }
65
- }
@@ -1,8 +0,0 @@
1
- // Run with [--assets <dir>] [--out <dir>]; defaults to installed assets and ./world.
2
- import { cookTerrainWorld } from "@threenative/assets";
3
- import { bakeKit } from "@threenative/terrain/kit";
4
-
5
- await bakeKit(import.meta.url, {
6
- sky: "hdri/kloofendal_48d_partly_cloudy_1k.hdr",
7
- cookTerrainWorld,
8
- });