@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,57 @@
|
|
|
1
|
+
import { SKY_LOOKS as e, applySkySettings as t } from "@margoengine/sky/settings";
|
|
2
|
+
import { WATER_LOOKS as n, applyWaterSettings as r } from "@margoengine/water/settings";
|
|
3
|
+
import { TERRAIN_LOOKS as i, applyTerrainSettings as a } from "@margoengine/terrain/settings";
|
|
4
|
+
import { WEATHER_LOOKS as o, applyWeatherSettings as s } from "@margoengine/weather/settings";
|
|
5
|
+
import { ENVIRONMENT_LOOKS as c, applyEnvironmentSettings as l } from "@margoengine/environment/settings";
|
|
6
|
+
import { FLAME_LOOKS as u, SAND_LOOKS as d, SMOKE_LOOKS as f, applyFlameSettings as p, applySandSettings as m, applySmokeSettings as h } from "@margoengine/vfx/settings";
|
|
7
|
+
import { TONEMAP_LOOKS as g, applyTonemapSettings as _ } from "@margoengine/tonemap/settings";
|
|
8
|
+
import { POST_LOOKS as v, applyPostSettings as y } from "@margoengine/post/settings";
|
|
9
|
+
import { biomeMaterials as b } from "@margoengine/biomes/settings";
|
|
10
|
+
//#region src/look-family.ts
|
|
11
|
+
var x = ["natural", "animatedFeature"], S = x, C = [
|
|
12
|
+
"hours",
|
|
13
|
+
"timeScale",
|
|
14
|
+
"sun.mode",
|
|
15
|
+
"sun.azimuth",
|
|
16
|
+
"sun.elevation"
|
|
17
|
+
], w = [
|
|
18
|
+
"hours",
|
|
19
|
+
"timeScale",
|
|
20
|
+
"sunDirection"
|
|
21
|
+
], T = [
|
|
22
|
+
"type",
|
|
23
|
+
"coverage",
|
|
24
|
+
"bottom",
|
|
25
|
+
"top",
|
|
26
|
+
"density"
|
|
27
|
+
], E = (e) => {
|
|
28
|
+
if (!S.includes(e)) throw RangeError(`Unknown look family ${String(e)}; use one of ${x.join(", ")}.`);
|
|
29
|
+
};
|
|
30
|
+
function D(n, r, i) {
|
|
31
|
+
let a = r.sky.options, o = { ...e[n] };
|
|
32
|
+
for (let e of C) delete o[e];
|
|
33
|
+
let s = {
|
|
34
|
+
...o,
|
|
35
|
+
...i
|
|
36
|
+
}, c = C.some((e) => e in i) ? [] : w.map((e) => [e, a[e]]), l = r.clouds?.options, u = (l ? T.filter((e) => !(`volumetric.${e}` in s) && l[e] !== void 0) : []).map((e) => [e, l[e]]);
|
|
37
|
+
t(r, s);
|
|
38
|
+
for (let [e, t] of u) l[e] = t;
|
|
39
|
+
for (let [e, t] of c) t === void 0 ? delete a[e] : a[e] = Array.isArray(t) ? [...t] : t;
|
|
40
|
+
}
|
|
41
|
+
function O(e, t, n) {
|
|
42
|
+
let r = e.filter((e) => typeof e?.options == "object" && e.options !== null).map((e) => [e.options, e.options.exposure]);
|
|
43
|
+
if (n(), !t) for (let [e, t] of r) t === void 0 ? delete e.exposure : e.exposure = t;
|
|
44
|
+
}
|
|
45
|
+
var k = (t, n) => n in e[t] || n in g[t];
|
|
46
|
+
function A(e, t, n = {}) {
|
|
47
|
+
E(e), O([t.tonemap], "tonemap.exposure" in n || k(e, "tonemap.exposure"), () => D(e, t, n));
|
|
48
|
+
}
|
|
49
|
+
function j(e, t) {
|
|
50
|
+
E(e), O([t.sky?.tonemap, t.tonemap?.tonemap], k(e, "tonemap.exposure"), () => M(e, t));
|
|
51
|
+
}
|
|
52
|
+
function M(e, t) {
|
|
53
|
+
let x = (t) => t[e];
|
|
54
|
+
t.sky && D(e, t.sky, {}), t.water && r(t.water, x(n)), t.terrain && a(t.terrain, x(i)), t.weather && s(t.weather, x(o)), t.environment && l(t.environment, x(c)), t.sand && m(t.sand, x(d)), t.smoke && h(t.smoke, x(f)), t.fire && p(t.fire, x(u)), t.tonemap && _(t.tonemap, x(g)), t.post && y(t.post, x(v)), t.biomes && (t.biomes.materials = b(e));
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { x as LOOK_FAMILIES, A as applyFamilySky, j as applyLookFamily };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/** A colour value: linear RGB. */
|
|
2
|
+
export type SettingColor = readonly [number, number, number];
|
|
3
|
+
/** One gradient stop: a colour at a position (`elevation` unless the row's `stopKey` says otherwise). */
|
|
4
|
+
export type SettingStop = { readonly color: SettingColor };
|
|
5
|
+
/** One value of a setting: a number, a colour, a choice, gradient stops, or null where `nullable`. */
|
|
6
|
+
export type SettingValue = number | SettingColor | string | readonly SettingStop[] | null;
|
|
7
|
+
/** Values by setting name; a name left out takes its default. */
|
|
8
|
+
export type SettingValues = Readonly<Record<string, SettingValue>>;
|
|
9
|
+
/** One slider row, the shape every package's `/settings` entry shares. */
|
|
10
|
+
export interface SettingRow {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly group: string;
|
|
13
|
+
/** `number` is a slider, `color` three sliders or a picker, `choice` a list, `gradient` a stop editor. */
|
|
14
|
+
readonly kind: 'number' | 'color' | 'choice' | 'gradient';
|
|
15
|
+
/** The value with which the target draws exactly as it does without the option (null: follow the weather). */
|
|
16
|
+
readonly default: SettingValue;
|
|
17
|
+
readonly min?: number;
|
|
18
|
+
readonly max?: number;
|
|
19
|
+
readonly step?: number;
|
|
20
|
+
readonly choices?: readonly string[];
|
|
21
|
+
/** May be null: the target uses its own value, or follows the weather when `weather` is set. */
|
|
22
|
+
readonly nullable?: boolean;
|
|
23
|
+
/** The weather master slider that drives this row while it is null. */
|
|
24
|
+
readonly weather?: string;
|
|
25
|
+
/** The key a gradient stop is placed by (default `elevation`). */
|
|
26
|
+
readonly stopKey?: string;
|
|
27
|
+
readonly unit: string;
|
|
28
|
+
readonly about: string;
|
|
29
|
+
/** True: cheap to write every frame (no pipeline, buffer or texture is created), so it can be keyed over a shot. False: writing it rebuilds something. */
|
|
30
|
+
readonly live: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare const numberSetting: (
|
|
33
|
+
name: string,
|
|
34
|
+
group: string,
|
|
35
|
+
value: number,
|
|
36
|
+
min: number,
|
|
37
|
+
max: number,
|
|
38
|
+
step: number,
|
|
39
|
+
unit: string,
|
|
40
|
+
about: string,
|
|
41
|
+
live?: boolean,
|
|
42
|
+
) => SettingRow;
|
|
43
|
+
export declare const colorSetting: (
|
|
44
|
+
name: string,
|
|
45
|
+
group: string,
|
|
46
|
+
value: SettingColor,
|
|
47
|
+
min: number,
|
|
48
|
+
max: number,
|
|
49
|
+
about: string,
|
|
50
|
+
live?: boolean,
|
|
51
|
+
) => SettingRow;
|
|
52
|
+
export declare const choiceSetting: (
|
|
53
|
+
name: string,
|
|
54
|
+
group: string,
|
|
55
|
+
choices: readonly string[],
|
|
56
|
+
about: string,
|
|
57
|
+
live?: boolean,
|
|
58
|
+
) => SettingRow;
|
|
59
|
+
/** The row with a null default that follows the weather master slider `weather` until a value is given. */
|
|
60
|
+
export declare const followsWeather: (row: SettingRow, weather: string) => SettingRow;
|
|
61
|
+
/** Marks `key` of `target` as set by hand (`held` true) or hands it back to the weather (false). */
|
|
62
|
+
export declare function holdFromWeather(target: object, key: string, held?: boolean): void;
|
|
63
|
+
/** True while `key` of `target` holds a value set by hand, which the weather drive leaves alone. */
|
|
64
|
+
export declare const heldFromWeather: (target: object, key: string) => boolean;
|
|
65
|
+
export declare const sameSettingValue: (a: unknown, b: unknown) => boolean;
|
|
66
|
+
export declare function copySettingValue(v: SettingValue): SettingValue;
|
|
67
|
+
/** A fresh object holding every row at its default (a slider panel's state). */
|
|
68
|
+
export declare function settingDefaults(rows: readonly SettingRow[]): Record<string, SettingValue>;
|
|
69
|
+
/** The rows that may change every frame without a rebuild. */
|
|
70
|
+
export declare const liveSettings: (rows: readonly SettingRow[]) => SettingRow[];
|
|
71
|
+
/** A name to row map. */
|
|
72
|
+
export declare const settingIndex: (rows: readonly SettingRow[]) => Map<string, SettingRow>;
|
|
73
|
+
/** @throws RangeError when `v` is not a value of `row`. */
|
|
74
|
+
export declare function checkSettingValue(row: SettingRow, v: unknown, label: string): void;
|
|
75
|
+
/** @throws TypeError for an unknown name; RangeError for a bad value or a null on a row that is not nullable. */
|
|
76
|
+
export declare function checkSettings(
|
|
77
|
+
rows: readonly SettingRow[] | ReadonlyMap<string, SettingRow>,
|
|
78
|
+
values: SettingValues,
|
|
79
|
+
label: string,
|
|
80
|
+
entry?: string,
|
|
81
|
+
): void;
|
|
82
|
+
/** Checks `values`, then calls `write` once per row (or per row `only` accepts) with the given value or the default. */
|
|
83
|
+
export declare function applySettings(
|
|
84
|
+
rows: readonly SettingRow[],
|
|
85
|
+
values: SettingValues,
|
|
86
|
+
label: string,
|
|
87
|
+
write: (row: SettingRow, value: SettingValue) => void,
|
|
88
|
+
only?: (row: SettingRow) => boolean,
|
|
89
|
+
): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type SettingRow } from './shared/settings.js';
|
|
2
|
+
/** How the value moves from a key to the next: `linear`, `in` (slow start), `out` (slow end) or `inOut` (smoothstep). */
|
|
3
|
+
export type ShotEase = 'linear' | 'in' | 'out' | 'inOut';
|
|
4
|
+
/** One key of a keyed row: at `time` seconds into the shot the row has `value`; `ease` shapes the way to the next key. */
|
|
5
|
+
export interface ShotKey {
|
|
6
|
+
readonly time: number;
|
|
7
|
+
readonly value: unknown;
|
|
8
|
+
readonly ease?: ShotEase;
|
|
9
|
+
}
|
|
10
|
+
/** A row held for the whole shot (a plain value) or keyed over it. */
|
|
11
|
+
export type ShotRowValue = unknown | {
|
|
12
|
+
readonly keys: readonly ShotKey[];
|
|
13
|
+
};
|
|
14
|
+
/** The settings of one shot: target name, then row name, then a held value or keys. */
|
|
15
|
+
export type ShotSettingsBlock = Readonly<Record<string, Readonly<Record<string, ShotRowValue>>>>;
|
|
16
|
+
/** The rows of each target, by target name. */
|
|
17
|
+
export type ShotTables = Readonly<Record<string, readonly SettingRow[]>>;
|
|
18
|
+
/** The values at one time: target name, then row name, then value. */
|
|
19
|
+
export type ShotValues = Record<string, Record<string, unknown>>;
|
|
20
|
+
/**
|
|
21
|
+
* Checks a shot's settings against the tables before a render starts: every target and row exists, each held value and
|
|
22
|
+
* each key's value is a value of its row (the package's own check), a keyed row is `live`, key times rise and lie inside
|
|
23
|
+
* `[0, seconds]` (when `seconds` is given) and an ease is one of `linear`, `in`, `out`, `inOut`.
|
|
24
|
+
* @throws TypeError for an unknown target or row; RangeError for a bad value, a keyed row that is not live, key times
|
|
25
|
+
* that do not rise or leave the shot, or an unknown ease. The message names the target and the row.
|
|
26
|
+
* @example checkShotSettings({ weather: { 'wind.speed': { keys: [{ time: 0, value: 4 }, { time: 8, value: 20 }] } } }, { weather: WEATHER_SETTINGS }, 8);
|
|
27
|
+
*/
|
|
28
|
+
export declare function checkShotSettings(block: ShotSettingsBlock, tables: ShotTables, seconds?: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* The values of a (checked) shot block `seconds` into the shot: held rows as given, keyed rows between their keys (a
|
|
31
|
+
* number linearly through the key's ease, a colour per channel in linear RGB, a gradient stop by stop when both keys
|
|
32
|
+
* have the same stops; a choice, a null and a gradient with other stops step at each key), the first key's value
|
|
33
|
+
* before it and the last key's after it. Equal inputs give equal bytes.
|
|
34
|
+
*/
|
|
35
|
+
export declare function shotSettingsAt(block: ShotSettingsBlock, tables: ShotTables, seconds: number): ShotValues;
|
|
36
|
+
/**
|
|
37
|
+
* The held rows that are not live (a row the package rebuilds something for): applied once before the shot's warm-up,
|
|
38
|
+
* never every frame. Returned in the shape of {@link shotSettingsAt}.
|
|
39
|
+
*/
|
|
40
|
+
export declare function shotHeldRebuilds(block: ShotSettingsBlock, tables: ShotTables): ShotValues;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
//#region ../shared/settings.js
|
|
2
|
+
var e = (e, t, n) => typeof e == "number" && e >= t && e <= n, t = (t, n, r) => Array.isArray(t) && t.length === 3 && t.every((t) => e(t, n, r)), n = (e) => e.stopKey ?? "elevation";
|
|
3
|
+
function r(e) {
|
|
4
|
+
return Array.isArray(e) ? typeof e[0] == "object" ? e.map((e) => ({
|
|
5
|
+
...e,
|
|
6
|
+
color: [...e.color]
|
|
7
|
+
})) : [...e] : e;
|
|
8
|
+
}
|
|
9
|
+
var i = (e) => new Map(e.map((e) => [e.name, e]));
|
|
10
|
+
function a(r, i, a) {
|
|
11
|
+
let o = r.min ?? -Infinity, s = r.max ?? Infinity, c;
|
|
12
|
+
if (i === null) c = !!r.nullable;
|
|
13
|
+
else if (r.kind === "number") c = e(i, o, s);
|
|
14
|
+
else if (r.kind === "color") c = t(i, o, s);
|
|
15
|
+
else if (r.kind === "choice") c = r.choices.includes(i);
|
|
16
|
+
else {
|
|
17
|
+
let a = n(r);
|
|
18
|
+
c = Array.isArray(i) && i.length >= 2 && i.length <= 8 && i.every((n, r) => typeof n == "object" && !!n && e(n[a], o, s) && t(n.color, 0, 1) && (r === 0 || n[a] > i[r - 1][a]));
|
|
19
|
+
}
|
|
20
|
+
if (c) return;
|
|
21
|
+
let l = r.nullable ? r.weather ? ` or null (follow the weather's ${r.weather})` : " or null" : "", u = r.kind === "number" ? `a number from ${o} to ${s}${l}` : r.kind === "color" ? `three numbers from ${o} to ${s} (linear RGB)${l}` : r.kind === "choice" ? r.choices.map((e) => `'${e}'`).join(" or ") + l : `2 to 8 stops {${n(r)}, color}, ${n(r)} ${o} to ${s} rising, colours 0 to 1${l}`;
|
|
22
|
+
throw RangeError(`Invalid ${a} setting ${r.name}; use ${u}`);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/shot-settings.ts
|
|
26
|
+
var o = [
|
|
27
|
+
"linear",
|
|
28
|
+
"in",
|
|
29
|
+
"out",
|
|
30
|
+
"inOut"
|
|
31
|
+
], s = (e) => typeof e == "object" && !!e && !Array.isArray(e) && "keys" in e, c = (e, t) => e === "in" ? t * t : e === "out" ? 1 - (1 - t) * (1 - t) : e === "inOut" ? t * t * (3 - 2 * t) : t, l = (e) => e.stopKey ?? "elevation";
|
|
32
|
+
function u(e, t, n) {
|
|
33
|
+
if (typeof e != "object" || !e) throw TypeError("Shot settings must be an object of targets; pass { target: { row: value } }.");
|
|
34
|
+
for (let [r, c] of Object.entries(e)) {
|
|
35
|
+
if (!(r in t)) throw TypeError(`Unknown shot target ${r}; use one of ${Object.keys(t).join(", ")}.`);
|
|
36
|
+
let e = i(t[r]);
|
|
37
|
+
for (let [t, i] of Object.entries(c)) {
|
|
38
|
+
let c = `shot target ${r} row ${t}`, l = e.get(t);
|
|
39
|
+
if (!l) throw TypeError(`Unknown ${c}; use a name from the ${r} settings table.`);
|
|
40
|
+
if (!s(i)) {
|
|
41
|
+
a(l, i, c);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!l.live) throw RangeError(`Invalid ${c}; it is not live, so hold a single value instead of keys.`);
|
|
45
|
+
let u = i.keys;
|
|
46
|
+
if (!Array.isArray(u) || u.length < 1) throw RangeError(`Invalid ${c}; keys needs at least one { time, value }.`);
|
|
47
|
+
let d = -Infinity;
|
|
48
|
+
for (let e of u) {
|
|
49
|
+
if (typeof e?.time != "number" || !Number.isFinite(e.time) || e.time < 0 || n !== void 0 && e.time > n) throw RangeError(`Invalid ${c}; key times must be seconds inside the shot (0 to ${n ?? "its length"}).`);
|
|
50
|
+
if (!(e.time > d)) throw RangeError(`Invalid ${c}; key times must rise.`);
|
|
51
|
+
if (d = e.time, e.ease !== void 0 && !o.includes(e.ease)) throw RangeError(`Invalid ${c}; ease is one of ${o.join(", ")}.`);
|
|
52
|
+
a(l, e.value, c);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function d(e, t, n, r) {
|
|
58
|
+
if (t === null || n === null) return t;
|
|
59
|
+
if (e.kind === "number") return t + (n - t) * r;
|
|
60
|
+
if (e.kind === "color") return t.map((e, t) => e + (n[t] - e) * r);
|
|
61
|
+
if (e.kind === "choice") return t;
|
|
62
|
+
let i = l(e), a = t, o = n;
|
|
63
|
+
return a.length !== o.length || !a.every((e, t) => e[i] === o[t][i]) ? t : a.map((e, t) => ({
|
|
64
|
+
...e,
|
|
65
|
+
color: e.color.map((e, n) => e + (o[t].color[n] - e) * r)
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
function f(e, t, n) {
|
|
69
|
+
if (n <= t[0].time) return r(t[0].value);
|
|
70
|
+
let i = t[t.length - 1];
|
|
71
|
+
if (n >= i.time) return r(i.value);
|
|
72
|
+
let a = 0;
|
|
73
|
+
for (; t[a + 1].time <= n;) a++;
|
|
74
|
+
let o = t[a], s = t[a + 1], l = c(o.ease, (n - o.time) / (s.time - o.time));
|
|
75
|
+
return r(d(e, o.value, s.value, l));
|
|
76
|
+
}
|
|
77
|
+
function p(e, t, n) {
|
|
78
|
+
let a = {};
|
|
79
|
+
for (let [o, c] of Object.entries(e)) {
|
|
80
|
+
let e = i(t[o]), l = a[o] = {};
|
|
81
|
+
for (let [t, i] of Object.entries(c)) l[t] = s(i) ? f(e.get(t), i.keys, n) : r(i);
|
|
82
|
+
}
|
|
83
|
+
return a;
|
|
84
|
+
}
|
|
85
|
+
function m(e, t) {
|
|
86
|
+
let n = {};
|
|
87
|
+
for (let [a, o] of Object.entries(e)) {
|
|
88
|
+
let e = i(t[a]);
|
|
89
|
+
for (let [t, i] of Object.entries(o)) !e.get(t).live && !s(i) && ((n[a] ??= {})[t] = r(i));
|
|
90
|
+
}
|
|
91
|
+
return n;
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { u as checkShotSettings, m as shotHeldRebuilds, p as shotSettingsAt };
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
//#region src/timber-valley-info.ts
|
|
2
|
+
var e = {
|
|
3
|
+
name: "timber-valley",
|
|
4
|
+
title: "Timber valley (the 1910 Big Burn, northern Rockies, 20 August 1910)",
|
|
5
|
+
about: "A steep conifer mountain valley of the Idaho and Montana panhandle with a creek and a rail grade on its floor and a mining and railway town laid out along the line; western white pine, larch, cedar, Douglas-fir and grand fir on the walls; a wildfire that spreads by wind, slope and fuel with smoke columns, flames and embers. The town is laid out as lots (fuel and fire obstacles) and draws no buildings until its models exist.",
|
|
6
|
+
entry: "@margoengine/scenes/timber-valley",
|
|
7
|
+
settings: {
|
|
8
|
+
date: {
|
|
9
|
+
default: "1910-08-20",
|
|
10
|
+
about: "calendar date, YYYY-MM-DD"
|
|
11
|
+
},
|
|
12
|
+
hour: {
|
|
13
|
+
default: 16,
|
|
14
|
+
range: [0, 24],
|
|
15
|
+
unit: "h",
|
|
16
|
+
about: "local solar time"
|
|
17
|
+
},
|
|
18
|
+
latitude: {
|
|
19
|
+
default: 47.47,
|
|
20
|
+
range: [-90, 90],
|
|
21
|
+
unit: "deg",
|
|
22
|
+
about: "latitude north (Wallace, Idaho)"
|
|
23
|
+
},
|
|
24
|
+
longitude: {
|
|
25
|
+
default: -115.93,
|
|
26
|
+
range: [-180, 180],
|
|
27
|
+
unit: "deg",
|
|
28
|
+
about: "longitude east (Wallace, Idaho, is west, so negative): places the moon for the date and hour"
|
|
29
|
+
},
|
|
30
|
+
look: {
|
|
31
|
+
default: "animatedFeature",
|
|
32
|
+
options: ["animatedFeature", "natural"],
|
|
33
|
+
about: "picture style family"
|
|
34
|
+
},
|
|
35
|
+
weather: {
|
|
36
|
+
default: "blowup",
|
|
37
|
+
options: [
|
|
38
|
+
"calm",
|
|
39
|
+
"redFlag",
|
|
40
|
+
"blowup",
|
|
41
|
+
"smoke"
|
|
42
|
+
],
|
|
43
|
+
about: "calm August day, red-flag afternoon, the 20 August blowup gale, or a smoke-filled day"
|
|
44
|
+
},
|
|
45
|
+
windFrom: {
|
|
46
|
+
default: 225,
|
|
47
|
+
range: [0, 360],
|
|
48
|
+
unit: "deg",
|
|
49
|
+
about: "compass direction the wind blows from"
|
|
50
|
+
},
|
|
51
|
+
fire: {
|
|
52
|
+
default: "running",
|
|
53
|
+
options: [
|
|
54
|
+
"none",
|
|
55
|
+
"running",
|
|
56
|
+
"burnt"
|
|
57
|
+
],
|
|
58
|
+
about: "no fire, a fire burning since `fireTime`, or the burned valley after it"
|
|
59
|
+
},
|
|
60
|
+
fireTime: {
|
|
61
|
+
default: 1800,
|
|
62
|
+
range: [0, 21600],
|
|
63
|
+
unit: "s",
|
|
64
|
+
about: "seconds the fire has burned when the scene opens"
|
|
65
|
+
},
|
|
66
|
+
grassMoisture: {
|
|
67
|
+
default: .3,
|
|
68
|
+
range: [.3, 2.5],
|
|
69
|
+
unit: "fraction",
|
|
70
|
+
about: "live moisture of the grass (dry weight): 0.3 cured straw (the 1910 drought) up to 2.5 at green-up"
|
|
71
|
+
},
|
|
72
|
+
houses: {
|
|
73
|
+
default: 48,
|
|
74
|
+
range: [0, 256],
|
|
75
|
+
about: "town lots along the rail line (no buildings drawn until models exist)"
|
|
76
|
+
},
|
|
77
|
+
quality: {
|
|
78
|
+
default: "film",
|
|
79
|
+
options: ["film", "preview"],
|
|
80
|
+
about: "draw distance, shadow map and fire detail"
|
|
81
|
+
},
|
|
82
|
+
seed: {
|
|
83
|
+
default: 1910,
|
|
84
|
+
about: "seed of the valley, forest, town and embers"
|
|
85
|
+
},
|
|
86
|
+
standSeed: {
|
|
87
|
+
default: 0,
|
|
88
|
+
range: [0, 4294967295],
|
|
89
|
+
about: "restocks the forest on the same valley: 1 or more reseeds where trees stand and their meshes; 0 the valley own"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
presets: {
|
|
93
|
+
blowup: {},
|
|
94
|
+
"calm-august": {
|
|
95
|
+
weather: "calm",
|
|
96
|
+
fire: "none",
|
|
97
|
+
hour: 11
|
|
98
|
+
},
|
|
99
|
+
"red-flag": {
|
|
100
|
+
weather: "redFlag",
|
|
101
|
+
fireTime: 600,
|
|
102
|
+
hour: 15
|
|
103
|
+
},
|
|
104
|
+
aftermath: {
|
|
105
|
+
weather: "smoke",
|
|
106
|
+
fire: "burnt",
|
|
107
|
+
date: "1910-08-22",
|
|
108
|
+
hour: 10
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
anchors: [
|
|
112
|
+
"aerial-west",
|
|
113
|
+
"aerial-east",
|
|
114
|
+
"town",
|
|
115
|
+
"town-up",
|
|
116
|
+
"rail",
|
|
117
|
+
"rail-far",
|
|
118
|
+
"creek",
|
|
119
|
+
"creek-up",
|
|
120
|
+
"ridge",
|
|
121
|
+
"ridge-pan",
|
|
122
|
+
"fire-line",
|
|
123
|
+
"fire-line-near",
|
|
124
|
+
"blowup",
|
|
125
|
+
"blowup-push",
|
|
126
|
+
"aftermath",
|
|
127
|
+
"aftermath-crane"
|
|
128
|
+
],
|
|
129
|
+
views: [
|
|
130
|
+
"aerial-west",
|
|
131
|
+
"town",
|
|
132
|
+
"rail",
|
|
133
|
+
"creek",
|
|
134
|
+
"ridge",
|
|
135
|
+
"fire-line",
|
|
136
|
+
"blowup",
|
|
137
|
+
"aftermath"
|
|
138
|
+
],
|
|
139
|
+
looks: ["animatedFeature", "natural"],
|
|
140
|
+
shots: [
|
|
141
|
+
{
|
|
142
|
+
name: "valley-aerial",
|
|
143
|
+
seconds: 12,
|
|
144
|
+
camera: ["aerial-west", "aerial-east"],
|
|
145
|
+
probes: [
|
|
146
|
+
"ridges",
|
|
147
|
+
"valley-floor",
|
|
148
|
+
"sky"
|
|
149
|
+
],
|
|
150
|
+
about: "slow aerial push up the valley over the creek, the rail line and the town lots, forest on both walls"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "town-street",
|
|
154
|
+
seconds: 10,
|
|
155
|
+
camera: ["town", "town-up"],
|
|
156
|
+
probes: [
|
|
157
|
+
"lots",
|
|
158
|
+
"walls",
|
|
159
|
+
"smoke"
|
|
160
|
+
],
|
|
161
|
+
about: "eye-level dolly along the town lots by the rail line, the smoke over the south ridge"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "rail-line",
|
|
165
|
+
seconds: 10,
|
|
166
|
+
camera: ["rail", "rail-far"],
|
|
167
|
+
probes: [
|
|
168
|
+
"grade",
|
|
169
|
+
"forest",
|
|
170
|
+
"sky"
|
|
171
|
+
],
|
|
172
|
+
about: "low track along the rail grade up the valley, timber close on the north wall"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "creek",
|
|
176
|
+
seconds: 8,
|
|
177
|
+
camera: ["creek", "creek-up"],
|
|
178
|
+
probes: [
|
|
179
|
+
"water",
|
|
180
|
+
"banks",
|
|
181
|
+
"forest"
|
|
182
|
+
],
|
|
183
|
+
about: "low pan up the creek on the valley floor"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "ridge-smoke",
|
|
187
|
+
seconds: 12,
|
|
188
|
+
camera: ["ridge", "ridge-pan"],
|
|
189
|
+
settings: { weather: { wind: { keys: [{
|
|
190
|
+
time: 0,
|
|
191
|
+
value: 12
|
|
192
|
+
}, {
|
|
193
|
+
time: 12,
|
|
194
|
+
value: 16,
|
|
195
|
+
ease: "inOut"
|
|
196
|
+
}] } } },
|
|
197
|
+
probes: [
|
|
198
|
+
"column",
|
|
199
|
+
"sun",
|
|
200
|
+
"far-ridges"
|
|
201
|
+
],
|
|
202
|
+
about: "wide pan from the north ridge across the valley to the smoke columns leaning in the wind"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "fire-line",
|
|
206
|
+
seconds: 10,
|
|
207
|
+
camera: ["fire-line", "fire-line-near"],
|
|
208
|
+
probes: [
|
|
209
|
+
"flames",
|
|
210
|
+
"smoke",
|
|
211
|
+
"unburnt"
|
|
212
|
+
],
|
|
213
|
+
about: "long-lens side track on the front running up the wall"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "blowup",
|
|
217
|
+
seconds: 12,
|
|
218
|
+
camera: ["blowup", "blowup-push"],
|
|
219
|
+
settings: { weather: { wind: { keys: [{
|
|
220
|
+
time: 0,
|
|
221
|
+
value: 16
|
|
222
|
+
}, {
|
|
223
|
+
time: 12,
|
|
224
|
+
value: 24,
|
|
225
|
+
ease: "in"
|
|
226
|
+
}] } } },
|
|
227
|
+
probes: [
|
|
228
|
+
"crown-fire",
|
|
229
|
+
"embers",
|
|
230
|
+
"town"
|
|
231
|
+
],
|
|
232
|
+
about: "push in from the valley floor as the gale drives the fire down the wall toward the town"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "aftermath",
|
|
236
|
+
seconds: 12,
|
|
237
|
+
camera: ["aftermath", "aftermath-crane"],
|
|
238
|
+
probes: [
|
|
239
|
+
"scar",
|
|
240
|
+
"snags",
|
|
241
|
+
"haze"
|
|
242
|
+
],
|
|
243
|
+
about: "crane up over the burned walls in the smoke haze two days later"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
targets: {
|
|
247
|
+
weather: "@margoengine/weather/settings",
|
|
248
|
+
sky: "@margoengine/sky/settings",
|
|
249
|
+
fire: "@margoengine/vfx/settings"
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
//#endregion
|
|
253
|
+
export { e as t };
|