@adatechnology/game-vfx 0.15.0 → 0.16.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/dist/index.d.ts CHANGED
@@ -540,8 +540,20 @@ interface Confiner {
540
540
  * walls (a puff is a ball, not a point: its middle stops before its edge goes through the glass).
541
541
  */
542
542
  confine(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, pad: number, dt: number): boolean;
543
+ /** `confine` with the step in an object the caller reuses: eight numbers passed to a call are boxed on the heap, one object is not. `move` is only read during the call: it is not kept. */
544
+ confineMove(move: ConfineMove, dt: number): boolean;
543
545
  readonly out: ConfineResult;
544
546
  }
547
+ /** One particle's step for {@link Confiner.confineMove}: from `(x0, y0, z0)` to `(x1, y1, z1)`, kept `pad` metres off the walls. */
548
+ interface ConfineMove {
549
+ x0: number;
550
+ y0: number;
551
+ z0: number;
552
+ x1: number;
553
+ y1: number;
554
+ z1: number;
555
+ pad: number;
556
+ }
545
557
  /**
546
558
  * The closed spaces of a world by id. Each step of a carried particle that would cross a wall is tested: through an opening it passes (a hole only at
547
559
  * its rate), through a closed wall only at the leak; otherwise it stays on its side, put back on the wall and sliding along it.
@@ -554,6 +566,8 @@ declare class Enclosures implements Confiner {
554
566
  private readonly l0;
555
567
  private readonly l1;
556
568
  private readonly q;
569
+ private readonly h;
570
+ private readonly move;
557
571
  constructor(seed?: number);
558
572
  get empty(): boolean;
559
573
  get size(): number;
@@ -570,7 +584,14 @@ declare class Enclosures implements Confiner {
570
584
  /** The opening the wall point `q` (local) is in lets it through now. */
571
585
  private through;
572
586
  confine(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, pad: number, dt: number): boolean;
587
+ confineMove(move: ConfineMove, dt: number): boolean;
573
588
  }
589
+ /** {@link slideAlong} written back into the particle's own velocity, nothing allocated. */
590
+ declare function slideInto(out: ConfineResult, velocity: {
591
+ vx: number;
592
+ vy: number;
593
+ vz: number;
594
+ }): void;
574
595
  /** Takes the part of a velocity that runs into the wall away (what is left slides along it). */
575
596
  declare function slideAlong(out: ConfineResult, vx: number, vy: number, vz: number): [number, number, number];
576
597
 
@@ -1920,6 +1941,12 @@ type DebrisEffectFamily = (typeof DEBRIS_EFFECT_FAMILIES)[number];
1920
1941
  /** The variables a host sets (`PlayOptions.values`) to draw the debris and the dust in the colour of the material that broke. */
1921
1942
  declare const DEBRIS_COLOR_VARIABLE = "debrisColor";
1922
1943
  declare const DUST_COLOR_VARIABLE = "dustColor";
1944
+ /**
1945
+ * Set (to 1) by a host that draws the pieces of what broke itself (the destruction renderer: its fragments and the loose parts in physics): the breach and
1946
+ * collapse effects then raise only their dust, without the stand-in blocks they throw for a scene that has none, which would lie beside the real pieces
1947
+ * at a size and shape the material does not break into.
1948
+ */
1949
+ declare const PIECES_DRAWN_VARIABLE = "piecesDrawn";
1923
1950
  /** The stage, breach and collapse effects of every family, and the rebar laid bare. */
1924
1951
  declare const MATERIAL_EVENT_EFFECTS: readonly EffectDef[];
1925
1952
 
@@ -2435,4 +2462,4 @@ declare function resolveWaterShotProfile(profile: string | WaterShotProfile, tab
2435
2462
  /** Changes a profile table without touching the kit's: `null` removes an entry, a partial entry is merged over the old one. */
2436
2463
  declare function patchWaterShotProfiles(base: Readonly<Record<string, WaterShotProfile>>, changes: Readonly<Record<string, Partial<WaterShotProfile> | null>>): Record<string, WaterShotProfile>;
2437
2464
 
2438
- export { AREA_CAP_GAME, type AreaCap, type AreaCapTracker, type Behavior, type BehaviorHost, type BlastLight, type BloodMark, type Carrier, type Chunk, type ConfineResult, type Confiner, type CueRequest, DEBRIS_COLOR_VARIABLE, DEBRIS_EFFECT_FAMILIES, DUST_COLOR_VARIABLE, type DebrisEffectFamily, 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 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, 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 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, streamFor, updateScreen, waterShotClassOf, workshopGround };
2465
+ 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 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 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 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 };
@@ -42,6 +42,7 @@ var GameVfx = (() => {
42
42
  MATERIAL_EVENT_EFFECTS: () => MATERIAL_EVENT_EFFECTS,
43
43
  MeshPool: () => MeshPool,
44
44
  OrderedPool: () => OrderedPool,
45
+ PIECES_DRAWN_VARIABLE: () => PIECES_DRAWN_VARIABLE,
45
46
  PROFILES: () => PROFILES,
46
47
  RAIN_CAPACITY: () => RAIN_CAPACITY,
47
48
  RainField: () => RainField,
@@ -91,6 +92,7 @@ var GameVfx = (() => {
91
92
  resolveWaterBlast: () => resolveWaterBlast,
92
93
  resolveWaterShotProfile: () => resolveWaterShotProfile,
93
94
  slideAlong: () => slideAlong,
95
+ slideInto: () => slideInto,
94
96
  streamFor: () => streamFor,
95
97
  updateScreen: () => updateScreen,
96
98
  waterShotClassOf: () => waterShotClassOf,
@@ -1521,6 +1523,8 @@ var GameVfx = (() => {
1521
1523
  __publicField(this, "l0", new Float64Array(3));
1522
1524
  __publicField(this, "l1", new Float64Array(3));
1523
1525
  __publicField(this, "q", new Float64Array(3));
1526
+ __publicField(this, "h", new Float64Array(3));
1527
+ __publicField(this, "move", { x0: 0, y0: 0, z0: 0, x1: 0, y1: 0, z1: 0, pad: 0 });
1524
1528
  this.random = lehmer(seed);
1525
1529
  }
1526
1530
  get empty() {
@@ -1596,9 +1600,21 @@ var GameVfx = (() => {
1596
1600
  return this.chance(s.leak, dt);
1597
1601
  }
1598
1602
  confine(x0, y0, z0, x1, y1, z1, pad, dt) {
1603
+ const move = this.move;
1604
+ move.x0 = x0;
1605
+ move.y0 = y0;
1606
+ move.z0 = z0;
1607
+ move.x1 = x1;
1608
+ move.y1 = y1;
1609
+ move.z1 = z1;
1610
+ move.pad = pad;
1611
+ return this.confineMove(move, dt);
1612
+ }
1613
+ confineMove(move, dt) {
1599
1614
  const list = this.list;
1600
1615
  if (list.length === 0) return false;
1601
- const p = Math.min(Math.max(0, pad), MAX_PAD);
1616
+ const { x0, y0, z0, x1, y1, z1 } = move;
1617
+ const p = Math.min(Math.max(0, move.pad), MAX_PAD);
1602
1618
  const l0 = this.l0;
1603
1619
  const l1 = this.l1;
1604
1620
  const q = this.q;
@@ -1615,7 +1631,10 @@ var GameVfx = (() => {
1615
1631
  }
1616
1632
  this.toLocal(s, x0, y0, z0, l0);
1617
1633
  this.toLocal(s, x1, y1, z1, l1);
1618
- const h = [s.hx, s.hy, s.hz];
1634
+ const h = this.h;
1635
+ h[0] = s.hx;
1636
+ h[1] = s.hy;
1637
+ h[2] = s.hz;
1619
1638
  const in0 = Math.abs(l0[0]) <= s.hx && Math.abs(l0[1]) <= s.hy && Math.abs(l0[2]) <= s.hz;
1620
1639
  let axis2 = 0;
1621
1640
  let sign = 1;
@@ -1664,6 +1683,13 @@ var GameVfx = (() => {
1664
1683
  return false;
1665
1684
  }
1666
1685
  };
1686
+ function slideInto(out, velocity) {
1687
+ const into = velocity.vx * out.nx + velocity.vy * out.ny + velocity.vz * out.nz;
1688
+ if (into >= 0) return;
1689
+ velocity.vx -= into * out.nx;
1690
+ velocity.vy -= into * out.ny;
1691
+ velocity.vz -= into * out.nz;
1692
+ }
1667
1693
  function slideAlong(out, vx2, vy2, vz2) {
1668
1694
  const into = vx2 * out.nx + vy2 * out.ny + vz2 * out.nz;
1669
1695
  if (into >= 0) return [vx2, vy2, vz2];
@@ -1678,6 +1704,7 @@ var GameVfx = (() => {
1678
1704
  var GROWTH_CAP_SECONDS = 3.5;
1679
1705
  var CARRIED_KINDS = [true, true, false, true, false];
1680
1706
  var PAD_OF_SIZE = 0.35;
1707
+ var MOVE = { x0: 0, y0: 0, z0: 0, x1: 0, y1: 0, z1: 0, pad: 0 };
1681
1708
  function createPuffPool(capacity) {
1682
1709
  const placeholder = { next: () => 0, between: (min2) => min2, direction: (out) => out, state: 0 };
1683
1710
  return new OrderedPool(capacity, () => ({
@@ -1774,23 +1801,30 @@ var GameVfx = (() => {
1774
1801
  if (puff3.vy < 0) puff3.vy *= FLOOR_BOUNCE;
1775
1802
  }
1776
1803
  }
1804
+ function confine(confiner, puff3, dt) {
1805
+ MOVE.x1 = puff3.x;
1806
+ MOVE.y1 = puff3.y;
1807
+ MOVE.z1 = puff3.z;
1808
+ MOVE.pad = puff3.size * PAD_OF_SIZE;
1809
+ return confiner.confineMove(MOVE, dt);
1810
+ }
1777
1811
  function updatePuffs(pool, dt, wind, confiner) {
1778
1812
  pool.compact(ageOrKeep2, dt);
1779
1813
  const confining = confiner !== void 0 && !confiner.empty;
1780
1814
  for (const puff3 of pool.items) {
1781
1815
  const age = puff3.t / puff3.life;
1782
1816
  const heat = puff3.h0 > 0 ? puff3.h0 * Math.pow(Math.max(0, 1 - puff3.t / puff3.hl), 1.25) : 0;
1783
- const x0 = puff3.x;
1784
- const y0 = puff3.y;
1785
- const z0 = puff3.z;
1817
+ MOVE.x0 = puff3.x;
1818
+ MOVE.y0 = puff3.y;
1819
+ MOVE.z0 = puff3.z;
1786
1820
  if (puff3.ring) moveOnRing(puff3, puff3.ring, wind);
1787
1821
  else moveFree(puff3, dt, age, heat, wind);
1788
- if (confining && CARRIED_KINDS[puff3.kind] && confiner.confine(x0, y0, z0, puff3.x, puff3.y, puff3.z, puff3.size * PAD_OF_SIZE, dt)) {
1822
+ if (confining && CARRIED_KINDS[puff3.kind] && confine(confiner, puff3, dt)) {
1789
1823
  const out = confiner.out;
1790
1824
  puff3.x = out.x;
1791
1825
  puff3.y = out.y;
1792
1826
  puff3.z = out.z;
1793
- [puff3.vx, puff3.vy, puff3.vz] = slideAlong(out, puff3.vx, puff3.vy, puff3.vz);
1827
+ slideInto(out, puff3);
1794
1828
  }
1795
1829
  const size = puff3.s0 + (puff3.s1 - puff3.s0) * (1 - Math.exp(-puff3.t * puff3.gk)) + puff3.sg * Math.min(puff3.t, GROWTH_CAP_SECONDS);
1796
1830
  puff3.size = size * Math.min(1, puff3.t * ARRIVAL_FRAME + ARRIVAL_BASE);
@@ -3797,6 +3831,8 @@ var GameVfx = (() => {
3797
3831
  var DEBRIS_EFFECT_FAMILIES = ["wood", "masonry", "glass", "metal", "soft", "soil"];
3798
3832
  var DEBRIS_COLOR_VARIABLE = "debrisColor";
3799
3833
  var DUST_COLOR_VARIABLE = "dustColor";
3834
+ var PIECES_DRAWN_VARIABLE = "piecesDrawn";
3835
+ var standIns = (...steps) => when(not(variable(PIECES_DRAWN_VARIABLE)), steps);
3800
3836
  var FAMILIES = {
3801
3837
  wood: { debris: 8017200, dust: 10127986, piece: [0.015, 0.015, 0.1], spin: 6, cloud: 0.5, sparks: false, glints: false },
3802
3838
  masonry: { debris: 10197652, dust: 11052187, piece: [0.035, 0.028, 0.035], spin: 4, cloud: 1, sparks: false, glints: false },
@@ -3843,7 +3879,7 @@ var GameVfx = (() => {
3843
3879
  ...sparks(look, 14),
3844
3880
  ...glints(look, 20),
3845
3881
  burst("normal", Math.round(30 * look.cloud), { p: ORIGIN, box: [1.4, 0.8, 0.2], sp: [0.3, 1.2], drag: 1.5, life: [1.5, 2.6], size: [0.4, 0.7], grow: 3, c0: dustTone(look), c1: 4867648, a: 0.45 }),
3846
- repeat(scaled(16), debris({ p: ORIGIN, box: [1.3, 0.8, 0.1], sp: [1, 3], size: grow(look.piece, 2.2), k: [0.5, 1.5], spin: look.spin, c: debrisTone(look), life: 20 })),
3882
+ standIns(repeat(scaled(16), debris({ p: ORIGIN, box: [1.3, 0.8, 0.1], sp: [1, 3], size: grow(look.piece, 2.2), k: [0.5, 1.5], spin: look.spin, c: debrisTone(look), life: 20 }))),
3847
3883
  repeat(
3848
3884
  scaled(Math.round(60 * look.cloud)),
3849
3885
  spawn("normal", local("angle", rnd(0, 6.283), {
@@ -3875,8 +3911,10 @@ var GameVfx = (() => {
3875
3911
  timeline: [
3876
3912
  screen({ add: { shake: 0.45 } }),
3877
3913
  ...sparks(look, 20),
3878
- repeat(6, debris({ p: ORIGIN, box: [2, 0.05, 0.6], v: [rnd(-0.5, 0.5), rnd(-0.5, 0), rnd(0, 0.8)], sp: 0, size: [rnd(0.5, 1.1), look.piece[1] > 0.01 ? 0.25 : 0.03, rnd(0.4, 0.8)], c: debrisTone(look), spin: 3, life: 30, bounce: 0.1 })),
3879
- repeat(scaled(20), debris({ p: ORIGIN, box: [2.1, 0.1, 0.7], v: [rnd(-1, 1), rnd(-1, 1), rnd(0, 1.5)], sp: 0, size: grow(look.piece, 3.4), k: [0.5, 1.5], spin: look.spin, c: debrisTone(look), life: 30 })),
3914
+ standIns(
3915
+ repeat(6, debris({ p: ORIGIN, box: [2, 0.05, 0.6], v: [rnd(-0.5, 0.5), rnd(-0.5, 0), rnd(0, 0.8)], sp: 0, size: [rnd(0.5, 1.1), look.piece[1] > 0.01 ? 0.25 : 0.03, rnd(0.4, 0.8)], c: debrisTone(look), spin: 3, life: 30, bounce: 0.1 })),
3916
+ repeat(scaled(20), debris({ p: ORIGIN, box: [2.1, 0.1, 0.7], v: [rnd(-1, 1), rnd(-1, 1), rnd(0, 1.5)], sp: 0, size: grow(look.piece, 3.4), k: [0.5, 1.5], spin: look.spin, c: debrisTone(look), life: 30 }))
3917
+ ),
3880
3918
  repeat(
3881
3919
  scaled(Math.round(70 * look.cloud)),
3882
3920
  spawn("normal", local("angle", rnd(-0.4, 3.5), {
@@ -7619,6 +7657,7 @@ var GameVfx = (() => {
7619
7657
  var FIRE_FLICKER_SWAY = 0.25;
7620
7658
  var FIRE_FLICKER_JITTER = 0.08;
7621
7659
  var LENS_FADE = 0.16;
7660
+ var FLOOR_NORMAL_Y = 0.9;
7622
7661
  function rotate2(q, v) {
7623
7662
  const [qx, qy, qz, qw] = q;
7624
7663
  const ix = qw * v[0] + qy * v[2] - qz * v[1];
@@ -7747,7 +7786,9 @@ var GameVfx = (() => {
7747
7786
  if (this.placement) {
7748
7787
  const [x, y, z] = this.place([recipe[0], recipe[1], recipe[2]]);
7749
7788
  const options = recipe[5];
7750
- args = [x, y, z, recipe[3], recipe[4], options?.n ? { ...options, n: this.turn(options.n) } : options];
7789
+ const normal = options?.n ? this.turn(options.n) : void 0;
7790
+ const onFloor = !normal || normal[1] > FLOOR_NORMAL_Y;
7791
+ args = [x, onFloor ? this.context.groundAt(x, z) : y, z, recipe[3], recipe[4], normal ? { ...options, n: normal } : options];
7751
7792
  }
7752
7793
  this.context.trace?.("decal", args);
7753
7794
  this.decals.add(args[0], args[1], args[2], args[3], args[4], args[5]);
@@ -7929,6 +7970,21 @@ var GameVfx = (() => {
7929
7970
  return {
7930
7971
  hostGroundAt: options.groundAt,
7931
7972
  play(id, point, playOptions = {}) {
7973
+ if (id === "volumetric_fire") {
7974
+ const values = playOptions.values;
7975
+ const handle = ++handles.next;
7976
+ addFire(core, streamOf(playOptions.seed), {
7977
+ x: point[0],
7978
+ y: point[1],
7979
+ z: point[2],
7980
+ r: values?.radius ?? 0.55,
7981
+ life: values?.life ?? 24,
7982
+ ...values?.rate !== void 0 ? { rate: values.rate } : {},
7983
+ ...values?.smoke !== void 0 ? { smoke: values.smoke } : {},
7984
+ ...values?.smokeColor !== void 0 ? { color: hexToLinearRgb(values.smokeColor) } : {}
7985
+ }, handle);
7986
+ return handle;
7987
+ }
7932
7988
  if (!(id in effects)) return null;
7933
7989
  const seed = playOptions.seed ?? (randomMode === "shared" ? void 0 : Math.imul(++handles.events, AUTO_SEED) + (options.seed ?? 0));
7934
7990
  return effectPlayer().play(id, [point[0], point[1], point[2]], { ...playOptions, ...seed !== void 0 ? { seed } : {} });
@@ -7945,7 +8001,7 @@ var GameVfx = (() => {
7945
8001
  sprites: () => spriteSystem,
7946
8002
  workshop,
7947
8003
  peekWorkshop: () => engine,
7948
- effectIds: () => Object.keys(effects),
8004
+ effectIds: () => "volumetric_fire" in effects ? Object.keys(effects) : [...Object.keys(effects), "volumetric_fire"],
7949
8005
  explosion(id, point, explosionOptions = {}) {
7950
8006
  const base = definitionOf(id);
7951
8007
  if (!base) return null;