@adatechnology/game-destruction-three 0.13.0 → 0.15.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/README.md +1 -1
- package/dist/index.d.ts +171 -12
- package/dist/index.global.js +1831 -205
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +758 -118
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ physics, loose pieces after a part comes off, and pooled particles (fire, smoke,
|
|
|
7
7
|
- Nothing is changed in place: geometry and materials are cloned on the first visual change of a mesh, and `restore` / `clear` give the originals back.
|
|
8
8
|
- Blasts and the fires of burning parts are drawn by the effects world of [`@adatechnology/game-vfx`](../game-vfx) (an `explode` event plays `ev.effect ?? 'generic'`, scaled by the radius when it names none). Pass the world the host shares in `vfx`; without it the renderer makes its own world and its own `game-vfx-three` layer and steps them in `update`. Debris, sparks, drips and leaks still use two pooled `THREE.Points` (additive and normal blending), with a soft sprite computed in the shader (no texture asset); they move to the shared sprite pool when `game-vfx` gets one.
|
|
9
9
|
- `three` is a peer dependency used for types only: you pass your own `THREE` instance at runtime.
|
|
10
|
-
- The renderer plays nothing: you get keys (`impact_metal`, `shatter_glass`, `burn_loop`, `burn_end`, ...) through `onSound`. `createDestructionSound(engine)` is the sound bank for them on a [`@adatechnology/game-audio`](../game-audio) engine: the Cena de Arte's material sounds (clang, wood, glass, crumble, thud, boom...) and the game's explosion thump, a fire loop that follows how many parts burn, and a key table (`style: 'art_scene' | 'game'`, `keys` to replace) so a game changes what each key plays.
|
|
10
|
+
- The renderer plays nothing: you get keys (`impact_metal`, `shatter_glass`, `burn_loop`, `burn_end`, ...) through `onSound`. `createDestructionSound(engine)` is the sound bank for them on a [`@adatechnology/game-audio`](../game-audio) engine: the Cena de Arte's material sounds (clang, wood, glass, crumble, thud, boom...) and the game's explosion thump, a fire loop that follows how many parts burn, and a key table (`style: 'art_scene' | 'game'`, `keys` to replace) so a game changes what each key plays. An impact, a break or a ricochet also sends `detail.keys`, the keys to try first, most specific first: `impact_<material>_<blow>`, `impact_<material>`, `impact_<family>_<blow>`, `impact_<family>` (`blow` is the hit's `DamageType`, carried by every destruction event as `blow`; the family comes from `impactFamily`: metal, glass, ceramic, soil, masonry, wood, plant, plastic, rubber, wax, soft). `IMPACT_SOUND_KEYS` gives a bullet, a blow and a blade their own sound on each family; a game replaces or silences any key in `keys`.
|
|
11
11
|
|
|
12
12
|
Contracts live in [`@adatechnology/game-contracts`](../game-contracts); the types are re-exported here, so existing imports keep working.
|
|
13
13
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fragment, Vec3, DebrisKind, HitResult, DestructionWorld, MaterialId, DestructibleSpec, MaterialDef } from '@adatechnology/game-destruction';
|
|
1
|
+
import { Fragment, Vec3, DebrisKind, HitResult, DestructionWorld, MaterialId, DestructibleSpec, MaterialDef, DamageType } from '@adatechnology/game-destruction';
|
|
2
2
|
export { Quat, Vec3 } from '@adatechnology/game-destruction';
|
|
3
3
|
import { DeferredQueue, WarmUpProbes, BlastShoveOptions, Vec3 as Vec3$1 } from '@adatechnology/game-contracts';
|
|
4
4
|
import * as THREE_NS from 'three';
|
|
5
5
|
import { VfxWorld, SpriteKind } from '@adatechnology/game-vfx';
|
|
6
|
-
import { LoopRecipe, SoundBank, SoundRecipe, AudioEngine } from '@adatechnology/game-audio';
|
|
6
|
+
import { LoopRecipe, SoundBank, SoundRecipe, Falloff, AudioEngine, SampleDefaults, SfxManifest } from '@adatechnology/game-audio';
|
|
7
7
|
|
|
8
8
|
/** What a fragment's resting time can depend on: the fragment (its material, size, shape) and the id of the object it came from. */
|
|
9
9
|
type FragmentLifeRule = (fragment: Fragment, objectId: string) => number;
|
|
@@ -20,6 +20,23 @@ type ThreeNamespace = typeof THREE_NS;
|
|
|
20
20
|
type Object3D = THREE_NS.Object3D;
|
|
21
21
|
type Mesh = THREE_NS.Mesh;
|
|
22
22
|
type Quality = 'low' | 'medium' | 'high';
|
|
23
|
+
/** What a sound key carries besides the point and the volume: the named explosion and its size, how enclosed it was, how long a leak lasts. */
|
|
24
|
+
interface SoundDetail {
|
|
25
|
+
/** An impact or a break: the keys to try before the key itself, most specific first (material and blow, material, family and blow, family). */
|
|
26
|
+
readonly keys?: readonly string[];
|
|
27
|
+
/** `explode`: the named explosion (`explosions.json` of game-vfx: `m67`, `c4`, `propane_p13`...). */
|
|
28
|
+
readonly effect?: string;
|
|
29
|
+
/** `explode`: blast radius in metres. */
|
|
30
|
+
readonly radius?: number;
|
|
31
|
+
/** `explode`: how enclosed the blast was (1 in the open, more in a room; from the blast report). */
|
|
32
|
+
readonly confinement?: number;
|
|
33
|
+
/** `primed`: seconds until the vessel bursts (the gas leak lasts that long). */
|
|
34
|
+
readonly seconds?: number;
|
|
35
|
+
/** `burn_loop` / `burn_end`: the material burning (`wood_hard`, `rubber`...), which picks the fire's sound. */
|
|
36
|
+
readonly material?: string;
|
|
37
|
+
/** `burn_loop` / `burn_end`: the fuel itself, when it is not a material (a gas jet, a pool of fuel). Wins over `material`. */
|
|
38
|
+
readonly fuel?: 'wood' | 'fabric' | 'plastic' | 'gas' | 'liquid';
|
|
39
|
+
}
|
|
23
40
|
interface RendererOptions {
|
|
24
41
|
/** Scene that receives fragments, loose pieces, decals and particles. */
|
|
25
42
|
scene: THREE_NS.Scene;
|
|
@@ -60,8 +77,12 @@ interface RendererOptions {
|
|
|
60
77
|
shoveable?: (objectId: string) => boolean;
|
|
61
78
|
/** Called when the renderer made a bound object a piece on its own: a blast shoved it (`blast`, see `shoveable`), or furniture came apart and what stayed is loose too (`apart`). */
|
|
62
79
|
onLoosened?: (objectId: string, piece: Piece, cause: 'blast' | 'apart') => void;
|
|
63
|
-
/**
|
|
64
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Called when a sound should play; the host maps keys to audio (e.g. `impact_metal`, `shatter_glass`, `ignite`, `explode`). `burn_loop` is sent when a part starts to burn and `burn_end` when it burns out or is put out.
|
|
82
|
+
* An impact or a break also sends `detail.keys`, the keys to try before `key`, most specific first (`impact_concrete_ballistic`, `impact_concrete`, `impact_masonry_ballistic`, `impact_masonry`).
|
|
83
|
+
* An explosion sends its named effect, radius and confinement; `primed` sends the seconds of its leak.
|
|
84
|
+
*/
|
|
85
|
+
onSound?: (key: string, point: Vec3, volume: number, detail?: SoundDetail) => void;
|
|
65
86
|
/**
|
|
66
87
|
* The effects world that draws blasts and fires. Pass the one the host shares with the other renderers (and step it, through its
|
|
67
88
|
* `VfxRenderer.update`, once per frame); without it the renderer makes its own world and its own three layer and steps them in `update`.
|
|
@@ -233,6 +254,8 @@ interface SpecFromObjectResult {
|
|
|
233
254
|
|
|
234
255
|
/** Sound key for an impact on a material. */
|
|
235
256
|
declare function impactKey(def: MaterialDef | undefined): string;
|
|
257
|
+
/** Sound key (`shot_*`) of a round striking this material: sharper than a blow (a tink on steel, a crack on glass); a host without it plays the `impact_*`. */
|
|
258
|
+
declare const shotKey: (def: MaterialDef | undefined) => string;
|
|
236
259
|
/** Sound key (`drag_*`) of a base of this material dragged on a floor. */
|
|
237
260
|
declare const dragSoundKey: (def: MaterialDef | undefined) => string;
|
|
238
261
|
/** The renderer this package makes always has its `deferredQueue`; a third-party `DestructionRenderer` may leave it out. */
|
|
@@ -276,8 +299,72 @@ declare const EXPLOSION_BOOM: SoundRecipe;
|
|
|
276
299
|
declare const BURN_LOOP: LoopRecipe;
|
|
277
300
|
/** Something heavy dragged on a floor, by what its base is made of. */
|
|
278
301
|
declare const DRAG_SOUNDS: readonly SoundRecipe[];
|
|
302
|
+
/**
|
|
303
|
+
* A blow on a material, by what it is made of and what met it (`impactSoundKeys`): a bullet, a blunt blow (a punch, a kick, a fall), a blade. Each
|
|
304
|
+
* is drawn from how the real thing sounds (checklist 5.3): a bullet rings steel and goes "tchak" on concrete with pebbles after it, a fist on steel is a
|
|
305
|
+
* low "bong", a knife scrapes it; the ground is a dull "tuf", ceramic a dry "tic", plastic a hollow "toc", a sofa a "fump". Levels are matched so a
|
|
306
|
+
* bullet on concrete is as loud as on wood.
|
|
307
|
+
*/
|
|
308
|
+
declare const IMPACT_SOUNDS: readonly SoundRecipe[];
|
|
279
309
|
declare const DESTRUCTION_SOUND_BANK: SoundBank;
|
|
280
310
|
|
|
311
|
+
/**
|
|
312
|
+
* The sound family of a material, from its tags: what it sounds like when something meets it. Finer than the five keys of `impactKey` (which stay the
|
|
313
|
+
* last fallback): ceramic is not glass, the ground is not concrete, plastic and wax are not wood, leaves are not a sofa.
|
|
314
|
+
*/
|
|
315
|
+
type ImpactFamily = 'metal' | 'glass' | 'ceramic' | 'soil' | 'masonry' | 'wood' | 'plant' | 'plastic' | 'rubber' | 'wax' | 'soft';
|
|
316
|
+
/** Tag → family, in the order they are tried (`green_wood` is `plant` and `wood`: wood wins; `gravel` is `soil` and `masonry`: soil wins). */
|
|
317
|
+
declare const IMPACT_FAMILY_TAGS: readonly (readonly [tag: string, family: ImpactFamily])[];
|
|
318
|
+
/** The family of a material, or `undefined` when none of its tags names one (the five legacy keys of `impactKey` then answer). */
|
|
319
|
+
declare function impactFamily(def: MaterialDef | undefined): ImpactFamily | undefined;
|
|
320
|
+
/** What an impact or a break sends with its key: the keys to try before it, most specific first (material and blow, material, family and blow, family). */
|
|
321
|
+
type ImpactKeys = SoundDetail & {
|
|
322
|
+
readonly keys: readonly string[];
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* The impact keys for a blow on a material, most specific first: `impact_<material>_<blow>`, `impact_<material>`, `impact_<family>_<blow>`,
|
|
326
|
+
* `impact_<family>` (blow is the `DamageType`: `ballistic`, `blunt`, `slash`, `explosive`...). The legacy `impactKey` is the last fallback the caller sends as the key.
|
|
327
|
+
*/
|
|
328
|
+
declare function impactSoundKeys(material: string, def: MaterialDef | undefined, blow?: DamageType): ImpactKeys;
|
|
329
|
+
/** The keys for a part of this material breaking, most specific first: `break_<material>_<blow>`, `break_<material>`, `break_<family>_<blow>`, `break_<family>`. */
|
|
330
|
+
declare function breakSoundKeys(material: string, def: MaterialDef | undefined, blow?: DamageType): ImpactKeys;
|
|
331
|
+
/** The keys for a round glancing off a part of this material: `ricochet_<material>`, `ricochet_<family>` (then the plain `ricochet`). */
|
|
332
|
+
declare function ricochetSoundKeys(material: string, def: MaterialDef | undefined): ImpactKeys;
|
|
333
|
+
|
|
334
|
+
/** A blast near the listener: loud for tens of metres; lowpass cutoffs fall with distance. */
|
|
335
|
+
declare const BLAST_FALLOFF: Falloff;
|
|
336
|
+
/** A blast far away (past `BLAST_FAR_DISTANCE`): heard for hundreds of metres. */
|
|
337
|
+
declare const BLAST_FAR_FALLOFF: Falloff;
|
|
338
|
+
/** Fire, ignition and crackles: a room-size sound. */
|
|
339
|
+
declare const FIRE_FALLOFF: Falloff;
|
|
340
|
+
/** Metres from the listener past which a blast plays its far version. */
|
|
341
|
+
declare const BLAST_FAR_DISTANCE = 60;
|
|
342
|
+
/** The explosion families, each with its own sound. */
|
|
343
|
+
declare const BLAST_KINDS: readonly ["grenade", "big", "fuel", "car", "pipe_bomb", "rocket", "flashbang", "molotov"];
|
|
344
|
+
type BlastKind = (typeof BLAST_KINDS)[number];
|
|
345
|
+
/**
|
|
346
|
+
* Which family each named explosion of `@adatechnology/game-vfx` (`explosions.json`, the `effect` of an explosive part) belongs to. Data: a game adds
|
|
347
|
+
* or changes entries through `DestructionSoundOptions.blastKinds`. An explosion without a known effect is a grenade below `BIG_BLAST_RADIUS` and a big
|
|
348
|
+
* charge above it.
|
|
349
|
+
*/
|
|
350
|
+
declare const BLAST_KIND_OF: Readonly<Record<string, BlastKind>>;
|
|
351
|
+
/** Blast radius (metres) from which an explosion with no known effect is a big charge. */
|
|
352
|
+
declare const BIG_BLAST_RADIUS = 8;
|
|
353
|
+
/** One sound per explosion family, the far and the indoor versions. */
|
|
354
|
+
declare const BLAST_SOUNDS: readonly SoundRecipe[];
|
|
355
|
+
/** Fire: ignition, gas leaking from a vessel about to burst, a fire put out, and the crackles that ride on the fire loop. */
|
|
356
|
+
declare const FIRE_SOUNDS: readonly SoundRecipe[];
|
|
357
|
+
/** The roar of the fires: low, soft noise; `createDestructionSound` raises it with every part that burns and sprinkles crackles on it. */
|
|
358
|
+
declare const FIRE_LOOP: LoopRecipe;
|
|
359
|
+
/**
|
|
360
|
+
* What is burning, for the sound: each fuel has its own roar (a gas jet, a fuel pool, wood, plastic) and its own share of crackles. The rules are the
|
|
361
|
+
* same for all (the level grows with how much burns, fades with distance, never clips); only the timbre comes from the fuel.
|
|
362
|
+
*/
|
|
363
|
+
declare const FIRE_FUELS: readonly ["wood", "fabric", "plastic", "gas", "liquid"];
|
|
364
|
+
type FireFuel = (typeof FIRE_FUELS)[number];
|
|
365
|
+
/** The sound of a blast family. */
|
|
366
|
+
declare const BLAST_SOUND_OF: Readonly<Record<BlastKind, string>>;
|
|
367
|
+
|
|
281
368
|
/**
|
|
282
369
|
* What a sound key plays: the recipe, its params, a scale on the volume the renderer gives, and (optionally) a louder recipe above a volume
|
|
283
370
|
* (a big blast gets the long boom).
|
|
@@ -290,8 +377,15 @@ type SoundKeyRule = {
|
|
|
290
377
|
readonly volume: number;
|
|
291
378
|
readonly sound: string;
|
|
292
379
|
};
|
|
380
|
+
/** A sound of this bank played when the engine does not know `sound` (a vehicle door without the vehicle bank registered shuts like metal). */
|
|
381
|
+
readonly fallback?: string;
|
|
293
382
|
};
|
|
294
383
|
type DestructionSoundStyle = 'art_scene' | 'game';
|
|
384
|
+
/**
|
|
385
|
+
* The keys of a blow on a material (`impactSoundKeys`, `breakSoundKeys`): `impact_<family>_<blow>`, `impact_<material>[_<blow>]`, `break_<...>`. The renderer
|
|
386
|
+
* sends them before its legacy family key, so the first one with a rule plays; a game replaces any of them in `keys`.
|
|
387
|
+
*/
|
|
388
|
+
declare const IMPACT_SOUND_KEYS: Readonly<Record<string, SoundKeyRule>>;
|
|
295
389
|
/**
|
|
296
390
|
* The keys `createDestructionRenderer` sends to `onSound`, mapped to the sounds the teams delivered. The Cena de Arte has a sound for every material
|
|
297
391
|
* (clang, wood, glass, crumble, thud...); the game has four classes (impact, glass, wood, explosion) and its own explosion thump. Which team sound answers
|
|
@@ -301,7 +395,7 @@ declare const DESTRUCTION_SOUND_KEYS: Readonly<Record<DestructionSoundStyle, Rea
|
|
|
301
395
|
type DestructionSoundOptions = {
|
|
302
396
|
/** Which team answers the keys (default `art_scene`, the kit mix). `game` falls back to the art scene for the keys the game has no sound for. */
|
|
303
397
|
readonly style?: DestructionSoundStyle;
|
|
304
|
-
/** Replaces or adds a key's rule; `null` silences it. */
|
|
398
|
+
/** Replaces or adds a key's rule; `null` silences it. A key without a rule that is the id of a registered sound (the foley bank's) plays that sound. */
|
|
305
399
|
readonly keys?: Readonly<Record<string, SoundKeyRule | null>>;
|
|
306
400
|
/** The fire loop: the volume each burning part adds and the most it reaches (the page never raises it, so these are the kit's). */
|
|
307
401
|
readonly fire?: {
|
|
@@ -310,27 +404,92 @@ type DestructionSoundOptions = {
|
|
|
310
404
|
};
|
|
311
405
|
/** Burn loop on or off (default on). */
|
|
312
406
|
readonly burnLoop?: boolean;
|
|
407
|
+
/** The loop of the wood fire (default `fire_loop`; `burn_loop` is the art scene's bright one). */
|
|
408
|
+
readonly fireLoop?: string;
|
|
409
|
+
/** Adds to or changes `FIRE_FUEL_OF`: which fuel a burning material sounds like. */
|
|
410
|
+
readonly fuels?: Readonly<Record<string, FireFuel>>;
|
|
411
|
+
/** Adds to or changes `FIRE_LOOP_OF`: the loop of each fuel. */
|
|
412
|
+
readonly fireLoops?: Partial<Readonly<Record<FireFuel, string>>>;
|
|
413
|
+
/** The fuel of a fire whose material is not in the table (default `wood`). */
|
|
414
|
+
readonly defaultFuel?: FireFuel;
|
|
415
|
+
/** Crackles per second over the fire loop: `base + perSqrtFire × √(parts burning)`, at most `max` (default 2, 3, 14). `false` turns them off. */
|
|
416
|
+
readonly crackles?: false | {
|
|
417
|
+
readonly base?: number;
|
|
418
|
+
readonly perSqrtFire?: number;
|
|
419
|
+
readonly max?: number;
|
|
420
|
+
readonly volume?: number;
|
|
421
|
+
};
|
|
422
|
+
/** Adds to or changes `BLAST_KIND_OF`: which family a named explosion (`effect`) sounds like. */
|
|
423
|
+
readonly blastKinds?: Readonly<Record<string, BlastKind>>;
|
|
424
|
+
/** Metres past which a blast plays `explosion_far` instead of its own sound (default `BLAST_FAR_DISTANCE`). */
|
|
425
|
+
readonly blastFarDistance?: number;
|
|
426
|
+
/** `confinement` of a blast (from its report) from which the indoor tail plays too (default 1.3). */
|
|
427
|
+
readonly indoorConfinement?: number;
|
|
428
|
+
/** Seed of the crackle timing (default 1). */
|
|
429
|
+
readonly seed?: number;
|
|
313
430
|
};
|
|
314
431
|
type DestructionSound = {
|
|
315
432
|
/** Pass to `createDestructionRenderer({ onSound })`. */
|
|
316
|
-
readonly onSound: (key: string, point: Vec3$1, volume: number) => void;
|
|
317
|
-
/**
|
|
318
|
-
|
|
433
|
+
readonly onSound: (key: string, point: Vec3$1, volume: number, detail?: SoundDetail) => void;
|
|
434
|
+
/** Moves the fire crackles on; call once per frame with the frame time in seconds. */
|
|
435
|
+
update(dt: number): void;
|
|
436
|
+
/** The sound an explosion plays (`explode` with its detail), for a listener at the engine's listener position. */
|
|
437
|
+
blastSound(point: Vec3$1, volume: number, detail?: SoundDetail): string;
|
|
438
|
+
/** The rule a key resolves to, if any; with `detail`, the rule `onSound` would play (the first of `detail.keys` that has one, else `key`'s). */
|
|
439
|
+
rule(key: string, detail?: SoundDetail): SoundKeyRule | undefined;
|
|
319
440
|
/** Parts burning now. */
|
|
320
441
|
readonly burning: () => number;
|
|
442
|
+
/** Parts burning now, by fuel. */
|
|
443
|
+
readonly burningBy: () => Readonly<Partial<Record<FireFuel, number>>>;
|
|
444
|
+
/** Puts every fire sound out (the scene was cleared); the engine and the bank stay. */
|
|
445
|
+
reset(): void;
|
|
321
446
|
dispose(): void;
|
|
322
447
|
};
|
|
323
448
|
declare const DEFAULT_FIRE: {
|
|
324
|
-
readonly perFire: 0.
|
|
325
|
-
readonly max: 0.
|
|
449
|
+
readonly perFire: 0.08;
|
|
450
|
+
readonly max: 0.45;
|
|
451
|
+
};
|
|
452
|
+
declare const DEFAULT_CRACKLES: {
|
|
453
|
+
readonly base: 2;
|
|
454
|
+
readonly perSqrtFire: 3;
|
|
455
|
+
readonly max: 14;
|
|
456
|
+
readonly volume: 0.5;
|
|
326
457
|
};
|
|
458
|
+
declare const DEFAULT_INDOOR_CONFINEMENT = 1.3;
|
|
327
459
|
/**
|
|
328
460
|
* Plays the renderer's sound keys on a game-audio engine: the bank is registered in the engine, a key becomes a positional sound at the point, and
|
|
329
|
-
* `burn_loop` / `burn_end` (a part starts to burn, a part burns out or is put out) drive one fire loop whose volume follows how many parts burn
|
|
461
|
+
* `burn_loop` / `burn_end` (a part starts to burn, a part burns out or is put out) drive one fire loop whose volume follows how many parts burn, with
|
|
462
|
+
* crackles at the burning points (`update`). An explosion plays the sound of its family (`BLAST_KIND_OF` by its effect), the far rumble past
|
|
463
|
+
* `blastFarDistance` and the indoor tail when the blast was confined.
|
|
330
464
|
*/
|
|
331
465
|
declare function createDestructionSound(engine: AudioEngine, options?: DestructionSoundOptions): DestructionSound;
|
|
332
466
|
|
|
467
|
+
/** The numbers of one recorded sound, plus whether it loops (the fire's roar). */
|
|
468
|
+
type BlastFireSampleDefaults = SampleDefaults & {
|
|
469
|
+
readonly loop?: boolean | {
|
|
470
|
+
readonly crossfade?: number;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* The sounds of the blasts and the fire that have recorded takes, with their bus, level and distance curve (the recipes' own curves, so a file and its
|
|
475
|
+
* fallback fade alike with distance). Data: a game passes its own table to `blastFireSampleBank`.
|
|
476
|
+
*/
|
|
477
|
+
declare const BLAST_FIRE_SAMPLES: Readonly<Record<string, BlastFireSampleDefaults>>;
|
|
478
|
+
type BlastFireSampleBankOptions = {
|
|
479
|
+
/** Bank id (default 'destruction-samples'). */
|
|
480
|
+
readonly id?: string;
|
|
481
|
+
/** Where the manifest's folder is served (`/sfx/`); default ''. */
|
|
482
|
+
readonly baseUrl?: string;
|
|
483
|
+
/** Numbers per id (default `BLAST_FIRE_SAMPLES`). */
|
|
484
|
+
readonly sounds?: Readonly<Record<string, BlastFireSampleDefaults>>;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* A bank of the recorded blasts and fire from the kit's sound manifest. Register it with the engine next to `DESTRUCTION_SOUND_BANK`: each id plays
|
|
488
|
+
* its files once loaded and its synthesized recipe until then.
|
|
489
|
+
*/
|
|
490
|
+
declare function blastFireSampleBank(manifest: SfxManifest, options?: BlastFireSampleBankOptions): SoundBank;
|
|
491
|
+
|
|
333
492
|
/** Every particle kind the renderer can emit (the game's sprite kinds, see `@adatechnology/game-vfx`). */
|
|
334
493
|
type ParticleKind = SpriteKind;
|
|
335
494
|
|
|
336
|
-
export { BURN_LOOP, type BindOptions, DEFAULT_FIRE, DESTRUCTION_SOUND_BANK, DESTRUCTION_SOUND_KEYS, DRAG_SOUNDS, type DestructionRenderer, type DestructionSound, type DestructionSoundOptions, type DestructionSoundStyle, EXPLOSION_BOOM, type ExplodeOptions, type FragmentLifeRule, type LooseBody, type Mesh, type MeshRange, type Object3D, type PartHint, type ParticleKind, type Piece, type Quality, type RendererOptions, SCENE_SOUNDS, type SolidBox, type SoundKeyRule, type SpecFromObjectOptions, type SpecFromObjectResult, type ThreeNamespace, createDestructionRenderer, createDestructionSound, dragSoundKey, heatColor, impactKey, specFromObject3D };
|
|
495
|
+
export { BIG_BLAST_RADIUS, BLAST_FALLOFF, BLAST_FAR_DISTANCE, BLAST_FAR_FALLOFF, BLAST_FIRE_SAMPLES, BLAST_KINDS, BLAST_KIND_OF, BLAST_SOUNDS, BLAST_SOUND_OF, BURN_LOOP, type BindOptions, type BlastFireSampleBankOptions, type BlastFireSampleDefaults, type BlastKind, DEFAULT_CRACKLES, DEFAULT_FIRE, DEFAULT_INDOOR_CONFINEMENT, DESTRUCTION_SOUND_BANK, DESTRUCTION_SOUND_KEYS, DRAG_SOUNDS, type DestructionRenderer, type DestructionSound, type DestructionSoundOptions, type DestructionSoundStyle, EXPLOSION_BOOM, type ExplodeOptions, FIRE_FALLOFF, FIRE_LOOP, FIRE_SOUNDS, type FragmentLifeRule, IMPACT_FAMILY_TAGS, IMPACT_SOUNDS, IMPACT_SOUND_KEYS, type ImpactFamily, type ImpactKeys, type LooseBody, type Mesh, type MeshRange, type Object3D, type PartHint, type ParticleKind, type Piece, type Quality, type RendererOptions, SCENE_SOUNDS, type SolidBox, type SoundDetail, type SoundKeyRule, type SpecFromObjectOptions, type SpecFromObjectResult, type ThreeNamespace, blastFireSampleBank, breakSoundKeys, createDestructionRenderer, createDestructionSound, dragSoundKey, heatColor, impactFamily, impactKey, impactSoundKeys, ricochetSoundKeys, shotKey, specFromObject3D };
|