roamwright 0.61.26 → 0.61.27
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.
- package/README.md +2 -1
- package/examples/troops.html +56 -0
- package/examples/troops.js +309 -0
- package/geometry/index.js +171 -0
- package/index.js +6 -469
- package/math/index.js +8 -0
- package/motion/index.js +100 -0
- package/motion/troop-director.js +482 -0
- package/motion/troop-volleys.js +197 -0
- package/package.json +1 -1
- package/rendering/index.js +178 -0
- package/rendering/troop-director.js +374 -0
- package/rendering/troop-mounts.js +326 -0
- package/rendering/troop-standards.js +259 -0
- package/rendering/troop-volleys.js +143 -0
- package/runtime/index.js +95 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ npm resolves the Three.js peer in a new project. Roamwright targets Three.js **0
|
|
|
30
30
|
|
|
31
31
|
## Examples
|
|
32
32
|
|
|
33
|
-
Browse all twenty-
|
|
33
|
+
Browse all twenty-three examples on the [live showcase](https://enestaylan.github.io/roamwright/).
|
|
34
34
|
|
|
35
35
|
| Live example | What the example shows | Source |
|
|
36
36
|
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
@@ -56,6 +56,7 @@ Browse all twenty-two examples on the [live showcase](https://enestaylan.github.
|
|
|
56
56
|
| [World map and wayfinding](https://enestaylan.github.io/roamwright/examples/world-map.html?seed=42) | Shaded atlas relief, baked terrain sheets, collision-free lettering, interactive pan/zoom/tap and a live compass strip. | [world-map.js](examples/world-map.js) |
|
|
57
57
|
| [Scenes](https://enestaylan.github.io/roamwright/examples/scenes.html?seed=42) | Melee duels with blade trails, flying bolts, energy beams, props, instanced scene markers and automated camera cuts. | [scenes.js](examples/scenes.js) |
|
|
58
58
|
| [Title backdrop](https://enestaylan.github.io/roamwright/examples/title-backdrop.html?seed=42) | Procedural 2D parallax mountain ranges, snow lines, sunlit cumulus banks and freeze-on-load canvas handoff. | [title-backdrop.js](examples/title-backdrop.js) |
|
|
59
|
+
| [Troop formations](https://enestaylan.github.io/roamwright/examples/troops.html?seed=42) | Staggered infantry ranks, carried standards, mounted lancers, ox-drawn wagons, cattle herd and ballistic volleys. | [troops.js](examples/troops.js) |
|
|
59
60
|
|
|
60
61
|
### Run locally
|
|
61
62
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="theme-color" content="#1e2a26" />
|
|
7
|
+
<title>Troop formations · Roamwright</title>
|
|
8
|
+
<link rel="stylesheet" href="./showcase.css" />
|
|
9
|
+
<script type="importmap">
|
|
10
|
+
{
|
|
11
|
+
"imports": {
|
|
12
|
+
"three": "../node_modules/three/build/three.module.js",
|
|
13
|
+
"three/addons/": "../node_modules/three/examples/jsm/",
|
|
14
|
+
"roamwright": "../index.js",
|
|
15
|
+
"roamwright/": "../"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<canvas
|
|
22
|
+
tabindex="0"
|
|
23
|
+
aria-label="Opposing infantry formations with carried standards, mounted lancers, ox-drawn wagons, cattle herd, and arcing volleys on a sunlit plain"
|
|
24
|
+
></canvas>
|
|
25
|
+
<header>
|
|
26
|
+
<a class="back" href="../index.html"><span aria-hidden="true">←</span> Roamwright</a>
|
|
27
|
+
<div class="meta">
|
|
28
|
+
<a class="source" href="https://github.com/enestaylan/roamwright/blob/main/examples/troops.js">Source</a>
|
|
29
|
+
<form method="get">
|
|
30
|
+
<label for="seed">Seed</label>
|
|
31
|
+
<input id="seed" name="seed" type="number" step="1" min="-2147483648" max="2147483647" value="42" required />
|
|
32
|
+
<button type="submit" title="Rebuild formations with this seed" aria-label="Rebuild formations with this seed">→</button>
|
|
33
|
+
</form>
|
|
34
|
+
</div>
|
|
35
|
+
</header>
|
|
36
|
+
<footer>
|
|
37
|
+
<div class="caption">
|
|
38
|
+
<h1>Troop formations</h1>
|
|
39
|
+
<p>Staggered infantry lines, carried standards, mounted lancers, ox-drawn supply wagons, cattle herd, and ballistic volleys.</p>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="tools">
|
|
42
|
+
<div class="views" role="group" aria-label="Camera viewpoint">
|
|
43
|
+
<button type="button" data-view="line" aria-pressed="true">Line</button>
|
|
44
|
+
<button type="button" data-view="cavalry" aria-pressed="false">Cavalry</button>
|
|
45
|
+
<button type="button" data-view="train" aria-pressed="false">Supply train</button>
|
|
46
|
+
<button type="button" data-view="overview" aria-pressed="false">Overview</button>
|
|
47
|
+
</div>
|
|
48
|
+
<button type="button" class="action" id="march">March</button>
|
|
49
|
+
<button type="button" class="action" id="fight">Engage</button>
|
|
50
|
+
<button type="button" class="action" id="fall">Volley fall</button>
|
|
51
|
+
<button type="button" class="action" id="reset">Reset</button>
|
|
52
|
+
</div>
|
|
53
|
+
</footer>
|
|
54
|
+
<script type="module" src="./troops.js"></script>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import {
|
|
3
|
+
createCrowdSystem,
|
|
4
|
+
createDaylightSky,
|
|
5
|
+
createHouseKit,
|
|
6
|
+
createHouseKitMaterials,
|
|
7
|
+
createHouseKitMeshes,
|
|
8
|
+
createOrbitCamera,
|
|
9
|
+
createSpaces,
|
|
10
|
+
createTroopDirector,
|
|
11
|
+
createTroopMounts,
|
|
12
|
+
createTroopStandards,
|
|
13
|
+
scatterTrees,
|
|
14
|
+
scatterTussocks,
|
|
15
|
+
} from 'roamwright';
|
|
16
|
+
import { createHeightfieldMesh } from 'roamwright/geometry/heightfield.js';
|
|
17
|
+
import { createProps } from 'roamwright/geometry/props.js';
|
|
18
|
+
import { sstep } from 'roamwright/math/scalar.js';
|
|
19
|
+
import { createVehicleTrains } from 'roamwright/rendering/vehicle-train.js';
|
|
20
|
+
import { initExample } from './stage.js';
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
canvas,
|
|
24
|
+
renderer,
|
|
25
|
+
camera,
|
|
26
|
+
scene,
|
|
27
|
+
worldGroup,
|
|
28
|
+
seed,
|
|
29
|
+
random: rng,
|
|
30
|
+
noise,
|
|
31
|
+
hash,
|
|
32
|
+
shapes,
|
|
33
|
+
} = initExample({
|
|
34
|
+
fallbackSeed: 42,
|
|
35
|
+
fov: 38,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Gentle sunlit meadow plain ringed by rolling highland ridges so formations read clearly.
|
|
39
|
+
function groundHeight(x, z) {
|
|
40
|
+
const r = Math.hypot(x, z);
|
|
41
|
+
const rim = sstep(46, 150, r);
|
|
42
|
+
const ridge = rim * (14 * noise.fbm(x * 0.0085, z * 0.0085, 4, 29) + 5 * noise.ridged(x * 0.006, z * 0.006, 3, 17));
|
|
43
|
+
return 0.22 * Math.sin(x * 0.035 + seed * 0.1) * Math.cos(z * 0.03) + ridge;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const meadowCol = new THREE.Color(0x7c8652),
|
|
47
|
+
dryGrassCol = new THREE.Color(0x9a8f63),
|
|
48
|
+
trackCol = new THREE.Color(0xa69473);
|
|
49
|
+
const terrain = createHeightfieldMesh({
|
|
50
|
+
size: 420,
|
|
51
|
+
segs: 136,
|
|
52
|
+
heightAt: groundHeight,
|
|
53
|
+
colorAt: (x, y, z, up, out) => {
|
|
54
|
+
const f = noise.fbm(x * 0.038, z * 0.038, 3, 11);
|
|
55
|
+
const onTrack = 1 - sstep(4.5, 11, Math.abs(z + 17));
|
|
56
|
+
out.copy(meadowCol).lerp(dryGrassCol, f);
|
|
57
|
+
out.lerp(trackCol, onTrack * 0.65);
|
|
58
|
+
out.multiplyScalar(0.88 + 0.22 * noise.vnoise(x * 0.15, z * 0.15, 7));
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
worldGroup.add(terrain);
|
|
62
|
+
|
|
63
|
+
// Trees and tussocks framing the distant ridge while keeping the parade plain clear.
|
|
64
|
+
const { material: leafMat } = scatterTrees({
|
|
65
|
+
parent: worldGroup,
|
|
66
|
+
noise,
|
|
67
|
+
hash,
|
|
68
|
+
seed,
|
|
69
|
+
random: rng,
|
|
70
|
+
groundAt: groundHeight,
|
|
71
|
+
attempts: 150,
|
|
72
|
+
maxPerSpecies: 48,
|
|
73
|
+
species: ['broadleaf', 'conifer'],
|
|
74
|
+
scaleRange: [0.85, 0.65],
|
|
75
|
+
sink: 0.15,
|
|
76
|
+
sample: () => {
|
|
77
|
+
const angle = rng() * Math.PI * 2;
|
|
78
|
+
const dist = 42 + rng() * 95;
|
|
79
|
+
const tx = Math.cos(angle) * dist;
|
|
80
|
+
const tz = Math.sin(angle) * dist;
|
|
81
|
+
return Math.abs(tz + 17) < 12 ? null : [tx, tz];
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
scatterTussocks({
|
|
86
|
+
parent: worldGroup,
|
|
87
|
+
seed: seed * 17,
|
|
88
|
+
random: rng,
|
|
89
|
+
groundAt: groundHeight,
|
|
90
|
+
count: 85,
|
|
91
|
+
attempts: 130,
|
|
92
|
+
scaleRange: [0.8, 0.55],
|
|
93
|
+
material: leafMat,
|
|
94
|
+
sample: () => {
|
|
95
|
+
const tx = (rng() - 0.5) * 120;
|
|
96
|
+
const tz = (rng() - 0.5) * 100;
|
|
97
|
+
return Math.hypot(tx, tz) < 22 ? null : [tx, tz];
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// Kits for standards, supply wagons, and crowd batches.
|
|
102
|
+
const houseKit = createHouseKit({ shapes });
|
|
103
|
+
const props = createProps({ houseKit, shapes, vnoise: noise.vnoise, hash, horse: () => {} });
|
|
104
|
+
const kitMeshes = createHouseKitMeshes({ materials: createHouseKitMaterials({ doubleSide: true }) });
|
|
105
|
+
const { makeVehicles } = createVehicleTrains({
|
|
106
|
+
kitNew: houseKit.kitNew,
|
|
107
|
+
kitAt: houseKit.kitAt,
|
|
108
|
+
kitInstanced: kitMeshes.kitInstanced,
|
|
109
|
+
propCart: props.propCart,
|
|
110
|
+
propWagon: props.propWagon,
|
|
111
|
+
propWheel: props.propWheel,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const { lightDir } = createDaylightSky({
|
|
115
|
+
scene,
|
|
116
|
+
renderer,
|
|
117
|
+
noise,
|
|
118
|
+
sky: { sunDir: [0.64, 0.36, 0.68] },
|
|
119
|
+
sunPosition: [58, 48, 62],
|
|
120
|
+
shadowRadius: 72,
|
|
121
|
+
shadowFar: 220,
|
|
122
|
+
fogColor: 0xd4dfd9,
|
|
123
|
+
fogDensity: 0.002,
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const spaceKit = createSpaces({ id: 'plain', ground: groundHeight });
|
|
127
|
+
const crowdSystem = createCrowdSystem({ scene: worldGroup, groundAt: groundHeight, spaceKit, camera, renderer });
|
|
128
|
+
|
|
129
|
+
let elapsed = 0;
|
|
130
|
+
let frame = 0;
|
|
131
|
+
const updater = crowdSystem.createUpdater({
|
|
132
|
+
getTime: () => elapsed,
|
|
133
|
+
getFrame: () => frame,
|
|
134
|
+
getLightDir: () => lightDir,
|
|
135
|
+
shadowRange: 72,
|
|
136
|
+
shadowFar: 220,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
const STANDARDS = {
|
|
140
|
+
crimson: [0x762626, 0xd9c28c],
|
|
141
|
+
cobalt: [0x26486c, 0xd8d2c0],
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const troopMounts = createTroopMounts({ camera, makeVehicles });
|
|
145
|
+
const troopStandards = createTroopStandards({
|
|
146
|
+
kitNew: houseKit.kitNew,
|
|
147
|
+
kitAt: houseKit.kitAt,
|
|
148
|
+
kitInstanced: kitMeshes.kitInstanced,
|
|
149
|
+
propStandard: props.propStandard,
|
|
150
|
+
getFrame: () => frame,
|
|
151
|
+
standardOf: id => STANDARDS[id] || null,
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
const director = createTroopDirector({
|
|
155
|
+
seed,
|
|
156
|
+
camera,
|
|
157
|
+
getTime: () => elapsed,
|
|
158
|
+
addCrowd: (list, tones, cx, cz, near, kind, _bodyId, spaceId) => crowdSystem.addCrowd(list, tones, cx, cz, near, kind, null, spaceId),
|
|
159
|
+
standardOf: id => STANDARDS[id] || null,
|
|
160
|
+
makeMounts: troopMounts.makeMounts,
|
|
161
|
+
makeHerd: troopMounts.makeHerd,
|
|
162
|
+
makeWagons: troopMounts.makeWagons,
|
|
163
|
+
makeStandards: troopStandards.makeStandards,
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const plainSpace = { id: 'plain', group: worldGroup, ground: groundHeight };
|
|
167
|
+
const tickHost = director.raiseHost(
|
|
168
|
+
plainSpace,
|
|
169
|
+
'field',
|
|
170
|
+
[
|
|
171
|
+
{
|
|
172
|
+
originX: 0,
|
|
173
|
+
originZ: 0,
|
|
174
|
+
troops: {
|
|
175
|
+
crimsonFoot: {
|
|
176
|
+
body: 'crimson',
|
|
177
|
+
kind: 'trooper',
|
|
178
|
+
tones: [0x762626, 0x622222, 0x5c362c],
|
|
179
|
+
n: 36,
|
|
180
|
+
wide: 9,
|
|
181
|
+
gap: [1.15, 1.3],
|
|
182
|
+
loose: 0.22,
|
|
183
|
+
at: [-9, 0],
|
|
184
|
+
face: [20, 0],
|
|
185
|
+
},
|
|
186
|
+
crimsonBows: {
|
|
187
|
+
body: 'crimson',
|
|
188
|
+
kind: 'guard',
|
|
189
|
+
tones: [0x6e3a2c, 0x583226],
|
|
190
|
+
n: 16,
|
|
191
|
+
wide: 8,
|
|
192
|
+
gap: [1.2, 1.3],
|
|
193
|
+
loose: 0.25,
|
|
194
|
+
at: [-17, 1],
|
|
195
|
+
face: [20, 1],
|
|
196
|
+
},
|
|
197
|
+
cobaltFoot: {
|
|
198
|
+
body: 'cobalt',
|
|
199
|
+
kind: 'raider',
|
|
200
|
+
tones: [0x2a4a6e, 0x38587a, 0x4b5b6b],
|
|
201
|
+
n: 36,
|
|
202
|
+
wide: 9,
|
|
203
|
+
gap: [1.15, 1.3],
|
|
204
|
+
loose: 0.28,
|
|
205
|
+
at: [8, -1],
|
|
206
|
+
face: [-20, -1],
|
|
207
|
+
},
|
|
208
|
+
cobaltLancers: {
|
|
209
|
+
body: 'cobalt',
|
|
210
|
+
kind: 'plain',
|
|
211
|
+
tones: [0x2a4a6e, 0x3b5878, 0x606c7a],
|
|
212
|
+
n: 9,
|
|
213
|
+
wide: 3,
|
|
214
|
+
gap: [2.2, 3.0],
|
|
215
|
+
loose: 0.2,
|
|
216
|
+
mounted: true,
|
|
217
|
+
lance: true,
|
|
218
|
+
at: [7.5, 8.5],
|
|
219
|
+
face: [-20, 6],
|
|
220
|
+
},
|
|
221
|
+
wagons: {
|
|
222
|
+
beast: 'wagon',
|
|
223
|
+
tones: [0x8a6a4a, 0xa89878, 0x5a4636],
|
|
224
|
+
n: 2,
|
|
225
|
+
wide: 1,
|
|
226
|
+
gap: [4.5, 11],
|
|
227
|
+
loose: 0.08,
|
|
228
|
+
at: [-2, -16],
|
|
229
|
+
face: [40, -16],
|
|
230
|
+
},
|
|
231
|
+
herd: {
|
|
232
|
+
beast: 'cattle',
|
|
233
|
+
tones: [0x8a6a4a, 0xa89878, 0x5a4636, 0xc8b89a],
|
|
234
|
+
n: 10,
|
|
235
|
+
wide: 5,
|
|
236
|
+
gap: [1.8, 2.2],
|
|
237
|
+
loose: 0.4,
|
|
238
|
+
at: [11, -16],
|
|
239
|
+
face: [40, -16],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
400,
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
crowdSystem.build();
|
|
248
|
+
|
|
249
|
+
const views = {
|
|
250
|
+
line: { eye: [-1, 7.6, 28], target: [0.5, 1.9, -1] },
|
|
251
|
+
cavalry: { eye: [-2, 4.6, 19], target: [7, 1.8, 8] },
|
|
252
|
+
train: { eye: [-16, 5.8, -3], target: [-1, 1.6, -16] },
|
|
253
|
+
overview: { eye: [0, 38, 56], target: [0, 1, -2] },
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const rig = createOrbitCamera({
|
|
257
|
+
camera,
|
|
258
|
+
canvas,
|
|
259
|
+
renderer,
|
|
260
|
+
scene,
|
|
261
|
+
views,
|
|
262
|
+
initialView: 'line',
|
|
263
|
+
groundAt: groundHeight,
|
|
264
|
+
minClearance: 1.2,
|
|
265
|
+
minDistance: 6,
|
|
266
|
+
maxDistance: 170,
|
|
267
|
+
onDraw: () => {},
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
const anchor = { x: 0, z: 0 };
|
|
271
|
+
const fireCue = (verb, targets, ...args) => director.cue('field', [elapsed, 'cue', 'field', verb, targets, ...args], anchor);
|
|
272
|
+
|
|
273
|
+
document.querySelector('#march').addEventListener('click', () => {
|
|
274
|
+
fireCue('go', 'crimsonFoot', -5, 0, 5, 20, 0);
|
|
275
|
+
fireCue('go', 'cobaltFoot', 5, 0, 5, -20, 0);
|
|
276
|
+
fireCue('go', 'cobaltLancers', 4, 8, 4.5, -20, 4);
|
|
277
|
+
fireCue('go', 'wagons', 8, -17, 10, 40, -17);
|
|
278
|
+
fireCue('go', 'herd', 24, -18, 10, 40, -18);
|
|
279
|
+
});
|
|
280
|
+
document.querySelector('#fight').addEventListener('click', () => {
|
|
281
|
+
fireCue('fight', ['crimsonFoot', 'cobaltFoot', 'cobaltLancers'], 1.25);
|
|
282
|
+
});
|
|
283
|
+
document.querySelector('#fall').addEventListener('click', () => {
|
|
284
|
+
fireCue('fall', ['crimsonFoot', 'cobaltFoot'], 0.35, 3);
|
|
285
|
+
});
|
|
286
|
+
document.querySelector('#reset').addEventListener('click', () => {
|
|
287
|
+
director.resetAll();
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// Start with a brief opening advance so the first frames show active ranks, lancers, and rolling wagons.
|
|
291
|
+
fireCue('go', 'crimsonFoot', -5, 0, 6, 20, 0);
|
|
292
|
+
fireCue('go', 'cobaltFoot', 5, -1, 6, -20, -1);
|
|
293
|
+
fireCue('go', 'cobaltLancers', 3.5, 7.5, 6, -20, 5);
|
|
294
|
+
fireCue('go', 'wagons', 4, -16, 12, 40, -16);
|
|
295
|
+
fireCue('go', 'herd', 17, -16, 12, 40, -16);
|
|
296
|
+
|
|
297
|
+
const clock = new THREE.Timer();
|
|
298
|
+
function draw() {
|
|
299
|
+
clock.update();
|
|
300
|
+
const dt = Math.min(clock.getDelta(), 0.1);
|
|
301
|
+
elapsed += dt;
|
|
302
|
+
frame++;
|
|
303
|
+
rig.clampCamera();
|
|
304
|
+
tickHost(dt);
|
|
305
|
+
updater.updateCrowds();
|
|
306
|
+
renderer.render(scene, camera);
|
|
307
|
+
requestAnimationFrame(draw);
|
|
308
|
+
}
|
|
309
|
+
draw();
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roamwright's public geometry builders and kits, grouped by subsystem. Re-exported whole from `roamwright`.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// ── Context, math & core geometry ────────────────────────────────────────
|
|
7
|
+
export { GB as GeometryBuilder, geometryOf } from './builder.js';
|
|
8
|
+
export { stillMesh } from './still-mesh.js';
|
|
9
|
+
export { createUnitShapes, createFigureUnitShapes } from './primitives.js';
|
|
10
|
+
|
|
11
|
+
// ── Terrain & land baking ────────────────────────────────────────────────
|
|
12
|
+
export { createLandSheet } from './land-sheet.js';
|
|
13
|
+
export { createLandWaters } from './land-waters.js';
|
|
14
|
+
export { createEarthworks } from './land-earthworks.js';
|
|
15
|
+
export { createDitchedGround } from './land-ditches.js';
|
|
16
|
+
export { createMoundFaces } from './land-mound-faces.js';
|
|
17
|
+
export { createTownGround } from './land-town-ground.js';
|
|
18
|
+
export { createDryBasin } from './land-dry-basin.js';
|
|
19
|
+
export { landEdgeGrid } from './land-edge.js';
|
|
20
|
+
export { rockSheet } from './creased-sheet.js';
|
|
21
|
+
export { planTalusStones } from './strata-talus.js';
|
|
22
|
+
export {
|
|
23
|
+
OUTCROP_SEEDS,
|
|
24
|
+
OUTCROP_SHAPE,
|
|
25
|
+
SCREE_STONE_FORMS,
|
|
26
|
+
WORN_STONE_FOOT,
|
|
27
|
+
WORN_STONE_FORMS,
|
|
28
|
+
beddedOutcrop,
|
|
29
|
+
cragRock,
|
|
30
|
+
createCragLibrary,
|
|
31
|
+
createRockShapes,
|
|
32
|
+
fallenStone,
|
|
33
|
+
flatQuad,
|
|
34
|
+
jointed,
|
|
35
|
+
wornStone,
|
|
36
|
+
} from './strata-rocks.js';
|
|
37
|
+
export { MESA_CLIFF, buildMesaCliff } from './strata-mesa.js';
|
|
38
|
+
export { HILL_RUIN, buildHillRuin } from './ruins-hill.js';
|
|
39
|
+
export { MOUND_RUINS, buildMoundRuins, buildMoundSherds, buildMoundWalls, createMoundRuins } from './ruins-mound.js';
|
|
40
|
+
export { RUBBLE_HEAP, RUBBLE_SCATTER, buildRubbleHeap, createRubbleStone, scatterRubble } from './ruins-rubble.js';
|
|
41
|
+
export { RUIN_WALL, buildRuinWall, coursedWall, tumbleBlock } from './ruins-walls.js';
|
|
42
|
+
export {
|
|
43
|
+
ASHLAR_COURSE,
|
|
44
|
+
COLUMN_DRUM,
|
|
45
|
+
MASONRY_METAL,
|
|
46
|
+
buildAshlarWall,
|
|
47
|
+
buildColumnDrum,
|
|
48
|
+
buildFlagstones,
|
|
49
|
+
buildLampStandGeometry,
|
|
50
|
+
buildWallLanternGeometry,
|
|
51
|
+
} from './ruins-masonry.js';
|
|
52
|
+
export { DEFAULT_SCORCH_PALETTE, addEmberSkin, buildBreachFan, buildRubbleMound } from './ruins-breach.js';
|
|
53
|
+
export { CRATER_PALETTE, buildCraterBowl, buildFallenBoulder, craterDip } from './ruins-crater.js';
|
|
54
|
+
export {
|
|
55
|
+
GROUND_PATCH_DEFAULTS,
|
|
56
|
+
GROUND_PATCH_KINDS,
|
|
57
|
+
buildDrapePebbleGeometry,
|
|
58
|
+
createGroundPatchData,
|
|
59
|
+
drapeGroundPatch,
|
|
60
|
+
scatterPatchBits,
|
|
61
|
+
} from './ground-drape.js';
|
|
62
|
+
export { createShapeBatches } from './instances.js';
|
|
63
|
+
export { planStreamBanks } from './stream-banks.js';
|
|
64
|
+
export { SPRING_COLOURS, SPRING_HEAD, planSpringRocks, planSprings, springFrame, springWetGround } from './stream-springs.js';
|
|
65
|
+
export { planShoreReeds } from './shore-reeds.js';
|
|
66
|
+
export { roadRibbon } from './road-ribbon.js';
|
|
67
|
+
export { bridgeSpanPath, bridgeSpanPaths, planBridgeFrame, planRoadBridges } from './road-bridges.js';
|
|
68
|
+
export {
|
|
69
|
+
AVENUE_CEDAR,
|
|
70
|
+
PAVED_ROAD,
|
|
71
|
+
avenueBoleRadius,
|
|
72
|
+
buildAvenueCedar,
|
|
73
|
+
buildFarRoadPaving,
|
|
74
|
+
buildRoadArch,
|
|
75
|
+
buildRoadMilestones,
|
|
76
|
+
buildRoadPaving,
|
|
77
|
+
planRoadAvenue,
|
|
78
|
+
roadLine,
|
|
79
|
+
} from './paved-road.js';
|
|
80
|
+
export { createFieldSurvey, FIELD_SURVEY, FIELD_USE } from './field-survey.js';
|
|
81
|
+
export { FIELD_BITS, NO_PATH_DISTANCE, createFieldCoverCache, packFieldBits, packSparsePlain } from './field-map.js';
|
|
82
|
+
export {
|
|
83
|
+
DEFAULT_DRIFT_SCALE,
|
|
84
|
+
DEFAULT_FLOWER_DRIFTS,
|
|
85
|
+
DEFAULT_FLOWER_LOOKS,
|
|
86
|
+
FLOWER_KINDS,
|
|
87
|
+
TUFT_SHAPE,
|
|
88
|
+
createFlowerDrift,
|
|
89
|
+
tuftGeometry,
|
|
90
|
+
} from './plant-tuft.js';
|
|
91
|
+
export { LAND_TRAILS, LAND_TRAIL_MARKS, boundsOverlap, createLandTrails, rasterizeTrailMarks } from './land-trails.js';
|
|
92
|
+
export { createIrrigatedFields, IRRIGATED_FIELDS } from './irrigated-fields.js';
|
|
93
|
+
export { DEFAULT_CROP_STANDS, FARM_CROPS, createCropPlacer } from './farm-crops.js';
|
|
94
|
+
export { DRYSTONE_WALL, FIELD_STONE, drystoneStone, planDrystoneWall } from './drystone-wall.js';
|
|
95
|
+
export { DEFAULT_FENCE_STYLE, addFenceRing, buildFenceRing } from './timber-fence.js';
|
|
96
|
+
export { TREE_GROVE, planScatterInstances, planTreeGrove } from './scatter-instances.js';
|
|
97
|
+
export { FARM_BOUNDARIES, planFieldBoundaries } from './farm-boundaries.js';
|
|
98
|
+
export { DEFAULT_FARM_HERDS, FARM_LIFE, herdPlaces, parcelPlaces, planFarmLife, ploughSite } from './farm-life.js';
|
|
99
|
+
export { STOOK, createStook } from './prop-stook.js';
|
|
100
|
+
export { PLOUGH, ploughGear } from './prop-plough.js';
|
|
101
|
+
export { FARM_BARN_DOORS, FARM_HAYSTACK, FARM_STONE_PILE, buildBarnDoors, buildHaystacks, buildStonePile } from './farm-props.js';
|
|
102
|
+
|
|
103
|
+
// ── Settlements, houses, fortifications & interiors ──────────────────────
|
|
104
|
+
export { createHouseKit } from './house-kit.js';
|
|
105
|
+
export { createPooledKit } from './house-kit-pool.js';
|
|
106
|
+
export { layVillage } from './village-layout.js';
|
|
107
|
+
export { TOWN_CELL, districtAt, layTown, rectFree, stampArea, stampDisc, stampLine, stampRect, townPlan } from './town-plan.js';
|
|
108
|
+
export { townLots } from './town-lots.js';
|
|
109
|
+
export { paintTown } from './town-ground.js';
|
|
110
|
+
export { createTownHouses } from './town-houses.js';
|
|
111
|
+
export { ARCADE_BAY, ARCADE_WALK, createTownWorks, townFacing } from './town-works.js';
|
|
112
|
+
export { createTownLights, distantTownLights } from './town-lights.js';
|
|
113
|
+
export { createCourtyardInn } from './town-courtyard-inn.js';
|
|
114
|
+
export { alongRim, createTownGarden } from './town-garden.js';
|
|
115
|
+
export { createGardenPlantShapes, createPlantList, GARDEN_PLANT_LOBES, GARDEN_PLANT_SEEN } from './plant-garden.js';
|
|
116
|
+
export { createWallRuns } from './wall-runs.js';
|
|
117
|
+
export { addBattlement, addMerlonRow, addPortcullis, addRadialMerlons, addRampDeck, addRoundTower, wallGateFrames } from './fort-parts.js';
|
|
118
|
+
export { createGreatWalls, greatGateMouth } from './fort-great-walls.js';
|
|
119
|
+
export { createCityFortification } from './fort-city-walls.js';
|
|
120
|
+
export { buildPortalGateway, portalGatewayLights } from './fort-portal.js';
|
|
121
|
+
export {
|
|
122
|
+
addCrenelRun,
|
|
123
|
+
addDressedSlit,
|
|
124
|
+
buildArchedKeepDoor,
|
|
125
|
+
buildFlaggedWallWalk,
|
|
126
|
+
buildFlaredRoundTower,
|
|
127
|
+
buildKeepCitadel,
|
|
128
|
+
buildKeepTowers,
|
|
129
|
+
} from './fort-keep.js';
|
|
130
|
+
export { buildRingCurtain, buildRingFortification, buildRingGate, buildRingTower } from './fort-ring-wall.js';
|
|
131
|
+
export { buildPolylineWall, buildWallCulverts } from './fort-polyline.js';
|
|
132
|
+
export { buildGateApron, buildGateCauseway } from './fort-gate-approach.js';
|
|
133
|
+
export { createSeawall } from './fort-seawall.js';
|
|
134
|
+
export { TERRACE_DEFAULTS, createTerraceFrame, planTerrace, wallAt } from './fort-terrace-plan.js';
|
|
135
|
+
export { createTerraceWall } from './fort-terrace-wall.js';
|
|
136
|
+
export { createTerraceGates } from './fort-terrace-gates.js';
|
|
137
|
+
export { createRoomKit } from './room-kit.js';
|
|
138
|
+
export { HALL_OLD_STONE_TONE, HALL_STONE_TONE, HALL_WALL_THICKNESS, createStoneHalls } from './room-halls.js';
|
|
139
|
+
|
|
140
|
+
// ── Vessels ──────────────────────────────────────────────────────────────
|
|
141
|
+
export { CRANE_EDGE, HARBOUR_WATERFRONT, craneX, createHarbourKit, quayDeck } from './harbour-kit.js';
|
|
142
|
+
export { createShipKit } from './ship-kit.js';
|
|
143
|
+
export { SHIP_PRESETS } from './ship-presets.js';
|
|
144
|
+
|
|
145
|
+
// ── Figures, animals & fliers ────────────────────────────────────────────
|
|
146
|
+
export { createFigureBuilder } from './figure-body.js';
|
|
147
|
+
export { catBodies, catRig } from './animal-cat-body.js';
|
|
148
|
+
export { FLY_LOOK, flyShape } from './flier-shapes.js';
|
|
149
|
+
export {
|
|
150
|
+
ANT_LOOK,
|
|
151
|
+
BEETLE_LOOK,
|
|
152
|
+
RAT_LOOK,
|
|
153
|
+
SNAKE_LOOK,
|
|
154
|
+
SPIDER_LOOK,
|
|
155
|
+
antGeometry,
|
|
156
|
+
beetleGeometry,
|
|
157
|
+
ratGeometry,
|
|
158
|
+
snakeGeometry,
|
|
159
|
+
spiderGeometry,
|
|
160
|
+
} from './crawl-shapes.js';
|
|
161
|
+
export { GIANT_SPIDER_GAIT, GIANT_SPIDER_LOOK, giantSpiderMoment, giantSpiderMoments } from './crawler-giant-spider.js';
|
|
162
|
+
|
|
163
|
+
// ── Crowds ───────────────────────────────────────────────────────────────
|
|
164
|
+
export { buildCrowdLook, createCrowdLookBuilder } from './crowd-look.js';
|
|
165
|
+
export { farCrowdFigure } from './crowd-far.js';
|
|
166
|
+
|
|
167
|
+
// ── Effects, audio, pacing & runtime ─────────────────────────────────────
|
|
168
|
+
export { STORM_WALL_DEFAULTS, stormWallArrays } from './storm-wall.js';
|
|
169
|
+
|
|
170
|
+
// ── Scene playback, melee, projectiles, beams, props & markers ───────────
|
|
171
|
+
export { buildArrowGeometry, buildKnifeGeometry, buildQuarrelGeometry } from './projectile-shapes.js';
|