webgpu-grass 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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +645 -2
  3. package/lib/distance.d.ts +63 -0
  4. package/lib/distance.d.ts.map +1 -0
  5. package/lib/distance.js +148 -0
  6. package/lib/distance.js.map +1 -0
  7. package/lib/engine.d.ts +402 -0
  8. package/lib/engine.d.ts.map +1 -0
  9. package/lib/engine.js +3253 -0
  10. package/lib/engine.js.map +1 -0
  11. package/lib/field.d.ts +133 -0
  12. package/lib/field.d.ts.map +1 -0
  13. package/lib/field.js +244 -0
  14. package/lib/field.js.map +1 -0
  15. package/lib/flowers.d.ts +138 -0
  16. package/lib/flowers.d.ts.map +1 -0
  17. package/lib/flowers.js +117 -0
  18. package/lib/flowers.js.map +1 -0
  19. package/lib/index.d.ts +11 -0
  20. package/lib/index.d.ts.map +1 -0
  21. package/lib/index.js +14 -0
  22. package/lib/index.js.map +1 -0
  23. package/lib/mix.d.ts +17 -0
  24. package/lib/mix.d.ts.map +1 -0
  25. package/lib/mix.js +95 -0
  26. package/lib/mix.js.map +1 -0
  27. package/lib/mixshare.d.ts +42 -0
  28. package/lib/mixshare.d.ts.map +1 -0
  29. package/lib/mixshare.js +144 -0
  30. package/lib/mixshare.js.map +1 -0
  31. package/lib/noise.d.ts +4 -0
  32. package/lib/noise.d.ts.map +1 -0
  33. package/lib/noise.js +49 -0
  34. package/lib/noise.js.map +1 -0
  35. package/lib/placement.d.ts +39 -0
  36. package/lib/placement.d.ts.map +1 -0
  37. package/lib/placement.js +67 -0
  38. package/lib/placement.js.map +1 -0
  39. package/lib/rank.d.ts +36 -0
  40. package/lib/rank.d.ts.map +1 -0
  41. package/lib/rank.js +158 -0
  42. package/lib/rank.js.map +1 -0
  43. package/lib/species.d.ts +408 -0
  44. package/lib/species.d.ts.map +1 -0
  45. package/lib/species.js +672 -0
  46. package/lib/species.js.map +1 -0
  47. package/lib/transitions.d.ts +72 -0
  48. package/lib/transitions.d.ts.map +1 -0
  49. package/lib/transitions.js +123 -0
  50. package/lib/transitions.js.map +1 -0
  51. package/package.json +60 -3
@@ -0,0 +1,408 @@
1
+ import * as THREE from "three/webgpu";
2
+ import { type Bloom } from "./flowers.js";
3
+ /** How a leaf ends: grown to a point, cut by a mower on a slant, or cut off square as close-mown turf is. */
4
+ export type TipShape = "point" | "cut" | "square";
5
+ export interface Species {
6
+ name: string;
7
+ /** How tall the stand is (m). */
8
+ height: number;
9
+ /** How much its leaves differ in height, 0 (cut to one height) to 1 (half to one and a half times it). */
10
+ heightSpread: number;
11
+ /**
12
+ * How thick it grows. Up to 1, the share of a sward's plants that grow: a
13
+ * wiry grass is thin on the ground. Above 1, every plant grows and has
14
+ * more leaves, in proportion: 2 is twice the leaves. (As far as the
15
+ * layers allow: `GrassLayer.blades`, a third of it. The far tufts stop at 1.)
16
+ */
17
+ density: number;
18
+ /** Whether it is drawn as tufts beyond the fine leaves (tall grass) or left to the ground there (mown turf). */
19
+ tufted: boolean;
20
+ /** A leaf's breadth at its widest, edge to edge (m), and how much more the broadest have. */
21
+ width: number;
22
+ widthSpread: number;
23
+ tip: TipShape;
24
+ /** How far leaves lean out from their root, 0 (upright pile) to 1 and over (sprawling). */
25
+ splay: number;
26
+ /** How far a leaning leaf's tip hangs, 0 (stiff) to 1 and over. */
27
+ droop: number;
28
+ /** How far leaves are turned from square-on and twist up their length, 0..1. */
29
+ twist: number;
30
+ /** A seed head on a thin stalk, 0 (a plain leaf) to 1. */
31
+ seedHead: number;
32
+ /**
33
+ * The share of its stems that carry a seed head, 0..1: all of them in a stand gone to seed, a few in
34
+ * marram's tussocks. A stem in seed stands a fifth taller than the leaves, as a flowering stem does.
35
+ */
36
+ seedShare: number;
37
+ /**
38
+ * How round it is, 0 (a leaf: flat, folded along its rib) to 1 (a stem: a rush has no leaves, only
39
+ * round green stems that taper to a point; `width` is then the stem's thickness at its foot). A stem
40
+ * looks the same from every side, has no rib and no veins, and lets no light through.
41
+ */
42
+ stem: number;
43
+ /** The share of its stems that are in flower, 0..1: a brown tuft on the stem's side, a hand below its tip (a rush's). Only on a stem. */
44
+ flower: number;
45
+ /** How little the wind moves it, 0 (lies down in a gust) to 1 (does not stir). */
46
+ stiffness: number;
47
+ /** How strongly it grows in clumps, taller at their centres, 0..1. */
48
+ clump: number;
49
+ /** How far apart its clumps and tussocks are, as a multiple of the field's (`look.clumpSize`): marram's stand further apart than a fescue's. */
50
+ clumpScale: number;
51
+ /**
52
+ * How far it stands in tussocks with open ground between, 0 (a sward: it grows everywhere) to 1 (small
53
+ * tussocks well apart). A tussock is a clump (`look.clumpSize` apart), some broader and some smaller.
54
+ */
55
+ tussock: number;
56
+ /** How uneven it is over a stride: height, lean and thickness, 0 (combed) to 1. */
57
+ disorder: number;
58
+ color: string;
59
+ /** What a leaf's colour is multiplied by towards its tip. */
60
+ tipTint: [number, number, number];
61
+ /** What a seed head's is. */
62
+ seedTint: [number, number, number];
63
+ /** How dark a leaf is at its root, where the stand shades itself: 1 is no darker. */
64
+ rootShade: number;
65
+ /** How much one leaf differs in tone from the next, 0..1. */
66
+ variation: number;
67
+ /** The share of leaves that are dead and straw-coloured, 0..1. */
68
+ dry: number;
69
+ /** How waxy a leaf is: the light it catches where it bends over, 0..1. */
70
+ sheen: number;
71
+ /**
72
+ * How far the mower's roller lays it over, 0 (it stands as it grew) to 1:
73
+ * what makes a mown sward's stripes. Where it is laid, and which way, is
74
+ * the field's (`GrassOptions.mow`).
75
+ */
76
+ lay: number;
77
+ /**
78
+ * The share of its mown leaves whose cut ends have died back to straw, 0..1: few behind a sharp reel
79
+ * (a green), most behind a rotary that tears (rough). Nothing for a grass that is not mown.
80
+ */
81
+ cutTip: number;
82
+ /** The flowers that bloom among it, up to `MAX_BLOOMS` (none: an empty list). See `Bloom`. */
83
+ blooms: Bloom[];
84
+ /**
85
+ * How far its edge strays into it (m). 0 is a mown edge: a mower cuts to a line, and the grass is one
86
+ * height on this side and another on that. More is an edge nobody keeps: the neighbour comes in among
87
+ * it in tongues and single plants over about this far, and the two heights run into each other.
88
+ */
89
+ edgeBlend: number;
90
+ /**
91
+ * What the patches are. "colonies": plants that came in and spread, each a disc grown out from where it
92
+ * landed, alike within itself and a little unlike the next (annual meadow-grass in a bent green was
93
+ * measured at 10 cm to 2.5 m across, 50 cm on average: Poole and Johnston; clover likewise), with
94
+ * seedlings come up about them, for a grass that seeds as annual meadow-grass does. "runners": the
95
+ * same, for a plant that spreads by its runners and hardly by seed (creeping bent in an annual
96
+ * meadow-grass green, white clover): fewer and rounder, and nothing about them. "blotches":
97
+ * the stand's own grass doing worse or better where the ground makes it, in odd shapes with hazy edges
98
+ * (drought, which greenkeepers call a camouflage pattern).
99
+ */
100
+ patchKind: PatchKind;
101
+ /**
102
+ * Where the patches take, -1..1: on the crowns and knolls, which dry out first (1), in the hollows,
103
+ * where water gathers and stays (-1), or anywhere (0). By the ground's own shape: see `look.site`.
104
+ */
105
+ patchSite: number;
106
+ /** The share of the stand's ground that is in patches, 0..1 (0: none). */
107
+ patch: number;
108
+ /** How far across a patch is, roughly (m). */
109
+ patchSize: number;
110
+ /** The colour of the grass in a patch, as multipliers on the species' own. */
111
+ patchTint: [number, number, number];
112
+ /** How tall the grass in a patch is, as a multiple of the species' height. */
113
+ patchTall: number;
114
+ /**
115
+ * Where its patches get in besides the lie of the ground (`patchSite`), -1..1: towards the stand's edge
116
+ * and into the trees' shade (1: annual meadow-grass in a bent green, which comes in from the collar and
117
+ * takes the shaded and worn ground first), away from them (-1: the bent left in a meadow-grass green,
118
+ * holding out in the open middle), or neither (0). Left out: 0.
119
+ */
120
+ patchEdge?: number;
121
+ /**
122
+ * How unlike one another its plants' strains are, as a share of its colour (0: all alike). A green
123
+ * sown from a bent bred of a few parents, or grown over by many strains of annual meadow-grass, comes
124
+ * to be a quilt of touching patches each a shade unlike the next (USGA: "a patchwork quilt"), most
125
+ * in early spring and late autumn and hardly at all in summer (`look.strains`). Left out: 0.
126
+ */
127
+ mosaic?: number;
128
+ /** How broad a strain's patch is, roughly (m). Left out: 0.9. */
129
+ mosaicSize?: number;
130
+ /**
131
+ * The colour of the ground under it, as a multiplier on the ground's own (the host's, under
132
+ * `groundShade`): the ground shows between the stems of a thin stand, and is not the same ground
133
+ * everywhere. Sand under a links' thin fescue, peat under a heath, mud in a wet meadow. Not far off, where
134
+ * the ground stands in for the stand seen from there: that is the stand's colour. Left out: 1, 1, 1.
135
+ */
136
+ soil?: [number, number, number];
137
+ /**
138
+ * How readily it browns in a dry spell, 0..1 (`look.drought`): small spots on the crowns and the
139
+ * high, firm ground, and a ring along its edge where the mower turns (the clean-up pass), as greens go
140
+ * first. Left out: 0.
141
+ */
142
+ scorch?: number;
143
+ /** How much of the ground's picture shows: the leaves lying on it, and the dark between them, 0..1. */
144
+ groundDetail: number;
145
+ /** How much ground one copy of the picture covers (m), edge to edge. */
146
+ groundTile: number;
147
+ /** The picture's name, or "" for a plain leaf. It runs root to tip up the picture, the leaf's breadth across it. */
148
+ leafTexture: string;
149
+ /**
150
+ * What the picture is. "detail": the leaf's own colour, lighter and
151
+ * darker as the picture is (mid grey leaves it alone): ribs, veins,
152
+ * blotches. "color": the picture is the leaf's colour.
153
+ */
154
+ textureMode: TextureMode;
155
+ /** How much of the picture shows, 0..1. */
156
+ textureStrength: number;
157
+ /**
158
+ * The picture's transparency is the leaf's outline: the leaf is drawn as
159
+ * a plain strip and cut to it, so it can be a seed head, a toothed leaf,
160
+ * a flower.
161
+ */
162
+ textureCutout: boolean;
163
+ }
164
+ export type TextureMode = "detail" | "color";
165
+ /** Rows in the table. A map's species numbers are below this; `NO_GRASS` is not. */
166
+ export declare const MAX_SPECIES = 16;
167
+ /** Four numbers to a slot, this many slots to a species. */
168
+ export type PatchKind = "colonies" | "runners" | "blotches";
169
+ export declare const SPECIES_SLOTS = 20;
170
+ /** One uniform-array entry to a slot, a row to a species: made once, then written into by `packSpecies`. */
171
+ export declare function makeSpeciesTable(): THREE.Vector4[];
172
+ /**
173
+ * Write the species into the table the shaders read. The slots:
174
+ *
175
+ * 0 height, heightSpread, density, tufted
176
+ * 1 width, widthSpread, splay, droop
177
+ * 2 tip (0 point, 1 cut, 2 square), twist, seedHead, stiffness
178
+ * 3 clump, disorder, rootShade, variation
179
+ * 4 colour (linear r, g, b), sheen
180
+ * 5 tipTint r, g, b, dry
181
+ * 6 seedTint r, g, b, lay
182
+ * 7 the picture's layer (-1 for none), its strength, its mode (0 detail, 1 colour), cut-out
183
+ * 8 the ground's picture: how much shows (0 if it has none), its tile (m)
184
+ * (and in z, w: patchSize, patchTall)
185
+ * 9 the ground's picture's own mean colour (linear r, g, b), patches are colonies (0), blotches (1) or runners (2)
186
+ * 10 patchTint r, g, b, patch
187
+ * 11 patchSite, edgeBlend, cutTip, seedShare
188
+ * 12 tussock, stem, flower, clumpScale
189
+ * 13 its flowers (`blooms`, four to a slot from here): their rows in the flower table (-1 for none)
190
+ * 14 flowers to the square metre
191
+ * 15 the share of ground
192
+ * 16 where they take (-1 hollows .. 1 crowns)
193
+ * 17 where: 0 in drifts, 1 only in the species' patches, 2 in drifts on its tussocks
194
+ * 18 mosaic, mosaicSize, patchEdge, scorch
195
+ * 19 soil r, g, b
196
+ *
197
+ * `layers` gives each picture's name its layer in the leaf texture, `flowerAt` each flower's name its
198
+ * row in the flower table (`packFlowers`).
199
+ */
200
+ export declare function packSpecies(list: readonly Species[], table: THREE.Vector4[], layers?: ReadonlyMap<string, number>, ground?: readonly ({
201
+ mean: readonly [number, number, number];
202
+ } | null)[], flowerAt?: ReadonlyMap<string, number>): void;
203
+ /**
204
+ * Six stands to start from, short to tall. They are the surfaces of a golf
205
+ * course as Couch Golf Club draws them, turned into rows, with a hay meadow
206
+ * added to show the range. They are starting points for the lab, not
207
+ * botany: no row here has been set against a photograph of a named grass.
208
+ * Their leaves are a real leaf's breadth, 2 to 5 mm (the game drew few
209
+ * leaves and made them several times that), which they can be because the
210
+ * ground under them carries what leaves cannot be drawn.
211
+ */
212
+ export declare const STARTER_SPECIES: Species[];
213
+ /**
214
+ * A copy that shares nothing with the original, for the lab's editing and for presets, with what a species
215
+ * from an older preset has not got filled in. (A preset read from outside is read with `parseSpecies`.)
216
+ */
217
+ export declare function cloneSpecies(list: readonly Species[]): Species[];
218
+ /**
219
+ * Read a parsed preset's species: each setting checked for what it must be (a setting an older preset has
220
+ * not got is filled in, as `cloneSpecies` does, and so is its one flower of before), or the reason they
221
+ * cannot be read. What this gives back is a copy that shares nothing with `value`.
222
+ */
223
+ export declare function parseSpecies(value: unknown): {
224
+ species: Species[];
225
+ error: null;
226
+ } | {
227
+ species: null;
228
+ error: string;
229
+ };
230
+ /** Whether a parsed preset is a list of species this version can draw; the reason if not. (`parseSpecies` reads it.) */
231
+ export declare function checkSpecies(value: unknown): string | null;
232
+ /**
233
+ * A golf course's surfaces, short to tall, as eight named stands: the green, its collar, the fairway, the
234
+ * first cut, the rough, deep rough, and two that nobody mows. The heights are heights of cut in use (see
235
+ * the README for where each comes from). The leaf widths are set against the floras' (README, "Where
236
+ * the numbers come from"): a leaf grown out, creeping bent 0.5 to 5 mm, perennial rye 2 to 4, Kentucky
237
+ * bluegrass 1.7 to 5, red fescue 0.4 to 0.9 folded (Flora of Australia; Hitchcock has bent 1 to 8). A
238
+ * mown grass's leaves are at the narrow end of its range, and narrower than the same grass left to grow,
239
+ * so the mown ones here are: a rye leaf in a fairway is about 2 mm. The habit was set by eye: a likeness,
240
+ * not a measurement.
241
+ *
242
+ * The colours are a leaf's, worked out: what a leaf with so much chlorophyll sends back of sun and sky
243
+ * (PROSPECT-D, Feret et al. 2017), as linear sRGB, all at one brightness (2.2 times the leaf's own, which
244
+ * is what an exposure for grass comes to). A leaf sends back about half as much red as green and a
245
+ * quarter as much blue, whatever the grass: far more red than a green chosen by eye has. What differs
246
+ * from grass to grass is the chlorophyll in a square centimetre of leaf, and those figures are
247
+ * estimates, since nobody has published them species against species: bent 38 to 40 ug, rye 50 to 55,
248
+ * Kentucky bluegrass 60, bermuda 45, red fescue 42, a hay meadow 34, fescue gone to seed 24 with brown
249
+ * pigment in it, and annual meadow-grass 34 against the bent's 38 (the patches' tint). Fescue and Kentucky bluegrass
250
+ * carry a wax bloom the leaf model has none of: it sends back a little more of everything and most
251
+ * of the blue (1 to 2.5 parts in a hundred, an estimate), which is their grey-blue cast.
252
+ *
253
+ * The mown ones have mown edges (`edgeBlend` 0); deep rough, fescue and meadow run into their neighbours.
254
+ * In the order of the lab's plot.
255
+ */
256
+ export declare const TURF_SPECIES: Species[];
257
+ /** Two more, for a host or a scene to put in a row of its own: a warm-season fairway and a lawn. */
258
+ export declare const MORE_TURF: {
259
+ bermuda: Species;
260
+ bluegrass: Species;
261
+ };
262
+ /**
263
+ * What grows beside grass and is not one, for a host or a scene to put in a row of its own.
264
+ *
265
+ * Soft rush (Juncus effusus), a marsh's and a wet ditch's plant: no leaves, only round, smooth, glossy
266
+ * stems, 2 to 4 mm thick at the foot and tapering to a point, 30 cm to over a metre tall (Flora Iberica: stems
267
+ * 1 to 5 mm across, plants 25 to 128 cm), stiff and nearly straight, standing in dense tussocks that fan out from their middles, with the last years' dead stems
268
+ * straw-brown among the green (the floras: Stace; Clapham, Tutin and Moore). Its colour is a guess at a
269
+ * dark leaf's (65 ug of chlorophyll to the square centimetre): nobody has published a rush's. Its flowers
270
+ * are a brown tuft that sits on the side of a stem a hand below its tip, on a third of its stems.
271
+ */
272
+ export declare const MORE_PLANTS: {
273
+ rush: Species;
274
+ };
275
+ /**
276
+ * Grasses of other courses than the cool, wet parkland `TURF_SPECIES` are: a green gone over to annual
277
+ * meadow-grass, a warm coast's kikuyu, a links' fine fescue, and the dunes' marram.
278
+ *
279
+ * Their leaves are set against the floras (README, "Where the numbers come from"): annual meadow-grass 1
280
+ * to 5 mm grown out (Flora of Australia; Hitchcock 1 to 3), kikuyu 2 to 8 (Flora Iberica; 2 to 3.5 in
281
+ * Thailand), red fescue 0.4 to 0.9 folded, marram 1.5 to 4 rolled and 50 to 120 cm tall (Flora Iberica;
282
+ * Hitchcock 70 to 100 cm).
283
+ *
284
+ * Annual meadow-grass (Poa annua) takes over most old greens on wet or mild coasts (California's
285
+ * public courses, Pebble Beach, much of the Pacific north-west): a lighter, yellower green than bent
286
+ * (34 ug of chlorophyll against the bent's 38: the bent green's patch tint), a broader leaf (2 to 3 mm
287
+ * grown, 1 to 1.5 at a green's cut), and it seeds even at a green's height, which a putt feels as
288
+ * bumpiness: a scatter of small pale seed heads. Bent that is left in it is the darker patches.
289
+ *
290
+ * Kikuyu (Pennisetum clandestinum, in the floras an African grass grown and gone wild on the coasts of
291
+ * California, Australia and South Africa) runs on thick stems over and under the ground into a dense,
292
+ * springy mat, the ball sitting up on it in a fairway and down in it in the rough: leaves 3 to 5 mm,
293
+ * folded, stiff, a bright pale green (taken as bermuda's 45 ug: it is a warm-season grass like bermuda),
294
+ * torn more than cut by a mower. Its own flowers are its stamens: white threads among the leaves after a
295
+ * mowing.
296
+ *
297
+ * Fine fescue (Chewings and slender creeping red fescue) is a links' fairway and green: leaves rolled to a
298
+ * needle, half a millimetre, the densest of the turf grasses, grey-green with red fescue's wax, browning
299
+ * in a dry summer where a links is not watered, and firm, which is why a links runs. Greens of it are cut
300
+ * higher than bent (4 to 5 mm); a fairway at about 10 mm.
301
+ *
302
+ * Marram (Ammophila arenaria) holds the dunes behind a links: leaves rolled into stiff, sharp, grey-green
303
+ * tubes 50 cm to over a metre, fanning from tussocks with bare sand between, many dead and pale, and in
304
+ * summer a dense pale spike of a seed head 7 to 22 cm long (the floras). Its colour is red fescue's
305
+ * with more wax (an estimate). Its rolled leaf is drawn as part way to a stem (`stem`), its tussocks further
306
+ * apart than the field's clumps (`clumpScale`), by eye, and its spikes as a flower of its own (`FLOWERS.marram`)
307
+ * on the tussocks: a leaf has too few joints to carry a spike a fifth of its length.
308
+ *
309
+ * As with the others, the habit was set by eye.
310
+ */
311
+ export declare const MORE_GRASSES: {
312
+ poaGreen: Species;
313
+ kikuyuFairway: Species;
314
+ kikuyuRough: Species;
315
+ fescueGreen: Species;
316
+ fescueFairway: Species;
317
+ marram: Species;
318
+ };
319
+ /**
320
+ * The grasses of ground nobody mows but once a year, for the mixes a host makes of them (`mixedMap`): no
321
+ * stand of native grass is one grass. Each is drawn as it stands in high summer, gone to seed.
322
+ *
323
+ * Their leaves and stems are the floras' (Kew's GrassBase, the Flora of New Zealand, Flora of Victoria,
324
+ * Flora of North America):
325
+ *
326
+ * - Sheep's fescue (Festuca ovina): leaves folded to a bristle, 0.3 to 0.6 mm (Kew; 0.3 to 1.2 in New
327
+ * England), 3 to 25 cm long, in dense tufts with ground between; stems 5 to 60 cm. Of dry, thin, sandy and
328
+ * acid ground: a links' dunes, a heath. Greyer than red fescue, with more wax on it (an estimate).
329
+ * - Common bent (Agrostis capillaris): leaves flat, 1 to 2.5 mm (to 5), 2 to 13 cm long; stems 10 to 70 cm;
330
+ * a very loose panicle of purplish-brown spikelets, so a stand of it in seed has a reddish haze. It
331
+ * creeps by short runners. A greener grass than the fescues, with no wax.
332
+ * - Yorkshire fog (Holcus lanatus): leaves flat and soft with velvety hairs, 3 to 10 mm, to 25 cm long;
333
+ * stems 30 to 110 cm; a panicle that goes from pinkish white to purple. A pale grey-green, matt for its
334
+ * hairs, in tufts: the grass of a damp, rich meadow.
335
+ * - Sweet vernal grass (Anthoxanthum odoratum): leaves flat, 2 to 6.5 mm, 3.5 to 18 cm long; stems 12 to
336
+ * 50 cm (to 90); a dense, spike-like panicle, yellow-green, gold as it ripens. The first meadow grass to
337
+ * flower, in April to June, and the smell of hay (coumarin).
338
+ * - Wavy hair-grass (Deschampsia flexuosa): leaves rolled to a thread, 0.3 to 0.6 mm (New Zealand; 0.3 to
339
+ * 0.8, Kew), 5 to 20 cm long, in dense tufts far overtopped by their stems, 20 to 75 cm; a loose panicle
340
+ * on wavy branches, silvery and purplish. Of acid heath and open woods.
341
+ * - Creeping bent (Agrostis stolonifera) left unmown: leaves flat, 0.5 to 5 mm (Kew; to 8, New Zealand),
342
+ * 1 to 10 cm long; stems 8 to 40 cm, bent at their foot and rooting where they touch the ground, from
343
+ * runners over it; a narrow panicle, spread in flower and drawn in after, greenish to purplish. With red
344
+ * fescue the body of a grazed or wet coastal meadow (the Juncetum gerardii's closed swards).
345
+ * - Saltmarsh rush (Juncus gerardii): a rush, not a grass, of coastal meadows the sea reaches in winter:
346
+ * slender, wiry, dark green stems 25 to 80 cm (New Zealand 40 to 80; Burren to 60), with flat narrow
347
+ * leaves half their length, in loose tufts along a creeping black rootstock, not in tussocks; dark brown
348
+ * flowers in a cluster near the top. Drawn as stems, as soft rush is (`MORE_PLANTS.rush`).
349
+ *
350
+ * Their seed heads stand where every grass's here does, a fifth over its leaves: the floras' stems stand
351
+ * further over some of them (wavy hair-grass's most), which a leaf's three joints cannot draw. The colours
352
+ * are set by eye from the floras' words; the habit by eye too, as with the others. None has flowers of
353
+ * its own: a host gives a mix its flowers.
354
+ */
355
+ export declare const NATIVE_GRASSES: {
356
+ sheepsFescue: Species;
357
+ commonBent: Species;
358
+ yorkshireFog: Species;
359
+ sweetVernal: Species;
360
+ wavyHairGrass: Species;
361
+ creepingBent: Species;
362
+ saltmarshRush: Species;
363
+ tuftedHairGrass: Species;
364
+ purpleMoorGrass: Species;
365
+ cottonGrass: Species;
366
+ pendulousSedge: Species;
367
+ crestedDogsTail: Species;
368
+ lymeGrass: Species;
369
+ };
370
+ /**
371
+ * Every species here by a name: a host makes its own list from them (`cloneSpecies` the ones it wants, in
372
+ * the order of its map's numbers), as a course has the grasses it has.
373
+ */
374
+ export declare const GRASSES: {
375
+ poaGreen: Species;
376
+ kikuyuFairway: Species;
377
+ kikuyuRough: Species;
378
+ fescueGreen: Species;
379
+ fescueFairway: Species;
380
+ marram: Species;
381
+ sheepsFescue: Species;
382
+ commonBent: Species;
383
+ yorkshireFog: Species;
384
+ sweetVernal: Species;
385
+ wavyHairGrass: Species;
386
+ creepingBent: Species;
387
+ saltmarshRush: Species;
388
+ tuftedHairGrass: Species;
389
+ purpleMoorGrass: Species;
390
+ cottonGrass: Species;
391
+ pendulousSedge: Species;
392
+ crestedDogsTail: Species;
393
+ lymeGrass: Species;
394
+ bentGreen: Species;
395
+ bentCollar: Species;
396
+ ryeFairway: Species;
397
+ ryeFirstCut: Species;
398
+ rough: Species;
399
+ redFescueRough: Species;
400
+ fescueInSeed: Species;
401
+ hayMeadow: Species;
402
+ bermudaFairway: Species;
403
+ bluegrassLawn: Species;
404
+ softRush: Species;
405
+ };
406
+ /** A species' name in `GRASSES`. */
407
+ export type GrassName = keyof typeof GRASSES;
408
+ //# sourceMappingURL=species.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"species.d.ts","sourceRoot":"","sources":["../src/species.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,cAAc,CAAC;AAEtD,6GAA6G;AAC7G,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IAGb,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,0GAA0G;IAC1G,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,gHAAgH;IAChH,MAAM,EAAE,OAAO,CAAC;IAGhB,6FAA6F;IAC7F,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,QAAQ,CAAC;IACd,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;I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