@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,165 @@
|
|
|
1
|
+
/// <reference lib="esnext.disposable" preserve="true" />
|
|
2
|
+
import type { EngineKernel, Vec3 } from '@margoengine/core';
|
|
3
|
+
import { BlastCloud } from '@margoengine/weather/eruption';
|
|
4
|
+
import { Clouds } from '@margoengine/vfx/clouds';
|
|
5
|
+
import { type BurningBed } from '@margoengine/vfx/flame';
|
|
6
|
+
import type { GroundChange } from '@margoengine/terrain/ground-change';
|
|
7
|
+
import { type FauldDig } from './fauld-dig.js';
|
|
8
|
+
import { type FauldExplosionFlow, type FauldSound } from './fauld-explosion.js';
|
|
9
|
+
import { type FauldMudFlow } from './fauld-mud.js';
|
|
10
|
+
import { type FauldSurgeFlow } from './fauld-surge.js';
|
|
11
|
+
export { FAULD_SURGE, type FauldSurgeBlast, type FauldSurgeFlow, type FauldSurgeSample, fauldSurge, fauldSurgeDust, } from './fauld-surge.js';
|
|
12
|
+
import { type FauldWorld, type FauldWorldSettings } from './fauld-world.js';
|
|
13
|
+
export { FAULD_BLASTS, FAULD_STORE, FAULD_WIND, type FauldDig, type FauldDigOptions, fauldDig, fauldGypsum, } from './fauld-dig.js';
|
|
14
|
+
export { FAULD_CAMERA, FAULD_MICROPHONE, FAULD_ROCK, type FauldSound, type FauldExplosionBlast, type FauldExplosionFlow, type FauldRock, fauldExplosion, } from './fauld-explosion.js';
|
|
15
|
+
export { FAULD_MUD, FAULD_RESERVOIR, type FauldMudFlow, type FauldMudGrid, type FauldMudSurface, fauldMud, } from './fauld-mud.js';
|
|
16
|
+
export { FAULD_CENTRE, FAULD_CLOUD_DECK, FAULD_PLACES, FAULD_SIZE, FAULD_SLOTS, type FauldEra, type FauldSky, } from './fauld-world.js';
|
|
17
|
+
/** Settings of {@link attach}: the shared Fauld settings plus the film time and the mud. */
|
|
18
|
+
export interface FauldBlastSettings extends FauldWorldSettings {
|
|
19
|
+
/** Film seconds since the first explosion at attach, 0 to 3,600. Default 0. */
|
|
20
|
+
readonly time?: number;
|
|
21
|
+
/** Whether the burst reservoir's mud flows (the breach and its mud as physics, drawn by Water). Default false (it costs a solver). */
|
|
22
|
+
readonly mud?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the blast's base surge runs (the store's charge, its column falling back over the crater and pouring out as
|
|
25
|
+
* a dusty gravity current over the ground, laying its dust; EARTH-03). Default false (it costs a solver). Its physics is
|
|
26
|
+
* on the film clock and in `surge`, drawn as dust puffs in the smoke.
|
|
27
|
+
*/
|
|
28
|
+
readonly surge?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether each engine frame moves the film on by its delta. Default true; false leaves the film where `seek` puts it
|
|
31
|
+
* (a shot tool that seeks every frame from its own clock).
|
|
32
|
+
*/
|
|
33
|
+
readonly clock?: boolean;
|
|
34
|
+
/** Puffs of each cap and each stem (`BlastCloud.draw`). Default 2,040 and 1,020. */
|
|
35
|
+
readonly puffs?: {
|
|
36
|
+
readonly cap?: number;
|
|
37
|
+
readonly stem?: number;
|
|
38
|
+
};
|
|
39
|
+
/** Pieces of thrown rock flown and drawn (FIRE-05's ejecta). Default 600. */
|
|
40
|
+
readonly rocks?: number;
|
|
41
|
+
/** Whether the blast shakes the camera (a film camera on its tripod, `FAULD_CAMERA`). Default true. */
|
|
42
|
+
readonly shake?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** The scene handle: the world plus the blast's parts and its film clock. */
|
|
45
|
+
export interface FauldBlast extends FauldWorld {
|
|
46
|
+
readonly blast: BlastCloud;
|
|
47
|
+
readonly smoke: Clouds;
|
|
48
|
+
readonly fire: Clouds;
|
|
49
|
+
/** The explosion's physics: its charges and thrown rock, the air blast (sound and shake) and the column's thermal. */
|
|
50
|
+
readonly explosion: FauldExplosionFlow;
|
|
51
|
+
/** The crater the releases dig (EARTH-06's size, formation time, ejecta and launch speed) and the terrain drawing it. */
|
|
52
|
+
readonly dig: FauldDig;
|
|
53
|
+
readonly crater: GroundChange;
|
|
54
|
+
/** The reservoir's breach and its mud with `mud: true`: their world, solvers and film time. */
|
|
55
|
+
readonly mud: FauldMudFlow | undefined;
|
|
56
|
+
/** The base surge with `surge: true`: its world, solvers, film time and views. */
|
|
57
|
+
readonly surge: FauldSurgeFlow | undefined;
|
|
58
|
+
/** Film seconds since the first explosion. */
|
|
59
|
+
readonly time: number;
|
|
60
|
+
/** Sets the film time; every part shows that moment. */
|
|
61
|
+
seek(t: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* The blast's sound where the camera stands (as `look` put it, or `at`), from film second `start` for `seconds`: a mono
|
|
64
|
+
* recording for the film's audio track, ready for a cutscene's `sounds`.
|
|
65
|
+
*/
|
|
66
|
+
soundtrack(start: number, seconds: number, at?: Vec3): FauldSound;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* What the column carries, for its colour (FIRE-03's `plumeAlbedo`): the share of the crater's mass lofted as dust, and
|
|
70
|
+
* that dust's free iron oxide, mass percent. Neither was measured at Fauld. The dust is physics/plume's `burstDust` of
|
|
71
|
+
* the store's 4,000 t (NRC 1985's 0.3 kg a kg of yield, from surface bursts): 1,200 t, 0.04 percent of the crater's
|
|
72
|
+
* 3.3e9 kg. With all the TNT's soot (772 t) the column is near black (albedo 0.10, 0.09, 0.09), as the witnesses saw it;
|
|
73
|
+
* the 1 percent taken before (a model choice, 33,000 t) drew it grey-brown (0.39, 0.32, 0.30; KB-SCENES-FAULDSTILLS1).
|
|
74
|
+
* The iron oxide is that of a red-brown mudstone with minor disseminated haematite (BGS RR/01/02, section 3), taken at 3
|
|
75
|
+
* percent, about the mean of Di Biagio et al.'s 19 dusts. All the TNT's soot is kept (a charge 35 m down vents into
|
|
76
|
+
* little air; Ornellas's yield before any afterburn).
|
|
77
|
+
*/
|
|
78
|
+
export declare const FAULD_LOAD: Readonly<{
|
|
79
|
+
dust: 0.0004;
|
|
80
|
+
ironOxide: 3;
|
|
81
|
+
}>;
|
|
82
|
+
/** Film second a mud without the blast has its bank cut (`fauldMud`'s `at`); the scene's own bank is broken by the blast. */
|
|
83
|
+
export declare const FAULD_MUD_AT = 20;
|
|
84
|
+
/** Film second the incendiary dump on the surface catches. */
|
|
85
|
+
export declare const FAULD_FIRE_AT = 3;
|
|
86
|
+
/** Seconds the blast's fireball burns in the column (BlastCloud `fireDuration`, a model choice). */
|
|
87
|
+
export declare const FAULD_FIREBALL_SECONDS = 6;
|
|
88
|
+
/** The incendiary dump on the surface, [x, z] metres from the crater. */
|
|
89
|
+
export declare const FAULD_DUMP: readonly [-150, 95];
|
|
90
|
+
/**
|
|
91
|
+
* The burning dump's `Fire` options at film second `t` (FAULD_FIRE_AT or later) on ground `height`: its flames and
|
|
92
|
+
* smoke under the day's wind (FAULD_WIND, a light northerly), so the column bends over and widens as Briggs' 2/3 law
|
|
93
|
+
* has it (`@margoengine/vfx/smoke`); without it the column stood straight up the frame as a rod (KB-SCENES-FAULDSTILLS1).
|
|
94
|
+
* Its smoke has grown since the dump caught (not a full column at once), soot black, churned as a large fire's is.
|
|
95
|
+
*/
|
|
96
|
+
export declare function fauldDumpFire(t: number, height: (x: number, z: number) => number, soot: readonly number[]): {
|
|
97
|
+
position: Vec3;
|
|
98
|
+
flameLength: number;
|
|
99
|
+
width: number;
|
|
100
|
+
wind: [number, number];
|
|
101
|
+
smoke: {
|
|
102
|
+
prewarm: number;
|
|
103
|
+
color: Vec3;
|
|
104
|
+
turbulence: number;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* The store's incendiaries burning on in the crater after the blast, one bed at each release (FAULD_BLASTS). Witnesses saw
|
|
109
|
+
* "a blaze at the foot of the column" (21 MU / Andricks leaflet, MI-AB-0050), and rescuers fought flames in the broken
|
|
110
|
+
* tunnels that day; the burst's own fire lasts seconds. The record gives no size or duration, so each bed is a model
|
|
111
|
+
* choice: `bombs` 4 lb magnesium incendiaries (`INCENDIARY_4LB` of @margoengine/vfx/flame, ten minutes each, War
|
|
112
|
+
* Department TM 3-330, 1942) over `area` m^2 of crater floor, lit by the blast's own fire and so catching evenly over its
|
|
113
|
+
* `spread` ({@link FAULD_FIREBALL_SECONDS}) from the moment the crater has formed. 20,000 bombs (11 t of magnesium) over
|
|
114
|
+
* 700 m^2: about 470 MW and 13 m flames while every bomb burns, ten minutes in all, under the bombs' own white MgO smoke.
|
|
115
|
+
*/
|
|
116
|
+
export declare const FAULD_CRATER_FIRE: Readonly<{
|
|
117
|
+
bombs: 20000;
|
|
118
|
+
area: 700;
|
|
119
|
+
spread: 6;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* The film second the crater has formed, when its fires' beds begin: its dome risen (the event's default, 0.4 of the
|
|
123
|
+
* depth) and its bowl opened.
|
|
124
|
+
*/
|
|
125
|
+
export declare function fauldCraterFormed(dig: FauldDig): number;
|
|
126
|
+
/** One crater fire's bed: the heat release and flame length over its burn ({@link FAULD_CRATER_FIRE}). */
|
|
127
|
+
export declare function fauldCraterBed(): BurningBed;
|
|
128
|
+
/**
|
|
129
|
+
* A crater fire's `Fire` options at `position` (on the crater floor), `since` seconds after its bed began to catch: the
|
|
130
|
+
* bed's flames that second over its diameter, leaning in the day's wind, and the white MgO smoke grown since it caught.
|
|
131
|
+
* Undefined while the bed has no flame above it (before enough bombs have caught, and once they are out).
|
|
132
|
+
*/
|
|
133
|
+
export declare function fauldCraterFire(position: Vec3, since: number, bed?: BurningBed): {
|
|
134
|
+
position: Vec3;
|
|
135
|
+
flameLength: number;
|
|
136
|
+
width: number;
|
|
137
|
+
breadth: number;
|
|
138
|
+
wind: [number, number];
|
|
139
|
+
smoke: {
|
|
140
|
+
prewarm: number;
|
|
141
|
+
color: Vec3;
|
|
142
|
+
turbulence: number;
|
|
143
|
+
};
|
|
144
|
+
} | undefined;
|
|
145
|
+
/** What {@link fauldFireStep} needs of a fire. */
|
|
146
|
+
export interface FauldFireLike {
|
|
147
|
+
setLength(length: number): unknown;
|
|
148
|
+
dispose(): void;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Keeps one fire in step with the film second: `options` are what should burn then (undefined for nothing). The fire is
|
|
152
|
+
* made when they first come, sized to their `flameLength` while they last and put out when they go, so a seek in any
|
|
153
|
+
* order (back before the fire caught included) shows the fire that second has. Returns the fire now burning.
|
|
154
|
+
*/
|
|
155
|
+
export declare function fauldFireStep<F extends FauldFireLike, O extends {
|
|
156
|
+
flameLength: number;
|
|
157
|
+
}>(fire: F | undefined, options: O | undefined, make: (options: O) => F): F | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Builds the countryside with the explosion into `engine`, at film time `settings.time`.
|
|
160
|
+
* @example
|
|
161
|
+
* const scene = await attach(engine, { sky: 'overcast', time: 30 });
|
|
162
|
+
* scene.look([-1800, 150, 900], [0, 900, 0], 30);
|
|
163
|
+
* scene.seek(60); // the column a minute after the first explosion
|
|
164
|
+
*/
|
|
165
|
+
export declare function attach(engine: EngineKernel, settings?: FauldBlastSettings): Promise<FauldBlast>;
|