@margoengine/scenes 0.0.0-stage → 1.0.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.
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +619 -2
- package/dist/dune-coast-info-D9yQIv8G.js +218 -0
- package/dist/dune-coast-info.d.ts +3 -0
- package/dist/dune-coast.d.ts +179 -0
- package/dist/dune-coast.js +778 -0
- package/dist/errors-fc4i1pSL.js +7 -0
- package/dist/fauld-blast.d.ts +165 -0
- package/dist/fauld-blast.js +1034 -0
- package/dist/fauld-countryside.d.ts +13 -0
- package/dist/fauld-countryside.js +10 -0
- package/dist/fauld-crater.d.ts +13 -0
- package/dist/fauld-crater.js +10 -0
- package/dist/fauld-dig.d.ts +89 -0
- package/dist/fauld-dustfall-fines-grid-MA6XPrq6.js +14 -0
- package/dist/fauld-dustfall-fines-grid.d.ts +11 -0
- package/dist/fauld-dustfall-grid-Bb4X8b-u.js +14 -0
- package/dist/fauld-dustfall-grid.d.ts +11 -0
- package/dist/fauld-explosion.d.ts +135 -0
- package/dist/fauld-grains.d.ts +27 -0
- package/dist/fauld-mud.d.ts +104 -0
- package/dist/fauld-surge.d.ts +71 -0
- package/dist/fauld-tunnels-info-8qv9X4OJ.js +70 -0
- package/dist/fauld-tunnels-info.d.ts +5 -0
- package/dist/fauld-tunnels-plan.d.ts +1069 -0
- package/dist/fauld-tunnels.d.ts +281 -0
- package/dist/fauld-tunnels.js +6801 -0
- package/dist/fauld-world-CNNSonJF.js +863 -0
- package/dist/fauld-world-info.d.ts +7 -0
- package/dist/fauld-world.d.ts +243 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +160 -0
- package/dist/library-mesh-CjTG-mVZ.js +329 -0
- package/dist/library-mesh.d.ts +108 -0
- package/dist/library-parts.d.ts +55 -0
- package/dist/library.d.ts +52 -0
- package/dist/library.js +48 -0
- package/dist/look-family.d.ts +63 -0
- package/dist/look-family.js +57 -0
- package/dist/shared/settings.d.ts +89 -0
- package/dist/shot-settings.d.ts +40 -0
- package/dist/shot-settings.js +94 -0
- package/dist/timber-valley-info-vVI2nwDs.js +253 -0
- package/dist/timber-valley-info.d.ts +3 -0
- package/dist/timber-valley.d.ts +229 -0
- package/dist/timber-valley.js +424 -0
- package/package.json +104 -4
|
@@ -0,0 +1,863 @@
|
|
|
1
|
+
import { n as e, t } from "./library-mesh-CjTG-mVZ.js";
|
|
2
|
+
import { SURFACES as n } from "@margoengine/materials/presets";
|
|
3
|
+
import { DAY_PRESETS as r } from "@margoengine/sky/day-presets";
|
|
4
|
+
import { PresetScene as i, SCENE_PRESETS as a } from "@margoengine/sky/scenes";
|
|
5
|
+
import { degrees as o, sunPath as s } from "@margoengine/sky/sun";
|
|
6
|
+
import { Shadows as c } from "@margoengine/shadows";
|
|
7
|
+
import { GTAO as l } from "@margoengine/post/gtao";
|
|
8
|
+
import { BiomeWorld as u, defineBiome as d } from "@margoengine/biomes";
|
|
9
|
+
import { BiomeEditor as f } from "@margoengine/biomes/editor";
|
|
10
|
+
import "@margoengine/biomes/splines";
|
|
11
|
+
import { FARMLAND_MATERIALS as p, FARMLAND_PAINT as m, farmlandEdits as h, layoutFarmland as g, lowlandFarmWorld as _ } from "@margoengine/biomes/farmland";
|
|
12
|
+
import { BiomeView as v } from "@margoengine/biomes/view";
|
|
13
|
+
import { VolumetricClouds as y } from "@margoengine/sky/volumetric-clouds";
|
|
14
|
+
import { WEATHER_PRESETS as b, WeatherMachine as x } from "@margoengine/weather";
|
|
15
|
+
import { WeatherDrive as S } from "@margoengine/weather/drive";
|
|
16
|
+
import { loadGLTF as C } from "@margoengine/gltf";
|
|
17
|
+
import { textured as ee } from "@margoengine/gltf/textured";
|
|
18
|
+
import { DOF as te } from "@margoengine/dof";
|
|
19
|
+
//#region src/fauld-dig.ts
|
|
20
|
+
var ne = Object.freeze([{
|
|
21
|
+
at: 0,
|
|
22
|
+
at_: [-40, 10],
|
|
23
|
+
tnt: 22e5
|
|
24
|
+
}, {
|
|
25
|
+
at: 1.6,
|
|
26
|
+
at_: [55, -15],
|
|
27
|
+
tnt: 18e5
|
|
28
|
+
}]), w = Object.freeze({
|
|
29
|
+
speed: 1.5,
|
|
30
|
+
from: 345,
|
|
31
|
+
toward: 15
|
|
32
|
+
}), T = Object.freeze({
|
|
33
|
+
depth: 35,
|
|
34
|
+
ground: "wetSoftRock"
|
|
35
|
+
}), E = (e) => e % 5 == 0, D = 32, re = .75;
|
|
36
|
+
async function ie(e, t = 9.80665, n = {}) {
|
|
37
|
+
if (!(e.length > 0 && e.every((e) => e.tnt > 0 && e.at >= 0))) throw RangeError("fauld dig: pass one or more releases, each with TNT above 0 kg and a film time of 0 or more.");
|
|
38
|
+
let { craterSize: r, CRATER_GROUNDS: i, ejectaBlocks: a, ejectaSpoil: o, blockLanding: s, lowSpeedCrater: c, LOW_SPEED_GROUNDS: l } = await import("@margoengine/physics/crater"), u = i[T.ground], d = e.reduce((e, t) => e + t.tnt, 0), f = [e.reduce((e, t) => e + t.at_[0] * t.tnt, 0) / d, e.reduce((e, t) => e + t.at_[1] * t.tnt, 0) / d], p = r(d * 4184e3, T.depth, u, t), m = (u.ejected ?? .6) * (u.bulking ?? 1), h = Math.min(...e.map((e) => e.at)), g = null, _ = [], v = null, y, b = 0;
|
|
39
|
+
if (n.height) {
|
|
40
|
+
let e = n.height, r = h + Math.sqrt(.8 * p.depth / t), i = a(p, u, {
|
|
41
|
+
smallest: n.smallest ?? 2,
|
|
42
|
+
seed: 1944,
|
|
43
|
+
gravity: t,
|
|
44
|
+
coherent: 1,
|
|
45
|
+
coherentExponent: 0
|
|
46
|
+
}), d = a(p, u, {
|
|
47
|
+
smallest: .25,
|
|
48
|
+
seed: 1944,
|
|
49
|
+
gravity: t
|
|
50
|
+
}), m = Array(D).fill(0), x = [], S = [];
|
|
51
|
+
b = d.length;
|
|
52
|
+
for (let n of i) {
|
|
53
|
+
let r = s(n, f, e, t), i = Math.atan2(r.at[1] - f[1], r.at[0] - f[0]) / (2 * Math.PI);
|
|
54
|
+
m[(Math.round(i * D) % D + D) % D] += n.mass;
|
|
55
|
+
}
|
|
56
|
+
for (let n of d) {
|
|
57
|
+
let i = s(n, f, e, t), a = c(n.diameter, u.density, i.speed, i.angle, l.wetClay, t);
|
|
58
|
+
S.push({
|
|
59
|
+
at: i.at,
|
|
60
|
+
height: i.height,
|
|
61
|
+
diameter: n.diameter
|
|
62
|
+
}), a.radius >= re && x.push({
|
|
63
|
+
center: i.at,
|
|
64
|
+
start: r + i.time,
|
|
65
|
+
radius: a.radius,
|
|
66
|
+
depth: a.depth,
|
|
67
|
+
duration: Math.max(a.formation, .05)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
y = m, _ = S, v = o(p, u, {
|
|
71
|
+
smallest: .25,
|
|
72
|
+
seed: 1944,
|
|
73
|
+
gravity: t,
|
|
74
|
+
centre: f,
|
|
75
|
+
height: e
|
|
76
|
+
}), x.length && (g = Object.freeze({
|
|
77
|
+
kind: "craters",
|
|
78
|
+
craters: x,
|
|
79
|
+
seed: 1944
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
return Object.freeze({
|
|
83
|
+
event: Object.freeze({
|
|
84
|
+
kind: "crater",
|
|
85
|
+
center: f,
|
|
86
|
+
start: h,
|
|
87
|
+
duration: p.formation,
|
|
88
|
+
radius: p.radius,
|
|
89
|
+
depth: p.depth,
|
|
90
|
+
ejecta: m,
|
|
91
|
+
seed: 1944,
|
|
92
|
+
...y ? {
|
|
93
|
+
rays: y,
|
|
94
|
+
pits: !1,
|
|
95
|
+
blocks: !1
|
|
96
|
+
} : {}
|
|
97
|
+
}),
|
|
98
|
+
secondaries: g,
|
|
99
|
+
blocks: b,
|
|
100
|
+
landed: _,
|
|
101
|
+
spoil: v,
|
|
102
|
+
launch: (u.launch ?? .78) * Math.sqrt(t * p.radius),
|
|
103
|
+
radius: p.radius,
|
|
104
|
+
depth: p.depth,
|
|
105
|
+
volume: p.volume,
|
|
106
|
+
lip: p.lip
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/fauld-world.ts
|
|
111
|
+
var O = 6400, k = Object.freeze({
|
|
112
|
+
easting: 418225,
|
|
113
|
+
northing: 327725
|
|
114
|
+
}), A = Object.freeze({
|
|
115
|
+
crater: [0, 0],
|
|
116
|
+
farm: [0, 10],
|
|
117
|
+
hanbury: [-1225, -175],
|
|
118
|
+
church: [-1190, -190],
|
|
119
|
+
inn: [-1120, -120],
|
|
120
|
+
works: [43, -582],
|
|
121
|
+
reservoir: [-61, -278],
|
|
122
|
+
dove: [-300, -2600],
|
|
123
|
+
tutbury: [3100, -1300]
|
|
124
|
+
}), j = Object.freeze({
|
|
125
|
+
church: {
|
|
126
|
+
at: A.church,
|
|
127
|
+
turn: 0,
|
|
128
|
+
model: "church_st_werburgh",
|
|
129
|
+
eras: [
|
|
130
|
+
"before",
|
|
131
|
+
"1944",
|
|
132
|
+
"today"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
inn: {
|
|
136
|
+
at: A.inn,
|
|
137
|
+
turn: .3,
|
|
138
|
+
model: "cock_inn",
|
|
139
|
+
eras: [
|
|
140
|
+
"before",
|
|
141
|
+
"1944",
|
|
142
|
+
"today"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
cottages: {
|
|
146
|
+
at: [-1260, -90],
|
|
147
|
+
turn: .1,
|
|
148
|
+
model: "cottage_row",
|
|
149
|
+
eras: [
|
|
150
|
+
"before",
|
|
151
|
+
"1944",
|
|
152
|
+
"today"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
farmhouse: {
|
|
156
|
+
at: A.farm,
|
|
157
|
+
turn: .2,
|
|
158
|
+
model: void 0,
|
|
159
|
+
eras: ["before"]
|
|
160
|
+
},
|
|
161
|
+
kilnWorks: {
|
|
162
|
+
at: A.works,
|
|
163
|
+
turn: -.4,
|
|
164
|
+
model: "kiln_works",
|
|
165
|
+
eras: ["before", "1944"]
|
|
166
|
+
},
|
|
167
|
+
guardHut: {
|
|
168
|
+
at: [150, 120],
|
|
169
|
+
turn: 0,
|
|
170
|
+
model: "guard_hut",
|
|
171
|
+
eras: ["before", "1944"]
|
|
172
|
+
},
|
|
173
|
+
nfsTender: {
|
|
174
|
+
at: [205, 150],
|
|
175
|
+
turn: .15,
|
|
176
|
+
model: "nfs_tender",
|
|
177
|
+
eras: ["1944"]
|
|
178
|
+
},
|
|
179
|
+
wvsVan: {
|
|
180
|
+
at: [222, 162],
|
|
181
|
+
turn: .4,
|
|
182
|
+
model: "wvs_van",
|
|
183
|
+
eras: ["1944"]
|
|
184
|
+
},
|
|
185
|
+
cattle: {
|
|
186
|
+
at: [-160, 220],
|
|
187
|
+
turn: 0,
|
|
188
|
+
model: "cattle",
|
|
189
|
+
eras: ["before", "today"]
|
|
190
|
+
}
|
|
191
|
+
}), M = {
|
|
192
|
+
dawn: {
|
|
193
|
+
hour: 8.7,
|
|
194
|
+
weather: {
|
|
195
|
+
cloud: .85,
|
|
196
|
+
fog: .25,
|
|
197
|
+
humidity: .92,
|
|
198
|
+
temperature: -1,
|
|
199
|
+
wind: 1.5
|
|
200
|
+
},
|
|
201
|
+
preset: "overcast",
|
|
202
|
+
clouds: "stratus"
|
|
203
|
+
},
|
|
204
|
+
lowSun: {
|
|
205
|
+
hour: 11.5,
|
|
206
|
+
weather: {
|
|
207
|
+
cloud: .6,
|
|
208
|
+
fog: .12,
|
|
209
|
+
humidity: .75,
|
|
210
|
+
temperature: 4,
|
|
211
|
+
wind: 3
|
|
212
|
+
},
|
|
213
|
+
preset: "noon",
|
|
214
|
+
clouds: "cumulus"
|
|
215
|
+
},
|
|
216
|
+
overcast: {
|
|
217
|
+
hour: 11.2,
|
|
218
|
+
weather: {
|
|
219
|
+
...b.overcast,
|
|
220
|
+
cloud: .9,
|
|
221
|
+
fog: .14,
|
|
222
|
+
temperature: 5
|
|
223
|
+
},
|
|
224
|
+
preset: "overcast",
|
|
225
|
+
clouds: "stratus"
|
|
226
|
+
},
|
|
227
|
+
grey: {
|
|
228
|
+
hour: 12.5,
|
|
229
|
+
weather: {
|
|
230
|
+
...b.overcast,
|
|
231
|
+
cloud: .95,
|
|
232
|
+
fog: .22,
|
|
233
|
+
temperature: 4
|
|
234
|
+
},
|
|
235
|
+
preset: "overcast",
|
|
236
|
+
clouds: "stratus"
|
|
237
|
+
},
|
|
238
|
+
dusk: {
|
|
239
|
+
hour: 15.9,
|
|
240
|
+
weather: {
|
|
241
|
+
cloud: .7,
|
|
242
|
+
fog: .18,
|
|
243
|
+
humidity: .85,
|
|
244
|
+
temperature: 1,
|
|
245
|
+
wind: 2
|
|
246
|
+
},
|
|
247
|
+
preset: "goldenHour",
|
|
248
|
+
clouds: "stratus"
|
|
249
|
+
},
|
|
250
|
+
night: {
|
|
251
|
+
hour: 19,
|
|
252
|
+
weather: {
|
|
253
|
+
cloud: .8,
|
|
254
|
+
fog: .2,
|
|
255
|
+
humidity: .9,
|
|
256
|
+
temperature: 0,
|
|
257
|
+
wind: 1
|
|
258
|
+
},
|
|
259
|
+
preset: "overcast",
|
|
260
|
+
clouds: "stratus"
|
|
261
|
+
},
|
|
262
|
+
snow: {
|
|
263
|
+
hour: 12,
|
|
264
|
+
weather: { ...b.snow },
|
|
265
|
+
preset: "overcast",
|
|
266
|
+
clouds: "stratus"
|
|
267
|
+
},
|
|
268
|
+
rain: {
|
|
269
|
+
hour: 12,
|
|
270
|
+
weather: {
|
|
271
|
+
...b.rain,
|
|
272
|
+
wind: 5
|
|
273
|
+
},
|
|
274
|
+
preset: "overcast",
|
|
275
|
+
clouds: "stratus"
|
|
276
|
+
},
|
|
277
|
+
mist: {
|
|
278
|
+
hour: 8.6,
|
|
279
|
+
weather: {
|
|
280
|
+
...b.fog,
|
|
281
|
+
fog: .4
|
|
282
|
+
},
|
|
283
|
+
preset: "overcast",
|
|
284
|
+
clouds: "stratus"
|
|
285
|
+
}
|
|
286
|
+
}, N = 500, P = Object.freeze({
|
|
287
|
+
bottom: 1e3,
|
|
288
|
+
top: 1600
|
|
289
|
+
}), F = Object.freeze({
|
|
290
|
+
oak: "trees/oak",
|
|
291
|
+
ash: "trees/ash",
|
|
292
|
+
birch: "trees/birch",
|
|
293
|
+
holly: "trees/holly",
|
|
294
|
+
hazel: "hedges/hawthorn_b",
|
|
295
|
+
hawthorn: "hedges/hawthorn_a",
|
|
296
|
+
blackthorn: "hedges/blackthorn_a"
|
|
297
|
+
}), I = 1 - .4 * (1 - Math.exp(-2.25)) / (1 - Math.exp(-3)), L = (e) => [
|
|
298
|
+
e[0] * I,
|
|
299
|
+
e[1] * I,
|
|
300
|
+
e[2] * I
|
|
301
|
+
], R = L(n.redSand.color), z = {
|
|
302
|
+
"winter-pasture": {
|
|
303
|
+
file: "grass_ground",
|
|
304
|
+
repeat: 3,
|
|
305
|
+
color: n.grass.color
|
|
306
|
+
},
|
|
307
|
+
"rough-meadow": {
|
|
308
|
+
file: "sparse_grass",
|
|
309
|
+
repeat: 3,
|
|
310
|
+
color: ((e, t) => [
|
|
311
|
+
(e[0] + t[0]) / 2,
|
|
312
|
+
(e[1] + t[1]) / 2,
|
|
313
|
+
(e[2] + t[2]) / 2
|
|
314
|
+
])(n.grass.color, n.dryGrass.color)
|
|
315
|
+
},
|
|
316
|
+
plough: {
|
|
317
|
+
file: "raked_dirt",
|
|
318
|
+
repeat: 2.5,
|
|
319
|
+
color: L(n.redSand.color),
|
|
320
|
+
bump: .35
|
|
321
|
+
},
|
|
322
|
+
stubble: {
|
|
323
|
+
file: "withered_grass",
|
|
324
|
+
repeat: 2.5,
|
|
325
|
+
color: n.dryGrass.color
|
|
326
|
+
},
|
|
327
|
+
"lane-gravel": {
|
|
328
|
+
file: "gravel_road",
|
|
329
|
+
repeat: 3,
|
|
330
|
+
color: [
|
|
331
|
+
.42,
|
|
332
|
+
.37,
|
|
333
|
+
.31
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
mud: {
|
|
337
|
+
file: "mud_forest",
|
|
338
|
+
repeat: 2.5,
|
|
339
|
+
color: L(n.redSand.color)
|
|
340
|
+
},
|
|
341
|
+
"leaf-litter": {
|
|
342
|
+
file: "leaves_forest_ground",
|
|
343
|
+
repeat: 2.5,
|
|
344
|
+
color: [
|
|
345
|
+
.34,
|
|
346
|
+
.26,
|
|
347
|
+
.18
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
moss: {
|
|
351
|
+
file: "forest_leaves_02",
|
|
352
|
+
repeat: 2.5,
|
|
353
|
+
color: [
|
|
354
|
+
.27,
|
|
355
|
+
.29,
|
|
356
|
+
.16
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
"crater-marl": {
|
|
360
|
+
file: "brown_mud_dry",
|
|
361
|
+
repeat: 3,
|
|
362
|
+
color: n.redSand.color
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
async function ae(e, t) {
|
|
366
|
+
let n = await (await fetch(e, t ? { signal: t } : {})).blob(), r = 1024, i = await createImageBitmap(n, {
|
|
367
|
+
resizeWidth: r,
|
|
368
|
+
resizeHeight: r,
|
|
369
|
+
resizeQuality: "high"
|
|
370
|
+
}), a = new OffscreenCanvas(r, r).getContext("2d");
|
|
371
|
+
if (!a) throw TypeError("fauld: no 2D canvas to decode the ground scans; run the scene in a browser with OffscreenCanvas 2D.");
|
|
372
|
+
return a.drawImage(i, 0, 0), i.close(), {
|
|
373
|
+
width: r,
|
|
374
|
+
height: r,
|
|
375
|
+
data: a.getImageData(0, 0, r, r).data
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
var B = (e, t) => (e.endsWith("/") ? e : e + "/") + t;
|
|
379
|
+
function V(e, t) {
|
|
380
|
+
if (t.length !== e.width * e.depth) throw RangeError(`fauld: the height grid holds ${t.length} heights, not ${e.width} x ${e.depth}; regenerate the grid and its .json together.`);
|
|
381
|
+
return (n, r) => {
|
|
382
|
+
let i = (n - e.xll_easting - e.cellsize_m / 2) / e.cellsize_m, a = (e.ytop_northing - e.cellsize_m / 2 - r) / e.cellsize_m, o = Math.max(0, Math.min(e.width - 2, Math.floor(i))), s = Math.max(0, Math.min(e.depth - 2, Math.floor(a))), c = Math.max(0, Math.min(1, i - o)), l = Math.max(0, Math.min(1, a - s)), u = (n, r) => t[r * e.width + n];
|
|
383
|
+
return (u(o, s) * (1 - c) + u(o + 1, s) * c) * (1 - l) + (u(o, s + 1) * (1 - c) + u(o + 1, s + 1) * c) * l;
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
async function oe(e, t) {
|
|
387
|
+
let n = t ? { signal: t } : {};
|
|
388
|
+
return V(await (await fetch(e.replace(/\.f32$/, ".json"), n)).json(), new Float32Array(await (await fetch(e, n)).arrayBuffer()));
|
|
389
|
+
}
|
|
390
|
+
function H(e) {
|
|
391
|
+
let t = e.geometry.positions, n = (/* @__PURE__ */ new Float32Array(68121)).fill(NaN);
|
|
392
|
+
for (let e = 0; e < t.length; e += 3) {
|
|
393
|
+
let r = Math.round((t[e] + 260) / 2), i = Math.round((t[e + 2] + 260) / 2);
|
|
394
|
+
if (r < 0 || i < 0 || r >= 261 || i >= 261) continue;
|
|
395
|
+
let a = i * 261 + r;
|
|
396
|
+
n[a] >= t[e + 1] || (n[a] = t[e + 1]);
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
half: 260,
|
|
400
|
+
at(e, t) {
|
|
401
|
+
let r = Math.round((e + 260) / 2), i = Math.round((t + 260) / 2);
|
|
402
|
+
if (r < 0 || i < 0 || r >= 261 || i >= 261) return;
|
|
403
|
+
let a = n[i * 261 + r];
|
|
404
|
+
return Number.isNaN(a) ? void 0 : a;
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
var U = (e, t, n) => {
|
|
409
|
+
let r = Math.max(0, Math.min(1, (n - e) / (t - e)));
|
|
410
|
+
return r * r * (3 - 2 * r);
|
|
411
|
+
}, W = d({
|
|
412
|
+
id: "crater-spoil",
|
|
413
|
+
climate: { height: [1e5, null] },
|
|
414
|
+
ground: [{ material: "crater-marl" }, {
|
|
415
|
+
material: "mud",
|
|
416
|
+
moisture: [.85, null]
|
|
417
|
+
}]
|
|
418
|
+
}), G = (e, t, n = 24) => Array.from({ length: n }, (r, i) => [e[0] + t * Math.cos(i / n * 2 * Math.PI), e[1] + t * Math.sin(i / n * 2 * Math.PI)]);
|
|
419
|
+
function se(e, t, n) {
|
|
420
|
+
let r = [
|
|
421
|
+
1,
|
|
422
|
+
4,
|
|
423
|
+
6,
|
|
424
|
+
4,
|
|
425
|
+
1
|
|
426
|
+
], i = (e, i) => {
|
|
427
|
+
let a = Array(e.length).fill(0);
|
|
428
|
+
for (let o = 0; o < t; o++) for (let s = 0; s < n; s++) {
|
|
429
|
+
let c = e[s + n * o];
|
|
430
|
+
if (!c) continue;
|
|
431
|
+
let l = 0;
|
|
432
|
+
for (let e = -2; e <= 2; e++) {
|
|
433
|
+
let a = i === "r" ? s + e : s, c = i === "c" ? o + e : o;
|
|
434
|
+
a >= 0 && a < n && c >= 0 && c < t && (l += r[e + 2]);
|
|
435
|
+
}
|
|
436
|
+
for (let e = -2; e <= 2; e++) {
|
|
437
|
+
let u = i === "r" ? s + e : s, d = i === "c" ? o + e : o;
|
|
438
|
+
u >= 0 && u < n && d >= 0 && d < t && (a[u + n * d] += c * r[e + 2] / l);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return a;
|
|
442
|
+
};
|
|
443
|
+
return i(i([...e], "r"), "c");
|
|
444
|
+
}
|
|
445
|
+
var ce = 6e4, le = 3600, K = {
|
|
446
|
+
radius: 200,
|
|
447
|
+
blend: 160,
|
|
448
|
+
edge: 128
|
|
449
|
+
};
|
|
450
|
+
function q(e, t, n, r) {
|
|
451
|
+
let i = t * t + n * n, a = r * r, o = e.length, s = 0;
|
|
452
|
+
for (let c = 0; c < o; c++) {
|
|
453
|
+
let l = c / o * 2 * Math.PI, u = r * Math.cos(l), d = r * Math.sin(l), f = (t - u) * (t - u) + (n - d) * (n - d);
|
|
454
|
+
s += (a - i) / f * e[c];
|
|
455
|
+
}
|
|
456
|
+
return s / o;
|
|
457
|
+
}
|
|
458
|
+
async function ue(e) {
|
|
459
|
+
let t = e.era ?? "before", n = e.seed ?? 1944, r = e.signal, i = e.dem, a = e.crater ? H(e.crater) : void 0;
|
|
460
|
+
if (![
|
|
461
|
+
"before",
|
|
462
|
+
"1944",
|
|
463
|
+
"today"
|
|
464
|
+
].includes(t)) throw RangeError(`fauld: unknown era ${t}; pass 'before', '1944' or 'today'.`);
|
|
465
|
+
let o = 0;
|
|
466
|
+
for (let e = 0; e < 32; e++) {
|
|
467
|
+
let t = e / 32 * 2 * Math.PI;
|
|
468
|
+
o += i(k.easting + 250 * Math.cos(t), k.northing - 250 * Math.sin(t)) / 32;
|
|
469
|
+
}
|
|
470
|
+
let s = a ? o - 44.9 : 0, c = 1281, l = new Float32Array(c * c), d = t === "today" ? void 0 : Array.from({ length: K.edge }, (e, t) => {
|
|
471
|
+
let n = t / K.edge * 2 * Math.PI;
|
|
472
|
+
return i(k.easting + K.radius * Math.cos(n), k.northing - K.radius * Math.sin(n));
|
|
473
|
+
});
|
|
474
|
+
for (let e = 0; e < c; e++) for (let t = 0; t < c; t++) {
|
|
475
|
+
let n = -3200 + t * 5, r = -3200 + e * 5, o = i(k.easting + n, k.northing - r), u = Math.hypot(n, r);
|
|
476
|
+
if (d && u < K.radius && (o += (q(d, n, r, K.radius) - o) * (1 - U(K.blend, K.radius, u))), a) {
|
|
477
|
+
let e = a.at(n, r), t = 1 - U(150, 200, Math.hypot(n, r));
|
|
478
|
+
e !== void 0 && (o = o * (1 - t) + (e + s) * t);
|
|
479
|
+
}
|
|
480
|
+
l[e * c + t] = o;
|
|
481
|
+
}
|
|
482
|
+
let p = await u.create({
|
|
483
|
+
seed: n,
|
|
484
|
+
origin: [-3200, -3200],
|
|
485
|
+
size: [O, O],
|
|
486
|
+
climate: _.climate,
|
|
487
|
+
height: {
|
|
488
|
+
samples: l,
|
|
489
|
+
width: c,
|
|
490
|
+
depth: c,
|
|
491
|
+
unit: "m"
|
|
492
|
+
},
|
|
493
|
+
biomes: [..._.biomes, W],
|
|
494
|
+
paint: [...m, { biome: W.id }],
|
|
495
|
+
...r ? { signal: r } : {}
|
|
496
|
+
}), v = [
|
|
497
|
+
G(A.hanbury, 260),
|
|
498
|
+
G(A.works, 110),
|
|
499
|
+
G(A.reservoir, 70),
|
|
500
|
+
t === "before" ? G(A.farm, 45) : G(A.crater, 230)
|
|
501
|
+
], y = O / 2, b = g(p, {
|
|
502
|
+
seed: n,
|
|
503
|
+
fieldSize: 42e3,
|
|
504
|
+
keep: v,
|
|
505
|
+
connect: [
|
|
506
|
+
[-3200, 260],
|
|
507
|
+
A.hanbury,
|
|
508
|
+
t === "before" ? A.farm : [0, 260],
|
|
509
|
+
A.works,
|
|
510
|
+
[y, -900],
|
|
511
|
+
[-420, -3200],
|
|
512
|
+
[-900, y]
|
|
513
|
+
]
|
|
514
|
+
}), x = f.attach(p);
|
|
515
|
+
for (let e of h(b, {}, [G([380, -620], 230), ...t === "today" ? [G(A.crater, 200)] : []])) x.apply(e);
|
|
516
|
+
t === "1944" && x.polygon(W.id, G(A.crater, 175, 48));
|
|
517
|
+
let S = (e, t) => {
|
|
518
|
+
let n = p.heightAt(e, t), r = a && Math.hypot(e, t) < 150 ? a.at(e, t) : void 0;
|
|
519
|
+
return r === void 0 ? n : Math.max(n, r + s);
|
|
520
|
+
}, C = () => p.dispose();
|
|
521
|
+
return {
|
|
522
|
+
world: p,
|
|
523
|
+
farm: b,
|
|
524
|
+
exclusions: [...b.exclusions, ...t === "1944" ? [{
|
|
525
|
+
kind: "polygon",
|
|
526
|
+
points: G(A.crater, 205)
|
|
527
|
+
}] : []],
|
|
528
|
+
height: S,
|
|
529
|
+
dispose: C,
|
|
530
|
+
[Symbol.dispose]: C
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
async function J(n, u = {}) {
|
|
534
|
+
let d = u.era ?? "before", f = u.sky ?? "lowSun", m = M[f], h = u.seed ?? 1944, g = u.library ?? "/asset-library/", _ = u.radius ?? 2500, w = u.signal, T = [], D = [];
|
|
535
|
+
if (!M[f]) throw RangeError(`fauld: unknown sky ${f}; pass one of ${Object.keys(M).join(", ")}.`);
|
|
536
|
+
if (![
|
|
537
|
+
"before",
|
|
538
|
+
"1944",
|
|
539
|
+
"today"
|
|
540
|
+
].includes(d)) throw RangeError(`fauld: unknown era ${d}; pass 'before', '1944' or 'today'.`);
|
|
541
|
+
if (!(_ >= 200 && _ <= 3e3)) throw RangeError(`fauld: radius ${_} is outside 200 to 3,000 metres; pass a radius in that range.`);
|
|
542
|
+
try {
|
|
543
|
+
let re = await oe(u.dem ?? B(g, "dem/os-terrain-50/fauld_sk12_sk23.f32"), w), k = d === "today" ? await t(B(g, "margo-library/fauld/crater/crater_inner_today.gltf"), {
|
|
544
|
+
kind: "stone",
|
|
545
|
+
color: [
|
|
546
|
+
.5,
|
|
547
|
+
.5,
|
|
548
|
+
.5
|
|
549
|
+
],
|
|
550
|
+
maxTriangles: 6e5,
|
|
551
|
+
...w ? { signal: w } : {}
|
|
552
|
+
}) : void 0, M = await ue({
|
|
553
|
+
era: d,
|
|
554
|
+
seed: h,
|
|
555
|
+
dem: re,
|
|
556
|
+
...k ? { crater: k } : {},
|
|
557
|
+
...w ? { signal: w } : {}
|
|
558
|
+
});
|
|
559
|
+
T.push(() => M.dispose());
|
|
560
|
+
let { world: N, farm: I } = M, L = M.height, V = s({
|
|
561
|
+
latitude: o(52.84),
|
|
562
|
+
dayOfYear: 332,
|
|
563
|
+
hour: u.hour ?? m.hour
|
|
564
|
+
}), H = i.attach(n, {
|
|
565
|
+
...a[m.preset],
|
|
566
|
+
day: {
|
|
567
|
+
...r[m.preset === "dawn" ? "overcast" : m.preset],
|
|
568
|
+
azimuth: V.azimuth.degrees,
|
|
569
|
+
elevation: Math.max(f === "night" ? -12 : 1, V.elevation.degrees)
|
|
570
|
+
},
|
|
571
|
+
fog: 3.912 / (f === "mist" ? 2500 : f === "grey" || f === "rain" || f === "snow" ? 6e3 : 16e3)
|
|
572
|
+
}, { meter: !0 });
|
|
573
|
+
T.push(() => H.dispose()), H.post.addEffect(new l({
|
|
574
|
+
radius: 2,
|
|
575
|
+
slices: 3,
|
|
576
|
+
steps: 8
|
|
577
|
+
}), 0);
|
|
578
|
+
let U = u.lens?.stop ?? 8, W = u.lens?.focusDistance ?? 1e3;
|
|
579
|
+
if (!(U > 0) || !(W > 0)) throw RangeError(`Fauld lens needs a stop and focus distance over 0 (got f/${U} at ${W} m)`);
|
|
580
|
+
let G = new te({
|
|
581
|
+
aperture: U,
|
|
582
|
+
focalDistance: W,
|
|
583
|
+
filmGauge: 24.89,
|
|
584
|
+
sensorFit: "horizontal"
|
|
585
|
+
});
|
|
586
|
+
H.post.addEffect(G, 1);
|
|
587
|
+
let K = c.attach(n, {
|
|
588
|
+
resolution: 4096,
|
|
589
|
+
distance: 1200,
|
|
590
|
+
lambda: .8,
|
|
591
|
+
lightSize: .02,
|
|
592
|
+
normalBias: .2,
|
|
593
|
+
casterMargin: 300
|
|
594
|
+
});
|
|
595
|
+
T.push(() => K.dispose());
|
|
596
|
+
let q = {};
|
|
597
|
+
for (let [t, n] of Object.entries(F)) q[`library:${t}`] = await e(B(g, `margo-library/fauld/${n}.gltf`), {
|
|
598
|
+
maxTriangles: 25e4,
|
|
599
|
+
kind: "bark",
|
|
600
|
+
...w ? { signal: w } : {}
|
|
601
|
+
});
|
|
602
|
+
q["library:fern"] = [{
|
|
603
|
+
geometry: (await t(B(g, "big-burn-1910/plants/fern_02/fern_02_2k.gltf"), {
|
|
604
|
+
kind: "foliage",
|
|
605
|
+
color: [
|
|
606
|
+
.2,
|
|
607
|
+
.12,
|
|
608
|
+
.06
|
|
609
|
+
],
|
|
610
|
+
maxTriangles: 6e4,
|
|
611
|
+
...w ? { signal: w } : {}
|
|
612
|
+
})).geometry,
|
|
613
|
+
color: [
|
|
614
|
+
.2,
|
|
615
|
+
.12,
|
|
616
|
+
.06
|
|
617
|
+
],
|
|
618
|
+
kind: "foliage"
|
|
619
|
+
}];
|
|
620
|
+
let J = { ...p };
|
|
621
|
+
for (let [e, t] of Object.entries(z)) J[e] = {
|
|
622
|
+
...p[e] ?? {
|
|
623
|
+
detail: .4,
|
|
624
|
+
bump: .4,
|
|
625
|
+
macro: .35
|
|
626
|
+
},
|
|
627
|
+
color: t.color,
|
|
628
|
+
...t.bump === void 0 ? {} : { bump: t.bump },
|
|
629
|
+
image: await ae(B(g, `margo-library/fauld/ground/${t.file}_diff_2k.jpg`), w),
|
|
630
|
+
repeat: t.repeat
|
|
631
|
+
};
|
|
632
|
+
let Y = await v.attach(n, N, {
|
|
633
|
+
sky: H.sky,
|
|
634
|
+
shadows: K,
|
|
635
|
+
materials: J,
|
|
636
|
+
exclusions: M.exclusions,
|
|
637
|
+
radius: _,
|
|
638
|
+
meshes: q,
|
|
639
|
+
...d === "1944" ? { clipmap: { resolution: 128 } } : {},
|
|
640
|
+
...w ? { signal: w } : {}
|
|
641
|
+
});
|
|
642
|
+
T.push(() => Y.dispose());
|
|
643
|
+
let { FieldFurrows: de } = await import("@margoengine/terrain/furrows"), fe = de.attach(n, Y.terrain, {
|
|
644
|
+
fields: I.fields.flatMap((e) => e.use === "plough" ? [{
|
|
645
|
+
outline: e.outline,
|
|
646
|
+
furrow: e.furrow,
|
|
647
|
+
spacing: .35,
|
|
648
|
+
depth: .22
|
|
649
|
+
}] : e.use === "stubble" ? [{
|
|
650
|
+
outline: e.outline,
|
|
651
|
+
furrow: e.furrow,
|
|
652
|
+
spacing: .18,
|
|
653
|
+
depth: .12
|
|
654
|
+
}] : []),
|
|
655
|
+
origin: [-3200, -3200],
|
|
656
|
+
size: [O, O]
|
|
657
|
+
});
|
|
658
|
+
if (T.push(() => fe.dispose()), d === "1944") {
|
|
659
|
+
let e = L, [t, { GroundChange: r }, { FAULD_DUSTFALL_GRID: i }, { FAULD_DUSTFALL_FINES_GRID: a }] = await Promise.all([
|
|
660
|
+
ie(ne, 9.80665, { height: e }),
|
|
661
|
+
import("@margoengine/terrain/ground-change"),
|
|
662
|
+
import("./fauld-dustfall-grid-Bb4X8b-u.js"),
|
|
663
|
+
import("./fauld-dustfall-fines-grid-MA6XPrq6.js")
|
|
664
|
+
]), o = [i, a].map((e) => ({
|
|
665
|
+
kind: "fall",
|
|
666
|
+
cover: "soil",
|
|
667
|
+
grid: {
|
|
668
|
+
columns: e.columns,
|
|
669
|
+
rows: e.rows,
|
|
670
|
+
width: e.width,
|
|
671
|
+
depth: e.depth,
|
|
672
|
+
centre: [e.centre[0], e.centre[1]]
|
|
673
|
+
},
|
|
674
|
+
mass: se(Array.from(atob(e.data), (t) => {
|
|
675
|
+
let n = t.charCodeAt(0);
|
|
676
|
+
return n === 0 ? 0 : 10 ** (e.low + e.decades * (n - 1) / 254);
|
|
677
|
+
}), e.columns + 1, e.rows + 1),
|
|
678
|
+
start: 0,
|
|
679
|
+
duration: e.minutes * 60
|
|
680
|
+
})), s = r.attach(n, Y.terrain, {
|
|
681
|
+
events: t.secondaries ? [
|
|
682
|
+
t.event,
|
|
683
|
+
t.secondaries,
|
|
684
|
+
...o
|
|
685
|
+
] : [t.event, ...o],
|
|
686
|
+
clock: () => le,
|
|
687
|
+
shadows: K,
|
|
688
|
+
soil: R
|
|
689
|
+
});
|
|
690
|
+
T.push(() => s.dispose()), L = (t, n) => e(t, n) + s.sample(t, n, le).change;
|
|
691
|
+
let [{ loadGLTF: c }, { PBRInstances: l }] = await Promise.all([import("@margoengine/gltf/pbr"), import("@margoengine/gltf/pbr-instancing")]), u = (e) => c(n, B(g, e), w ? { signal: w } : {}), [d, ...f] = await Promise.all([u("big-burn-1910/rocks/rock_07/rock_07_2k.gltf"), ...[
|
|
692
|
+
1,
|
|
693
|
+
2,
|
|
694
|
+
3,
|
|
695
|
+
4
|
|
696
|
+
].map((e) => u(`margo-library/fauld/crater/crater_gypsum_${e}_textured.gltf`))]), p = t.landed.flatMap((e, t) => E(t) ? [{
|
|
697
|
+
block: e,
|
|
698
|
+
i: t
|
|
699
|
+
}] : []), m = [{
|
|
700
|
+
model: d,
|
|
701
|
+
blocks: t.landed.flatMap((e, t) => E(t) ? [] : [{
|
|
702
|
+
block: e,
|
|
703
|
+
i: t
|
|
704
|
+
}])
|
|
705
|
+
}, ...f.map((e, t) => ({
|
|
706
|
+
model: e,
|
|
707
|
+
blocks: p.filter((e, n) => n % f.length === t)
|
|
708
|
+
}))], h = /* @__PURE__ */ new Float32Array(16);
|
|
709
|
+
for (let { model: e, blocks: t } of m) {
|
|
710
|
+
let n = new l(Math.max(1, t.length));
|
|
711
|
+
for (let t of e.primitives) t.instances = n;
|
|
712
|
+
T.push(() => e.dispose()), n.count = t.length;
|
|
713
|
+
let r = e !== d;
|
|
714
|
+
for (let [e, { block: i, i: a }] of t.entries()) {
|
|
715
|
+
let t = a * 2.399963, o = Math.cos(t), s = Math.sin(t), c = r ? i.diameter / 1.25 : 4 * i.diameter, l = r ? .425 * c : .35 * i.diameter;
|
|
716
|
+
h.fill(0), h[0] = c * o, h[2] = -c * s, h[5] = c, h[8] = c * s, h[10] = c * o, h[12] = i.at[0], h[13] = L(i.at[0], i.at[1]) - l, h[14] = i.at[1], h[15] = 1, n.setMatrixAt(e, h), n.setColorAt(e, r ? [
|
|
717
|
+
1,
|
|
718
|
+
1,
|
|
719
|
+
1,
|
|
720
|
+
1
|
|
721
|
+
] : [
|
|
722
|
+
.36,
|
|
723
|
+
.2,
|
|
724
|
+
.14,
|
|
725
|
+
1
|
|
726
|
+
]);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
if (t.spoil) {
|
|
730
|
+
let [{ drawSpoil: e }, r] = await Promise.all([import("@margoengine/vfx/debris"), c(n, B(g, "big-burn-1910/rocks/rock_07/rock_07_2k.gltf"), w ? { signal: w } : {})]), i = new l(ce);
|
|
731
|
+
for (let e of r.primitives) e.instances = i;
|
|
732
|
+
T.push(() => r.dispose()), e(i, t.spoil, {
|
|
733
|
+
height: L,
|
|
734
|
+
meshSize: .25,
|
|
735
|
+
colors: [
|
|
736
|
+
[
|
|
737
|
+
.36,
|
|
738
|
+
.2,
|
|
739
|
+
.14,
|
|
740
|
+
1
|
|
741
|
+
],
|
|
742
|
+
[
|
|
743
|
+
.33,
|
|
744
|
+
.19,
|
|
745
|
+
.13,
|
|
746
|
+
1
|
|
747
|
+
],
|
|
748
|
+
[
|
|
749
|
+
.4,
|
|
750
|
+
.24,
|
|
751
|
+
.17,
|
|
752
|
+
1
|
|
753
|
+
],
|
|
754
|
+
[
|
|
755
|
+
.36,
|
|
756
|
+
.2,
|
|
757
|
+
.14,
|
|
758
|
+
1
|
|
759
|
+
],
|
|
760
|
+
[
|
|
761
|
+
.78,
|
|
762
|
+
.76,
|
|
763
|
+
.7,
|
|
764
|
+
1
|
|
765
|
+
]
|
|
766
|
+
],
|
|
767
|
+
seed: 1944
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
let X = H.sky.options.fog;
|
|
772
|
+
if (X) {
|
|
773
|
+
X.scaleHeight = 500;
|
|
774
|
+
let [e, t] = u.focus ?? A.crater;
|
|
775
|
+
X.base = L(e, t);
|
|
776
|
+
}
|
|
777
|
+
let Z = y.attach(n, {
|
|
778
|
+
sky: H.sky,
|
|
779
|
+
type: m.clouds,
|
|
780
|
+
coverage: Math.min(.95, (m.weather.cloud ?? .4) + .05),
|
|
781
|
+
...m.clouds === "stratus" ? P : {}
|
|
782
|
+
});
|
|
783
|
+
T.push(() => Z.dispose());
|
|
784
|
+
let Q = new x({
|
|
785
|
+
...b.clear,
|
|
786
|
+
...m.weather,
|
|
787
|
+
windDirection: .6
|
|
788
|
+
}, { seed: h });
|
|
789
|
+
T.push(() => Q.dispose());
|
|
790
|
+
let pe = S.attach(n, {
|
|
791
|
+
weather: Q,
|
|
792
|
+
listener: n.camera,
|
|
793
|
+
clouds: Z
|
|
794
|
+
});
|
|
795
|
+
T.push(() => pe.dispose?.());
|
|
796
|
+
let $ = {};
|
|
797
|
+
if (u.buildings ?? !0) for (let [e, t] of Object.entries(j)) {
|
|
798
|
+
if (!t.model || !t.eras.includes(d)) continue;
|
|
799
|
+
let r = t.model === "cattle" ? Array.from({ length: 14 }, (e, n) => {
|
|
800
|
+
let r = n * 2.399963, i = 9 * Math.sqrt(n + .5);
|
|
801
|
+
return {
|
|
802
|
+
file: n % 3 == 2 ? "cow_friesian" : "cow_shorthorn",
|
|
803
|
+
at: [t.at[0] + i * Math.cos(r), t.at[1] + i * Math.sin(r)],
|
|
804
|
+
turn: n * .618034 % 1
|
|
805
|
+
};
|
|
806
|
+
}) : [{
|
|
807
|
+
file: t.model,
|
|
808
|
+
at: t.at,
|
|
809
|
+
turn: t.turn
|
|
810
|
+
}];
|
|
811
|
+
$[e] = [];
|
|
812
|
+
for (let t of r) {
|
|
813
|
+
let r = await C(n, B(g, `margo-library/fauld/buildings/${t.file}/${t.file}.gltf`), {
|
|
814
|
+
extensions: [ee],
|
|
815
|
+
...w ? { signal: w } : {}
|
|
816
|
+
});
|
|
817
|
+
T.push(() => r.dispose()), r.root.setPosition([
|
|
818
|
+
t.at[0],
|
|
819
|
+
L(t.at[0], t.at[1]) - .15,
|
|
820
|
+
t.at[1]
|
|
821
|
+
]), r.root.setRotation([
|
|
822
|
+
0,
|
|
823
|
+
t.turn * 2 * Math.PI,
|
|
824
|
+
0
|
|
825
|
+
]), $[e].push(r);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return {
|
|
829
|
+
era: d,
|
|
830
|
+
world: N,
|
|
831
|
+
farm: I,
|
|
832
|
+
view: Y,
|
|
833
|
+
preset: H,
|
|
834
|
+
clouds: Z,
|
|
835
|
+
weather: Q,
|
|
836
|
+
shadows: K,
|
|
837
|
+
dof: G,
|
|
838
|
+
meshes: D,
|
|
839
|
+
buildings: $,
|
|
840
|
+
height: L,
|
|
841
|
+
look(e, t, r = 45) {
|
|
842
|
+
n.camera.position = [...e], n.camera.target = [...t], n.camera.fov = r;
|
|
843
|
+
},
|
|
844
|
+
advanceTime(e) {
|
|
845
|
+
pe.advanceTime(e), H.sky.advanceTime?.(e);
|
|
846
|
+
},
|
|
847
|
+
settle: () => Y.whenIdle(),
|
|
848
|
+
dispose() {
|
|
849
|
+
for (let e of T.reverse()) e();
|
|
850
|
+
T.length = 0;
|
|
851
|
+
for (let e of D) e.dispose?.();
|
|
852
|
+
},
|
|
853
|
+
[Symbol.dispose]() {
|
|
854
|
+
this.dispose();
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
} catch (e) {
|
|
858
|
+
for (let e of T.reverse()) e();
|
|
859
|
+
throw e;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
//#endregion
|
|
863
|
+
export { ie as _, A as a, j as c, J as d, V as f, w as g, T as h, N as i, R as l, ne as m, P as n, F as o, ue as p, z as r, O as s, k as t, I as u, E as v };
|