@margoengine/scenes 0.1.0 → 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 -201
- package/NOTICE +4 -4
- package/README.md +620 -387
- package/dist/{dune-coast-info-e8eDZXBu.js → dune-coast-info-D9yQIv8G.js} +13 -3
- package/dist/dune-coast.d.ts +20 -1
- package/dist/dune-coast.js +374 -187
- package/dist/errors-fc4i1pSL.js +7 -0
- package/dist/fauld-blast.d.ts +119 -21
- package/dist/fauld-blast.js +957 -206
- package/dist/fauld-countryside.d.ts +1 -1
- package/dist/fauld-countryside.js +4 -4
- package/dist/fauld-crater.d.ts +1 -1
- package/dist/fauld-crater.js +4 -4
- 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.d.ts +76 -3
- package/dist/fauld-tunnels.js +518 -193
- package/dist/fauld-world-CNNSonJF.js +863 -0
- package/dist/fauld-world.d.ts +86 -3
- package/dist/index.js +2 -2
- package/dist/{library-mesh-BRk4Ycnn.js → library-mesh-CjTG-mVZ.js} +97 -74
- package/dist/library-parts.d.ts +11 -1
- package/dist/library.js +1 -1
- package/dist/look-family.d.ts +16 -1
- package/dist/look-family.js +35 -12
- package/dist/shared/settings.d.ts +89 -89
- package/dist/{timber-valley-info-BB6GvcsL.js → timber-valley-info-vVI2nwDs.js} +11 -0
- package/dist/timber-valley.d.ts +69 -3
- package/dist/timber-valley.js +198 -136
- package/package.json +106 -104
- package/dist/fauld-world-85dg03jo.js +0 -582
package/dist/timber-valley.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { t as e } from "./timber-valley-info-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { WEATHER_LOOKS as
|
|
5
|
-
import { applyFireSettings as
|
|
6
|
-
import { PresetScene as
|
|
7
|
-
import { degrees as
|
|
8
|
-
import { Shadows as
|
|
9
|
-
import { GTAO as
|
|
10
|
-
import { BiomeWorld as
|
|
11
|
-
import { pathExclusions as
|
|
12
|
-
import { BiomeView as
|
|
13
|
-
import { VolumetricClouds as
|
|
14
|
-
import { WEATHER_PRESETS as
|
|
1
|
+
import { t as e } from "./timber-valley-info-vVI2nwDs.js";
|
|
2
|
+
import { applyFamilySky as t, applyLookFamily as n } from "./look-family.js";
|
|
3
|
+
import { t as r } from "./errors-fc4i1pSL.js";
|
|
4
|
+
import { WEATHER_LOOKS as i, WEATHER_SETTINGS as a, applyWeatherSettings as o } from "@margoengine/weather/settings";
|
|
5
|
+
import { applyFireSettings as s } from "@margoengine/vfx/settings";
|
|
6
|
+
import { PresetScene as c, sunScene as l } from "@margoengine/sky/scenes";
|
|
7
|
+
import { degrees as u, sunPath as d } from "@margoengine/sky/sun";
|
|
8
|
+
import { Shadows as f } from "@margoengine/shadows";
|
|
9
|
+
import { GTAO as p } from "@margoengine/post/gtao";
|
|
10
|
+
import { BiomeWorld as m } from "@margoengine/biomes";
|
|
11
|
+
import { pathExclusions as h } from "@margoengine/biomes/splines";
|
|
12
|
+
import { BiomeView as g } from "@margoengine/biomes/view";
|
|
13
|
+
import { VolumetricClouds as _ } from "@margoengine/sky/volumetric-clouds";
|
|
14
|
+
import { WEATHER_PRESETS as v, WeatherMachine as ee } from "@margoengine/weather";
|
|
15
15
|
import { WeatherDrive as y } from "@margoengine/weather/drive";
|
|
16
16
|
import { rockiesValleyWorld as b } from "@margoengine/biomes/presets";
|
|
17
17
|
import { createRelief as x } from "@margoengine/biomes/relief";
|
|
18
18
|
import "@margoengine/biomes/valley";
|
|
19
|
-
import { fuelMap as
|
|
20
|
-
import { layoutSettlements as
|
|
21
|
-
import { FireFront as
|
|
19
|
+
import { fuelMap as te, herbaceousCuring as ne } from "@margoengine/biomes/fuel";
|
|
20
|
+
import { layoutSettlements as S } from "@margoengine/biomes/settlements";
|
|
21
|
+
import { FireFront as C } from "@margoengine/vfx/fire-front";
|
|
22
|
+
import { Grade as w } from "@margoengine/tonemap/grade";
|
|
22
23
|
//#region src/timber-valley.ts
|
|
23
|
-
var T = e, E = 4096, D = [-2048, -2048];
|
|
24
|
-
function
|
|
24
|
+
var T = e, E = 4096, D = 2500, re = 1500, O = [-2048, -2048];
|
|
25
|
+
function k(e) {
|
|
25
26
|
if (typeof e != "object" || !e) throw TypeError("timber-valley: pass settings as an object.");
|
|
26
27
|
let { signal: t, ...n } = e, r = {
|
|
27
28
|
...Object.fromEntries(Object.entries(T.settings).map(([e, t]) => [e, t.default])),
|
|
@@ -34,22 +35,23 @@ function O(e) {
|
|
|
34
35
|
}
|
|
35
36
|
if (!Number.isInteger(r.houses)) throw RangeError("timber-valley: houses is not a whole number; pass 0 to 256.");
|
|
36
37
|
if (!Number.isInteger(r.seed) || r.seed < 0) throw RangeError("timber-valley: seed must be a whole number 0 or more.");
|
|
38
|
+
if (!Number.isInteger(r.standSeed)) throw RangeError("timber-valley: standSeed must be a whole number; pass 0 to 4294967295.");
|
|
37
39
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(r.date) || Number.isNaN(Date.parse(r.date))) throw RangeError("timber-valley: date is not a date; pass YYYY-MM-DD.");
|
|
38
40
|
if (r.meshes !== void 0 && (typeof r.meshes != "object" || r.meshes === null)) throw TypeError("timber-valley: meshes must be an object of mesh parts by key.");
|
|
39
41
|
return r;
|
|
40
42
|
}
|
|
41
|
-
function
|
|
43
|
+
function A(e) {
|
|
42
44
|
let t = Date.parse(e + "T12:00:00Z"), n = Date.UTC(Number(e.slice(0, 4)), 0, 1, 12);
|
|
43
45
|
return Math.round((t - n) / 864e5) + 1;
|
|
44
46
|
}
|
|
45
|
-
function
|
|
46
|
-
let n = (t + 180) * Math.PI / 180,
|
|
47
|
+
function j(e, t) {
|
|
48
|
+
let n = (t + 180) * Math.PI / 180, r = Math.atan2(Math.sin(n), -Math.cos(n)), a = e === "calm" ? {
|
|
47
49
|
wind: 2,
|
|
48
50
|
gust: .15,
|
|
49
51
|
cloud: .2,
|
|
50
52
|
humidity: .35,
|
|
51
53
|
temperature: 27
|
|
52
|
-
} : e === "redFlag" ? (({ storm: e, ...t }) => t)(
|
|
54
|
+
} : e === "redFlag" ? (({ storm: e, ...t }) => t)(i.redFlag) : e === "blowup" ? {
|
|
53
55
|
wind: 20,
|
|
54
56
|
gust: .8,
|
|
55
57
|
humidity: .12,
|
|
@@ -58,21 +60,21 @@ function A(e, t) {
|
|
|
58
60
|
} : {
|
|
59
61
|
wind: 6,
|
|
60
62
|
gust: .3,
|
|
61
|
-
smoke: .
|
|
63
|
+
smoke: i.wildfireSmoke.smoke,
|
|
62
64
|
cloud: .3,
|
|
63
65
|
humidity: .3,
|
|
64
66
|
temperature: 22
|
|
65
67
|
};
|
|
66
68
|
return {
|
|
67
|
-
...
|
|
69
|
+
...v.clear,
|
|
68
70
|
...a,
|
|
69
|
-
windDirection:
|
|
71
|
+
windDirection: r
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
function
|
|
73
|
-
let n =
|
|
74
|
+
function M(e, t = {}) {
|
|
75
|
+
let n = k(t), r = x({
|
|
74
76
|
seed: n.seed,
|
|
75
|
-
origin:
|
|
77
|
+
origin: O,
|
|
76
78
|
size: [E, E],
|
|
77
79
|
...b.relief
|
|
78
80
|
}).mountainValley, i = (e) => {
|
|
@@ -93,7 +95,7 @@ function j(e, t = {}) {
|
|
|
93
95
|
points: s,
|
|
94
96
|
width: 14,
|
|
95
97
|
edge: 2
|
|
96
|
-
},
|
|
98
|
+
}, m = n.houses > 0 ? S(e, {
|
|
97
99
|
seed: n.seed,
|
|
98
100
|
sites: [u(700), u(2600)],
|
|
99
101
|
villages: 2,
|
|
@@ -107,14 +109,14 @@ function j(e, t = {}) {
|
|
|
107
109
|
street: 10
|
|
108
110
|
},
|
|
109
111
|
siteGrade: .2,
|
|
110
|
-
avoid:
|
|
112
|
+
avoid: h([f, p])
|
|
111
113
|
}) : {
|
|
112
114
|
villages: [],
|
|
113
115
|
roads: [],
|
|
114
116
|
lanes: [],
|
|
115
117
|
paths: [],
|
|
116
118
|
exclusions: []
|
|
117
|
-
}, g =
|
|
119
|
+
}, g = m.villages.flatMap((e) => e.houses.map((e) => ({
|
|
118
120
|
at: [e.centre[0], e.centre[1]],
|
|
119
121
|
radius: Math.max(e.size[0], e.size[1]) / 2
|
|
120
122
|
}))), _ = c(250), v = [{
|
|
@@ -126,18 +128,18 @@ function j(e, t = {}) {
|
|
|
126
128
|
rail: o,
|
|
127
129
|
axis: a,
|
|
128
130
|
town: {
|
|
129
|
-
...
|
|
130
|
-
exclusions: [...
|
|
131
|
+
...m,
|
|
132
|
+
exclusions: [...m.exclusions, ...h([f, p])]
|
|
131
133
|
},
|
|
132
134
|
structures: g,
|
|
133
135
|
ignitions: v
|
|
134
136
|
};
|
|
135
137
|
}
|
|
136
|
-
async function
|
|
137
|
-
let t =
|
|
138
|
-
return
|
|
138
|
+
async function N(e = {}) {
|
|
139
|
+
let t = k(e);
|
|
140
|
+
return m.create({
|
|
139
141
|
seed: t.seed,
|
|
140
|
-
origin:
|
|
142
|
+
origin: O,
|
|
141
143
|
size: [E, E],
|
|
142
144
|
climate: b.climate,
|
|
143
145
|
height: { relief: b.relief },
|
|
@@ -145,105 +147,155 @@ async function M(e = {}) {
|
|
|
145
147
|
...e.signal ? { signal: e.signal } : {}
|
|
146
148
|
});
|
|
147
149
|
}
|
|
148
|
-
|
|
149
|
-
let
|
|
150
|
+
function P(e) {
|
|
151
|
+
let { preset: t, grade: n, clouds: r, water: i, fireFront: a } = e;
|
|
152
|
+
return {
|
|
153
|
+
sky: {
|
|
154
|
+
sky: t.sky,
|
|
155
|
+
clouds: r,
|
|
156
|
+
tonemap: t.tonemap,
|
|
157
|
+
grade: n
|
|
158
|
+
},
|
|
159
|
+
tonemap: {
|
|
160
|
+
tonemap: t.tonemap,
|
|
161
|
+
grade: n
|
|
162
|
+
},
|
|
163
|
+
...i ? { water: i } : {},
|
|
164
|
+
...a ? {
|
|
165
|
+
fire: a,
|
|
166
|
+
smoke: a
|
|
167
|
+
} : {}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
async function F(e, r = {}) {
|
|
171
|
+
let i = k(r), a = i.quality === "film", m = [], h = (e) => {
|
|
150
172
|
for (let e of m.reverse()) e();
|
|
151
173
|
throw e;
|
|
152
|
-
},
|
|
153
|
-
m.push(() =>
|
|
174
|
+
}, v = await N(r);
|
|
175
|
+
m.push(() => v.dispose());
|
|
154
176
|
try {
|
|
155
|
-
let
|
|
156
|
-
latitude:
|
|
157
|
-
dayOfYear:
|
|
177
|
+
let h = M(v, i), x = (e, t) => v.heightAt(e, t), S = d({
|
|
178
|
+
latitude: u(i.latitude),
|
|
179
|
+
dayOfYear: A(i.date),
|
|
158
180
|
hour: i.hour
|
|
159
|
-
}),
|
|
160
|
-
...
|
|
181
|
+
}), k = c.attach(e, {
|
|
182
|
+
...l(S.azimuth.degrees, S.elevation.degrees),
|
|
161
183
|
fog: 3.912 / 4e4
|
|
162
184
|
});
|
|
163
|
-
if (
|
|
185
|
+
if (k.sky.options.night) {
|
|
164
186
|
let { moonPosition: e } = await import("@margoengine/sky/astro"), t = Date.parse(i.date + "T00:00:00Z") + (i.hour - i.longitude / 15) * 36e5, n = e(new Date(t), {
|
|
165
|
-
latitude:
|
|
166
|
-
longitude:
|
|
187
|
+
latitude: u(i.latitude),
|
|
188
|
+
longitude: u(i.longitude)
|
|
167
189
|
});
|
|
168
|
-
|
|
190
|
+
k.sky.options.night = {
|
|
169
191
|
moonDirection: [...n.direction],
|
|
170
192
|
moonPhase: Math.max(-1, Math.min(1, 2 * n.illumination - 1)),
|
|
171
193
|
moonLitBySun: !0
|
|
172
194
|
};
|
|
173
195
|
}
|
|
174
|
-
m.push(() =>
|
|
175
|
-
let
|
|
196
|
+
m.push(() => k.dispose());
|
|
197
|
+
let N = new w();
|
|
198
|
+
k.tonemap.options.extensions = [N];
|
|
199
|
+
let F = new p({
|
|
176
200
|
radius: 2,
|
|
177
|
-
slices:
|
|
178
|
-
steps:
|
|
201
|
+
slices: a ? 3 : 2,
|
|
202
|
+
steps: a ? 8 : 6
|
|
179
203
|
});
|
|
180
|
-
|
|
181
|
-
let
|
|
182
|
-
resolution:
|
|
204
|
+
k.post.addEffect(F, 0);
|
|
205
|
+
let I = f.attach(e, {
|
|
206
|
+
resolution: a ? 4096 : 2048,
|
|
183
207
|
distance: 900,
|
|
184
208
|
lambda: .8,
|
|
185
209
|
lightSize: .02,
|
|
186
210
|
normalBias: .2,
|
|
187
211
|
casterMargin: 300
|
|
188
212
|
});
|
|
189
|
-
m.push(() =>
|
|
190
|
-
let
|
|
191
|
-
|
|
192
|
-
|
|
213
|
+
m.push(() => I.dispose());
|
|
214
|
+
let B = {};
|
|
215
|
+
n(i.look, { biomes: B });
|
|
216
|
+
let V = await g.attach(e, v, {
|
|
217
|
+
...B,
|
|
218
|
+
sky: k.sky,
|
|
219
|
+
shadows: I,
|
|
193
220
|
water: { rivers: "auto" },
|
|
194
|
-
|
|
195
|
-
|
|
221
|
+
clipmap: { anchor: "camera" },
|
|
222
|
+
exclusions: h.town.exclusions,
|
|
223
|
+
grass: { cured: ne(i.grassMoisture) },
|
|
224
|
+
...i.standSeed > 0 ? { standSeed: i.standSeed } : {},
|
|
225
|
+
radius: a ? 2e3 : 1e3,
|
|
196
226
|
...i.meshes ? { meshes: i.meshes } : {},
|
|
197
227
|
...r.signal ? { signal: r.signal } : {}
|
|
198
228
|
});
|
|
199
|
-
m.push(() =>
|
|
200
|
-
let
|
|
201
|
-
sky:
|
|
229
|
+
m.push(() => V.dispose());
|
|
230
|
+
let H = b.relief.base, U = _.attach(e, {
|
|
231
|
+
sky: k.sky,
|
|
202
232
|
type: "cumulus",
|
|
203
|
-
coverage: .2
|
|
233
|
+
coverage: .2,
|
|
234
|
+
bottom: H + D,
|
|
235
|
+
top: H + D + re
|
|
204
236
|
});
|
|
205
|
-
m.push(() =>
|
|
206
|
-
let
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
237
|
+
m.push(() => U.dispose());
|
|
238
|
+
let W, G;
|
|
239
|
+
if (a) {
|
|
240
|
+
let [{ TAA: t }, { ScatterVelocity: n }, { MotionBlur: r }] = await Promise.all([
|
|
241
|
+
import("@margoengine/taa"),
|
|
242
|
+
import("@margoengine/scatter/velocity"),
|
|
243
|
+
import("@margoengine/post/motion-blur")
|
|
244
|
+
]), i = t.attach(e, { depth: () => k.post.depthTexture });
|
|
245
|
+
W = i, m.push(() => i.dispose());
|
|
246
|
+
let a = new r({
|
|
247
|
+
velocity: () => i.velocity,
|
|
248
|
+
shutter: .5
|
|
249
|
+
});
|
|
250
|
+
k.post.addEffect(a), G = a, m.push(() => {
|
|
251
|
+
k.post.removeEffect(a), a.dispose();
|
|
252
|
+
});
|
|
253
|
+
for (let e of V.objects?.swaying ?? []) {
|
|
254
|
+
let t = new n(e), r = i.add(t);
|
|
255
|
+
m.push(() => {
|
|
256
|
+
r(), t.dispose();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
let K = te(v, {
|
|
261
|
+
step: a ? 8 : 16,
|
|
262
|
+
bare: h.town.exclusions
|
|
263
|
+
}), q = new ee(j(i.weather, i.windFrom), { seed: i.seed });
|
|
264
|
+
m.push(() => q.dispose());
|
|
265
|
+
let J;
|
|
266
|
+
i.fire !== "none" && (J = C.attach(e, {
|
|
213
267
|
ground: x,
|
|
214
268
|
size: [E, E],
|
|
215
|
-
origin:
|
|
216
|
-
cell:
|
|
217
|
-
fuel: (e, t) =>
|
|
218
|
-
structures:
|
|
219
|
-
ignitions:
|
|
269
|
+
origin: O,
|
|
270
|
+
cell: a ? 4 : 8,
|
|
271
|
+
fuel: (e, t) => K.at(e, t),
|
|
272
|
+
structures: h.structures,
|
|
273
|
+
ignitions: h.ignitions,
|
|
220
274
|
seed: i.seed,
|
|
221
|
-
columns:
|
|
222
|
-
flames:
|
|
223
|
-
}), m.push(() =>
|
|
224
|
-
let
|
|
225
|
-
weather:
|
|
275
|
+
columns: a ? 12 : 6,
|
|
276
|
+
flames: a ? 24 : 12
|
|
277
|
+
}), m.push(() => J?.dispose()));
|
|
278
|
+
let Y = y.attach(e, {
|
|
279
|
+
weather: q,
|
|
226
280
|
listener: e.camera,
|
|
227
|
-
clouds:
|
|
228
|
-
...
|
|
229
|
-
});
|
|
230
|
-
m.push(() => H.dispose?.()), V && (P(H, V, i.fireTime), i.fire === "burnt" && await V.settle(86400, r.signal));
|
|
231
|
-
let U = (e) => t(e, {
|
|
232
|
-
sky: {
|
|
233
|
-
sky: O.sky,
|
|
234
|
-
clouds: R,
|
|
235
|
-
tonemap: O.tonemap
|
|
236
|
-
},
|
|
237
|
-
...V ? {
|
|
238
|
-
fire: V,
|
|
239
|
-
smoke: V
|
|
240
|
-
} : {}
|
|
281
|
+
clouds: U,
|
|
282
|
+
...J ? { fires: J } : {}
|
|
241
283
|
});
|
|
242
|
-
|
|
243
|
-
let
|
|
284
|
+
m.push(() => Y.dispose?.()), J && (R(Y, J, i.fireTime), i.fire === "burnt" && await L(J, r.signal));
|
|
285
|
+
let X = i.look, Z = (e) => {
|
|
286
|
+
X = e, n(e, P({
|
|
287
|
+
preset: k,
|
|
288
|
+
grade: N,
|
|
289
|
+
clouds: U,
|
|
290
|
+
water: V.water,
|
|
291
|
+
fireFront: J
|
|
292
|
+
}));
|
|
293
|
+
};
|
|
294
|
+
Z(i.look);
|
|
295
|
+
let Q = ie(h, x), $ = {};
|
|
244
296
|
for (let e of T.shots ?? []) {
|
|
245
|
-
let t =
|
|
246
|
-
|
|
297
|
+
let t = Q[e.camera[0]], n = Q[e.camera[e.camera.length - 1]];
|
|
298
|
+
$[e.name] = [{
|
|
247
299
|
type: "camera",
|
|
248
300
|
id: "camera",
|
|
249
301
|
path: "linear",
|
|
@@ -264,46 +316,50 @@ async function N(e, r = {}) {
|
|
|
264
316
|
return {
|
|
265
317
|
settings: i,
|
|
266
318
|
height: x,
|
|
267
|
-
anchors:
|
|
319
|
+
anchors: Q,
|
|
268
320
|
views: T.views,
|
|
269
321
|
view(t, n = 50) {
|
|
270
|
-
let r =
|
|
271
|
-
if (!r) throw RangeError(`timber-valley: no anchor ${t}; pass one of ${Object.keys(
|
|
322
|
+
let r = Q[t];
|
|
323
|
+
if (!r) throw RangeError(`timber-valley: no anchor ${t}; pass one of ${Object.keys(Q).join(", ")}.`);
|
|
272
324
|
e.camera.position = [...r.position], e.camera.target = [...r.target], e.camera.fov = n;
|
|
273
325
|
},
|
|
274
326
|
shots: T.shots ?? [],
|
|
275
|
-
tracks:
|
|
327
|
+
tracks: $,
|
|
276
328
|
targets: T.targets ?? {},
|
|
277
|
-
layout:
|
|
278
|
-
applyLook:
|
|
329
|
+
layout: h,
|
|
330
|
+
applyLook: Z,
|
|
279
331
|
applySettings(e) {
|
|
280
|
-
for (let [
|
|
281
|
-
...
|
|
332
|
+
for (let [n, r] of Object.entries(e)) if (n === "weather") o(q, {
|
|
333
|
+
...z(q),
|
|
282
334
|
...r
|
|
283
335
|
});
|
|
284
|
-
else if (
|
|
285
|
-
sky:
|
|
286
|
-
clouds:
|
|
287
|
-
tonemap:
|
|
336
|
+
else if (n === "sky") t(X, {
|
|
337
|
+
sky: k.sky,
|
|
338
|
+
clouds: U,
|
|
339
|
+
tonemap: k.tonemap,
|
|
340
|
+
grade: N
|
|
288
341
|
}, r);
|
|
289
|
-
else if (
|
|
290
|
-
else throw RangeError(`timber-valley: no settings target ${
|
|
342
|
+
else if (n === "fire") J && s(J, r);
|
|
343
|
+
else throw RangeError(`timber-valley: no settings target ${n}; pass weather, sky or fire.`);
|
|
291
344
|
},
|
|
292
345
|
advanceTime(e) {
|
|
293
|
-
|
|
346
|
+
Y.advanceTime(e), k.sky.advanceTime?.(e), J?.advanceTime(e);
|
|
294
347
|
},
|
|
295
|
-
settle: () =>
|
|
348
|
+
settle: () => V.whenIdle(),
|
|
296
349
|
parts: {
|
|
297
|
-
world:
|
|
298
|
-
view:
|
|
299
|
-
preset:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
350
|
+
world: v,
|
|
351
|
+
view: V,
|
|
352
|
+
preset: k,
|
|
353
|
+
grade: N,
|
|
354
|
+
clouds: U,
|
|
355
|
+
weather: q,
|
|
356
|
+
drive: Y,
|
|
357
|
+
shadows: I,
|
|
358
|
+
occlusion: F,
|
|
359
|
+
fuel: K,
|
|
360
|
+
fireFront: J,
|
|
361
|
+
taa: W,
|
|
362
|
+
motionBlur: G
|
|
307
363
|
},
|
|
308
364
|
dispose() {
|
|
309
365
|
for (let e of m.reverse()) e();
|
|
@@ -314,22 +370,28 @@ async function N(e, r = {}) {
|
|
|
314
370
|
}
|
|
315
371
|
};
|
|
316
372
|
} catch (e) {
|
|
317
|
-
return
|
|
373
|
+
return h(e);
|
|
318
374
|
}
|
|
319
375
|
}
|
|
320
|
-
|
|
376
|
+
var I = 2592e3;
|
|
377
|
+
async function L(e, t) {
|
|
378
|
+
let n = await e.settle(I, t);
|
|
379
|
+
if (e.active) throw r("state", `timber-valley fire 'burnt': the fire still burns after ${I} s of fire time; use fire 'running'`);
|
|
380
|
+
return n;
|
|
381
|
+
}
|
|
382
|
+
function R(e, t, n) {
|
|
321
383
|
e.update(0);
|
|
322
384
|
for (let r = 0; r < n; r += 10) {
|
|
323
385
|
let i = Math.min(10, n - r);
|
|
324
386
|
e.advanceTime(i), t.advanceTime(i);
|
|
325
387
|
}
|
|
326
388
|
}
|
|
327
|
-
function
|
|
389
|
+
function z(e) {
|
|
328
390
|
let t = e.state, n = {};
|
|
329
|
-
for (let e of
|
|
391
|
+
for (let e of a) e.name in t && (n[e.name] = t[e.name]);
|
|
330
392
|
return n;
|
|
331
393
|
}
|
|
332
|
-
function
|
|
394
|
+
function ie(e, t) {
|
|
333
395
|
let n = (t) => e.axis[Math.max(0, Math.min(e.axis.length - 1, Math.round(t / 16)))], r = (t) => e.rail[Math.max(0, Math.min(e.rail.length - 1, Math.round(t / 16)))] ?? n(t), i = (t) => e.creek[Math.max(0, Math.min(e.creek.length - 1, Math.round(t / 16)))], a = (e, n, r = 0, i = 0) => [
|
|
334
396
|
e[0] + r,
|
|
335
397
|
Math.max(t(e[0] + r, e[1] + i), 0) + n,
|
|
@@ -359,4 +421,4 @@ function I(e, t) {
|
|
|
359
421
|
};
|
|
360
422
|
}
|
|
361
423
|
//#endregion
|
|
362
|
-
export {
|
|
424
|
+
export { I as BURN_OUT_LIMIT, F as attach, L as burnOut, k as check, T as info, M as layout, P as lookTargets, R as rollFire, j as weatherState, N as world };
|