@casmo/tree.js 0.0.0-stage → 0.1.1

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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +485 -2
  3. package/dist/bake/index.d.ts +39 -0
  4. package/dist/bake/index.d.ts.map +1 -0
  5. package/dist/definition/defaults.d.ts +9 -0
  6. package/dist/definition/defaults.d.ts.map +1 -0
  7. package/dist/definition/index.d.ts +5 -0
  8. package/dist/definition/index.d.ts.map +1 -0
  9. package/dist/definition/migrations.d.ts +12 -0
  10. package/dist/definition/migrations.d.ts.map +1 -0
  11. package/dist/definition/parse.d.ts +30 -0
  12. package/dist/definition/parse.d.ts.map +1 -0
  13. package/dist/definition/schema.d.ts +13 -0
  14. package/dist/definition/schema.d.ts.map +1 -0
  15. package/dist/definition/types.d.ts +217 -0
  16. package/dist/definition/types.d.ts.map +1 -0
  17. package/dist/effects/effects.d.ts +46 -0
  18. package/dist/effects/effects.d.ts.map +1 -0
  19. package/dist/effects/glow.d.ts +19 -0
  20. package/dist/effects/glow.d.ts.map +1 -0
  21. package/dist/effects/grade.d.ts +19 -0
  22. package/dist/effects/grade.d.ts.map +1 -0
  23. package/dist/effects/index.d.ts +7 -0
  24. package/dist/effects/index.d.ts.map +1 -0
  25. package/dist/effects/mask.d.ts +44 -0
  26. package/dist/effects/mask.d.ts.map +1 -0
  27. package/dist/effects/outline.d.ts +18 -0
  28. package/dist/effects/outline.d.ts.map +1 -0
  29. package/dist/effects/suggested.d.ts +13 -0
  30. package/dist/effects/suggested.d.ts.map +1 -0
  31. package/dist/effects.js +249 -0
  32. package/dist/effects.js.map +1 -0
  33. package/dist/forest/Forest.d.ts +156 -0
  34. package/dist/forest/Forest.d.ts.map +1 -0
  35. package/dist/forest/index.d.ts +14 -0
  36. package/dist/forest/index.d.ts.map +1 -0
  37. package/dist/forest/nodes.d.ts +31 -0
  38. package/dist/forest/nodes.d.ts.map +1 -0
  39. package/dist/forest/placement.d.ts +52 -0
  40. package/dist/forest/placement.d.ts.map +1 -0
  41. package/dist/forest-OX9WvAwh.js +3057 -0
  42. package/dist/forest-OX9WvAwh.js.map +1 -0
  43. package/dist/generator/attributes.d.ts +20 -0
  44. package/dist/generator/attributes.d.ts.map +1 -0
  45. package/dist/generator/branches.d.ts +12 -0
  46. package/dist/generator/branches.d.ts.map +1 -0
  47. package/dist/generator/frames.d.ts +21 -0
  48. package/dist/generator/frames.d.ts.map +1 -0
  49. package/dist/generator/growth.d.ts +15 -0
  50. package/dist/generator/growth.d.ts.map +1 -0
  51. package/dist/generator/index.d.ts +22 -0
  52. package/dist/generator/index.d.ts.map +1 -0
  53. package/dist/generator/leaf-shapes.d.ts +10 -0
  54. package/dist/generator/leaf-shapes.d.ts.map +1 -0
  55. package/dist/generator/leaves.d.ts +14 -0
  56. package/dist/generator/leaves.d.ts.map +1 -0
  57. package/dist/generator/mesh.d.ts +11 -0
  58. package/dist/generator/mesh.d.ts.map +1 -0
  59. package/dist/generator/sculpt.d.ts +28 -0
  60. package/dist/generator/sculpt.d.ts.map +1 -0
  61. package/dist/generator/trunk.d.ts +6 -0
  62. package/dist/generator/trunk.d.ts.map +1 -0
  63. package/dist/generator/types.d.ts +126 -0
  64. package/dist/generator/types.d.ts.map +1 -0
  65. package/dist/generator/vec.d.ts +12 -0
  66. package/dist/generator/vec.d.ts.map +1 -0
  67. package/dist/generator/wind.d.ts +27 -0
  68. package/dist/generator/wind.d.ts.map +1 -0
  69. package/dist/growth/evaluate.d.ts +32 -0
  70. package/dist/growth/evaluate.d.ts.map +1 -0
  71. package/dist/growth/index.d.ts +3 -0
  72. package/dist/growth/index.d.ts.map +1 -0
  73. package/dist/growth/tsl.d.ts +12 -0
  74. package/dist/growth/tsl.d.ts.map +1 -0
  75. package/dist/index.d.ts +14 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +198 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/materials/index.d.ts +18 -0
  80. package/dist/materials/index.d.ts.map +1 -0
  81. package/dist/materials/maps.d.ts +23 -0
  82. package/dist/materials/maps.d.ts.map +1 -0
  83. package/dist/materials/shading.d.ts +18 -0
  84. package/dist/materials/shading.d.ts.map +1 -0
  85. package/dist/materials/toon.d.ts +12 -0
  86. package/dist/materials/toon.d.ts.map +1 -0
  87. package/dist/math/index.d.ts +23 -0
  88. package/dist/math/index.d.ts.map +1 -0
  89. package/dist/profiles-BAiyeFlh.js +113 -0
  90. package/dist/profiles-BAiyeFlh.js.map +1 -0
  91. package/dist/random/index.d.ts +37 -0
  92. package/dist/random/index.d.ts.map +1 -0
  93. package/dist/react/Forest.d.ts +54 -0
  94. package/dist/react/Forest.d.ts.map +1 -0
  95. package/dist/react/Tree.d.ts +41 -0
  96. package/dist/react/Tree.d.ts.map +1 -0
  97. package/dist/react/Wind.d.ts +17 -0
  98. package/dist/react/Wind.d.ts.map +1 -0
  99. package/dist/react/index.d.ts +6 -0
  100. package/dist/react/index.d.ts.map +1 -0
  101. package/dist/react/useTreeStyle.d.ts +15 -0
  102. package/dist/react/useTreeStyle.d.ts.map +1 -0
  103. package/dist/react.js +239 -0
  104. package/dist/react.js.map +1 -0
  105. package/dist/renderer/index.d.ts +7 -0
  106. package/dist/renderer/index.d.ts.map +1 -0
  107. package/dist/season/check.d.ts +3 -0
  108. package/dist/season/check.d.ts.map +1 -0
  109. package/dist/season/index.d.ts +4 -0
  110. package/dist/season/index.d.ts.map +1 -0
  111. package/dist/season/nodes.d.ts +32 -0
  112. package/dist/season/nodes.d.ts.map +1 -0
  113. package/dist/season/profile.d.ts +78 -0
  114. package/dist/season/profile.d.ts.map +1 -0
  115. package/dist/season/profiles.d.ts +40 -0
  116. package/dist/season/profiles.d.ts.map +1 -0
  117. package/dist/styles/low-poly/index.d.ts +16 -0
  118. package/dist/styles/low-poly/index.d.ts.map +1 -0
  119. package/dist/styles/low-poly.js +165 -0
  120. package/dist/styles/low-poly.js.map +1 -0
  121. package/dist/styles/realistic/index.d.ts +23 -0
  122. package/dist/styles/realistic/index.d.ts.map +1 -0
  123. package/dist/styles/realistic.js +206 -0
  124. package/dist/styles/realistic.js.map +1 -0
  125. package/dist/styles/registry.d.ts +17 -0
  126. package/dist/styles/registry.d.ts.map +1 -0
  127. package/dist/styles/stylized/index.d.ts +17 -0
  128. package/dist/styles/stylized/index.d.ts.map +1 -0
  129. package/dist/styles/stylized.js +266 -0
  130. package/dist/styles/stylized.js.map +1 -0
  131. package/dist/styles/types.d.ts +12 -0
  132. package/dist/styles/types.d.ts.map +1 -0
  133. package/dist/textures/index.d.ts +44 -0
  134. package/dist/textures/index.d.ts.map +1 -0
  135. package/dist/textures/realistic/bark-normal.png +0 -0
  136. package/dist/textures/realistic/bark.png +0 -0
  137. package/dist/textures/realistic/leaf.png +0 -0
  138. package/dist/textures/realistic/needles.png +0 -0
  139. package/dist/tree/Tree.d.ts +70 -0
  140. package/dist/tree/Tree.d.ts.map +1 -0
  141. package/dist/tree/index.d.ts +14 -0
  142. package/dist/tree/index.d.ts.map +1 -0
  143. package/dist/types-BZjHhNz7.js +20 -0
  144. package/dist/types-BZjHhNz7.js.map +1 -0
  145. package/dist/wind/Wind.d.ts +54 -0
  146. package/dist/wind/Wind.d.ts.map +1 -0
  147. package/dist/wind/index.d.ts +4 -0
  148. package/dist/wind/index.d.ts.map +1 -0
  149. package/dist/wind/node.d.ts +38 -0
  150. package/dist/wind/node.d.ts.map +1 -0
  151. package/dist/wind/response.d.ts +27 -0
  152. package/dist/wind/response.d.ts.map +1 -0
  153. package/package.json +107 -4
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Tree Definition schema (see GLOSSARY.md). Plain JSON: it is what the Tree Editor exports
3
+ * and what `createTree` consumes. Every field is documented with its unit and allowed range;
4
+ * the runtime rules live in `schema.ts` and the defaults in `defaults.ts`.
5
+ *
6
+ * Conventions: lengths in metres (scene units), angles in degrees, colours as `#rrggbb`,
7
+ * "fraction" fields are 0..1. Fields named `*Variation` are Seed ranges: the Seed picks a
8
+ * value within ± that fraction of the base value.
9
+ */
10
+ /**
11
+ * Current Tree Definition schema version. Bump it, and add a migration in `migrations.ts`,
12
+ * whenever the format changes or a generator change would alter existing trees (ADR 0003).
13
+ */
14
+ export declare const CURRENT_SCHEMA_VERSION = 2;
15
+ /** `#rrggbb` colour string. */
16
+ export type HexColor = string;
17
+ /** [x, y, z] */
18
+ export type Vec3Tuple = [number, number, number];
19
+ /** The overall kind of tree a Definition grows. */
20
+ export type TreeForm = 'broadleaf' | 'conifer';
21
+ /** Trunk parameters (branch level 0). */
22
+ export interface TrunkDefinition {
23
+ /** Trunk length at full Growth, metres (> 0). */
24
+ length: number;
25
+ /** Radius at the base, metres (> 0). */
26
+ radius: number;
27
+ /** Tip radius as a fraction of the base radius (0 = point, 1 = cylinder). */
28
+ taper: number;
29
+ /** Number of sides around the trunk (integer >= 3). */
30
+ sides: number;
31
+ /** Number of sections along the trunk (integer >= 1). */
32
+ sections: number;
33
+ /** Seed range: the Seed scales length by up to ± this fraction (0..1). */
34
+ lengthVariation: number;
35
+ /** Seed range: maximum sideways drift per section, as a fraction of the section length (0..1). */
36
+ bend: number;
37
+ }
38
+ /**
39
+ * One level of branching. `branches[0]` grows from the trunk, `branches[1]` from the
40
+ * level-1 branches, and so on (at most {@link MAX_BRANCH_LEVELS} levels).
41
+ */
42
+ export interface BranchLevelDefinition {
43
+ /** Child branches per parent branch (integer >= 0). */
44
+ count: number;
45
+ /** Where along the parent children start, as a fraction of the parent length (0..1). */
46
+ start: number;
47
+ /** Where along the parent children stop, as a fraction of the parent length (0..1, >= start). */
48
+ end: number;
49
+ /** Angle between parent and child direction, degrees (0..180). */
50
+ angle: number;
51
+ /** Seed range: ± this fraction of `angle` (0..1). */
52
+ angleVariation: number;
53
+ /** Rotation around the parent between successive children, degrees (0..360; 137.5 = golden angle). */
54
+ spiral: number;
55
+ /** Child length as a fraction of the parent's length (> 0). */
56
+ length: number;
57
+ /** Seed range: ± this fraction of `length` (0..1). */
58
+ lengthVariation: number;
59
+ /** Child base radius as a fraction of the parent's radius where it attaches (0..1). */
60
+ radius: number;
61
+ /** Tip radius as a fraction of the base radius (0..1). */
62
+ taper: number;
63
+ /** Number of sides around each branch (integer >= 3). */
64
+ sides: number;
65
+ /** Number of sections along each branch (integer >= 1). */
66
+ sections: number;
67
+ /** Seed range: maximum sideways drift per section, as a fraction of the section length (0..1). */
68
+ bend: number;
69
+ /** Upward (+) or downward (−) pull on the branch tip (−1..1). */
70
+ gravity: number;
71
+ }
72
+ /** Maximum number of branching levels below the trunk. */
73
+ export declare const MAX_BRANCH_LEVELS = 4;
74
+ /**
75
+ * How a leaf is drawn: a flat card, a faceted clump of foliage, a needle cluster, or a puff
76
+ * (a smooth round ball of foliage, for toon shading).
77
+ */
78
+ export type LeafShape = 'card' | 'clump' | 'needle' | 'puff';
79
+ /** Leaves, placed on the last branching level (or the trunk if there are no branches). */
80
+ export interface LeavesDefinition {
81
+ /** Leaves per terminal branch (integer >= 0; 0 = no leaves). */
82
+ count: number;
83
+ /** Leaf shape. */
84
+ shape: LeafShape;
85
+ /** Leaf size (width and length of a card / clump diameter), metres (> 0). */
86
+ size: number;
87
+ /** Seed range: ± this fraction of `size` (0..1). */
88
+ sizeVariation: number;
89
+ /** Where along the terminal branch leaves start, as a fraction of its length (0..1). */
90
+ start: number;
91
+ /** Angle between branch and leaf, degrees (0..180). */
92
+ angle: number;
93
+ }
94
+ /** Material shading model. Low-poly uses `flat`, stylized `toon`, realistic `standard`. */
95
+ export type Shading = 'standard' | 'flat' | 'toon';
96
+ export interface BarkMaterialDefinition {
97
+ /** Base bark colour. */
98
+ color: HexColor;
99
+ /** PBR roughness (0..1). */
100
+ roughness: number;
101
+ /** Colour texture URL (resolved against the app's texture base path), or null for none. */
102
+ map: string | null;
103
+ /** Normal map URL, or null for none. */
104
+ normalMap: string | null;
105
+ }
106
+ export interface LeafMaterialDefinition {
107
+ /** PBR roughness (0..1). Leaf colour comes from the Season Profile. */
108
+ roughness: number;
109
+ /** Leaf card texture URL (alpha cut-out), or null for none. */
110
+ map: string | null;
111
+ /** Alpha cut-off for `map` (0..1). */
112
+ alphaTest: number;
113
+ }
114
+ export interface MaterialsDefinition {
115
+ shading: Shading;
116
+ bark: BarkMaterialDefinition;
117
+ leaf: LeafMaterialDefinition;
118
+ }
119
+ /** One keyframe of a Season Profile track. `t` is the Season (0 = first day of spring .. 1 = last day of winter). */
120
+ export interface Keyframe<V> {
121
+ t: number;
122
+ value: V;
123
+ }
124
+ /**
125
+ * How leaf colour, leaf coverage and blossom change across Season. Each track needs
126
+ * at least one keyframe; keyframes are sorted by `t` (non-decreasing).
127
+ */
128
+ export interface SeasonProfileDefinition {
129
+ /** Leaf colour keyframes. */
130
+ leafColor: Keyframe<HexColor>[];
131
+ /** Leaf coverage keyframes (0 = bare .. 1 = full). */
132
+ leafCoverage: Keyframe<number>[];
133
+ /** Blossom amount keyframes (0 = none .. 1 = full bloom). */
134
+ blossom: Keyframe<number>[];
135
+ /** Blossom colour. */
136
+ blossomColor: HexColor;
137
+ }
138
+ /** Per-tree response to the scene-wide Wind. All 0 (stiff) .. 1 (very flexible). */
139
+ export interface WindResponseDefinition {
140
+ /** Sway of the trunk. */
141
+ trunk: number;
142
+ /** Sway of the branches. */
143
+ branches: number;
144
+ /** Flutter of the leaves. */
145
+ leaves: number;
146
+ /** Sway speed multiplier (> 0; 1 = default). */
147
+ frequency: number;
148
+ }
149
+ /** Seed ranges that are not tied to one tree part. All 0 (none) .. 1. */
150
+ export interface VariationDefinition {
151
+ /** How much the Seed shifts bark and leaf colours. */
152
+ color: number;
153
+ /** How much the Seed shifts the timing of Growth (fraction of the 0..1 range). */
154
+ growth: number;
155
+ /** How much the Seed shifts the timing of Season (fraction of the 0..1 range). */
156
+ season: number;
157
+ }
158
+ interface SculptBase {
159
+ /** The Seed the Sculpt was made on; every other Seed ignores it (ADR 0003). */
160
+ seed: number;
161
+ /** Branch path, e.g. "0" (trunk) or "0.3.1". */
162
+ path: string;
163
+ }
164
+ /** Removes a branch and everything growing from it. */
165
+ export interface DeleteSculpt extends SculptBase {
166
+ action: 'delete';
167
+ }
168
+ /** Rotates (Euler XYZ, radians) and scales a branch around its base. */
169
+ export interface MoveSculpt extends SculptBase {
170
+ action: 'move';
171
+ rotation: Vec3Tuple;
172
+ /** Length scale (> 0). */
173
+ scale: number;
174
+ }
175
+ /** Sets the leaf coverage (0..1) of a branch and everything growing from it. */
176
+ export interface LeavesSculpt extends SculptBase {
177
+ action: 'leaves';
178
+ coverage: number;
179
+ }
180
+ /** A hand edit made in the Tree Editor, tied to one Seed. */
181
+ export type Sculpt = DeleteSculpt | MoveSculpt | LeavesSculpt;
182
+ /**
183
+ * The full parameter set that describes how a tree is generated, independent of any Seed.
184
+ */
185
+ export interface TreeDefinition {
186
+ schemaVersion: typeof CURRENT_SCHEMA_VERSION;
187
+ /** Optional human-readable name. */
188
+ name: string;
189
+ /** 'conifer': the branches from the trunk shrink towards its tip (a cone); 'broadleaf': they don't. */
190
+ form: TreeForm;
191
+ trunk: TrunkDefinition;
192
+ /** Branching levels below the trunk (0..{@link MAX_BRANCH_LEVELS} entries). */
193
+ branches: BranchLevelDefinition[];
194
+ leaves: LeavesDefinition;
195
+ materials: MaterialsDefinition;
196
+ season: SeasonProfileDefinition;
197
+ wind: WindResponseDefinition;
198
+ variation: VariationDefinition;
199
+ sculpts: Sculpt[];
200
+ }
201
+ /**
202
+ * Deep partial for Definition input. Objects may omit fields (they get defaults); arrays
203
+ * replace the default array as a whole. Branch levels may be partial (missing fields come
204
+ * from {@link DEFAULT_BRANCH_LEVEL}); keyframes and Sculpts must be complete.
205
+ */
206
+ export type DeepPartial<T> = T extends (infer U)[] ? (U extends Keyframe<unknown> | Sculpt ? U : DeepPartial<U>)[] : T extends object ? {
207
+ [K in keyof T]?: DeepPartial<T[K]>;
208
+ } : T;
209
+ /**
210
+ * What callers may pass: `schemaVersion` plus any subset of the fields; the rest is defaulted.
211
+ * Older `schemaVersion`s are accepted and migrated.
212
+ */
213
+ export type TreeDefinitionInput = {
214
+ schemaVersion: number;
215
+ } & DeepPartial<Omit<TreeDefinition, 'schemaVersion'>>;
216
+ export {};
217
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/definition/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,+BAA+B;AAC/B,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAE/C,yCAAyC;AACzC,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAC;IACxB,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,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AC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { RenderPipeline, type Camera, type Node, type Object3D, type Renderer, type Scene } from 'three/webgpu';
2
+ import type { StyleName } from '../styles/registry';
3
+ import { type TreeEffectInput, type TreeEffectsPass } from './mask';
4
+ import { type TreeEffectsSettings } from './suggested';
5
+ /**
6
+ * Applies a combination of Tree Effects to `input` and returns the resulting colour node, for use in
7
+ * your own post-processing pipeline (`pipeline.outputNode = applyTreeEffects(...)`, or feed it into
8
+ * more effects). Order: colour grade, leaf glow, outline. Empty settings return `input.color`.
9
+ */
10
+ export declare function applyTreeEffects(input: TreeEffectInput, settings: TreeEffectsSettings): Node<'vec4'>;
11
+ /** The suggested combination of a built-in Style, or the settings themselves; `null` = no effects. */
12
+ export type TreeEffectsChoice = StyleName | TreeEffectsSettings | null;
13
+ export interface TreeEffectsOptions {
14
+ /** Which effects: a Style name (its suggested combination), custom settings, or `null` (none). Default: none. */
15
+ effects?: TreeEffectsChoice;
16
+ /**
17
+ * The trees to outline (Trees, Forests, groups of them; mutable, read on every draw).
18
+ * Default: every tree in the scene.
19
+ */
20
+ selection?: Object3D[];
21
+ }
22
+ /**
23
+ * A ready-made post-processing pipeline (`RenderPipeline`) with the Tree Effects: render with
24
+ * `effects.render()` instead of `renderer.render(scene, camera)`. Switch the combination with
25
+ * `effects.set('stylized')` (e.g. a preview). For your own pipeline, use {@link treeEffectsPass}
26
+ * and {@link applyTreeEffects} instead.
27
+ */
28
+ export declare class TreeEffects {
29
+ readonly pipeline: RenderPipeline;
30
+ /** The scene pass (colour + tree mask). */
31
+ readonly scenePass: TreeEffectsPass;
32
+ private nodes;
33
+ private current;
34
+ constructor(renderer: Renderer, scene: Scene, camera: Camera, options?: TreeEffectsOptions);
35
+ /** The active combination (`{}` = none). */
36
+ get settings(): TreeEffectsSettings;
37
+ /** Switches to a Style's suggested combination, custom settings, or none (`null`). */
38
+ set(effects: TreeEffectsChoice): void;
39
+ /** Renders the scene with the effects (call instead of `renderer.render(scene, camera)`). */
40
+ render(): void;
41
+ dispose(): void;
42
+ private disposeNodes;
43
+ }
44
+ /** Shorthand for `new TreeEffects(renderer, scene, camera, options)`. */
45
+ export declare function createTreeEffects(renderer: Renderer, scene: Scene, camera: Camera, options?: TreeEffectsOptions): TreeEffects;
46
+ //# sourceMappingURL=effects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../src/effects/effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAmB,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErF,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,CAMpG;AAED,sGAAsG;AACtG,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,mBAAmB,GAAG,IAAI,CAAC;AAUvE,MAAM,WAAW,kBAAkB;IACjC,iHAAiH;IACjH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAA2B;gBAE9B,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB;IAM9F,4CAA4C;IAC5C,IAAI,QAAQ,IAAI,mBAAmB,CAElC;IAED,sFAAsF;IACtF,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IASrC,6FAA6F;IAC7F,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,YAAY;CAIrB;AAgBD,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAE7H"}
@@ -0,0 +1,19 @@
1
+ import { type ColorRepresentation, type Node } from 'three/webgpu';
2
+ import type { TreeEffectInput } from './mask';
3
+ /** Leaf glow settings. */
4
+ export interface LeafGlowOptions {
5
+ /** Glow colour, multiplied with the blurred leaf colour (default white). */
6
+ color?: ColorRepresentation;
7
+ /** Glow strength (default 0.6). */
8
+ intensity?: number;
9
+ /** Only leaf pixels brighter than this (linear luminance) glow; 0 = all leaves (default 0.15). */
10
+ threshold?: number;
11
+ /** Blur radius (Gaussian sigma, in pixels at half resolution; default 6). */
12
+ radius?: number;
13
+ }
14
+ /**
15
+ * Tree Effect: a soft glow of the leaves. The bright (sunlit) leaf pixels are blurred and added
16
+ * back onto the tree pixels (leaves and the wood between them), never onto the rest of the scene.
17
+ */
18
+ export declare function leafGlow(input: TreeEffectInput, options?: LeafGlowOptions): Node<'vec4'>;
19
+ //# sourceMappingURL=glow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glow.d.ts","sourceRoot":"","sources":["../../src/effects/glow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAG1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,0BAA0B;AAC1B,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,CAO5F"}
@@ -0,0 +1,19 @@
1
+ import { type ColorRepresentation, type Node } from 'three/webgpu';
2
+ import type { TreeEffectInput } from './mask';
3
+ /** Tree colour grading settings (all optional; the defaults change nothing). */
4
+ export interface TreeColorGradeOptions {
5
+ /** Brightness multiplier (default 1). */
6
+ exposure?: number;
7
+ /** 0 = grey, 1 = unchanged (default), > 1 = more saturated. */
8
+ saturation?: number;
9
+ /** Contrast around mid grey: 1 = unchanged (default), > 1 = more contrast. */
10
+ contrast?: number;
11
+ /** Colour multiplied in, e.g. a warm '#fff2dd' (default white). */
12
+ tint?: ColorRepresentation;
13
+ }
14
+ /**
15
+ * Tree Effect: colour grading (exposure, tint, saturation, contrast) of the tree pixels only.
16
+ * Returns the graded colour where the tree mask is set and `input.color` unchanged elsewhere.
17
+ */
18
+ export declare function treeColorGrade(input: TreeEffectInput, options?: TreeColorGradeOptions): Node<'vec4'>;
19
+ //# sourceMappingURL=grade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grade.d.ts","sourceRoot":"","sources":["../../src/effects/grade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,gFAAgF;AAChF,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,IAAI,CAAC,EAAE,mBAAmB,CAAC;CAC5B;AAID;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,GAAE,qBAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,CAMxG"}
@@ -0,0 +1,7 @@
1
+ export { TREE_MASK, createTreeMask, treeMaskMRT, treeEffectsPass, treePartOf, type TreeEffectInput, type TreeEffectsPass, type TreePart } from './mask';
2
+ export { treeOutline, type TreeOutlineOptions } from './outline';
3
+ export { leafGlow, type LeafGlowOptions } from './glow';
4
+ export { treeColorGrade, type TreeColorGradeOptions } from './grade';
5
+ export { SUGGESTED_TREE_EFFECTS, type TreeEffectsSettings } from './suggested';
6
+ export { applyTreeEffects, createTreeEffects, TreeEffects, type TreeEffectsChoice, type TreeEffectsOptions, } from './effects';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/effects/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxJ,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { type Camera, type Material, type MRTNode, type Node, type Object3D, type PassNode, type Scene, type TextureNode } from 'three/webgpu';
2
+ /** Name of the tree mask output in a pass's MRT (`scenePass.getTextureNode(TREE_MASK)`). */
3
+ export declare const TREE_MASK = "treeMask";
4
+ /** The part of a tree a material draws. */
5
+ export type TreePart = 'bark' | 'leaves';
6
+ /**
7
+ * Which tree part a material draws: 'bark' or 'leaves' for tree.js materials (and their clones),
8
+ * `null` for anything else. Tree Effects only change the pixels drawn by these materials.
9
+ */
10
+ export declare function treePartOf(material: Material | null | undefined): TreePart | null;
11
+ /**
12
+ * TSL node: the tree mask value of the object being drawn, `vec4(tree, leaves, selected, 1)`:
13
+ * r = 1 on tree pixels, g = 1 on leaf pixels, b = 1 on pixels of selected trees (the outline's
14
+ * selection), 0 elsewhere. A per-object uniform decided from the drawn material
15
+ * ({@link treePartOf}), so no tree material is changed and every other object writes 0.
16
+ *
17
+ * `selection`: the selected tree objects (Trees, Forests, any ancestor of tree meshes), read on
18
+ * every draw, so it may be changed in place. `null` (default) selects every tree.
19
+ */
20
+ export declare function createTreeMask(selection?: readonly Object3D[] | null): Node<'vec4'>;
21
+ /**
22
+ * The MRT output that renders the tree mask ({@link createTreeMask}) next to the colour. Merge it
23
+ * into the MRT of your own scene pass: `scenePass.setMRT(mrt({ output, normal: normalView }).merge(treeMaskMRT()))`,
24
+ * then read it with `scenePass.getTextureNode(TREE_MASK)`.
25
+ */
26
+ export declare function treeMaskMRT(selection?: readonly Object3D[] | null): MRTNode;
27
+ /** What every Tree Effect reads: the scene colour and the tree mask (screen-space nodes). */
28
+ export interface TreeEffectInput {
29
+ /** Scene colour (linear, before tone mapping), e.g. `scenePass.getTextureNode('output')`. */
30
+ color: Node<'vec4'>;
31
+ /** Tree mask texture (see {@link createTreeMask}), e.g. `scenePass.getTextureNode(TREE_MASK)`. */
32
+ mask: TextureNode;
33
+ }
34
+ /** A scene pass that renders the colour and the tree mask, ready for the Tree Effects. */
35
+ export interface TreeEffectsPass extends TreeEffectInput {
36
+ pass: PassNode;
37
+ }
38
+ /**
39
+ * Creates `pass(scene, camera)` with MRT `{ output, treeMask }` and returns it with its colour and
40
+ * mask texture nodes. `selection`: the trees to outline (default `null` = all trees), see
41
+ * {@link createTreeMask}. If your pipeline already has a scene pass, merge {@link treeMaskMRT} into it instead.
42
+ */
43
+ export declare function treeEffectsPass(scene: Scene, camera: Camera, selection?: readonly Object3D[] | null): TreeEffectsPass;
44
+ //# sourceMappingURL=mask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../src/effects/mask.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAGtB,4FAA4F;AAC5F,eAAO,MAAM,SAAS,aAAa,CAAC;AAEpC,2CAA2C;AAC3C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,CAGjF;AAOD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,SAAS,GAAE,SAAS,QAAQ,EAAE,GAAG,IAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAOzF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,GAAE,SAAS,QAAQ,EAAE,GAAG,IAAW,GAAG,OAAO,CAIjF;AAED,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,6FAA6F;IAC7F,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,kGAAkG;IAClG,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,0FAA0F;AAC1F,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAE,SAAS,QAAQ,EAAE,GAAG,IAAW,GAAG,eAAe,CAK3H"}
@@ -0,0 +1,18 @@
1
+ import { type ColorRepresentation, type Node } from 'three/webgpu';
2
+ import type { TreeEffectInput } from './mask';
3
+ /** Tree outline settings. */
4
+ export interface TreeOutlineOptions {
5
+ /** Line colour (default a dark green-brown). */
6
+ color?: ColorRepresentation;
7
+ /** Line width in pixels (default 2). */
8
+ thickness?: number;
9
+ /** Opacity of the line, 0..1 (default 1). */
10
+ strength?: number;
11
+ }
12
+ /**
13
+ * Tree Effect: an outline along the silhouettes of the selected trees (the `selection` of the
14
+ * tree mask, see `createTreeMask`; all trees by default), around the outside of the canopy and
15
+ * the gaps in it. The line is drawn on the inside of the silhouette, so only tree pixels change.
16
+ */
17
+ export declare function treeOutline(input: TreeEffectInput, options?: TreeOutlineOptions): Node<'vec4'>;
18
+ //# sourceMappingURL=outline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../src/effects/outline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC,CAYlG"}
@@ -0,0 +1,13 @@
1
+ import type { StyleName } from '../styles/registry';
2
+ import type { TreeColorGradeOptions } from './grade';
3
+ import type { LeafGlowOptions } from './glow';
4
+ import type { TreeOutlineOptions } from './outline';
5
+ /** A combination of Tree Effects; leave an effect out to skip it. `{}` = no effects. */
6
+ export interface TreeEffectsSettings {
7
+ grade?: TreeColorGradeOptions;
8
+ glow?: LeafGlowOptions;
9
+ outline?: TreeOutlineOptions;
10
+ }
11
+ /** The suggested combination of Tree Effects for each built-in Style. */
12
+ export declare const SUGGESTED_TREE_EFFECTS: Record<StyleName, TreeEffectsSettings>;
13
+ //# sourceMappingURL=suggested.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggested.d.ts","sourceRoot":"","sources":["../../src/effects/suggested.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,wFAAwF;AACxF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,yEAAyE;AACzE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,SAAS,EAAE,mBAAmB,CAiBzE,CAAC"}