@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
@@ -0,0 +1,157 @@
1
+ {
2
+ "id": "teak",
3
+ "name": "Teak",
4
+ "form": "broadleaf",
5
+ "trunk": {
6
+ "length": 7.5,
7
+ "radius": 0.4,
8
+ "taper": 0.36,
9
+ "lengthVariation": 0.1,
10
+ "bend": 0.08,
11
+ "flare": 0.8
12
+ },
13
+ "branches": [
14
+ {
15
+ "angleVariation": 0.15,
16
+ "spiral": 137.5,
17
+ "lengthVariation": 0.15,
18
+ "taper": 0.42,
19
+ "bend": 0.12,
20
+ "gravity": 0.1,
21
+ "lengthProfile": [
22
+ {
23
+ "t": 0.62,
24
+ "value": 1.0
25
+ },
26
+ {
27
+ "t": 1.0,
28
+ "value": 0.55
29
+ }
30
+ ],
31
+ "count": 7,
32
+ "start": 0.62,
33
+ "end": 0.96,
34
+ "angle": 50,
35
+ "length": 0.4,
36
+ "radius": 0.6
37
+ },
38
+ {
39
+ "angleVariation": 0.15,
40
+ "spiral": 137.5,
41
+ "lengthVariation": 0.15,
42
+ "taper": 0.45,
43
+ "bend": 0.12,
44
+ "gravity": 0.15,
45
+ "count": 4,
46
+ "start": 0.35,
47
+ "end": 1,
48
+ "angle": 45,
49
+ "length": 0.6,
50
+ "radius": 0.6
51
+ }
52
+ ],
53
+ "foliage": {
54
+ "type": "broad",
55
+ "density": 0.3,
56
+ "size": 1.25,
57
+ "sizeVariation": 0.25,
58
+ "start": 0.3,
59
+ "angle": 60
60
+ },
61
+ "bark": {
62
+ "type": "fibrous",
63
+ "color": "#a39886"
64
+ },
65
+ "roots": {
66
+ "count": 7,
67
+ "length": 0.3,
68
+ "lengthVariation": 0.3,
69
+ "radius": 0.4,
70
+ "angle": 10,
71
+ "bend": 0.35
72
+ },
73
+ "season": {
74
+ "leafColor": [
75
+ {
76
+ "t": 0,
77
+ "value": "#8fb04a"
78
+ },
79
+ {
80
+ "t": 0.15,
81
+ "value": "#4c7a2e"
82
+ },
83
+ {
84
+ "t": 0.6,
85
+ "value": "#4c7a2e"
86
+ },
87
+ {
88
+ "t": 0.7,
89
+ "value": "#8a6e3a"
90
+ },
91
+ {
92
+ "t": 0.85,
93
+ "value": "#7a5a32"
94
+ },
95
+ {
96
+ "t": 1,
97
+ "value": "#8fb04a"
98
+ }
99
+ ],
100
+ "leafCoverage": [
101
+ {
102
+ "t": 0,
103
+ "value": 0.4
104
+ },
105
+ {
106
+ "t": 0.1,
107
+ "value": 1
108
+ },
109
+ {
110
+ "t": 0.7,
111
+ "value": 1
112
+ },
113
+ {
114
+ "t": 0.86,
115
+ "value": 0
116
+ },
117
+ {
118
+ "t": 0.95,
119
+ "value": 0
120
+ },
121
+ {
122
+ "t": 1,
123
+ "value": 0.4
124
+ }
125
+ ],
126
+ "blossom": [
127
+ {
128
+ "t": 0.4,
129
+ "value": 0
130
+ },
131
+ {
132
+ "t": 0.46,
133
+ "value": 0.25
134
+ },
135
+ {
136
+ "t": 0.54,
137
+ "value": 0.25
138
+ },
139
+ {
140
+ "t": 0.6,
141
+ "value": 0
142
+ }
143
+ ],
144
+ "blossomColor": "#f2efe2"
145
+ },
146
+ "wind": {
147
+ "trunk": 0.06,
148
+ "branches": 0.3,
149
+ "leaves": 0.8,
150
+ "frequency": 0.8
151
+ },
152
+ "variation": {
153
+ "color": 0.1,
154
+ "growth": 0.1,
155
+ "season": 0.05
156
+ }
157
+ }
@@ -0,0 +1,65 @@
1
+ import type { BarkType, BranchLevelDefinition, FruitDefinition, HexColor, LeafType, RootsDefinition, SeasonProfileDefinition, TreeForm, TrunkDefinition, VariationDefinition, WindResponseDefinition } from '../definition/types';
2
+ /**
3
+ * A Species' trunk: the shape fields of {@link TrunkDefinition}, without the polygon detail
4
+ * (`sides`, `sections`, `flareSections`), which the Style chooses. Fields beyond the five required ones (e.g. Stems)
5
+ * are optional and default like in a Tree Definition.
6
+ */
7
+ export type SpeciesTrunkDefinition = Pick<TrunkDefinition, 'length' | 'radius' | 'taper' | 'lengthVariation' | 'bend'> & Partial<Omit<TrunkDefinition, 'sides' | 'sections' | 'flareSections'>>;
8
+ /** A Species' branch level: {@link BranchLevelDefinition} (with its Crown Shape curves) without `sides` / `sections`. */
9
+ export type SpeciesBranchLevelDefinition = Omit<BranchLevelDefinition, 'sides' | 'sections'>;
10
+ /** A Species' foliage, Style-neutral: the Style turns it into leaf shape, count, size and texture. */
11
+ export interface SpeciesFoliageDefinition {
12
+ /** Leaf Type. */
13
+ type: LeafType;
14
+ /** How dense the foliage is, 0 (none) .. 1 (very dense); 0.5 is an ordinary crown. */
15
+ density: number;
16
+ /** Real size of one leaf spray (a cluster of leaves on a twig), metres (> 0). */
17
+ size: number;
18
+ /** Seed range: ± this fraction of `size` (0..1). */
19
+ sizeVariation: number;
20
+ /** Where along the terminal branch leaves start, as a fraction of its length (0..1). */
21
+ start: number;
22
+ /** Angle between branch and leaf, degrees (0..180). */
23
+ angle: number;
24
+ }
25
+ /** A Species' bark, Style-neutral. */
26
+ export interface SpeciesBarkDefinition {
27
+ /** Bark Type. */
28
+ type: BarkType;
29
+ /** Bark colour (the tint for textured bark). */
30
+ color: HexColor;
31
+ }
32
+ /**
33
+ * A Species' Fruit (ADR 0006), copied as is into the Tree Definition's `fruit` block;
34
+ * the Style decides how it is drawn (its shading).
35
+ */
36
+ export type SpeciesFruitDefinition = FruitDefinition;
37
+ /** A Species' Roots (ADR 0007): {@link RootsDefinition} without the polygon detail (`sides`, `sections`), which the Style chooses. */
38
+ export type SpeciesRootsDefinition = Omit<RootsDefinition, 'sides' | 'sections'>;
39
+ /**
40
+ * Species: a named kind of real tree, described once, Style-neutral (ADR 0005). Plain JSON.
41
+ * A Style turns it into an ordinary, complete Tree Definition: `createTree(lowPoly.apply(oak), { seed })`.
42
+ * It holds no shading, polygon detail, textures or Style-specific leaf shape / count.
43
+ */
44
+ export interface SpeciesDefinition {
45
+ /** Kebab-case id, e.g. `'douglas-fir'`; kept as the Definition's `species`. */
46
+ id: string;
47
+ /** English display name, e.g. `'Douglas Fir'`; becomes the Definition's `name`. */
48
+ name: string;
49
+ /** Form: a label for grouping Species; it never changes geometry. */
50
+ form: TreeForm;
51
+ trunk: SpeciesTrunkDefinition;
52
+ /** Branch levels below the trunk, with their Crown Shape curves. */
53
+ branches: SpeciesBranchLevelDefinition[];
54
+ foliage: SpeciesFoliageDefinition;
55
+ bark: SpeciesBarkDefinition;
56
+ /** Optional Fruit. */
57
+ fruit?: SpeciesFruitDefinition;
58
+ /** Optional Roots. */
59
+ roots?: SpeciesRootsDefinition;
60
+ /** Season Profile (tracks beyond the four required ones are optional and default like in a Tree Definition). */
61
+ season: Pick<SeasonProfileDefinition, 'leafColor' | 'leafCoverage' | 'blossom' | 'blossomColor'> & Partial<SeasonProfileDefinition>;
62
+ wind: WindResponseDefinition;
63
+ variation: VariationDefinition;
64
+ }
65
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/species/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,iBAAiB,GAAG,MAAM,CAAC,GACpH,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC;AAEzE,yHAAyH;AACzH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE7F,sGAAsG;AACtG,MAAM,WAAW,wBAAwB;IACvC,iBAAiB;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sCAAsC;AACtC,MAAM,WAAW,qBAAqB;IACpC,iBAAiB;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAErD,sIAAsI;AACtI,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,sBAAsB,CAAC;IAC9B,oEAAoE;IACpE,QAAQ,EAAE,4BAA4B,EAAE,CAAC;IACzC,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,sBAAsB;IACtB,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,sBAAsB;IACtB,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,gHAAgH;IAChH,MAAM,EAAE,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACpI,IAAI,EAAE,sBAAsB,CAAC;IAC7B,SAAS,EAAE,mBAAmB,CAAC;CAChC"}
@@ -0,0 +1,220 @@
1
+ // src/species/data/walnut.json
2
+ var id = "walnut";
3
+ var name = "Walnut";
4
+ var form = "broadleaf";
5
+ var trunk = {
6
+ "length": 3.6,
7
+ "radius": .48,
8
+ "taper": .35,
9
+ "lengthVariation": .12,
10
+ "bend": .14,
11
+ "flare": .4
12
+ };
13
+ var branches = [
14
+ {
15
+ "angleVariation": .15,
16
+ "spiral": 137.5,
17
+ "lengthVariation": .15,
18
+ "taper": .45,
19
+ "bend": .15,
20
+ "gravity": .18,
21
+ "lengthProfile": [
22
+ {
23
+ "t": .55,
24
+ "value": 1
25
+ },
26
+ {
27
+ "t": .75,
28
+ "value": .95
29
+ },
30
+ {
31
+ "t": 1,
32
+ "value": .55
33
+ }
34
+ ],
35
+ "angleProfile": [{
36
+ "t": .55,
37
+ "value": 1.1
38
+ }, {
39
+ "t": 1,
40
+ "value": .6
41
+ }],
42
+ "count": 5,
43
+ "start": .55,
44
+ "end": .95,
45
+ "angle": 62,
46
+ "length": .95,
47
+ "radius": .62
48
+ },
49
+ {
50
+ "angleVariation": .15,
51
+ "spiral": 137.5,
52
+ "lengthVariation": .15,
53
+ "taper": .45,
54
+ "bend": .15,
55
+ "gravity": .2,
56
+ "count": 3,
57
+ "start": .3,
58
+ "end": 1,
59
+ "angle": 48,
60
+ "length": .5,
61
+ "radius": .6
62
+ },
63
+ {
64
+ "angleVariation": .15,
65
+ "spiral": 137.5,
66
+ "lengthVariation": .15,
67
+ "taper": .45,
68
+ "bend": .12,
69
+ "gravity": .15,
70
+ "count": 3,
71
+ "start": .35,
72
+ "end": 1,
73
+ "angle": 40,
74
+ "length": .45,
75
+ "radius": .6
76
+ }
77
+ ];
78
+ var foliage = {
79
+ "type": "compound",
80
+ "density": .35,
81
+ "size": .85,
82
+ "sizeVariation": .25,
83
+ "start": .25,
84
+ "angle": 55
85
+ };
86
+ var bark = {
87
+ "type": "furrowed",
88
+ "color": "#8a8278"
89
+ };
90
+ var fruit = {
91
+ "type": "nut",
92
+ "count": .3,
93
+ "size": .12,
94
+ "sizeVariation": .15,
95
+ "hang": .4
96
+ };
97
+ var roots = {
98
+ "count": 5,
99
+ "length": .2,
100
+ "lengthVariation": .3,
101
+ "radius": .3,
102
+ "angle": 14,
103
+ "bend": .3
104
+ };
105
+ var season = {
106
+ "leafColor": [
107
+ {
108
+ "t": 0,
109
+ "value": "#a5c45a"
110
+ },
111
+ {
112
+ "t": .2,
113
+ "value": "#66873a"
114
+ },
115
+ {
116
+ "t": .5,
117
+ "value": "#66873a"
118
+ },
119
+ {
120
+ "t": .58,
121
+ "value": "#c4ac48"
122
+ },
123
+ {
124
+ "t": .6799999999999999,
125
+ "value": "#8e7a40"
126
+ },
127
+ {
128
+ "t": .97,
129
+ "value": "#8e7a40"
130
+ },
131
+ {
132
+ "t": 1,
133
+ "value": "#a5c45a"
134
+ }
135
+ ],
136
+ "leafCoverage": [
137
+ {
138
+ "t": 0,
139
+ "value": .3
140
+ },
141
+ {
142
+ "t": .1,
143
+ "value": 1
144
+ },
145
+ {
146
+ "t": .6,
147
+ "value": 1
148
+ },
149
+ {
150
+ "t": .72,
151
+ "value": 0
152
+ },
153
+ {
154
+ "t": .96,
155
+ "value": 0
156
+ },
157
+ {
158
+ "t": 1,
159
+ "value": .3
160
+ }
161
+ ],
162
+ "blossom": [{
163
+ "t": 0,
164
+ "value": 0
165
+ }],
166
+ "blossomColor": "#d8d48a",
167
+ "fruit": [
168
+ {
169
+ "t": .25,
170
+ "value": 0
171
+ },
172
+ {
173
+ "t": .4,
174
+ "value": 1
175
+ },
176
+ {
177
+ "t": .62,
178
+ "value": 1
179
+ },
180
+ {
181
+ "t": .7,
182
+ "value": 0
183
+ }
184
+ ],
185
+ "fruitColor": [{
186
+ "t": .35,
187
+ "value": "#7a9a3a"
188
+ }, {
189
+ "t": .6,
190
+ "value": "#5a4a2a"
191
+ }]
192
+ };
193
+ var wind = {
194
+ "trunk": .08,
195
+ "branches": .3,
196
+ "leaves": .6,
197
+ "frequency": .9
198
+ };
199
+ var variation = {
200
+ "color": .1,
201
+ "growth": .1,
202
+ "season": .05
203
+ };
204
+ var walnut_default = {
205
+ id,
206
+ name,
207
+ form,
208
+ trunk,
209
+ branches,
210
+ foliage,
211
+ bark,
212
+ fruit,
213
+ roots,
214
+ season,
215
+ wind,
216
+ variation
217
+ };
218
+ export { bark, branches, walnut_default as default, foliage, form, fruit, id, name, roots, season, trunk, variation, wind };
219
+
220
+ //# sourceMappingURL=walnut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walnut.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,212 @@
1
+ {
2
+ "id": "walnut",
3
+ "name": "Walnut",
4
+ "form": "broadleaf",
5
+ "trunk": {
6
+ "length": 3.6,
7
+ "radius": 0.48,
8
+ "taper": 0.35,
9
+ "lengthVariation": 0.12,
10
+ "bend": 0.14,
11
+ "flare": 0.4
12
+ },
13
+ "branches": [
14
+ {
15
+ "angleVariation": 0.15,
16
+ "spiral": 137.5,
17
+ "lengthVariation": 0.15,
18
+ "taper": 0.45,
19
+ "bend": 0.15,
20
+ "gravity": 0.18,
21
+ "lengthProfile": [
22
+ {
23
+ "t": 0.55,
24
+ "value": 1.0
25
+ },
26
+ {
27
+ "t": 0.75,
28
+ "value": 0.95
29
+ },
30
+ {
31
+ "t": 1.0,
32
+ "value": 0.55
33
+ }
34
+ ],
35
+ "angleProfile": [
36
+ {
37
+ "t": 0.55,
38
+ "value": 1.1
39
+ },
40
+ {
41
+ "t": 1.0,
42
+ "value": 0.6
43
+ }
44
+ ],
45
+ "count": 5,
46
+ "start": 0.55,
47
+ "end": 0.95,
48
+ "angle": 62,
49
+ "length": 0.95,
50
+ "radius": 0.62
51
+ },
52
+ {
53
+ "angleVariation": 0.15,
54
+ "spiral": 137.5,
55
+ "lengthVariation": 0.15,
56
+ "taper": 0.45,
57
+ "bend": 0.15,
58
+ "gravity": 0.2,
59
+ "count": 3,
60
+ "start": 0.3,
61
+ "end": 1,
62
+ "angle": 48,
63
+ "length": 0.5,
64
+ "radius": 0.6
65
+ },
66
+ {
67
+ "angleVariation": 0.15,
68
+ "spiral": 137.5,
69
+ "lengthVariation": 0.15,
70
+ "taper": 0.45,
71
+ "bend": 0.12,
72
+ "gravity": 0.15,
73
+ "count": 3,
74
+ "start": 0.35,
75
+ "end": 1,
76
+ "angle": 40,
77
+ "length": 0.45,
78
+ "radius": 0.6
79
+ }
80
+ ],
81
+ "foliage": {
82
+ "type": "compound",
83
+ "density": 0.35,
84
+ "size": 0.85,
85
+ "sizeVariation": 0.25,
86
+ "start": 0.25,
87
+ "angle": 55
88
+ },
89
+ "bark": {
90
+ "type": "furrowed",
91
+ "color": "#8a8278"
92
+ },
93
+ "fruit": {
94
+ "type": "nut",
95
+ "count": 0.3,
96
+ "size": 0.12,
97
+ "sizeVariation": 0.15,
98
+ "hang": 0.4
99
+ },
100
+ "roots": {
101
+ "count": 5,
102
+ "length": 0.2,
103
+ "lengthVariation": 0.3,
104
+ "radius": 0.3,
105
+ "angle": 14,
106
+ "bend": 0.3
107
+ },
108
+ "season": {
109
+ "leafColor": [
110
+ {
111
+ "t": 0,
112
+ "value": "#a5c45a"
113
+ },
114
+ {
115
+ "t": 0.2,
116
+ "value": "#66873a"
117
+ },
118
+ {
119
+ "t": 0.5,
120
+ "value": "#66873a"
121
+ },
122
+ {
123
+ "t": 0.58,
124
+ "value": "#c4ac48"
125
+ },
126
+ {
127
+ "t": 0.6799999999999999,
128
+ "value": "#8e7a40"
129
+ },
130
+ {
131
+ "t": 0.97,
132
+ "value": "#8e7a40"
133
+ },
134
+ {
135
+ "t": 1,
136
+ "value": "#a5c45a"
137
+ }
138
+ ],
139
+ "leafCoverage": [
140
+ {
141
+ "t": 0,
142
+ "value": 0.3
143
+ },
144
+ {
145
+ "t": 0.1,
146
+ "value": 1
147
+ },
148
+ {
149
+ "t": 0.6,
150
+ "value": 1
151
+ },
152
+ {
153
+ "t": 0.72,
154
+ "value": 0
155
+ },
156
+ {
157
+ "t": 0.96,
158
+ "value": 0
159
+ },
160
+ {
161
+ "t": 1,
162
+ "value": 0.3
163
+ }
164
+ ],
165
+ "blossom": [
166
+ {
167
+ "t": 0,
168
+ "value": 0
169
+ }
170
+ ],
171
+ "blossomColor": "#d8d48a",
172
+ "fruit": [
173
+ {
174
+ "t": 0.25,
175
+ "value": 0
176
+ },
177
+ {
178
+ "t": 0.4,
179
+ "value": 1
180
+ },
181
+ {
182
+ "t": 0.62,
183
+ "value": 1
184
+ },
185
+ {
186
+ "t": 0.7,
187
+ "value": 0
188
+ }
189
+ ],
190
+ "fruitColor": [
191
+ {
192
+ "t": 0.35,
193
+ "value": "#7a9a3a"
194
+ },
195
+ {
196
+ "t": 0.6,
197
+ "value": "#5a4a2a"
198
+ }
199
+ ]
200
+ },
201
+ "wind": {
202
+ "trunk": 0.08,
203
+ "branches": 0.3,
204
+ "leaves": 0.6,
205
+ "frequency": 0.9
206
+ },
207
+ "variation": {
208
+ "color": 0.1,
209
+ "growth": 0.1,
210
+ "season": 0.05
211
+ }
212
+ }