@casmo/tree.js 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +312 -16
  2. package/dist/apply-Cio2t7CZ.js +285 -0
  3. package/dist/apply-Cio2t7CZ.js.map +1 -0
  4. package/dist/bake/index.d.ts +44 -5
  5. package/dist/bake/index.d.ts.map +1 -1
  6. package/dist/definition/crown-shape.d.ts +9 -0
  7. package/dist/definition/crown-shape.d.ts.map +1 -0
  8. package/dist/definition/defaults.d.ts +15 -1
  9. package/dist/definition/defaults.d.ts.map +1 -1
  10. package/dist/definition/index.d.ts +4 -3
  11. package/dist/definition/index.d.ts.map +1 -1
  12. package/dist/definition/migrations.d.ts +0 -8
  13. package/dist/definition/migrations.d.ts.map +1 -1
  14. package/dist/definition/schema.d.ts.map +1 -1
  15. package/dist/definition/types.d.ts +181 -6
  16. package/dist/definition/types.d.ts.map +1 -1
  17. package/dist/effects/mask.d.ts +3 -3
  18. package/dist/effects/mask.d.ts.map +1 -1
  19. package/dist/effects.js +3 -3
  20. package/dist/effects.js.map +1 -1
  21. package/dist/forest/Forest.d.ts +37 -2
  22. package/dist/forest/Forest.d.ts.map +1 -1
  23. package/dist/forest/nodes.d.ts +6 -1
  24. package/dist/forest/nodes.d.ts.map +1 -1
  25. package/dist/{forest-OX9WvAwh.js → forest-ChEaWJrf.js} +1763 -684
  26. package/dist/forest-ChEaWJrf.js.map +1 -0
  27. package/dist/generator/branches.d.ts +2 -2
  28. package/dist/generator/branches.d.ts.map +1 -1
  29. package/dist/generator/crown.d.ts +28 -0
  30. package/dist/generator/crown.d.ts.map +1 -0
  31. package/dist/generator/fruit.d.ts +28 -0
  32. package/dist/generator/fruit.d.ts.map +1 -0
  33. package/dist/generator/growth.d.ts +1 -1
  34. package/dist/generator/growth.d.ts.map +1 -1
  35. package/dist/generator/index.d.ts +5 -4
  36. package/dist/generator/index.d.ts.map +1 -1
  37. package/dist/generator/leaf-shapes.d.ts +33 -1
  38. package/dist/generator/leaf-shapes.d.ts.map +1 -1
  39. package/dist/generator/mesh.d.ts +10 -2
  40. package/dist/generator/mesh.d.ts.map +1 -1
  41. package/dist/generator/occlusion.d.ts +8 -0
  42. package/dist/generator/occlusion.d.ts.map +1 -0
  43. package/dist/generator/roots.d.ts +16 -0
  44. package/dist/generator/roots.d.ts.map +1 -0
  45. package/dist/generator/trunk.d.ts +16 -2
  46. package/dist/generator/trunk.d.ts.map +1 -1
  47. package/dist/generator/types.d.ts +61 -6
  48. package/dist/generator/types.d.ts.map +1 -1
  49. package/dist/growth/index.d.ts +1 -1
  50. package/dist/growth/index.d.ts.map +1 -1
  51. package/dist/growth/tsl.d.ts +2 -0
  52. package/dist/growth/tsl.d.ts.map +1 -1
  53. package/dist/index.d.ts +6 -3
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +274 -24
  56. package/dist/index.js.map +1 -1
  57. package/dist/materials/crown-nodes.d.ts +20 -0
  58. package/dist/materials/crown-nodes.d.ts.map +1 -0
  59. package/dist/materials/crown-normals.d.ts +17 -0
  60. package/dist/materials/crown-normals.d.ts.map +1 -0
  61. package/dist/materials/ground-tint.d.ts +13 -0
  62. package/dist/materials/ground-tint.d.ts.map +1 -0
  63. package/dist/materials/index.d.ts +13 -1
  64. package/dist/materials/index.d.ts.map +1 -1
  65. package/dist/materials/leaf-translucency-model.d.ts +14 -0
  66. package/dist/materials/leaf-translucency-model.d.ts.map +1 -0
  67. package/dist/materials/leaf-translucency.d.ts +73 -0
  68. package/dist/materials/leaf-translucency.d.ts.map +1 -0
  69. package/dist/materials/material-features.d.ts +43 -0
  70. package/dist/materials/material-features.d.ts.map +1 -0
  71. package/dist/materials/occlusion.d.ts +10 -0
  72. package/dist/materials/occlusion.d.ts.map +1 -0
  73. package/dist/materials/toon.d.ts +18 -1
  74. package/dist/materials/toon.d.ts.map +1 -1
  75. package/dist/names-BE9he6CS.js +713 -0
  76. package/dist/names-BE9he6CS.js.map +1 -0
  77. package/dist/react/Tree.d.ts +5 -2
  78. package/dist/react/Tree.d.ts.map +1 -1
  79. package/dist/react.js +10 -6
  80. package/dist/react.js.map +1 -1
  81. package/dist/season/nodes.d.ts +16 -0
  82. package/dist/season/nodes.d.ts.map +1 -1
  83. package/dist/season/profile.d.ts +26 -0
  84. package/dist/season/profile.d.ts.map +1 -1
  85. package/dist/species/almond.js +223 -0
  86. package/dist/species/almond.js.map +1 -0
  87. package/dist/species/almond.json +210 -0
  88. package/dist/species/apple.js +230 -0
  89. package/dist/species/apple.js.map +1 -0
  90. package/dist/species/apple.json +220 -0
  91. package/dist/species/ash.js +187 -0
  92. package/dist/species/ash.js.map +1 -0
  93. package/dist/species/ash.json +177 -0
  94. package/dist/species/beech.js +174 -0
  95. package/dist/species/beech.js.map +1 -0
  96. package/dist/species/beech.json +167 -0
  97. package/dist/species/birch.js +170 -0
  98. package/dist/species/birch.js.map +1 -0
  99. package/dist/species/birch.json +163 -0
  100. package/dist/species/catalog.d.ts +61 -0
  101. package/dist/species/catalog.d.ts.map +1 -0
  102. package/dist/species/cedar.js +169 -0
  103. package/dist/species/cedar.js.map +1 -0
  104. package/dist/species/cedar.json +168 -0
  105. package/dist/species/cherry.js +237 -0
  106. package/dist/species/cherry.js.map +1 -0
  107. package/dist/species/cherry.json +224 -0
  108. package/dist/species/chestnut.js +230 -0
  109. package/dist/species/chestnut.js.map +1 -0
  110. package/dist/species/chestnut.json +220 -0
  111. package/dist/species/douglas-fir.js +174 -0
  112. package/dist/species/douglas-fir.js.map +1 -0
  113. package/dist/species/douglas-fir.json +170 -0
  114. package/dist/species/elm.js +173 -0
  115. package/dist/species/elm.js.map +1 -0
  116. package/dist/species/elm.json +163 -0
  117. package/dist/species/hemlock.js +175 -0
  118. package/dist/species/hemlock.js.map +1 -0
  119. package/dist/species/hemlock.json +171 -0
  120. package/dist/species/hickory.js +200 -0
  121. package/dist/species/hickory.js.map +1 -0
  122. package/dist/species/hickory.json +192 -0
  123. package/dist/species/index.d.ts +10 -0
  124. package/dist/species/index.d.ts.map +1 -0
  125. package/dist/species/juniper.js +158 -0
  126. package/dist/species/juniper.js.map +1 -0
  127. package/dist/species/juniper.json +154 -0
  128. package/dist/species/loaders.d.ts +7 -0
  129. package/dist/species/loaders.d.ts.map +1 -0
  130. package/dist/species/mahogany.js +201 -0
  131. package/dist/species/mahogany.js.map +1 -0
  132. package/dist/species/mahogany.json +196 -0
  133. package/dist/species/maple.js +177 -0
  134. package/dist/species/maple.js.map +1 -0
  135. package/dist/species/maple.json +171 -0
  136. package/dist/species/oak.js +220 -0
  137. package/dist/species/oak.js.map +1 -0
  138. package/dist/species/oak.json +212 -0
  139. package/dist/species/olive.js +189 -0
  140. package/dist/species/olive.js.map +1 -0
  141. package/dist/species/olive.json +181 -0
  142. package/dist/species/peach.js +223 -0
  143. package/dist/species/peach.js.map +1 -0
  144. package/dist/species/peach.json +210 -0
  145. package/dist/species/pear.js +213 -0
  146. package/dist/species/pear.js.map +1 -0
  147. package/dist/species/pear.json +200 -0
  148. package/dist/species/pine.js +163 -0
  149. package/dist/species/pine.js.map +1 -0
  150. package/dist/species/pine.json +162 -0
  151. package/dist/species/plum.js +237 -0
  152. package/dist/species/plum.js.map +1 -0
  153. package/dist/species/plum.json +224 -0
  154. package/dist/species/red-oak.js +220 -0
  155. package/dist/species/red-oak.js.map +1 -0
  156. package/dist/species/red-oak.json +212 -0
  157. package/dist/species/redwood.js +174 -0
  158. package/dist/species/redwood.js.map +1 -0
  159. package/dist/species/redwood.json +170 -0
  160. package/dist/species/sequoia.js +167 -0
  161. package/dist/species/sequoia.js.map +1 -0
  162. package/dist/species/sequoia.json +166 -0
  163. package/dist/species/spruce.js +170 -0
  164. package/dist/species/spruce.js.map +1 -0
  165. package/dist/species/spruce.json +166 -0
  166. package/dist/species/teak.js +166 -0
  167. package/dist/species/teak.js.map +1 -0
  168. package/dist/species/teak.json +157 -0
  169. package/dist/species/types.d.ts +65 -0
  170. package/dist/species/types.d.ts.map +1 -0
  171. package/dist/species/walnut.js +220 -0
  172. package/dist/species/walnut.js.map +1 -0
  173. package/dist/species/walnut.json +212 -0
  174. package/dist/species/white-oak.js +213 -0
  175. package/dist/species/white-oak.js.map +1 -0
  176. package/dist/species/white-oak.json +208 -0
  177. package/dist/species.js +160 -0
  178. package/dist/species.js.map +1 -0
  179. package/dist/styles/apply.d.ts +12 -0
  180. package/dist/styles/apply.d.ts.map +1 -0
  181. package/dist/styles/low-poly/index.d.ts +1 -1
  182. package/dist/styles/low-poly/index.d.ts.map +1 -1
  183. package/dist/styles/low-poly.js +13 -10
  184. package/dist/styles/low-poly.js.map +1 -1
  185. package/dist/styles/material-features.d.ts +27 -0
  186. package/dist/styles/material-features.d.ts.map +1 -0
  187. package/dist/styles/names.d.ts +28 -0
  188. package/dist/styles/names.d.ts.map +1 -0
  189. package/dist/styles/realistic/index.d.ts +3 -8
  190. package/dist/styles/realistic/index.d.ts.map +1 -1
  191. package/dist/styles/realistic/textures.d.ts +20 -0
  192. package/dist/styles/realistic/textures.d.ts.map +1 -0
  193. package/dist/styles/realistic.js +14 -18
  194. package/dist/styles/realistic.js.map +1 -1
  195. package/dist/styles/registry.d.ts +2 -13
  196. package/dist/styles/registry.d.ts.map +1 -1
  197. package/dist/styles/stylized/index.d.ts +1 -1
  198. package/dist/styles/stylized/index.d.ts.map +1 -1
  199. package/dist/styles/stylized.js +13 -10
  200. package/dist/styles/stylized.js.map +1 -1
  201. package/dist/styles/types.d.ts +16 -2
  202. package/dist/styles/types.d.ts.map +1 -1
  203. package/dist/textures/realistic/bark-fibrous-normal.png +0 -0
  204. package/dist/textures/realistic/bark-fibrous.png +0 -0
  205. package/dist/textures/realistic/bark-papery-normal.png +0 -0
  206. package/dist/textures/realistic/bark-papery.png +0 -0
  207. package/dist/textures/realistic/bark-plated-normal.png +0 -0
  208. package/dist/textures/realistic/bark-plated.png +0 -0
  209. package/dist/textures/realistic/bark-smooth-normal.png +0 -0
  210. package/dist/textures/realistic/bark-smooth.png +0 -0
  211. package/dist/textures/realistic/leaf-compound.png +0 -0
  212. package/dist/textures/realistic/leaf-lobed.png +0 -0
  213. package/dist/textures/realistic/leaf-palmate.png +0 -0
  214. package/dist/textures/realistic/scale.png +0 -0
  215. package/dist/tree/Tree.d.ts +34 -5
  216. package/dist/tree/Tree.d.ts.map +1 -1
  217. package/package.json +9 -2
  218. package/dist/forest-OX9WvAwh.js.map +0 -1
  219. package/dist/types-BZjHhNz7.js +0 -20
  220. package/dist/types-BZjHhNz7.js.map +0 -1
@@ -2,11 +2,11 @@ import type { TreeDefinition } from '../definition';
2
2
  import type { Random } from '../random';
3
3
  import type { SkeletonBranch } from './types';
4
4
  /**
5
- * Grows all branching levels below the trunk, breadth first (level by level).
5
+ * Grows all branching levels on every Stem, breadth first (level by level, over all Stems).
6
6
  *
7
7
  * Branch path stability (ADR 0003): a parent's spiral phase comes from `random.fork(parentPath)`
8
8
  * and each child's shape from `random.fork(childPath)`. So a branch depends only on its
9
9
  * ancestors and its own path, never on its siblings' subtrees, on deeper levels or on leaves.
10
10
  */
11
- export declare function buildBranches(definition: TreeDefinition, trunk: SkeletonBranch, random: Random): SkeletonBranch[];
11
+ export declare function buildBranches(definition: TreeDefinition, stems: SkeletonBranch[], random: Random): SkeletonBranch[];
12
12
  //# sourceMappingURL=branches.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"branches.d.ts","sourceRoot":"","sources":["../../src/generator/branches.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,SAAS,CAAC;AAOnE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAYjH"}
1
+ {"version":3,"file":"branches.d.ts","sourceRoot":"","sources":["../../src/generator/branches.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,SAAS,CAAC;AAOnE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAYnH"}
@@ -0,0 +1,28 @@
1
+ import type { SkeletonBranch, Vec3 } from './types';
2
+ /**
3
+ * The Crown Volume (GLOSSARY): one smooth, axis-aligned ellipsoid around all leaves of the fully grown
4
+ * tree, in tree space (before Growth and Wind). Plain numbers, so it can go into glTF extras unchanged.
5
+ * A point `p` is inside when `crownDistance(crown, p) <= 1`.
6
+ */
7
+ export interface CrownVolume {
8
+ /** Centre of the ellipsoid, tree space (metres). */
9
+ center: Vec3;
10
+ /** Half axes along x, y and z (metres, > 0). */
11
+ radii: Vec3;
12
+ }
13
+ /**
14
+ * How far `p` sits from the Crown Volume's centre, in units of the ellipsoid:
15
+ * 0 at the centre, 1 on the shell, > 1 outside. (`1 - crownDistance` is how deep a point is in the crown.)
16
+ */
17
+ export declare function crownDistance({ center, radii }: CrownVolume, p: Readonly<Vec3>): number;
18
+ /**
19
+ * The unit outward normal at `p` of the Crown Volume's ellipsoid through `p` (the shell scaled to pass
20
+ * through it), i.e. the normalized gradient `(p - center) / radii²`. At the centre itself: straight up.
21
+ */
22
+ export declare function crownNormal({ center, radii }: CrownVolume, p: Readonly<Vec3>): Vec3;
23
+ /**
24
+ * Fits the Crown Volume to the leaf vertex positions of the fully grown tree. A tree without leaves gets
25
+ * a Volume around its branches (centre lines, Roots excluded).
26
+ */
27
+ export declare function crownVolume(leafPositions: Float32Array, branches: readonly SkeletonBranch[]): CrownVolume;
28
+ //# sourceMappingURL=crown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crown.d.ts","sourceRoot":"","sources":["../../src/generator/crown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,MAAM,EAAE,IAAI,CAAC;IACb,gDAAgD;IAChD,KAAK,EAAE,IAAI,CAAC;CACb;AAYD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAKvF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAMnF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,WAAW,CAIzG"}
@@ -0,0 +1,28 @@
1
+ import type { FruitType, TreeDefinition, VariationDefinition } from '../definition';
2
+ import type { Random } from '../random';
3
+ import type { GeometryBuffers, GrowthWindow, SkeletonBranch, SkeletonFruit } from './types';
4
+ import { type PartSway } from './wind';
5
+ /**
6
+ * Places Fruit on the outermost branches (the trunk if there are no branch levels), `fruit.count`
7
+ * per branch (a fraction = a chance of one more). `random` is the Generator's `fork('fruit')`: each Fruit draws from its own
8
+ * `random.fork(fruitId)`, so Fruit never shifts the branches or leaves (ADR 0006).
9
+ */
10
+ export declare function placeFruit(definition: TreeDefinition, branches: SkeletonBranch[], random: Random): SkeletonFruit[];
11
+ /**
12
+ * When each Fruit grows: only at the very end of Growth (from about {@link FRUIT_GROWTH_START},
13
+ * never before its twig is fully grown), so a sapling bears none. Computed apart from the other
14
+ * parts' timing, so Fruit never shifts the Growth of wood or leaves.
15
+ */
16
+ export declare function fruitGrowth(seed: number, fruit: SkeletonFruit[], twigGrowth: ReadonlyMap<string, GrowthWindow>): GrowthWindow[];
17
+ /**
18
+ * Fruit geometry: one small solid per Fruit from its Fruit Type's template, hanging from its
19
+ * attachment point. Vertex colours carry the Seed's tint; `aSeason` = (timing shift, fruit rank, 0);
20
+ * it sways with its twig at the attachment point (no leaf flutter).
21
+ */
22
+ export declare function fruitGeometry(fruit: SkeletonFruit[], { type, sides }: {
23
+ type: FruitType;
24
+ sides?: number | undefined;
25
+ }, level: number, seed: number, variation: Pick<VariationDefinition, 'season'>, growth: GrowthWindow[], branchSway: ReadonlyMap<string, PartSway>): GeometryBuffers;
26
+ /** Empty geometry buffers (a tree without Fruit). */
27
+ export declare function emptyGeometry(): GeometryBuffers;
28
+ //# sourceMappingURL=fruit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fruit.d.ts","sourceRoot":"","sources":["../../src/generator/fruit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAQ,MAAM,SAAS,CAAC;AAClG,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAahD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAuClH;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,YAAY,EAAE,CAK/H;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,aAAa,EAAE,EACtB,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAChE,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,EAC9C,MAAM,EAAE,YAAY,EAAE,EACtB,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,GACxC,eAAe,CAcjB;AAED,qDAAqD;AACrD,wBAAgB,aAAa,IAAI,eAAe,CAS/C"}
@@ -11,5 +11,5 @@ import type { GrowthTiming, SkeletonBranch, SkeletonLeaf } from './types';
11
11
  * (its end stays put, so the order above holds), and the whole timeline is warped by `t^k`,
12
12
  * k in 1 ± v (a monotone map that keeps 0 and 1). Together a window moves by less than v.
13
13
  */
14
- export declare function growthTiming(definition: TreeDefinition, seed: number, branches: SkeletonBranch[], leaves: SkeletonLeaf[]): GrowthTiming;
14
+ export declare function growthTiming(definition: TreeDefinition, seed: number, branches: SkeletonBranch[], leaves: SkeletonLeaf[]): Omit<GrowthTiming, 'fruit' | 'roots'>;
15
15
  //# sourceMappingURL=growth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"growth.d.ts","sourceRoot":"","sources":["../../src/generator/growth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAgB,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcxF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,cAAc,EAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,YAAY,EAAE,GACrB,YAAY,CA4Bd"}
1
+ {"version":3,"file":"growth.d.ts","sourceRoot":"","sources":["../../src/generator/growth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAgB,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcxF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,cAAc,EAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,YAAY,EAAE,GACrB,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,CA4BvC"}
@@ -1,7 +1,8 @@
1
1
  import type { TreeDefinition } from '../definition';
2
2
  import type { GeometryBuffers, TreeData, TreeSkeleton } from './types';
3
3
  export { growthTiming } from './growth';
4
- export type { GrowthTiming, GrowthWindow, GeometryBuffers, TreeAttributes, VertexAttribute, SkeletonBranch, SkeletonLeaf, SkeletonPoint, TreeData, TreeSkeleton, Vec3 } from './types';
4
+ export { crownDistance, crownNormal, type CrownVolume } from './crown';
5
+ export type { GrowthTiming, GrowthWindow, GeometryBuffers, TreeAttributes, VertexAttribute, SkeletonBranch, SkeletonFruit, SkeletonRoot, SkeletonLeaf, SkeletonPoint, TreeData, TreeSkeleton, Vec3 } from './types';
5
6
  /**
6
7
  * The Generator: a pure function from a (parsed) Tree Definition and a Seed to tree data.
7
8
  * No three.js, no GPU, no globals; runs in Node. Same input, same output, on every machine.
@@ -11,12 +12,12 @@ export type { GrowthTiming, GrowthWindow, GeometryBuffers, TreeAttributes, Verte
11
12
  */
12
13
  export declare function generateTree(definition: TreeDefinition, seed: number): TreeData;
13
14
  /**
14
- * Height of the (possibly Sculpted) trunk's tip: the scale of a tree's Wind sway. A Sculpt may
15
- * delete the trunk (an empty tree, nothing sways); the height is then 1.
15
+ * Height of the tallest (possibly Sculpted) Stem: the scale of a tree's Wind sway. For an upright
16
+ * trunk that is its tip. A Sculpt may delete every Stem (an empty tree, nothing sways); it is then 1.
16
17
  */
17
18
  export declare function trunkHeight(skeleton: Pick<TreeSkeleton, 'branches'>): number;
18
19
  /** Stable 32-bit hash (hex) of the generated geometry buffers, for determinism checks. */
19
20
  export declare function hashGeometry(geometry: GeometryBuffers): string;
20
- /** Stable hash of a tree's generated geometry (wood and leaves). */
21
+ /** Stable hash of a tree's generated geometry (wood, leaves and, if any, Fruit). */
21
22
  export declare function hashTreeData(data: TreeData): string;
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAWpD,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvL;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CA6B/E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,CAG5E;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAE9D;AAED,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAepD,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AACvE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpN;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CA8D/E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,CAI5E;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAE9D;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAInD"}
@@ -1,10 +1,42 @@
1
1
  import type { LeafShape, VariationDefinition } from '../definition';
2
- import type { GeometryBuffers, GrowthWindow, SkeletonLeaf } from './types';
2
+ import { type PartInfo } from './attributes';
3
+ import type { GeometryBuffers, GrowthWindow, SkeletonLeaf, Vec3 } from './types';
3
4
  import { type PartSway } from './wind';
5
+ /**
6
+ * A closed solid leaf shape in a leaf's local frame, in units of the leaf size:
7
+ * x = across (side), y = the leaf normal, z = along the leaf direction (0 = attachment, 1 = tip).
8
+ * `normals` are outward unit normals (smooth; a flat-shaded material makes them faceted).
9
+ */
10
+ export interface SolidTemplate {
11
+ positions: Vec3[];
12
+ normals: Vec3[];
13
+ triangles: [number, number, number][];
14
+ }
15
+ /** Low-poly foliage ball: an icosahedron of diameter 1, from the attachment point out along the leaf. */
16
+ export declare function clumpTemplate(): SolidTemplate;
17
+ /** Fixes each triangle's winding so its front face points along its vertex normals (CCW = front). */
18
+ export declare function orient(template: SolidTemplate): SolidTemplate;
4
19
  /**
5
20
  * Leaf geometry for the solid shapes ('clump', 'needle', 'puff'): one small closed mesh per leaf,
6
21
  * placed in the leaf's frame (across, normal, direction) and scaled by its size. Like cards,
7
22
  * every vertex carries the leaf's tint as its colour and the leaf's part attributes.
8
23
  */
9
24
  export declare function solidLeafGeometry(leaves: SkeletonLeaf[], shape: Exclude<LeafShape, 'card'>, level: number, seed: number, variation?: Pick<VariationDefinition, 'season'>, growth?: GrowthWindow[], branchSway?: ReadonlyMap<string, PartSway>): GeometryBuffers;
25
+ /** One placed copy of a solid template: its base point, frame (direction, normal), size and tint. */
26
+ export interface SolidPlacement {
27
+ position: Vec3;
28
+ /** Unit vector from the base point to the far end (template z). */
29
+ direction: Vec3;
30
+ /** Unit vector across it (template y), perpendicular to `direction`. */
31
+ normal: Vec3;
32
+ size: number;
33
+ /** Vertex colour (RGB multiplier). */
34
+ tint: Vec3;
35
+ }
36
+ /**
37
+ * One small closed mesh per placement: the template in the placement's frame
38
+ * (across, normal, direction), scaled by its size, every vertex carrying the placement's tint
39
+ * as its colour and its part attributes (`part`).
40
+ */
41
+ export declare function solidGeometry<P extends SolidPlacement>(template: SolidTemplate, placements: readonly P[], part: (placement: P, index: number) => PartInfo): GeometryBuffers;
10
42
  //# sourceMappingURL=leaf-shapes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leaf-shapes.d.ts","sourceRoot":"","sources":["../../src/generator/leaf-shapes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAQ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AK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAiB,EAC9D,MAAM,GAAE,YAAY,EAAO,EAC3B,UAAU,GAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAa,GACpD,eAAe,CAUjB;AAED,qGAAqG;AACrG,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,IAAI,CAAC;IACf,mEAAmE;IACnE,SAAS,EAAE,IAAI,CAAC;IAChB,wEAAwE;IACxE,MAAM,EAAE,IAAI,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,cAAc,EACpD,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,SAAS,CAAC,EAAE,EACxB,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,QAAQ,GAC9C,eAAe,CA4BjB"}
@@ -1,11 +1,19 @@
1
1
  import type { PartSeason } from '../season/profile';
2
2
  import type { GeometryBuffers, GrowthWindow, SkeletonBranch } from './types';
3
3
  import type { PartSway } from './wind';
4
+ /** How a Stem is swept (ADR 0007): its base ring sinks below the ground, and widens by its Root Flare. */
5
+ export interface StemSweep {
6
+ /** `trunk.flare` (0..1); 0 = no flare and no extra rings. */
7
+ flare: number;
8
+ /** Extra rings in the flare zone (`trunk.flareSections`). */
9
+ sections: number;
10
+ }
4
11
  /**
5
12
  * Sweeps a ring of `sides` vertices along a branch's points, using parallel-transport
6
- * frames so branches in any direction get even rings, and caps the tip.
13
+ * frames so branches in any direction get even rings, and caps the tip. A Stem (`stem` given)
14
+ * sinks its base ring below the ground and widens by its Root Flare; its skeleton is never changed.
7
15
  */
8
- export declare function sweepBranch(branch: SkeletonBranch, sides: number, random: number, season?: PartSeason, growth?: GrowthWindow, sway?: PartSway): GeometryBuffers;
16
+ export declare function sweepBranch(branch: SkeletonBranch, sides: number, random: number, season?: PartSeason, growth?: GrowthWindow, sway?: PartSway, stem?: StemSweep): GeometryBuffers;
9
17
  /** Concatenates geometry buffers into one (indices are offset). */
10
18
  export declare function mergeBuffers(parts: GeometryBuffers[]): GeometryBuffers;
11
19
  //# sourceMappingURL=mesh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/generator/mesh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,UAA0D,EAClE,MAAM,GAAE,YAAmC,EAC3C,IAAI,CAAC,EAAE,QAAQ,GACd,eAAe,CAiDjB;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,eAAe,CAwBtE"}
1
+ {"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/generator/mesh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAQ,MAAM,SAAS,CAAC;AAEnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,0GAA0G;AAC1G,MAAM,WAAW,SAAS;IACxB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,UAA0D,EAClE,MAAM,GAAE,YAAmC,EAC3C,IAAI,CAAC,EAAE,QAAQ,EACf,IAAI,CAAC,EAAE,SAAS,GACf,eAAe,CA6CjB;AAyDD,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,eAAe,CAwBtE"}
@@ -0,0 +1,8 @@
1
+ import { type CrownVolume } from './crown';
2
+ import type { GeometryBuffers } from './types';
3
+ /**
4
+ * Adds `aOcclusion` (1 float per vertex) to each of `parts` (wood, leaves, Fruit). A tree without leaves
5
+ * has no crown to hide under: every vertex is open (1).
6
+ */
7
+ export declare function bakeOcclusion(parts: readonly GeometryBuffers[], leaves: GeometryBuffers, crown: CrownVolume): void;
8
+ //# sourceMappingURL=occlusion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occlusion.d.ts","sourceRoot":"","sources":["../../src/generator/occlusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B/C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAmBlH"}
@@ -0,0 +1,16 @@
1
+ import type { TreeDefinition } from '../definition';
2
+ import type { Random } from '../random';
3
+ import type { SkeletonBranch, SkeletonRoot } from './types';
4
+ /** Sections along a Root while `roots.sections` is absent. */
5
+ export declare const ROOT_SECTIONS = 4;
6
+ /** Sides around a Root while `roots.sides` is absent: about two thirds of the trunk's. */
7
+ export declare const rootSides: (definition: TreeDefinition) => number;
8
+ /**
9
+ * Grows the Roots (ADR 0007) of every Stem in `stems` (the Stems left after the Sculpt pass, as
10
+ * they are after it: a deleted Stem has none, a moved one keeps them at its base, a scaled one
11
+ * scales them with its length). Stem `<p>`'s Roots are `<p>/r0`, `<p>/r1`, ...; Root i draws only
12
+ * from `random.fork('roots/<p>/<i>')` and the Stem's turn from `random.fork('roots/<p>')`, so Roots
13
+ * never change the wood, leaves or Fruit, and one Stem's Sculpts never change another's Roots.
14
+ */
15
+ export declare function growRoots(definition: TreeDefinition, stems: SkeletonBranch[], random: Random): SkeletonRoot[];
16
+ //# sourceMappingURL=roots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../src/generator/roots.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAQ,MAAM,SAAS,CAAC;AAGlE,8DAA8D;AAC9D,eAAO,MAAM,aAAa,IAAI,CAAC;AAc/B,0FAA0F;AAC1F,eAAO,MAAM,SAAS,GAAI,YAAY,cAAc,KAAG,MAC+B,CAAC;AA8BvF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAY7G"}
@@ -1,6 +1,20 @@
1
1
  import type { TreeDefinition } from '../definition';
2
2
  import type { Random } from '../random';
3
3
  import type { SkeletonBranch } from './types';
4
- /** Builds the trunk centre line from the Definition, varied by the Seed within its ranges. */
5
- export declare function buildTrunk(definition: TreeDefinition, random: Random): SkeletonBranch;
4
+ /** How far a Stem's base ring sinks straight down below the ground, as a fraction of the trunk radius (no seam on uneven terrain). */
5
+ export declare const BASE_SINK = 0.1;
6
+ /** Root Flare zone: the bottom fraction of a Stem's length (measured along it, after Sculpts) that widens. */
7
+ export declare const FLARE_ZONE = 0.12;
8
+ /** Root Flare width: at `flare` = 1 the base ring is (1 + this) × the trunk radius. */
9
+ export declare const FLARE_WIDTH = 0.8;
10
+ /** Extra rings the trunk sweep puts in the Root Flare zone while `trunk.flareSections` is absent (the low-poly Style sets 2). */
11
+ export declare const FLARE_SECTIONS = 3;
12
+ /**
13
+ * Builds the Stems: `trunk.stems` full trunks standing in a small ring at the base, paths "0", "1", ...
14
+ *
15
+ * Path stability (ADR 0003): Stem 0's centre line draws from `random.fork('trunk')` exactly as a
16
+ * single trunk always did, Stem i > 0 from `random.fork('trunk/<i>')`; the ring and the leans come
17
+ * from `random.fork('stems')`. So a single upright Stem without gravity is today's trunk, bit for bit.
18
+ */
19
+ export declare function buildStems(definition: TreeDefinition, random: Random): SkeletonBranch[];
6
20
  //# sourceMappingURL=trunk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trunk.d.ts","sourceRoot":"","sources":["../../src/generator/trunk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,SAAS,CAAC;AAE7D,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAkBrF"}
1
+ {"version":3,"file":"trunk.d.ts","sourceRoot":"","sources":["../../src/generator/trunk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,SAAS,CAAC;AAcnE,sIAAsI;AACtI,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,8GAA8G;AAC9G,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,uFAAuF;AACvF,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,iIAAiI;AACjI,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAevF"}
@@ -1,3 +1,4 @@
1
+ import type { CrownVolume } from './crown';
1
2
  export type Vec3 = [number, number, number];
2
3
  /** One point on a branch's centre line. */
3
4
  export interface SkeletonPoint {
@@ -6,7 +7,7 @@ export interface SkeletonPoint {
6
7
  }
7
8
  /**
8
9
  * One branch of the skeleton. `path` is stable for a given Definition and Seed
9
- * (ADR 0003): the trunk is "0", its children "0.0", "0.1", ... (ticket #4).
10
+ * (ADR 0003): the trunk is "0", its children "0.0", "0.1", ... (ticket #4). Extra Stems are "1", "2", ...
10
11
  */
11
12
  export interface SkeletonBranch {
12
13
  path: string;
@@ -20,6 +21,13 @@ export interface SkeletonBranch {
20
21
  direction: Vec3;
21
22
  points: SkeletonPoint[];
22
23
  }
24
+ /**
25
+ * One Root (ADR 0007). It has the shape of a `SkeletonBranch`, but it is not a branch: `path` is
26
+ * `<stem path>/r<i>` (e.g. "0/r0") and `parent` is its Stem's path. `level` and `attach` are only
27
+ * placeholders for Roots (always 0) so the wood mesh can sweep a Root like the trunk; they do not mean a
28
+ * branching level or a place on the Stem. `direction` is the way the Root leaves the Root Flare (out and down).
29
+ */
30
+ export type SkeletonRoot = SkeletonBranch;
23
31
  /**
24
32
  * One leaf. `id` is `<branch path>/<index>`, stable for a given Definition and Seed,
25
33
  * so leaf Sculpts (painting) can address it.
@@ -47,10 +55,40 @@ export interface SkeletonLeaf {
47
55
  */
48
56
  tint: Vec3;
49
57
  }
58
+ /**
59
+ * One Fruit (ADR 0006). `id` is `<branch path>/<index>`, stable for a given Definition and Seed.
60
+ */
61
+ export interface SkeletonFruit {
62
+ id: string;
63
+ /** Path of the (outermost) branch the Fruit grows on. */
64
+ branch: string;
65
+ /** Index of the Fruit on its branch (0 nearest the branch base). */
66
+ index: number;
67
+ /** Where the Fruit sits on its branch, as a fraction (0..1) of the branch length. */
68
+ attach: number;
69
+ /** Attachment point on the branch centre line (the top of the Fruit). */
70
+ position: Vec3;
71
+ /** Unit vector from the attachment point through the Fruit (down for hanging Fruit). */
72
+ direction: Vec3;
73
+ /** A unit vector perpendicular to `direction` (orients the Fruit's shape). */
74
+ normal: Vec3;
75
+ /** Fruit length (attachment to far end). */
76
+ size: number;
77
+ /** The Seed's colour variation for this Fruit (RGB multiplier, as for leaves); also its vertex colour. */
78
+ tint: Vec3;
79
+ }
50
80
  export interface TreeSkeleton {
51
- /** Trunk first, then breadth first: all of level 1, all of level 2, ... */
81
+ /** Stems (trunks) first, then breadth first: all of level 1, all of level 2, ... */
52
82
  branches: SkeletonBranch[];
53
83
  leaves: SkeletonLeaf[];
84
+ /** Fruit on the outermost twigs (empty without a `fruit` block). */
85
+ fruit: SkeletonFruit[];
86
+ /**
87
+ * Roots (ADR 0007), Stem by Stem (empty without a `roots` block), with paths `<stem path>/r<i>`
88
+ * (e.g. "0/r0", "0/r1") and their Stem's path as `parent` (see `SkeletonRoot`).
89
+ * Not in `branches`, where parentless entries are the Stems.
90
+ */
91
+ roots: SkeletonRoot[];
54
92
  }
55
93
  /** A custom per-vertex attribute: `itemSize` floats per vertex. */
56
94
  export interface VertexAttribute {
@@ -61,10 +99,14 @@ export interface VertexAttribute {
61
99
  * Per-vertex attributes every tree mesh carries; Growth, Season and Wind (tickets #6-#8)
62
100
  * are computed from these in TSL, and may add their own entries.
63
101
  * A "part" is a branch (wood mesh) or a leaf (leaves mesh).
102
+ *
103
+ * Only when the Definition sets `materials.occlusion` (Structural Occlusion) is there also `aOcclusion`
104
+ * (float, 0 = occluded .. 1 = open), baked on the fully grown tree with every leaf on from the depth in the
105
+ * Crown Volume and the leaf cover above; independent of Season and of the strength (the material mixes that in).
64
106
  */
65
107
  export interface TreeAttributes {
66
108
  [name: string]: VertexAttribute;
67
- /** Part level: 0 = trunk, n = branching level n, leaves = number of branch levels + 1. */
109
+ /** Part level: 0 = trunk, n = branching level n, leaves = number of branch levels + 1, Fruit = levels + 2. */
68
110
  aLevel: VertexAttribute;
69
111
  /** Position of the vertex along its part, 0 at the base to 1 at the tip. */
70
112
  aAlong: VertexAttribute;
@@ -83,12 +125,13 @@ export interface TreeAttributes {
83
125
  /**
84
126
  * Season (vec3): x = timing shift from the Seed (within ± `variation.season`), y = coverage rank,
85
127
  * z = blossom rank (0..1, leaves only; 0 on wood). See `leafSeason` in src/season.
128
+ * On Fruit: y = the Fruit's rank, z = 0 (see `fruitSeason`).
86
129
  */
87
130
  aSeason: VertexAttribute;
88
131
  /**
89
132
  * Wind weights (vec3, each 0..1): x = trunk sway (pinned at the ground, 1 at the trunk top),
90
133
  * y = branch sway (0 on the trunk, rising towards the outermost twigs), z = leaf flutter (0 on wood,
91
- * 0 at a leaf base, 1 at its tip). See `generator/wind.ts`.
134
+ * 0 at a leaf base, 1 at its tip). Fruit has its twig's branch sway at the attachment point and no flutter. See `generator/wind.ts`.
92
135
  */
93
136
  aWind: VertexAttribute;
94
137
  }
@@ -107,20 +150,32 @@ export interface GrowthWindow {
107
150
  start: number;
108
151
  end: number;
109
152
  }
110
- /** Growth windows per part, parallel to `TreeSkeleton.branches` and `TreeSkeleton.leaves`. */
153
+ /** Growth windows per part, parallel to `TreeSkeleton.branches`, `.leaves` and `.fruit`. */
111
154
  export interface GrowthTiming {
112
155
  branches: GrowthWindow[];
113
156
  leaves: GrowthWindow[];
157
+ /** Fruit grows only at the end of Growth (from about 0.9), on a fully grown twig. */
158
+ fruit: GrowthWindow[];
159
+ /** Roots grow like the trunk: present from Growth 0 ({ start: 0, end: 0 }), scaled with the whole tree. */
160
+ roots: GrowthWindow[];
114
161
  }
115
162
  /** Everything the Generator produces for one Definition + Seed. Pure data, Node-safe. */
116
163
  export interface TreeData {
117
164
  seed: number;
118
165
  skeleton: TreeSkeleton;
119
- /** Wood mesh: trunk and all branches. */
166
+ /** Wood mesh: trunk and all branches, then the Roots. */
120
167
  wood: GeometryBuffers;
121
168
  /** Leaf cards, vertex coloured. Empty buffers for a bare tree. */
122
169
  leaves: GeometryBuffers;
170
+ /** Fruit solids, vertex coloured (the Seed's tint). Empty buffers without Fruit. */
171
+ fruit: GeometryBuffers;
123
172
  /** When each part grows (the Seed shifts it within `variation.growth`). Also in the `aGrowth` attribute. */
124
173
  growth: GrowthTiming;
174
+ /**
175
+ * The Crown Volume: one ellipsoid around all leaves of the fully grown tree (every Stem's), in tree
176
+ * space. Always computed, deterministic per Definition and Seed, and not part of the geometry or its
177
+ * hash. Measure points against it with `crownDistance` and `crownNormal`.
178
+ */
179
+ crown: CrownVolume;
125
180
  }
126
181
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/generator/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE5C,2CAA2C;AAC3C,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,yGAAyG;IACzG,MAAM,EAAE,MAAM,CAAC;IACf,2GAA2G;IAC3G,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,MAAM,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AAC;IACzB,yFAAyF;IACzF,OAAO,EAAE,eAAe,CAAC;IACzB,uEAAuE;IACvE,OAAO,EAAE,eAAe,CAAC;IACzB;;;;OAIG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;;;OAIG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;;;OAIG;IACH,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,qFAAqF;AACrF,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,GAAG,EAAE,YAAY,CAAC;IAClB,wDAAwD;IACxD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qFAAqF;AACrF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,qFAAqF;IACrF,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2GAA2G;IAC3G,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,yFAAyF;AACzF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,yDAAyD;IACzD,IAAI,EAAE,eAAe,CAAC;IACtB,kEAAkE;IAClE,MAAM,EAAE,eAAe,CAAC;IACxB,oFAAoF;IACpF,KAAK,EAAE,eAAe,CAAC;IACvB,4GAA4G;IAC5G,MAAM,EAAE,YAAY,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,WAAW,CAAC;CACpB"}
@@ -1,3 +1,3 @@
1
1
  export { SAPLING_SCALE, SAPLING_THICKNESS, clampGrowth, growPositions, partProgress, thickness, treeScale, } from './evaluate';
2
- export { growthPosition } from './tsl';
2
+ export { growthPosition, growthScale } from './tsl';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/growth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/growth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import type { Node } from 'three/webgpu';
2
+ /** Size of the whole tree at Growth `g` (twin of `treeScale`): the scale `growthPosition` gives the tree. */
3
+ export declare const growthScale: (g: Node<"float">) => Node<"float">;
2
4
  /**
3
5
  * Growth in TSL: the vertex position of a tree part at Growth `growth` (a float node, usually the
4
6
  * tree's Growth uniform; a Forest can pass a per-instance attribute instead). Same model and steps
@@ -1 +1 @@
1
- {"version":3,"file":"tsl.d.ts","sourceRoot":"","sources":["../../src/growth/tsl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAiBzC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAE,IAAI,CAAC,MAAM,CAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,CAa1G"}
1
+ {"version":3,"file":"tsl.d.ts","sourceRoot":"","sources":["../../src/growth/tsl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKzC,6GAA6G;AAC7G,eAAO,MAAM,WAAW,GAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAG,IAAI,CAAC,OAAO,CAA8D,CAAC;AAW1H;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAE,IAAI,CAAC,MAAM,CAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,CAa1G"}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  export { createTree, Tree, type CreateTreeOptions, type TreeOptions } from './tree';
2
2
  export * from './definition';
3
3
  export * from './season';
4
- export { hashGeometry, hashTreeData, type TreeData, type GrowthTiming, type GrowthWindow, type TreeSkeleton, type SkeletonBranch, type SkeletonPoint, type SkeletonLeaf, type GeometryBuffers, type TreeAttributes, type VertexAttribute, type Vec3, } from './generator';
4
+ export { crownDistance, crownNormal, hashGeometry, hashTreeData, type CrownVolume, type TreeData, type GrowthTiming, type GrowthWindow, type TreeSkeleton, type SkeletonBranch, type SkeletonPoint, type SkeletonLeaf, type SkeletonFruit, type SkeletonRoot, type GeometryBuffers, type TreeAttributes, type VertexAttribute, type Vec3, } from './generator';
5
5
  export { createRandom, type Random } from './random';
6
6
  export { createBarkMaterial, createLeafMaterial } from './materials';
7
7
  export { DEFAULT_TEXTURE_BASE_PATH, getTextureOptions, loadTexture, resolveTextureUrl, setTextureOptions, textureReady, type TextureKind, type TextureOptions, } from './textures';
8
8
  export { assertWebGPURenderer, UnsupportedRendererError } from './renderer';
9
9
  export { Wind, sceneWind, WindResponse, type WindDirection, type WindOptions } from './wind';
10
10
  export type { TreeStyle } from './styles/types';
11
- export { loadStyle, STYLE_NAMES, type StyleName } from './styles/registry';
12
- export { bakeTree, disposeBakedTree, exportBakedTree, type BakeOptions, type ExportBakedTreeOptions, } from './bake';
11
+ export type { StyleSource } from './styles/apply';
12
+ export type { SpeciesDefinition, SpeciesTrunkDefinition, SpeciesBranchLevelDefinition, SpeciesFoliageDefinition, SpeciesBarkDefinition, SpeciesFruitDefinition, SpeciesRootsDefinition, } from './species/types';
13
+ export { loadStyle, STYLE_NAMES, styleLabel, styleOfShading, type StyleName } from './styles/registry';
14
+ export { materialFeaturesOf, SUGGESTED_MATERIAL_FEATURES, withMaterialFeatures } from './styles/material-features';
15
+ export { bakeTree, disposeBakedTree, exportBakedTree, type BakeOptions, type ExportBakedTreeOptions, type MaterialFeatureExtras, } from './bake';
13
16
  export { createForest, Forest, ForestTree, ForestVariant, type ForestOptions, type ForestPlacement, type ForestInstanceState, type ForestTreeTraits, } from './forest';
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpF,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,IAAI,GACV,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBA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