@adatechnology/game-vfx-three 0.10.0 → 0.10.1

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.
@@ -3624,66 +3624,58 @@ var GameVfxThree = (() => {
3624
3624
  ])
3625
3625
  ]
3626
3626
  };
3627
+ var DEBRIS_EFFECT_FAMILIES = ["wood", "masonry", "glass", "metal", "soft", "soil"];
3628
+ var DEBRIS_COLOR_VARIABLE = "debrisColor";
3629
+ var DUST_COLOR_VARIABLE = "dustColor";
3630
+ var FAMILIES = {
3631
+ wood: { debris: 8017200, dust: 10127986, piece: [0.015, 0.015, 0.1], spin: 6, cloud: 0.5, sparks: false, glints: false },
3632
+ masonry: { debris: 10197652, dust: 11052187, piece: [0.035, 0.028, 0.035], spin: 4, cloud: 1, sparks: false, glints: false },
3633
+ glass: { debris: 11061464, dust: 12572386, piece: [0.04, 4e-3, 0.04], spin: 14, cloud: 0.25, sparks: false, glints: true },
3634
+ metal: { debris: 9080726, dust: 9078138, piece: [0.04, 6e-3, 0.03], spin: 8, cloud: 0.15, sparks: true, glints: false },
3635
+ soft: { debris: 10130568, dust: 11578014, piece: [0.025, 4e-3, 0.02], spin: 6, cloud: 0.3, sparks: false, glints: false },
3636
+ soil: { debris: 8022613, dust: 9075298, piece: [0.03, 0.025, 0.03], spin: 3, cloud: 1, sparks: false, glints: false }
3637
+ };
3638
+ var ORIGIN = [0, 0, 0];
3627
3639
  var FACING4 = [0, 0, 1];
3628
3640
  var UP11 = [0, 1, 0];
3629
- var ORIGIN = [0, 0, 0];
3630
- var FORWARD4 = [0, 0, -1];
3631
- var IMPACT_MATERIALS = ["concrete", "metal", "wood", "glass", "flesh", "water"];
3632
- var impactEffect = (material2) => ({
3633
- id: `impact_${material2}`,
3634
- pageId: `event:impact_${material2}`,
3635
- team: "weapons",
3636
- budget: { particles: 40, decals: 1 },
3637
- loop: 2,
3638
- timeline: [call2("impact", material2, ORIGIN, FACING4, 1, 0)]
3639
- });
3640
- var muzzleEffect = (weapon) => ({
3641
- id: `muzzle_${weapon}`,
3642
- pageId: `event:muzzle_${weapon}`,
3643
- team: "weapons",
3644
- budget: { particles: 60, lights: 1 },
3645
- loop: 2.4,
3646
- timeline: [call2("muzzle", weapon, ORIGIN, FORWARD4)]
3647
- });
3648
- var casingEffect = (id, type) => ({
3649
- id,
3650
- pageId: `event:${id}`,
3651
- team: "weapons",
3652
- budget: { debris: 1 },
3653
- loop: 2,
3654
- timeline: [call2("casing", ORIGIN, type)]
3655
- });
3656
- var EVENT_EFFECTS = [
3657
- ...IMPACT_MATERIALS.map(impactEffect),
3658
- ...["glock", "ak", "r870", "barrett"].map(muzzleEffect),
3659
- casingEffect("casing_brass", ""),
3660
- casingEffect("casing_shell", "shell"),
3661
- casingEffect("casing_50", "50"),
3662
- {
3663
- // door_stages (W856-871): the dust a blow shakes loose from the frame and the splinters.
3664
- id: "stage_crack",
3665
- pageId: "event:stage_crack",
3641
+ var grow = (piece, factor) => [piece[0] * factor, piece[1] * factor, piece[2] * factor];
3642
+ var debrisTone = (look) => or(variable(DEBRIS_COLOR_VARIABLE), look.debris);
3643
+ var dustTone = (look) => or(variable(DUST_COLOR_VARIABLE), look.dust);
3644
+ var sparks = (look, count) => look.sparks ? [call2("spark_at", ORIGIN, FACING4, count, 0.9)] : [];
3645
+ var glints = (look, count) => look.glints ? [burst("add", count, { p: ORIGIN, r: 0.2, size: [0.02, 0.05], life: [0.2, 0.5], c0: 16777215, a: 0.9, fi: 0.3 })] : [];
3646
+ function stageCrack(family) {
3647
+ const look = FAMILIES[family];
3648
+ const dust = look.sparks ? [] : [burst("normal", 12, { p: ORIGIN, box: [0.3, 0.05, 0.02], dir: [0, -0.287, 0.958], cone: 0.6, sp: [0.2, 0.8], drag: 1.5, life: [0.8, 1.4], size: [0.08, 0.16], grow: 3, c0: dustTone(look), a: 0.45, g: 0.4 })];
3649
+ return {
3650
+ id: `stage_crack_${family}`,
3651
+ pageId: `event:stage_crack_${family}`,
3666
3652
  team: "destruction",
3667
- budget: { particles: 12, debris: 5 },
3653
+ budget: { particles: 16, debris: 6 },
3668
3654
  loop: 2,
3669
3655
  timeline: [
3670
- burst("normal", 12, { p: ORIGIN, box: [0.6, 0.05, 0.02], dir: [0, -0.287, 0.958], cone: 0.6, sp: [0.2, 0.8], drag: 1.5, life: [0.8, 1.4], size: [0.08, 0.16], grow: 3, c0: 8024934, a: 0.45, g: 0.4 }),
3671
- repeat(scaled(2), debris({ p: [rnd(-0.5, 0.5), rnd(0, 1.6), 0], dir: [0, 0.287, 0.958], cone: 0.6, sp: [1, 2.5], size: [0.015, 0.015, 0.1], c: 8017200, life: 12 }))
3656
+ ...dust,
3657
+ ...sparks(look, 8),
3658
+ ...glints(look, 4),
3659
+ repeat(scaled(look.sparks ? 1 : 4), debris({ p: ORIGIN, box: [0.15, 0.15, 0.02], dir: [0, 0.287, 0.958], cone: 0.6, sp: [1, 2.5], size: look.piece, k: [0.6, 1.4], spin: look.spin, c: debrisTone(look), life: 12 }))
3672
3660
  ]
3673
- },
3674
- {
3675
- // block_wall (W872-886, 3.6 s): the ring of dust that rolls out when the wall gives way.
3676
- id: "breach_dust",
3677
- pageId: "event:breach_dust",
3661
+ };
3662
+ }
3663
+ function breachDust(family) {
3664
+ const look = FAMILIES[family];
3665
+ return {
3666
+ id: `breach_dust_${family}`,
3667
+ pageId: `event:breach_dust_${family}`,
3678
3668
  team: "destruction",
3679
3669
  budget: { particles: 90, debris: 16 },
3680
3670
  loop: 5,
3681
3671
  timeline: [
3682
3672
  screen({ add: { shake: 0.25 } }),
3683
- burst("normal", 30, { 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: 9078138, c1: 4867648, a: 0.45 }),
3684
- repeat(scaled(16), debris({ p: ORIGIN, box: [1.3, 0.8, 0.1], sp: [1, 3], size: [0.08, 0.07, 0.08], k: [0.5, 1.5], c: 7236195, life: 20 })),
3673
+ ...sparks(look, 14),
3674
+ ...glints(look, 20),
3675
+ 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 }),
3676
+ 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 })),
3685
3677
  repeat(
3686
- scaled(60),
3678
+ scaled(Math.round(60 * look.cloud)),
3687
3679
  spawn("normal", local("angle", rnd(0, 6.283), {
3688
3680
  p: [rnd(-1.4, 1.4), 0.2, rnd(-0.6, 0.4)],
3689
3681
  dir: vnorm([cos(variable("angle")), 0.3, sin(variable("angle"))]),
@@ -3693,27 +3685,30 @@ var GameVfxThree = (() => {
3693
3685
  life: [2.5, 4.5],
3694
3686
  size: [0.6, 1],
3695
3687
  grow: 3,
3696
- c0: 8024680,
3688
+ c0: dustTone(look),
3697
3689
  c1: 4867648,
3698
3690
  a: 0.45,
3699
3691
  fi: 0.12
3700
3692
  }))
3701
3693
  )
3702
3694
  ]
3703
- },
3704
- {
3705
- // building_collapse (W872-886): the slab dropping in blocks and the cloud that rolls along the street.
3706
- id: "collapse_dust",
3707
- pageId: "event:collapse_dust",
3695
+ };
3696
+ }
3697
+ function collapseDust(family) {
3698
+ const look = FAMILIES[family];
3699
+ return {
3700
+ id: `collapse_dust_${family}`,
3701
+ pageId: `event:collapse_dust_${family}`,
3708
3702
  team: "destruction",
3709
3703
  budget: { particles: 350, debris: 26 },
3710
3704
  loop: 8,
3711
3705
  timeline: [
3712
3706
  screen({ add: { shake: 0.45 } }),
3713
- 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), 0.25, rnd(0.4, 0.8)], c: 7236195, spin: 3, life: 30, bounce: 0.1 })),
3714
- 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: [0.12, 0.1, 0.12], k: [0.5, 1.5], c: 6183508, life: 30 })),
3707
+ ...sparks(look, 20),
3708
+ 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 })),
3709
+ 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 })),
3715
3710
  repeat(
3716
- scaled(70),
3711
+ scaled(Math.round(70 * look.cloud)),
3717
3712
  spawn("normal", local("angle", rnd(-0.4, 3.5), {
3718
3713
  p: [rnd(-2, 2), 0.2, rnd(-0.5, 0.5)],
3719
3714
  dir: vnorm([mul(cos(variable("angle")), 0.6), 0.25, sin(variable("angle"))]),
@@ -3723,14 +3718,66 @@ var GameVfxThree = (() => {
3723
3718
  life: [3, 6],
3724
3719
  size: [0.7, 1.2],
3725
3720
  grow: 3,
3726
- c0: 8024680,
3721
+ c0: dustTone(look),
3727
3722
  c1: 4867648,
3728
3723
  a: 0.5,
3729
3724
  fi: 0.12
3730
3725
  }))
3731
3726
  )
3732
3727
  ]
3733
- },
3728
+ };
3729
+ }
3730
+ var MASONRY = FAMILIES.masonry;
3731
+ var REBAR_EXPOSE = {
3732
+ id: "rebar_expose",
3733
+ pageId: "event:rebar_expose",
3734
+ team: "destruction",
3735
+ budget: { particles: 24, debris: 8 },
3736
+ loop: 2,
3737
+ timeline: [
3738
+ repeat(scaled(8), debris({ p: ORIGIN, dir: UP11, cone: 0.9, sp: [1, 3], size: MASONRY.piece, k: [0.6, 1.4], spin: MASONRY.spin, c: debrisTone(MASONRY), life: 20 })),
3739
+ burst("normal", 8, { p: ORIGIN, dir: UP11, cone: 0.8, sp: [0.3, 1.2], drag: 2, life: [0.8, 1.4], size: [0.08, 0.15], grow: 3, c0: dustTone(MASONRY), a: 0.4 }),
3740
+ call2("rust_at", ORIGIN, 6)
3741
+ ]
3742
+ };
3743
+ var MATERIAL_EVENT_EFFECTS = [
3744
+ ...DEBRIS_EFFECT_FAMILIES.flatMap((family) => [stageCrack(family), breachDust(family), collapseDust(family)]),
3745
+ REBAR_EXPOSE
3746
+ ];
3747
+ var FACING5 = [0, 0, 1];
3748
+ var ORIGIN2 = [0, 0, 0];
3749
+ var FORWARD4 = [0, 0, -1];
3750
+ var IMPACT_MATERIALS = ["concrete", "metal", "wood", "glass", "flesh", "water"];
3751
+ var impactEffect = (material2) => ({
3752
+ id: `impact_${material2}`,
3753
+ pageId: `event:impact_${material2}`,
3754
+ team: "weapons",
3755
+ budget: { particles: 40, decals: 1 },
3756
+ loop: 2,
3757
+ timeline: [call2("impact", material2, ORIGIN2, FACING5, 1, 0)]
3758
+ });
3759
+ var muzzleEffect = (weapon) => ({
3760
+ id: `muzzle_${weapon}`,
3761
+ pageId: `event:muzzle_${weapon}`,
3762
+ team: "weapons",
3763
+ budget: { particles: 60, lights: 1 },
3764
+ loop: 2.4,
3765
+ timeline: [call2("muzzle", weapon, ORIGIN2, FORWARD4)]
3766
+ });
3767
+ var casingEffect = (id, type) => ({
3768
+ id,
3769
+ pageId: `event:${id}`,
3770
+ team: "weapons",
3771
+ budget: { debris: 1 },
3772
+ loop: 2,
3773
+ timeline: [call2("casing", ORIGIN2, type)]
3774
+ });
3775
+ var EVENT_EFFECTS = [
3776
+ ...IMPACT_MATERIALS.map(impactEffect),
3777
+ ...["glock", "ak", "r870", "barrett"].map(muzzleEffect),
3778
+ casingEffect("casing_brass", ""),
3779
+ casingEffect("casing_shell", "shell"),
3780
+ casingEffect("casing_50", "50"),
3734
3781
  {
3735
3782
  // shopfront_glass (W846-855): the pane coming down as shards, the flash of the glints and the pale dust.
3736
3783
  id: "glass_burst",
@@ -3742,21 +3789,13 @@ var GameVfxThree = (() => {
3742
3789
  screen({ add: { shake: 0.08 } }),
3743
3790
  repeat(
3744
3791
  scaled(75),
3745
- debris({ p: ORIGIN, box: [1.25, 0.85, 0.02], v: [rnd(-0.4, 0.4), rnd(-0.5, 0.8), rnd(0.6, 2)], sp: 0, size: [rnd(0.05, 0.18), 6e-3, rnd(0.05, 0.18)], c: 11061464, spin: 14, life: 30, bounce: 0.15 })
3792
+ debris({ p: ORIGIN2, box: [1.25, 0.85, 0.02], v: [rnd(-0.4, 0.4), rnd(-0.5, 0.8), rnd(0.6, 2)], sp: 0, size: [rnd(0.05, 0.18), 6e-3, rnd(0.05, 0.18)], c: 11061464, spin: 14, life: 30, bounce: 0.15 })
3746
3793
  ),
3747
- burst("add", 30, { p: ORIGIN, box: [1.2, 0.8, 0.05], size: [0.02, 0.05], life: [0.2, 0.6], c0: 16777215, a: 0.9, fi: 0.3 }),
3794
+ burst("add", 30, { p: ORIGIN2, box: [1.2, 0.8, 0.05], size: [0.02, 0.05], life: [0.2, 0.6], c0: 16777215, a: 0.9, fi: 0.3 }),
3748
3795
  burst("normal", 20, { p: [0, -0.6, 0.1], box: [1.2, 0.5, 0.1], sp: [0.2, 0.6], drag: 2, life: [0.8, 1.4], size: [0.12, 0.2], grow: 3, c0: 12572386, a: 0.2 })
3749
3796
  ]
3750
3797
  },
3751
- {
3752
- // The chips macro the page uses on wood (W849) plus rust (`rustAt`), for rebar laid bare in concrete.
3753
- id: "rebar_expose",
3754
- pageId: "event:rebar_expose",
3755
- team: "destruction",
3756
- budget: { particles: 20, debris: 8 },
3757
- loop: 2,
3758
- timeline: [call2("chips", ORIGIN, UP11, 8, 0.9), call2("rust_at", ORIGIN, 6)]
3759
- }
3798
+ ...MATERIAL_EVENT_EFFECTS
3760
3799
  ];
3761
3800
  var PI = Math.PI;
3762
3801
  var SMOKE = { color: 9079430, width: 10, height: 8, gravity: -0.08, drag: 2.2, growth: 2.1 };
@@ -3767,7 +3806,7 @@ var GameVfxThree = (() => {
3767
3806
  var FLASH_OPACITY = 0.95;
3768
3807
  var FLAME_COLORS = [16742946, 16760896, 13121050, 16773296];
3769
3808
  var FLAME_ADDITIVE = 3;
3770
- var ORIGIN2 = [0, 0, 0];
3809
+ var ORIGIN3 = [0, 0, 0];
3771
3810
  var SIZE = variable("size");
3772
3811
  var FLASH_SCALE = variable("flash");
3773
3812
  var fallback = (name, defaultValue) => ite(ne(variable(name), void 0), variable(name), defaultValue);
@@ -3815,7 +3854,7 @@ var GameVfxThree = (() => {
3815
3854
  grow: 2.2
3816
3855
  })
3817
3856
  ];
3818
- var flashPiece = (shape, radius, height, width, at3, rot, color) => mesh({ shape, r: radius, ...height === void 0 ? {} : { h: height }, seg: width, seg2: shape === "sphere" ? 8 : 1, p: ORIGIN2, at: at3, rot, roll: variable("roll"), ramp: FLASH_RAMP, life: FLASH_SECONDS, c0: color, a: FLASH_OPACITY, add: true });
3857
+ var flashPiece = (shape, radius, height, width, at3, rot, color) => mesh({ shape, r: radius, ...height === void 0 ? {} : { h: height }, seg: width, seg2: shape === "sphere" ? 8 : 1, p: ORIGIN3, at: at3, rot, roll: variable("roll"), ramp: FLASH_RAMP, life: FLASH_SECONDS, c0: color, a: FLASH_OPACITY, add: true });
3819
3858
  var MUZZLE_FLASH2 = {
3820
3859
  id: "viewmodel_muzzle_flash",
3821
3860
  pageId: "event:viewmodel_muzzle_flash",
@@ -3842,7 +3881,7 @@ var GameVfxThree = (() => {
3842
3881
  repeat(4, append("angles", add(div(mul(INDEX, PI), 2), mul(rand(), 0.6)))),
3843
3882
  set("roll", mul(rand(), PI)),
3844
3883
  when(gt(FLASH_SCALE, 0), [
3845
- flash(ORIGIN2, 16756832, mul(4, SIZE, FLASH_SCALE), FLASH_SECONDS, mul(2, SIZE, FLASH_SCALE), true, true),
3884
+ flash(ORIGIN3, 16756832, mul(4, SIZE, FLASH_SCALE), FLASH_SECONDS, mul(2, SIZE, FLASH_SCALE), true, true),
3846
3885
  flashPiece("cone_open", mul(0.013, SIZE, FLASH_SCALE), mul(0.085, SIZE, FLASH_SCALE), 10, [mul(0.042, SIZE, FLASH_SCALE), 0, 0], [0, 0, -PI / 2], 16757575),
3847
3886
  repeat(
3848
3887
  4,
@@ -3862,7 +3901,7 @@ var GameVfxThree = (() => {
3862
3901
  repeat(
3863
3902
  variable("puffs"),
3864
3903
  puff2(
3865
- ORIGIN2,
3904
+ ORIGIN3,
3866
3905
  [add(variable("drift"), mul(rand(), variable("driftSpread"))), add(variable("rise"), mul(rand(), variable("riseSpread"))), mul(sub(rand(), 0.5), variable("sideSpread"))],
3867
3906
  [0, 0, 0],
3868
3907
  mul(variable("radius"), SIZE),
@@ -3879,7 +3918,7 @@ var GameVfxThree = (() => {
3879
3918
  team: "weapons",
3880
3919
  budget: { particles: 1 },
3881
3920
  loop: 0.1,
3882
- timeline: [puff2(ORIGIN2, void 0, [variable("vx"), variable("vy"), variable("vz")], variable("radius"), variable("life"), variable("opacity"))]
3921
+ timeline: [puff2(ORIGIN3, void 0, [variable("vx"), variable("vy"), variable("vz")], variable("radius"), variable("life"), variable("opacity"))]
3883
3922
  };
3884
3923
  var BACKBLAST = {
3885
3924
  id: "launcher_backblast",
@@ -3888,8 +3927,8 @@ var GameVfxThree = (() => {
3888
3927
  budget: { particles: 40 },
3889
3928
  loop: 0.1,
3890
3929
  timeline: [
3891
- repeat(26, puff2(ORIGIN2, [neg(add(1.5, mul(rand(), 3))), 0, 0], [wide(1.4), wide(0.8), wide(1.4)], add(0.03, mul(rand(), 0.03)), add(1.8, mul(rand(), 1.4)), 0.5)),
3892
- repeat(14, ...flameBit(ORIGIN2, [neg(add(2, mul(rand(), 2))), 0, 0], [wide(1), wide(0.6), wide(1)], 0.02, 0.25))
3930
+ repeat(26, puff2(ORIGIN3, [neg(add(1.5, mul(rand(), 3))), 0, 0], [wide(1.4), wide(0.8), wide(1.4)], add(0.03, mul(rand(), 0.03)), add(1.8, mul(rand(), 1.4)), 0.5)),
3931
+ repeat(14, ...flameBit(ORIGIN3, [neg(add(2, mul(rand(), 2))), 0, 0], [wide(1), wide(0.6), wide(1)], 0.02, 0.25))
3893
3932
  ]
3894
3933
  };
3895
3934
  var FLAME_JET = {
@@ -4008,7 +4047,7 @@ var GameVfxThree = (() => {
4008
4047
  }
4009
4048
  var COLUMNS = 6;
4010
4049
  var ROWS = 5;
4011
- var ORIGIN3 = [-2.2, 0, 2.6];
4050
+ var ORIGIN4 = [-2.2, 0, 2.6];
4012
4051
  var BLOCK_SIZE = [0.5, 0.44, 0.25];
4013
4052
  var OBJECT_ID_DRAWS2 = 4;
4014
4053
  var FLOOR2 = 0.13;
@@ -4051,7 +4090,7 @@ var GameVfxThree = (() => {
4051
4090
  const chipScale = random.between(0.8, 1.3) * scale;
4052
4091
  for (let draw = 0; draw < OBJECT_ID_DRAWS2; draw++) random.next();
4053
4092
  best.holes.push({ x: offsetX, y: offsetY, scale, chipTurn, chipScale });
4054
- impact(host.engine, "concrete", [ORIGIN3[0] + x, y, ORIGIN3[2] + 0.13], [0, 0, 1], 0.8);
4093
+ impact(host.engine, "concrete", [ORIGIN4[0] + x, y, ORIGIN4[2] + 0.13], [0, 0, 1], 0.8);
4055
4094
  } else if (action === "collapse") {
4056
4095
  const { x, y } = args;
4057
4096
  for (const block of blocks) {
@@ -4101,7 +4140,7 @@ var GameVfxThree = (() => {
4101
4140
  }
4102
4141
  };
4103
4142
  }
4104
- var ORIGIN4 = [5.6, 0, 0.8];
4143
+ var ORIGIN5 = [5.6, 0, 0.8];
4105
4144
  var MAX_TILT = 0.25;
4106
4145
  function createCarBehavior() {
4107
4146
  let y = 0;
@@ -4134,7 +4173,7 @@ var GameVfxThree = (() => {
4134
4173
  }
4135
4174
  },
4136
4175
  query(_host, name, args) {
4137
- if (name === "position") return [ORIGIN4[0], y, ORIGIN4[2]];
4176
+ if (name === "position") return [ORIGIN5[0], y, ORIGIN5[2]];
4138
4177
  if (name === "point") {
4139
4178
  const [x, py, z] = args;
4140
4179
  const point = carPoint(x, py, z);
@@ -5006,7 +5045,7 @@ var GameVfxThree = (() => {
5006
5045
  this.index = previous;
5007
5046
  }
5008
5047
  };
5009
- var ORIGIN5 = [0, 0, 0];
5048
+ var ORIGIN6 = [0, 0, 0];
5010
5049
  var DEFAULT_HEADING = [0, 0, -1];
5011
5050
  var DEFAULT_MAX_INSTANCES = 48;
5012
5051
  var ENDLESS_SECONDS = 60;
@@ -5083,7 +5122,7 @@ var GameVfxThree = (() => {
5083
5122
  random: playOptions.seed !== void 0 ? streamOf(playOptions.seed) : void 0,
5084
5123
  follow: playOptions.follow,
5085
5124
  origin: point,
5086
- anchor: def.anchor ?? ORIGIN5,
5125
+ anchor: def.anchor ?? ORIGIN6,
5087
5126
  yaw: yawOf(heading, playOptions.direction),
5088
5127
  orientation: playOptions.orientation,
5089
5128
  seconds: playOptions.seconds ?? (def.loop && def.loop > 0 ? def.loop : ENDLESS_SECONDS),
@@ -9938,7 +9977,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
9938
9977
  uTime: { value: 0 }
9939
9978
  };
9940
9979
  const puffs = createPuffLayer(THREE, pools.puffs, uniforms);
9941
- const sparks = createSparkLayer(THREE, pools.sparks);
9980
+ const sparks2 = createSparkLayer(THREE, pools.sparks);
9942
9981
  const glows = createGlowLayer(THREE, pools.glows);
9943
9982
  const rockGeometry = new THREE.DodecahedronGeometry(0.5, 0);
9944
9983
  const plateGeometry = new THREE.BoxGeometry(1, 1, 1);
@@ -9947,7 +9986,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
9947
9986
  const sprites = createSpriteLayer(THREE, world.sprites(), options.pointScale ?? 700);
9948
9987
  const lights = createLightLayer(THREE, pools.lights, options.lightScale ?? Math.PI, options.lights);
9949
9988
  const marks = createMarkLayer(THREE, { ground: pools.ground, ...world.hostGroundAt ? { heightAt: world.hostGroundAt } : {}, createCanvas: options.createCanvas, rockGeometry, plateGeometry, ...options.markLimits });
9950
- root.add(puffs.mesh, sparks.mesh, glows.mesh, chunks.rocks, chunks.plates, shocks.group, lights.group, sprites.additive, sprites.normal, marks.group);
9989
+ root.add(puffs.mesh, sparks2.mesh, glows.mesh, chunks.rocks, chunks.plates, shocks.group, lights.group, sprites.additive, sprites.normal, marks.group);
9951
9990
  const stopMarks = world.onMarks((event) => marks.handle(event));
9952
9991
  const overlay = options.overlay ? createScreenOverlay(options.overlay) : void 0;
9953
9992
  let drawCalls = 0;
@@ -9956,7 +9995,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
9956
9995
  const layerOn = /* @__PURE__ */ new Map();
9957
9996
  const layerObjects = () => ({
9958
9997
  puffs: [puffs.mesh],
9959
- sparks: [sparks.mesh],
9998
+ sparks: [sparks2.mesh],
9960
9999
  glows: [glows.mesh],
9961
10000
  debris: [chunks.rocks, chunks.plates],
9962
10001
  shock: [shocks.group],
@@ -9984,7 +10023,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
9984
10023
  }
9985
10024
  function syncAll() {
9986
10025
  lastDrawn.puffs = puffs.sync();
9987
- lastDrawn.sparks = sparks.sync();
10026
+ lastDrawn.sparks = sparks2.sync();
9988
10027
  lastDrawn.glows = glows.sync();
9989
10028
  lastDrawn.chunks = chunks.sync();
9990
10029
  lastDrawn.shocks = shocks.sync();
@@ -10085,7 +10124,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
10085
10124
  stopMarks();
10086
10125
  overlay?.dispose();
10087
10126
  workshopLayers?.dispose();
10088
- for (const layer2 of [puffs, sparks, glows, chunks, shocks, lights, marks, sprites]) layer2.dispose();
10127
+ for (const layer2 of [puffs, sparks2, glows, chunks, shocks, lights, marks, sprites]) layer2.dispose();
10089
10128
  rockGeometry.dispose();
10090
10129
  plateGeometry.dispose();
10091
10130
  options.scene.remove(root);