@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,158 @@
1
+ // src/species/data/juniper.json
2
+ var id = "juniper";
3
+ var name = "Juniper";
4
+ var form = "conifer";
5
+ var trunk = {
6
+ "length": 3.4,
7
+ "radius": .15,
8
+ "taper": .4,
9
+ "lengthVariation": .15,
10
+ "bend": .25,
11
+ "stems": 3,
12
+ "spread": 22,
13
+ "flare": .15
14
+ };
15
+ var branches = [{
16
+ "angleVariation": .2,
17
+ "spiral": 137.5,
18
+ "lengthVariation": .15,
19
+ "taper": .4,
20
+ "bend": .2,
21
+ "gravity": .05,
22
+ "lengthProfile": [
23
+ {
24
+ "t": .2,
25
+ "value": 1
26
+ },
27
+ {
28
+ "t": .7,
29
+ "value": .85
30
+ },
31
+ {
32
+ "t": 1,
33
+ "value": .45
34
+ }
35
+ ],
36
+ "count": 6,
37
+ "start": .2,
38
+ "end": .95,
39
+ "angle": 48,
40
+ "length": .45,
41
+ "radius": .5
42
+ }, {
43
+ "angleVariation": .15,
44
+ "spiral": 137.5,
45
+ "lengthVariation": .15,
46
+ "taper": .4,
47
+ "bend": .15,
48
+ "gravity": .1,
49
+ "count": 3,
50
+ "start": .25,
51
+ "end": 1,
52
+ "angle": 45,
53
+ "length": .5,
54
+ "radius": .5
55
+ }];
56
+ var foliage = {
57
+ "type": "scale",
58
+ "density": .18,
59
+ "size": .7,
60
+ "sizeVariation": .25,
61
+ "start": .1,
62
+ "angle": 45
63
+ };
64
+ var bark = {
65
+ "type": "fibrous",
66
+ "color": "#9a8a7a"
67
+ };
68
+ var fruit = {
69
+ "type": "berry",
70
+ "count": .35,
71
+ "size": .1,
72
+ "sizeVariation": .2,
73
+ "hang": .3
74
+ };
75
+ var roots = {
76
+ "count": 3,
77
+ "length": .1,
78
+ "lengthVariation": .3,
79
+ "radius": .22,
80
+ "angle": 20,
81
+ "bend": .25
82
+ };
83
+ var season = {
84
+ "leafColor": [
85
+ {
86
+ "t": 0,
87
+ "value": "#6a8f62"
88
+ },
89
+ {
90
+ "t": .25,
91
+ "value": "#4f7558"
92
+ },
93
+ {
94
+ "t": .55,
95
+ "value": "#4f7558"
96
+ },
97
+ {
98
+ "t": .75,
99
+ "value": "#4a654e"
100
+ },
101
+ {
102
+ "t": .92,
103
+ "value": "#4a654e"
104
+ },
105
+ {
106
+ "t": 1,
107
+ "value": "#6a8f62"
108
+ }
109
+ ],
110
+ "leafCoverage": [{
111
+ "t": 0,
112
+ "value": 1
113
+ }],
114
+ "blossom": [{
115
+ "t": 0,
116
+ "value": 0
117
+ }],
118
+ "blossomColor": "#c9b46a",
119
+ "fruit": [{
120
+ "t": 0,
121
+ "value": 1
122
+ }],
123
+ "fruitColor": [{
124
+ "t": .15,
125
+ "value": "#7f9a5a"
126
+ }, {
127
+ "t": .6,
128
+ "value": "#4f5f8f"
129
+ }]
130
+ };
131
+ var wind = {
132
+ "trunk": .05,
133
+ "branches": .3,
134
+ "leaves": .4,
135
+ "frequency": .9
136
+ };
137
+ var variation = {
138
+ "color": .08,
139
+ "growth": .1,
140
+ "season": .05
141
+ };
142
+ var juniper_default = {
143
+ id,
144
+ name,
145
+ form,
146
+ trunk,
147
+ branches,
148
+ foliage,
149
+ bark,
150
+ fruit,
151
+ roots,
152
+ season,
153
+ wind,
154
+ variation
155
+ };
156
+ export { bark, branches, juniper_default as default, foliage, form, fruit, id, name, roots, season, trunk, variation, wind };
157
+
158
+ //# sourceMappingURL=juniper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"juniper.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,154 @@
1
+ {
2
+ "id": "juniper",
3
+ "name": "Juniper",
4
+ "form": "conifer",
5
+ "trunk": {
6
+ "length": 3.4,
7
+ "radius": 0.15,
8
+ "taper": 0.4,
9
+ "lengthVariation": 0.15,
10
+ "bend": 0.25,
11
+ "stems": 3,
12
+ "spread": 22,
13
+ "flare": 0.15
14
+ },
15
+ "branches": [
16
+ {
17
+ "angleVariation": 0.2,
18
+ "spiral": 137.5,
19
+ "lengthVariation": 0.15,
20
+ "taper": 0.4,
21
+ "bend": 0.2,
22
+ "gravity": 0.05,
23
+ "lengthProfile": [
24
+ {
25
+ "t": 0.2,
26
+ "value": 1.0
27
+ },
28
+ {
29
+ "t": 0.7,
30
+ "value": 0.85
31
+ },
32
+ {
33
+ "t": 1.0,
34
+ "value": 0.45
35
+ }
36
+ ],
37
+ "count": 6,
38
+ "start": 0.2,
39
+ "end": 0.95,
40
+ "angle": 48,
41
+ "length": 0.45,
42
+ "radius": 0.5
43
+ },
44
+ {
45
+ "angleVariation": 0.15,
46
+ "spiral": 137.5,
47
+ "lengthVariation": 0.15,
48
+ "taper": 0.4,
49
+ "bend": 0.15,
50
+ "gravity": 0.1,
51
+ "count": 3,
52
+ "start": 0.25,
53
+ "end": 1,
54
+ "angle": 45,
55
+ "length": 0.5,
56
+ "radius": 0.5
57
+ }
58
+ ],
59
+ "foliage": {
60
+ "type": "scale",
61
+ "density": 0.18,
62
+ "size": 0.7,
63
+ "sizeVariation": 0.25,
64
+ "start": 0.1,
65
+ "angle": 45
66
+ },
67
+ "bark": {
68
+ "type": "fibrous",
69
+ "color": "#9a8a7a"
70
+ },
71
+ "fruit": {
72
+ "type": "berry",
73
+ "count": 0.35,
74
+ "size": 0.1,
75
+ "sizeVariation": 0.2,
76
+ "hang": 0.3
77
+ },
78
+ "roots": {
79
+ "count": 3,
80
+ "length": 0.1,
81
+ "lengthVariation": 0.3,
82
+ "radius": 0.22,
83
+ "angle": 20,
84
+ "bend": 0.25
85
+ },
86
+ "season": {
87
+ "leafColor": [
88
+ {
89
+ "t": 0,
90
+ "value": "#6a8f62"
91
+ },
92
+ {
93
+ "t": 0.25,
94
+ "value": "#4f7558"
95
+ },
96
+ {
97
+ "t": 0.55,
98
+ "value": "#4f7558"
99
+ },
100
+ {
101
+ "t": 0.75,
102
+ "value": "#4a654e"
103
+ },
104
+ {
105
+ "t": 0.92,
106
+ "value": "#4a654e"
107
+ },
108
+ {
109
+ "t": 1,
110
+ "value": "#6a8f62"
111
+ }
112
+ ],
113
+ "leafCoverage": [
114
+ {
115
+ "t": 0,
116
+ "value": 1
117
+ }
118
+ ],
119
+ "blossom": [
120
+ {
121
+ "t": 0,
122
+ "value": 0
123
+ }
124
+ ],
125
+ "blossomColor": "#c9b46a",
126
+ "fruit": [
127
+ {
128
+ "t": 0,
129
+ "value": 1
130
+ }
131
+ ],
132
+ "fruitColor": [
133
+ {
134
+ "t": 0.15,
135
+ "value": "#7f9a5a"
136
+ },
137
+ {
138
+ "t": 0.6,
139
+ "value": "#4f5f8f"
140
+ }
141
+ ]
142
+ },
143
+ "wind": {
144
+ "trunk": 0.05,
145
+ "branches": 0.3,
146
+ "leaves": 0.4,
147
+ "frequency": 0.9
148
+ },
149
+ "variation": {
150
+ "color": 0.08,
151
+ "growth": 0.1,
152
+ "season": 0.05
153
+ }
154
+ }
@@ -0,0 +1,7 @@
1
+ /** Id of a Species in the collection (kebab-case), e.g. `'oak'`. */
2
+ export type SpeciesName = 'almond' | 'apple' | 'ash' | 'beech' | 'birch' | 'cedar' | 'cherry' | 'chestnut' | 'douglas-fir' | 'elm' | 'hemlock' | 'hickory' | 'juniper' | 'mahogany' | 'maple' | 'oak' | 'olive' | 'peach' | 'pear' | 'pine' | 'plum' | 'red-oak' | 'redwood' | 'sequoia' | 'spruce' | 'teak' | 'walnut' | 'white-oak';
3
+ /** Dynamic import of each Species (its own chunk in the build), by id. */
4
+ export declare const SPECIES_LOADERS: Record<SpeciesName, () => Promise<{
5
+ default: unknown;
6
+ }>>;
7
+ //# sourceMappingURL=loaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/species/loaders.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,OAAO,GACP,KAAK,GACL,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,aAAa,GACb,KAAK,GACL,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAEhB,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CA6BpF,CAAC"}
@@ -0,0 +1,201 @@
1
+ // src/species/data/mahogany.json
2
+ var id = "mahogany";
3
+ var name = "Mahogany";
4
+ var form = "broadleaf";
5
+ var trunk = {
6
+ "length": 8,
7
+ "radius": .46,
8
+ "taper": .34,
9
+ "lengthVariation": .1,
10
+ "bend": .06,
11
+ "flare": .8
12
+ };
13
+ var branches = [
14
+ {
15
+ "angleVariation": .15,
16
+ "spiral": 137.5,
17
+ "lengthVariation": .15,
18
+ "taper": .42,
19
+ "bend": .1,
20
+ "gravity": .12,
21
+ "lengthProfile": [{
22
+ "t": .66,
23
+ "value": 1
24
+ }, {
25
+ "t": 1,
26
+ "value": .55
27
+ }],
28
+ "angleProfile": [{
29
+ "t": .66,
30
+ "value": 1.05
31
+ }, {
32
+ "t": 1,
33
+ "value": .6
34
+ }],
35
+ "count": 6,
36
+ "start": .66,
37
+ "end": .97,
38
+ "angle": 62,
39
+ "length": .5,
40
+ "radius": .62
41
+ },
42
+ {
43
+ "angleVariation": .15,
44
+ "spiral": 137.5,
45
+ "lengthVariation": .15,
46
+ "taper": .45,
47
+ "bend": .12,
48
+ "gravity": .18,
49
+ "count": 3,
50
+ "start": .3,
51
+ "end": 1,
52
+ "angle": 48,
53
+ "length": .55,
54
+ "radius": .6
55
+ },
56
+ {
57
+ "angleVariation": .15,
58
+ "spiral": 137.5,
59
+ "lengthVariation": .15,
60
+ "taper": .45,
61
+ "bend": .1,
62
+ "gravity": .15,
63
+ "count": 2,
64
+ "start": .4,
65
+ "end": 1,
66
+ "angle": 40,
67
+ "length": .5,
68
+ "radius": .6
69
+ }
70
+ ];
71
+ var foliage = {
72
+ "type": "compound",
73
+ "density": .5,
74
+ "size": .7,
75
+ "sizeVariation": .2,
76
+ "start": .15,
77
+ "angle": 50
78
+ };
79
+ var bark = {
80
+ "type": "plated",
81
+ "color": "#9a7462"
82
+ };
83
+ var fruit = {
84
+ "type": "pear",
85
+ "count": .3,
86
+ "size": .18,
87
+ "sizeVariation": .15,
88
+ "hang": 0
89
+ };
90
+ var roots = {
91
+ "count": 7,
92
+ "length": .3,
93
+ "lengthVariation": .3,
94
+ "radius": .4,
95
+ "angle": 10,
96
+ "bend": .35
97
+ };
98
+ var season = {
99
+ "leafColor": [
100
+ {
101
+ "t": 0,
102
+ "value": "#8a5a32"
103
+ },
104
+ {
105
+ "t": .12,
106
+ "value": "#2f5a26"
107
+ },
108
+ {
109
+ "t": .8,
110
+ "value": "#2f5a26"
111
+ },
112
+ {
113
+ "t": .88,
114
+ "value": "#5a6a2a"
115
+ },
116
+ {
117
+ "t": 1,
118
+ "value": "#8a5a32"
119
+ }
120
+ ],
121
+ "leafCoverage": [
122
+ {
123
+ "t": 0,
124
+ "value": .85
125
+ },
126
+ {
127
+ "t": .1,
128
+ "value": 1
129
+ },
130
+ {
131
+ "t": .8,
132
+ "value": 1
133
+ },
134
+ {
135
+ "t": .92,
136
+ "value": .7
137
+ },
138
+ {
139
+ "t": 1,
140
+ "value": .85
141
+ }
142
+ ],
143
+ "blossom": [{
144
+ "t": 0,
145
+ "value": 0
146
+ }],
147
+ "blossomColor": "#e8e2b0",
148
+ "fruit": [
149
+ {
150
+ "t": .2,
151
+ "value": 0
152
+ },
153
+ {
154
+ "t": .35,
155
+ "value": 1
156
+ },
157
+ {
158
+ "t": .85,
159
+ "value": 1
160
+ },
161
+ {
162
+ "t": .95,
163
+ "value": 0
164
+ }
165
+ ],
166
+ "fruitColor": [{
167
+ "t": .35,
168
+ "value": "#6a7a3a"
169
+ }, {
170
+ "t": .75,
171
+ "value": "#6a4a30"
172
+ }]
173
+ };
174
+ var wind = {
175
+ "trunk": .05,
176
+ "branches": .25,
177
+ "leaves": .5,
178
+ "frequency": .8
179
+ };
180
+ var variation = {
181
+ "color": .1,
182
+ "growth": .1,
183
+ "season": .05
184
+ };
185
+ var mahogany_default = {
186
+ id,
187
+ name,
188
+ form,
189
+ trunk,
190
+ branches,
191
+ foliage,
192
+ bark,
193
+ fruit,
194
+ roots,
195
+ season,
196
+ wind,
197
+ variation
198
+ };
199
+ export { bark, branches, mahogany_default as default, foliage, form, fruit, id, name, roots, season, trunk, variation, wind };
200
+
201
+ //# sourceMappingURL=mahogany.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mahogany.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,196 @@
1
+ {
2
+ "id": "mahogany",
3
+ "name": "Mahogany",
4
+ "form": "broadleaf",
5
+ "trunk": {
6
+ "length": 8,
7
+ "radius": 0.46,
8
+ "taper": 0.34,
9
+ "lengthVariation": 0.1,
10
+ "bend": 0.06,
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.1,
20
+ "gravity": 0.12,
21
+ "lengthProfile": [
22
+ {
23
+ "t": 0.66,
24
+ "value": 1.0
25
+ },
26
+ {
27
+ "t": 1.0,
28
+ "value": 0.55
29
+ }
30
+ ],
31
+ "angleProfile": [
32
+ {
33
+ "t": 0.66,
34
+ "value": 1.05
35
+ },
36
+ {
37
+ "t": 1.0,
38
+ "value": 0.6
39
+ }
40
+ ],
41
+ "count": 6,
42
+ "start": 0.66,
43
+ "end": 0.97,
44
+ "angle": 62,
45
+ "length": 0.5,
46
+ "radius": 0.62
47
+ },
48
+ {
49
+ "angleVariation": 0.15,
50
+ "spiral": 137.5,
51
+ "lengthVariation": 0.15,
52
+ "taper": 0.45,
53
+ "bend": 0.12,
54
+ "gravity": 0.18,
55
+ "count": 3,
56
+ "start": 0.3,
57
+ "end": 1,
58
+ "angle": 48,
59
+ "length": 0.55,
60
+ "radius": 0.6
61
+ },
62
+ {
63
+ "angleVariation": 0.15,
64
+ "spiral": 137.5,
65
+ "lengthVariation": 0.15,
66
+ "taper": 0.45,
67
+ "bend": 0.1,
68
+ "gravity": 0.15,
69
+ "count": 2,
70
+ "start": 0.4,
71
+ "end": 1,
72
+ "angle": 40,
73
+ "length": 0.5,
74
+ "radius": 0.6
75
+ }
76
+ ],
77
+ "foliage": {
78
+ "type": "compound",
79
+ "density": 0.5,
80
+ "size": 0.7,
81
+ "sizeVariation": 0.2,
82
+ "start": 0.15,
83
+ "angle": 50
84
+ },
85
+ "bark": {
86
+ "type": "plated",
87
+ "color": "#9a7462"
88
+ },
89
+ "fruit": {
90
+ "type": "pear",
91
+ "count": 0.3,
92
+ "size": 0.18,
93
+ "sizeVariation": 0.15,
94
+ "hang": 0
95
+ },
96
+ "roots": {
97
+ "count": 7,
98
+ "length": 0.3,
99
+ "lengthVariation": 0.3,
100
+ "radius": 0.4,
101
+ "angle": 10,
102
+ "bend": 0.35
103
+ },
104
+ "season": {
105
+ "leafColor": [
106
+ {
107
+ "t": 0,
108
+ "value": "#8a5a32"
109
+ },
110
+ {
111
+ "t": 0.12,
112
+ "value": "#2f5a26"
113
+ },
114
+ {
115
+ "t": 0.8,
116
+ "value": "#2f5a26"
117
+ },
118
+ {
119
+ "t": 0.88,
120
+ "value": "#5a6a2a"
121
+ },
122
+ {
123
+ "t": 1,
124
+ "value": "#8a5a32"
125
+ }
126
+ ],
127
+ "leafCoverage": [
128
+ {
129
+ "t": 0,
130
+ "value": 0.85
131
+ },
132
+ {
133
+ "t": 0.1,
134
+ "value": 1
135
+ },
136
+ {
137
+ "t": 0.8,
138
+ "value": 1
139
+ },
140
+ {
141
+ "t": 0.92,
142
+ "value": 0.7
143
+ },
144
+ {
145
+ "t": 1,
146
+ "value": 0.85
147
+ }
148
+ ],
149
+ "blossom": [
150
+ {
151
+ "t": 0,
152
+ "value": 0
153
+ }
154
+ ],
155
+ "blossomColor": "#e8e2b0",
156
+ "fruit": [
157
+ {
158
+ "t": 0.2,
159
+ "value": 0
160
+ },
161
+ {
162
+ "t": 0.35,
163
+ "value": 1
164
+ },
165
+ {
166
+ "t": 0.85,
167
+ "value": 1
168
+ },
169
+ {
170
+ "t": 0.95,
171
+ "value": 0
172
+ }
173
+ ],
174
+ "fruitColor": [
175
+ {
176
+ "t": 0.35,
177
+ "value": "#6a7a3a"
178
+ },
179
+ {
180
+ "t": 0.75,
181
+ "value": "#6a4a30"
182
+ }
183
+ ]
184
+ },
185
+ "wind": {
186
+ "trunk": 0.05,
187
+ "branches": 0.25,
188
+ "leaves": 0.5,
189
+ "frequency": 0.8
190
+ },
191
+ "variation": {
192
+ "color": 0.1,
193
+ "growth": 0.1,
194
+ "season": 0.05
195
+ }
196
+ }