@adatechnology/game-vfx 0.18.0 → 0.20.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 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.global.js +361 -112
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +361 -112
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,6 +79,7 @@ is the recipes plus these, what a world plays by default. Texts of every recipe
|
|
|
79
79
|
|
|
80
80
|
## Vehicle effects
|
|
81
81
|
|
|
82
|
+
`VEHICLE_EFFECTS` hold the glass of a car by its kind (`vehicle_glass_chip`: dust and grains off a laminated pane that cracks and stays; `vehicle_glass_shatter`: the glints and dust of a tempered pane letting go, whose dice the vehicle throws itself; never `glass_burst`, the shards of a shopfront) and
|
|
82
83
|
`VEHICLE_EFFECTS` write the Garagem's recipes around a car: `vehicle_fire` and `vehicle_exhaust` (`engine_smoke`), `vehicle_leak` and `vehicle_leak_ignited` (`fuel_leak`). A normal bullet through a tank only leaks, so
|
|
83
84
|
`vehicle_leak` is the page's pool and drips without the fire and the explosion (`FUEL_LEAK_ONLY`: the same `decal` and `emit` steps); `vehicle_leak_ignited` is the whole sequence (the spark, the fire running along
|
|
84
85
|
the pool to the tank and the blast at 7.2 s), played when the leak catches fire.
|
package/dist/index.d.ts
CHANGED
|
@@ -310,6 +310,8 @@ interface ConfineResult {
|
|
|
310
310
|
nx: number;
|
|
311
311
|
ny: number;
|
|
312
312
|
nz: number;
|
|
313
|
+
/** Offset of the face the particle met (`n · p` of a point on it): the plane the face lies in. */
|
|
314
|
+
d: number;
|
|
313
315
|
}
|
|
314
316
|
/** One particle's step for {@link Confiner.confineMove}: from `(x0, y0, z0)` to `(x1, y1, z1)`, kept `pad` metres off the walls. */
|
|
315
317
|
interface ConfineMove {
|
|
@@ -619,6 +621,17 @@ interface Chunk {
|
|
|
619
621
|
/** `_hotCol` (L399-400): the colour of a hot piece, blended towards the glow while it is young. */
|
|
620
622
|
declare function colorOfChunk(chunk: Chunk): readonly [number, number, number];
|
|
621
623
|
|
|
624
|
+
/** The face of a wall a puff's drawn ball is cut at: unit normal towards the puff and offset (`n · point`). `on` false: no face. */
|
|
625
|
+
interface PuffCut {
|
|
626
|
+
on: boolean;
|
|
627
|
+
nx: number;
|
|
628
|
+
ny: number;
|
|
629
|
+
nz: number;
|
|
630
|
+
d: number;
|
|
631
|
+
}
|
|
632
|
+
/** How far a puff's drawn surface reaches from its middle, in sizes: the renderer bulges the ball by up to this much (`game-vfx-three`'s puff shader). */
|
|
633
|
+
declare const PUFF_REACH = 1.28;
|
|
634
|
+
|
|
622
635
|
/** The ring a mushroom cloud's puffs travel on (L722-735). */
|
|
623
636
|
interface Ring {
|
|
624
637
|
x: number;
|
|
@@ -668,6 +681,11 @@ interface Puff {
|
|
|
668
681
|
size: number;
|
|
669
682
|
/** The thing it was made for (a burning part's object): `VfxWorld.clearSource` takes it away when that thing leaves. */
|
|
670
683
|
source: string | undefined;
|
|
684
|
+
/**
|
|
685
|
+
* The faces of the walls (host solids, closed spaces) within the puff's reach, up to two (a wall and the skirting in front of it): the drawn ball is cut at
|
|
686
|
+
* them, so smoke against a wall flattens on it instead of growing through to its other side. See `puff-cuts.ts`.
|
|
687
|
+
*/
|
|
688
|
+
readonly cuts: readonly [PuffCut, PuffCut];
|
|
671
689
|
}
|
|
672
690
|
|
|
673
691
|
/** A shock wave: an air shell that grows to the lethal radius in 120 ms, and a dust ring on the ground (L319-348). The last block is what the renderer reads. */
|
|
@@ -1743,6 +1761,8 @@ declare class SpriteKindPool {
|
|
|
1743
1761
|
private readonly bounced;
|
|
1744
1762
|
private readonly floor;
|
|
1745
1763
|
private readonly riseMul;
|
|
1764
|
+
/** The ground under each sprite as last asked (`GROUND_RESAMPLE`): x and z where it was asked, and its height. NaN x: not asked yet. */
|
|
1765
|
+
private readonly ground;
|
|
1746
1766
|
constructor(capacity: number, defs: readonly SpriteKindDef[], owners: string[], sources?: SpriteSources);
|
|
1747
1767
|
spawn(kind: number, p: readonly number[], v: readonly number[], random: () => number, options?: SpriteSpawnOptions): void;
|
|
1748
1768
|
private ownerIndex;
|
|
@@ -2520,4 +2540,4 @@ declare function resolveWaterShotProfile(profile: string | WaterShotProfile, tab
|
|
|
2520
2540
|
/** Changes a profile table without touching the kit's: `null` removes an entry, a partial entry is merged over the old one. */
|
|
2521
2541
|
declare function patchWaterShotProfiles(base: Readonly<Record<string, WaterShotProfile>>, changes: Readonly<Record<string, Partial<WaterShotProfile> | null>>): Record<string, WaterShotProfile>;
|
|
2522
2542
|
|
|
2523
|
-
export { AREA_CAP_GAME, type AreaCap, type AreaCapTracker, type Behavior, type BehaviorHost, type BlastLight, type BloodMark, type Carrier, type Chunk, type ConfineMove, type ConfineResult, type Confiner, type CueRequest, DEBRIS_COLOR_VARIABLE, DEBRIS_EFFECT_FAMILIES, DUST_COLOR_VARIABLE, type DebrisEffectFamily, type DebrisObstacle, type DebrisSpawn, type Decal, type DecalOptions, type DirtMark, EVENT_BUDGET, EVENT_EFFECTS, EVENT_EFFECTS_MAP, EXPLOSIONS, EXPLOSION_ALIASES, EffectCamera, type EffectDef, EffectInstance, type EffectPlayer, type EffectPlayerOptions, EffectRunner, type EffectRunnerOptions, type EffectStep, type EffectTexts, type EffectTrack, type EffectView, Enclosures, type ExplosionCall, type ExplosionDef, type ExplosionOptions, type Fire, type FireBody, type FireLight, type FireOptions, type FireSpec, type Follow, GAME_EFFECTS, type GameEvent, type Glow, type GroundField, type GroundFieldOptions, type InstanceDeps, type InstanceSetup, type KindPoolHost, LOD_GAME, LOD_LAB, type LandListener, type LensBlob, type LightGlow, type LightPool, type LodBands, MATERIAL_EVENT_EFFECTS, type Mark, type MarkEvent, type MarkStore, type MeshParticle, MeshPool, type MeshShape, type MeshSpawn, type MushroomSpec, type MutableVec3, OrderedPool, PIECES_DRAWN_VARIABLE, PROFILES, type Placement, type PlayOptions, type PostProcess, type Puddle, type Puff, type Quaternion, RAIN_CAPACITY, RainField, type RandomStream, type Rgb, type Ring, type RockMark, SCRAPE_LIMIT, SMOKE_COLORS, SPRITE_KINDS, type Schedule, type ScorchMark, type ScrapeMark, type ScreenState, type SheetLabels, type Shock, type Spark, type SpriteGround, type SpriteKind, type SpriteKindDef, SpriteKindPool, SpriteKindSystem, type SpriteKindSystemOptions, type SpriteSpawn, type SpriteSpawnOptions, type SpriteSystem, VFX_LAYERS, VIEWMODEL_EFFECTS, type Vec3Like, type Vec3Tuple, type VfxEnclosure, type VfxEnclosureBox, type VfxLayer, type VfxLocale, type VfxOptions, type VfxPoolsView, type VfxProfile, type VfxProfileName, type VfxSideRequest, type VfxSolidQuery, type VfxStats, type VfxStrings, type VfxTrace, type VfxWorld, WATER_BLASTS, WATER_BLAST_KINDS, WATER_LIMITS, WATER_SHOT_BY_CALIBER, WATER_SHOT_PROFILES, WORKSHOP_BEHAVIORS, WORKSHOP_EFFECTS, WORKSHOP_PUDDLES, type WaterBlastCharge, type WaterBlastKind, type WaterBlastKindId, type WaterBlastParams, type WaterBlastPlan, type WaterBubble, type WaterColumn, type WaterDrop, type WaterEffects, type WaterEffectsLimits, type WaterEffectsOptions, type WaterEffectsStats, type WaterFoam, type WaterMist, type WaterRing, type WaterRound, type WaterShotClass, type WaterShotParams, type WaterShotPlan, type WaterShotProfile, type WaterVec3, type WaterWave, type WaterWaveSample, type WorkshopContext, WorkshopEngine, type WorkshopOptions, type WorkshopTrace, colorOfChunk, composeExplosion, createAreaCap, createEffectPlayer, createGroundField, createSchedule, createScreenState, createVfx, createWaterEffects, createWorkshopBehaviors, effectForEvent, estimateCost, explosionEffectIds, hexToLinearRgb, hexToRgb, inPuddle, lcg, lehmer, locales, lodScale, patchEffects, patchExplosions, patchSpriteKinds, patchWaterShotProfiles, planWaterBlast, planWaterShot, resolveStrings, resolveWaterBlast, resolveWaterShotProfile, slideAlong, slideInto, streamFor, updateScreen, waterShotClassOf, workshopGround };
|
|
2543
|
+
export { AREA_CAP_GAME, type AreaCap, type AreaCapTracker, type Behavior, type BehaviorHost, type BlastLight, type BloodMark, type Carrier, type Chunk, type ConfineMove, type ConfineResult, type Confiner, type CueRequest, DEBRIS_COLOR_VARIABLE, DEBRIS_EFFECT_FAMILIES, DUST_COLOR_VARIABLE, type DebrisEffectFamily, type DebrisObstacle, type DebrisSpawn, type Decal, type DecalOptions, type DirtMark, EVENT_BUDGET, EVENT_EFFECTS, EVENT_EFFECTS_MAP, EXPLOSIONS, EXPLOSION_ALIASES, EffectCamera, type EffectDef, EffectInstance, type EffectPlayer, type EffectPlayerOptions, EffectRunner, type EffectRunnerOptions, type EffectStep, type EffectTexts, type EffectTrack, type EffectView, Enclosures, type ExplosionCall, type ExplosionDef, type ExplosionOptions, type Fire, type FireBody, type FireLight, type FireOptions, type FireSpec, type Follow, GAME_EFFECTS, type GameEvent, type Glow, type GroundField, type GroundFieldOptions, type InstanceDeps, type InstanceSetup, type KindPoolHost, LOD_GAME, LOD_LAB, type LandListener, type LensBlob, type LightGlow, type LightPool, type LodBands, MATERIAL_EVENT_EFFECTS, type Mark, type MarkEvent, type MarkStore, type MeshParticle, MeshPool, type MeshShape, type MeshSpawn, type MushroomSpec, type MutableVec3, OrderedPool, PIECES_DRAWN_VARIABLE, PROFILES, PUFF_REACH, type Placement, type PlayOptions, type PostProcess, type Puddle, type Puff, type PuffCut, type Quaternion, RAIN_CAPACITY, RainField, type RandomStream, type Rgb, type Ring, type RockMark, SCRAPE_LIMIT, SMOKE_COLORS, SPRITE_KINDS, type Schedule, type ScorchMark, type ScrapeMark, type ScreenState, type SheetLabels, type Shock, type Spark, type SpriteGround, type SpriteKind, type SpriteKindDef, SpriteKindPool, SpriteKindSystem, type SpriteKindSystemOptions, type SpriteSpawn, type SpriteSpawnOptions, type SpriteSystem, VFX_LAYERS, VIEWMODEL_EFFECTS, type Vec3Like, type Vec3Tuple, type VfxEnclosure, type VfxEnclosureBox, type VfxLayer, type VfxLocale, type VfxOptions, type VfxPoolsView, type VfxProfile, type VfxProfileName, type VfxSideRequest, type VfxSolidQuery, type VfxStats, type VfxStrings, type VfxTrace, type VfxWorld, WATER_BLASTS, WATER_BLAST_KINDS, WATER_LIMITS, WATER_SHOT_BY_CALIBER, WATER_SHOT_PROFILES, WORKSHOP_BEHAVIORS, WORKSHOP_EFFECTS, WORKSHOP_PUDDLES, type WaterBlastCharge, type WaterBlastKind, type WaterBlastKindId, type WaterBlastParams, type WaterBlastPlan, type WaterBubble, type WaterColumn, type WaterDrop, type WaterEffects, type WaterEffectsLimits, type WaterEffectsOptions, type WaterEffectsStats, type WaterFoam, type WaterMist, type WaterRing, type WaterRound, type WaterShotClass, type WaterShotParams, type WaterShotPlan, type WaterShotProfile, type WaterVec3, type WaterWave, type WaterWaveSample, type WorkshopContext, WorkshopEngine, type WorkshopOptions, type WorkshopTrace, colorOfChunk, composeExplosion, createAreaCap, createEffectPlayer, createGroundField, createSchedule, createScreenState, createVfx, createWaterEffects, createWorkshopBehaviors, effectForEvent, estimateCost, explosionEffectIds, hexToLinearRgb, hexToRgb, inPuddle, lcg, lehmer, locales, lodScale, patchEffects, patchExplosions, patchSpriteKinds, patchWaterShotProfiles, planWaterBlast, planWaterShot, resolveStrings, resolveWaterBlast, resolveWaterShotProfile, slideAlong, slideInto, streamFor, updateScreen, waterShotClassOf, workshopGround };
|