@adatechnology/game-crowd-three 0.5.3 → 0.5.5

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.
@@ -38,6 +38,7 @@ var GameCrowdThree = (() => {
38
38
 
39
39
  // ../game-contracts/dist/index.js
40
40
  var DEFAULT_BLAST_SHOVE = { coupling: 0.02, maxSpeed: 20, lift: 0.3, minSpeed: 0.3, falloffPower: 2 };
41
+ var clampShare = (share) => Math.min(1, Math.max(0, share));
41
42
  function blastShove(blast, target, options = {}) {
42
43
  const o = { ...DEFAULT_BLAST_SHOVE, ...options };
43
44
  const dx = target.position[0] - blast.point[0];
@@ -47,7 +48,8 @@ var GameCrowdThree = (() => {
47
48
  if (!(blast.radius > 0) || distance2 > blast.radius) return void 0;
48
49
  const falloff = (1 - distance2 / blast.radius) ** o.falloffPower;
49
50
  const mass = Math.max(target.mass, 0.05);
50
- const speed = Math.min(o.maxSpeed, Math.sqrt(2 * blast.energy * (blast.reach ?? 1) * o.coupling / mass)) * falloff;
51
+ const reach = clampShare(blast.reach ?? 1);
52
+ const speed = Math.sqrt(reach) * Math.min(o.maxSpeed, Math.sqrt(2 * blast.energy * o.coupling / mass)) * falloff;
51
53
  if (!(speed >= o.minSpeed)) return void 0;
52
54
  const direction = distance2 > 1e-4 ? [dx / distance2, dy / distance2 + o.lift, dz / distance2] : [0, 1, 0];
53
55
  const length = Math.hypot(direction[0], direction[1], direction[2]);
@@ -150,6 +152,8 @@ var GameCrowdThree = (() => {
150
152
  mortar: "concrete",
151
153
  stone: "concrete",
152
154
  brick: "concrete",
155
+ cobble: "concrete",
156
+ paver: "concrete",
153
157
  plaster: "concrete",
154
158
  asphalt: "asphalt",
155
159
  wood_soft: "wood",
@@ -160,6 +164,8 @@ var GameCrowdThree = (() => {
160
164
  ceramic: "tile",
161
165
  plastic: "tile",
162
166
  soil: "dirt",
167
+ mud: "dirt",
168
+ clay: "dirt",
163
169
  wax: "dirt",
164
170
  flesh_fruit: "dirt",
165
171
  turf: "grass",
@@ -167,6 +173,8 @@ var GameCrowdThree = (() => {
167
173
  cactus: "grass",
168
174
  gravel: "gravel",
169
175
  sand: "sand",
176
+ // no snow surface yet: packed snow crunches closest to sand underfoot
177
+ snow: "sand",
170
178
  steel: "metal",
171
179
  cast_iron: "metal",
172
180
  aluminium: "metal",
@@ -1512,7 +1520,7 @@ var GameCrowdThree = (() => {
1512
1520
  var POSE_CLIPS = pose_clips_default.clips;
1513
1521
  var POSE_CLIP_LOCALES = pose_clips_default.locales;
1514
1522
 
1515
- // ../game-audio/dist/chunk-KBTUANNG.js
1523
+ // ../game-audio/dist/chunk-C2K7XN2K.js
1516
1524
  var DISTANCE_CURVES = {
1517
1525
  /** The game's `sfx`: `vol / (1 + d² × 0.004)`, cutoff `/ (1 + d × 0.01)`, silent below 0.01 (jogo L62091–62092, L62101). */
1518
1526
  game_sfx: { model: "inverse_square", k: 4e-3, cutoffK: 0.01, minGain: 0.01 },
@@ -1729,7 +1737,22 @@ var GameCrowdThree = (() => {
1729
1737
  ["smg_45_auto", 2, "sfx_pistol"],
1730
1738
  ["weapon_draw", 2],
1731
1739
  ["suppressor_attach", 3],
1732
- ["suppressor_detach", 3]
1740
+ ["suppressor_detach", 3],
1741
+ ["minigun_loop", 3],
1742
+ ["smg_5_7x28", 3],
1743
+ ["mg_belt_adjust", 3],
1744
+ ["mg_belt_box_attach", 3],
1745
+ ["mg_cover_open", 3],
1746
+ ["mg_cover_close", 3],
1747
+ ["weapon_holster", 3],
1748
+ ["scope_zoom", 3]
1749
+ ]),
1750
+ ...entries("impactos", [
1751
+ ["knife_hit_wall", 3],
1752
+ ["helmet_hit", 3],
1753
+ ["vest_hit", 3],
1754
+ ["headshot", 3],
1755
+ ["blood_squirt", 3]
1733
1756
  ]),
1734
1757
  ...entries("explosoes-fogo", [
1735
1758
  ["explosion_grenade", 1, "boom"],
@@ -1747,7 +1770,13 @@ var GameCrowdThree = (() => {
1747
1770
  ["grenade_bounce", 1],
1748
1771
  ["c4_plant", 2],
1749
1772
  ["c4_beep", 2],
1750
- ["c4_disarm", 2]
1773
+ ["c4_disarm", 2],
1774
+ ["c4_disarming_loop", 3],
1775
+ ["c4_remote_detonate", 3],
1776
+ ["smoke_grenade_hiss", 3],
1777
+ ["grenade_pin_pull", 3],
1778
+ ["electric_shock", 3],
1779
+ ["electric_spark", 3]
1751
1780
  ]),
1752
1781
  ...entries("personagem", [
1753
1782
  ["footstep_concrete_walk", 1, "sfx_step"],
@@ -1775,7 +1804,13 @@ var GameCrowdThree = (() => {
1775
1804
  ["zombie_attack", 1],
1776
1805
  ["zombie_pain", 1],
1777
1806
  ["zombie_claw_hit", 1, "sfx_flesh"],
1778
- ["zombie_claw_miss", 2]
1807
+ ["zombie_claw_miss", 2],
1808
+ ["swing_whoosh", 3],
1809
+ ["heartbeat_critical", 3],
1810
+ ["fall_water", 3],
1811
+ ["fall_damage", 3],
1812
+ ["fall_scream", 3],
1813
+ ["footstep_glass_walk", 3]
1779
1814
  ]),
1780
1815
  ...entries("veiculos", [
1781
1816
  ["engine_loop_car", 1],
@@ -1785,7 +1820,12 @@ var GameCrowdThree = (() => {
1785
1820
  ["car_door_open", 1, "latch"],
1786
1821
  ["car_door_close", 1, "shut_metal"],
1787
1822
  ["horn_car", 2, "horn"],
1788
- ["tire_skid_asphalt", 2]
1823
+ ["tire_skid_asphalt", 2],
1824
+ ["jet_flyby", 3],
1825
+ ["helicopter_turbine", 3],
1826
+ ["tire_burnout", 3],
1827
+ ["handbrake_turn", 3],
1828
+ ["siren_police", 3]
1789
1829
  ]),
1790
1830
  ...entries("itens-portas", [
1791
1831
  ["item_pickup_metal", 1],
@@ -1796,7 +1836,27 @@ var GameCrowdThree = (() => {
1796
1836
  ["door_creak", 1, "creak_wood"],
1797
1837
  ["door_locked_rattle", 1, "rattle"],
1798
1838
  ["drawer_open", 2, "slide"],
1799
- ["fridge_close", 2, "shut_metal"]
1839
+ ["fridge_close", 2, "shut_metal"],
1840
+ ["inventory_open", 3],
1841
+ ["inventory_close", 3],
1842
+ ["inventory_select", 3],
1843
+ ["inventory_place", 3],
1844
+ ["pickup_chime", 3],
1845
+ ["item_pickup_coins", 3],
1846
+ ["bandage_use", 3],
1847
+ ["bandage_refuse", 3],
1848
+ ["flashlight_toggle", 3],
1849
+ ["gear_draw", 3],
1850
+ ["gear_holster", 3],
1851
+ ["button_press", 3],
1852
+ ["lock_desk_open", 3],
1853
+ ["elevator_move_loop", 3],
1854
+ ["elevator_stop", 3],
1855
+ ["door_sliding", 3],
1856
+ ["door_kick", 3],
1857
+ ["door_wood_break", 3],
1858
+ ["gate_iron_open", 3],
1859
+ ["gate_iron_close", 3]
1800
1860
  ]),
1801
1861
  ...entries("ambiente", [
1802
1862
  ["rain_loop", 2],
@@ -1804,7 +1864,16 @@ var GameCrowdThree = (() => {
1804
1864
  ["thunder_near", 2],
1805
1865
  ["thunder_far", 2],
1806
1866
  ["water_splash", 2],
1807
- ["helicopter_loop", 3]
1867
+ ["helicopter_loop", 3],
1868
+ ["bird_flush", 3],
1869
+ ["dog_growl", 3],
1870
+ ["dog_whimper", 3],
1871
+ ["dog_howl", 3],
1872
+ ["zombie_dog_bark", 3],
1873
+ ["zombie_dog_howl_far", 3],
1874
+ ["insect_squash", 3],
1875
+ ["insect_crawl", 3],
1876
+ ["fan_loop", 3]
1808
1877
  ])
1809
1878
  ];
1810
1879
  var SFX_MATERIALS = [
@@ -1886,6 +1955,7 @@ var GameCrowdThree = (() => {
1886
1955
  burst: 20,
1887
1956
  burstSpacing: 0.06
1888
1957
  };
1958
+ var CATALOG = new Map([...SFX_CATALOG, ...SFX_IMPACTS].map((entry) => [entry.id, entry]));
1889
1959
  var PT = {
1890
1960
  group: "Som",
1891
1961
  name: "Painel de som (arquivos e C1\u2013C10)",
@@ -1960,9 +2030,9 @@ var GameCrowdThree = (() => {
1960
2030
  strengths: { light: "leve", medium: "m\xE9dio", heavy: "forte" },
1961
2031
  states: { file: "A", synth: "S", missing: "F" },
1962
2032
  criteria: { C1: "C1 Sincronia", C2: "C2 Certo p/ a\xE7\xE3o", C3: "C3 Dist\xE2ncia", C4: "C4 Posi\xE7\xE3o", C5: "C5 Varia\xE7\xE3o", C6: "C6 Volume", C7: "C7 Intensidade", C8: "C8 Cauda", C9: "C9 Rajada", C10: "C10 Escuta" },
1963
- metrics: { source: "1 \xB7 Fonte do que tocou", chosen: "1 \xB7 Escolhido", matrix: "2 \xB7 Matriz", last: "\xDAltimo tocado", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Prefer\xEAncias", state: "5 \xB7 Medi\xE7\xE3o", count: "1 \xB7 Cat\xE1logo" },
2033
+ metrics: { source: "1 \xB7 Fonte do que tocou", chosen: "1 \xB7 Escolhido", matrix: "2 \xB7 Matriz", last: "\xDAltimo tocado", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Prefer\xEAncias", state: "5 \xB7 Medi\xE7\xE3o", count: "1 \xB7 Cat\xE1logo", unlicensed: "1 \xB7 Arquivo sem licen\xE7a" },
1964
2034
  run: { idle: "parada", measuring: "medindo\u2026", done: "pronta", failed: "falhou", recording: "gravando\u2026", recorded: "grava\xE7\xE3o baixada" },
1965
- words: { none: "\u2014", hidden: "? (revele)", prefers: "prefere", approved: "aprovado pelo dono" },
2035
+ words: { none: "\u2014", hidden: "? (revele)", prefers: "prefere", approved: "aprovado pelo dono", local_file: "arquivo do pacote local", sdk_file: "grava\xE7\xE3o do SDK", synth: "s\xEDntese do SDK" },
1966
2036
  sources: { sdk: "SDK", user: "seu som", synth: "sintetizado" },
1967
2037
  probe: "Fonte do som",
1968
2038
  wall: "Parede (oclus\xE3o)",
@@ -2033,9 +2103,9 @@ var GameCrowdThree = (() => {
2033
2103
  environments: { indoor: "indoor", outdoor: "outdoor" },
2034
2104
  strengths: { light: "light", medium: "medium", heavy: "heavy" },
2035
2105
  criteria: { C1: "C1 Sync", C2: "C2 Right sound", C3: "C3 Distance", C4: "C4 Position", C5: "C5 Variation", C6: "C6 Level", C7: "C7 Strength", C8: "C8 Tail", C9: "C9 Burst", C10: "C10 Listening" },
2036
- metrics: { source: "1 \xB7 Source of what played", chosen: "1 \xB7 Chosen", matrix: "2 \xB7 Matrix", last: "Last played", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Preferences", state: "5 \xB7 Measurement", count: "1 \xB7 Catalogue" },
2106
+ metrics: { source: "1 \xB7 Source of what played", chosen: "1 \xB7 Chosen", matrix: "2 \xB7 Matrix", last: "Last played", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Preferences", state: "5 \xB7 Measurement", count: "1 \xB7 Catalogue", unlicensed: "1 \xB7 File without licence" },
2037
2107
  run: { idle: "idle", measuring: "measuring\u2026", done: "done", failed: "failed", recording: "recording\u2026", recorded: "recording downloaded" },
2038
- words: { none: "\u2014", hidden: "? (reveal)", prefers: "prefers", approved: "approved by the owner" },
2108
+ words: { none: "\u2014", hidden: "? (reveal)", prefers: "prefers", approved: "approved by the owner", local_file: "local pack file", sdk_file: "SDK recording", synth: "SDK synthesis" },
2039
2109
  sources: { sdk: "SDK", user: "your sound", synth: "synthesized" },
2040
2110
  probe: "Sound source",
2041
2111
  wall: "Wall (occlusion)",
@@ -2118,6 +2188,66 @@ var GameCrowdThree = (() => {
2118
2188
  sources: [`cena:${line}`]
2119
2189
  };
2120
2190
  }
2191
+ var hz = (midi) => 440 * 2 ** ((midi - 69) / 12);
2192
+ var layer = (note, beat, wave, level) => {
2193
+ const [at, midi, beats] = note;
2194
+ const length = beats * beat;
2195
+ return {
2196
+ at: at * beat,
2197
+ duration: length,
2198
+ source: { kind: "osc", wave, frequency: { set: hz(midi) } },
2199
+ envelope: [[0, 1e-4, "set"], [0.01, level, "linear"], [Math.max(0.02, length * 0.9), level * 0.35, "linear"], [length, 1e-4, "exp", "fixed"]]
2200
+ };
2201
+ };
2202
+ function radioTrack(spec) {
2203
+ const beat = 60 / spec.bpm;
2204
+ const recipes = Array.from({ length: spec.bars }, (_, bar) => {
2205
+ const inBar = (notes) => notes.filter((n) => n[0] >= bar * 4 && n[0] < bar * 4 + 4).map((n) => [n[0] - bar * 4, n[1], n[2]]);
2206
+ const layers = [
2207
+ ...inBar(spec.bass).map((n) => layer(n, beat, "triangle", 0.16)),
2208
+ ...inBar(spec.chords).map((n) => layer(n, beat, "sine", 0.05)),
2209
+ ...inBar(spec.melody).map((n) => layer(n, beat, spec.wave, 0.07))
2210
+ ];
2211
+ return { id: `${spec.id}_${bar}`, bus: "world", duration: 4 * beat, layers, falloff: { model: "none" } };
2212
+ });
2213
+ return { song: { id: spec.id, barSeconds: 4 * beat, bars: recipes.map((r) => r.id) }, recipes };
2214
+ }
2215
+ var chord = (bar, root, minor = false) => [[bar * 4, root, 4], [bar * 4, root + (minor ? 3 : 4), 4], [bar * 4, root + 7, 4]];
2216
+ var bassLine = (roots, pattern) => roots.flatMap((root, bar) => pattern.map((b) => [bar * 4 + b, root - 12, 0.9]));
2217
+ var TRACKS = [
2218
+ // a bright pop loop: I–V–vi–IV in C
2219
+ radioTrack({
2220
+ id: "radio_track_pop",
2221
+ bpm: 112,
2222
+ bars: 4,
2223
+ wave: "square",
2224
+ bass: bassLine([48, 55, 57, 53], [0, 1.5, 2, 3]),
2225
+ chords: [...chord(0, 60), ...chord(1, 55), ...chord(2, 57, true), ...chord(3, 53)],
2226
+ melody: [[0, 76, 1], [1, 74, 0.5], [1.5, 72, 1.5], [4, 74, 1], [5, 76, 1], [6, 79, 2], [8, 76, 1], [9, 74, 1], [10, 72, 2], [12, 72, 1], [13, 74, 1], [14, 72, 2]]
2227
+ }),
2228
+ // a syncopated loop in A minor, the bass on the off-beats
2229
+ radioTrack({
2230
+ id: "radio_track_groove",
2231
+ bpm: 100,
2232
+ bars: 4,
2233
+ wave: "triangle",
2234
+ bass: bassLine([57, 62, 64, 57], [0, 0.75, 1.5, 2.5, 3.25]),
2235
+ chords: [...chord(0, 57, true), ...chord(1, 62, true), ...chord(2, 64), ...chord(3, 57, true)],
2236
+ melody: [[0.5, 72, 0.5], [1.25, 76, 0.75], [2.5, 74, 1], [4.5, 77, 0.5], [5.25, 74, 0.75], [6.5, 72, 1.5], [8.5, 71, 0.5], [9.25, 74, 0.75], [10.5, 76, 1.5], [12.5, 72, 0.5], [13.25, 69, 2]]
2237
+ }),
2238
+ // a slow blues-like loop in F with a swung melody
2239
+ radioTrack({
2240
+ id: "radio_track_slow",
2241
+ bpm: 76,
2242
+ bars: 4,
2243
+ wave: "sine",
2244
+ bass: bassLine([53, 58, 53, 60], [0, 2]),
2245
+ chords: [...chord(0, 65), ...chord(1, 58), ...chord(2, 65), ...chord(3, 60)],
2246
+ melody: [[0, 72, 1.5], [1.67, 75, 0.33], [2, 77, 2], [4, 74, 1], [5, 72, 1], [6, 70, 2], [8, 72, 1.5], [9.67, 69, 0.33], [10, 65, 2], [12, 67, 1], [13, 70, 1], [14, 72, 2]]
2247
+ })
2248
+ ];
2249
+ var RADIO_TRACKS = TRACKS.map((t) => t.song);
2250
+ var RADIO_BANK = { id: "vehicle_radio", sounds: TRACKS.flatMap((t) => t.recipes), loops: [] };
2121
2251
  var FOLEY_FALLOFF = {
2122
2252
  model: "inverse_square",
2123
2253
  k: 0.02,
@@ -2724,11 +2854,11 @@ var GameCrowdThree = (() => {
2724
2854
  ...s.splash ? [sceneNoise({ type: "bandpass", f: s.splash.f * take.f, f2: s.splash.f2 * take.f, q: 1.4, d: s.splash.d * take.t * weight ** 0.4, vol: s.splash.vol * gait.vol * take.v * weight ** 0.5 })] : []
2725
2855
  ];
2726
2856
  }
2727
- var quieter = (level, layers) => layers.map((layer) => {
2728
- const gain = layer.gain ?? 1;
2729
- if (typeof gain === "number") return { ...layer, gain: gain * level };
2730
- if (Array.isArray(gain)) return { ...layer, gain: [gain[0] * level, gain[1] * level] };
2731
- return layer;
2857
+ var quieter = (level, layers) => layers.map((layer2) => {
2858
+ const gain = layer2.gain ?? 1;
2859
+ if (typeof gain === "number") return { ...layer2, gain: gain * level };
2860
+ if (Array.isArray(gain)) return { ...layer2, gain: [gain[0] * level, gain[1] * level] };
2861
+ return layer2;
2732
2862
  });
2733
2863
  var recipe = (id, layers, falloff, bus = "world") => ({ id, bus, pan: true, layers, falloff, sources: ["sdk"] });
2734
2864
  var takeId = (id, index) => `${id}_${String(index + 1).padStart(2, "0")}`;
@@ -2744,7 +2874,7 @@ var GameCrowdThree = (() => {
2744
2874
  (take) => quieter(LANDING_LEVEL, [
2745
2875
  // both feet, a hair apart, then the knees taking the weight (a low body thump) and the clothes settling
2746
2876
  ...footLayers(surface, take, GAITS.run, LANDINGS[landing2].weight),
2747
- ...footLayers(surface, { ...take, v: take.v * 0.6 }, GAITS.run, LANDINGS[landing2].weight * 0.6).map((layer) => ({ ...layer, at: (typeof layer.at === "number" ? layer.at : 0) + 0.018 * take.t })),
2877
+ ...footLayers(surface, { ...take, v: take.v * 0.6 }, GAITS.run, LANDINGS[landing2].weight * 0.6).map((layer2) => ({ ...layer2, at: (typeof layer2.at === "number" ? layer2.at : 0) + 0.018 * take.t })),
2748
2878
  sceneTone({ f: 60 * take.f, f2: 38, d: 0.14 * LANDINGS[landing2].weight * take.t, vol: 0.22 * LANDINGS[landing2].weight ** 0.7 * take.v, delay: 0.02 }),
2749
2879
  sceneNoise({ type: "bandpass", f: [1800, 2600], q: 0.8, d: 0.18, vol: LANDINGS[landing2].cloth * take.v, delay: 0.04 })
2750
2880
  ]),
@@ -2790,7 +2920,7 @@ var GameCrowdThree = (() => {
2790
2920
  fall_damage: (take) => [
2791
2921
  ...BODY.body_fall(take),
2792
2922
  sceneNoise({ type: "highpass", f: 2800, d: 0.02, vol: 0.35 * take.v, delay: 0.01 }),
2793
- ...voice({ f0: 170, f1: 110, d: 0.32, fA: 650, fB: 1150, noise: 0.25, vol: 0.32 })(take).map((layer) => ({ ...layer, at: 0.08 }))
2923
+ ...voice({ f0: 170, f1: 110, d: 0.32, fA: 650, fB: 1150, noise: 0.25, vol: 0.32 })(take).map((layer2) => ({ ...layer2, at: 0.08 }))
2794
2924
  ],
2795
2925
  player_hurt: voice({ f0: 150, f1: 105, d: 0.26, fA: 620, fB: 1100, noise: 0.3, vol: 0.35 }),
2796
2926
  player_breath_run: (take) => [
@@ -4001,8 +4131,8 @@ var GameCrowdThree = (() => {
4001
4131
  const face = faces[i];
4002
4132
  f3(face[2] + offset, face[1] + offset, face[0] + offset);
4003
4133
  }
4004
- const layer = steps + bevelSegments * 2;
4005
- offset = vlen * layer;
4134
+ const layer2 = steps + bevelSegments * 2;
4135
+ offset = vlen * layer2;
4006
4136
  for (let i = 0; i < flen; i++) {
4007
4137
  const face = faces[i];
4008
4138
  f3(face[0] + offset, face[1] + offset, face[2] + offset);
@@ -4449,7 +4579,7 @@ var GameCrowdThree = (() => {
4449
4579
  return releaseObject3D(list2, { keep });
4450
4580
  }
4451
4581
 
4452
- // ../game-characters-three/dist/chunk-XSMP7T6O.js
4582
+ // ../game-characters-three/dist/chunk-IBMIWGWX.js
4453
4583
  var UNDEAD_VOICE_GROUP = "undead_voice";
4454
4584
  var voiced = { bus: "voices", group: UNDEAD_VOICE_GROUP };
4455
4585
  var p = (param) => ({ param });
@@ -5580,7 +5710,7 @@ var GameCrowdThree = (() => {
5580
5710
  }
5581
5711
  }
5582
5712
  });
5583
- const layer = (bytes) => {
5713
+ const layer2 = (bytes) => {
5584
5714
  const texture2 = new three.DataTexture(bytes, stride, rows * cellHeight, three.RGBAFormat, three.UnsignedByteType);
5585
5715
  texture2.minFilter = three.NearestFilter;
5586
5716
  texture2.magFilter = three.NearestFilter;
@@ -5588,8 +5718,8 @@ var GameCrowdThree = (() => {
5588
5718
  texture2.needsUpdate = true;
5589
5719
  return texture2;
5590
5720
  };
5591
- const texture = layer(pixels);
5592
- const colorTexture = layer(colorPixels);
5721
+ const texture = layer2(pixels);
5722
+ const colorTexture = layer2(colorPixels);
5593
5723
  return { texture, colorTexture, silhouettes: bodies.length, cellWidth, cellHeight, columns, rows, boxes, pixels, colorPixels, dispose: () => (texture.dispose(), colorTexture.dispose()) };
5594
5724
  };
5595
5725
  var ACCESSORY_BIT = { CAP: 1, HELMET: 2, BACKPACK: 4, EXTRA: 8 };
@@ -7049,9 +7179,9 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
7049
7179
  for (let i = 0; i < view.n; i++) {
7050
7180
  if (!workspace.takesPart[i]) continue;
7051
7181
  const hx = Math.floor(store.x[i] + grid.half);
7052
- const hz = Math.floor(store.z[i] + grid.half);
7053
- if (hx < 0 || hz < 0 || hx >= side || hz >= side) continue;
7054
- const cell = hz * side + hx;
7182
+ const hz2 = Math.floor(store.z[i] + grid.half);
7183
+ if (hx < 0 || hz2 < 0 || hx >= side || hz2 >= side) continue;
7184
+ const cell = hz2 * side + hx;
7055
7185
  if (workspace.head[cell] === -1) workspace.touched[workspace.touchedCount++] = cell;
7056
7186
  workspace.next[i] = workspace.head[cell];
7057
7187
  workspace.head[cell] = i;
@@ -7083,12 +7213,12 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
7083
7213
  for (let i = 0; i < view.n; i++) {
7084
7214
  if (!workspace.takesPart[i]) continue;
7085
7215
  const hx = Math.floor(store.x[i] + grid.half);
7086
- const hz = Math.floor(store.z[i] + grid.half);
7087
- if (hx < 0 || hz < 0 || hx >= side || hz >= side) continue;
7088
- addPairsOfCell(view, i, hz * side + hx, true);
7216
+ const hz2 = Math.floor(store.z[i] + grid.half);
7217
+ if (hx < 0 || hz2 < 0 || hx >= side || hz2 >= side) continue;
7218
+ addPairsOfCell(view, i, hz2 * side + hx, true);
7089
7219
  for (let k = 0; k < FORWARD_CELLS.length; k += 2) {
7090
7220
  const qx = hx + FORWARD_CELLS[k];
7091
- const qz = hz + FORWARD_CELLS[k + 1];
7221
+ const qz = hz2 + FORWARD_CELLS[k + 1];
7092
7222
  if (qx >= 0 && qz >= 0 && qx < side && qz < side) addPairsOfCell(view, i, qz * side + qx, false);
7093
7223
  }
7094
7224
  }
@@ -8087,14 +8217,14 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
8087
8217
  const x = pool.x[slot];
8088
8218
  const z = pool.z[slot];
8089
8219
  const hx = Math.floor(x + grid.half);
8090
- const hz = Math.floor(z + grid.half);
8220
+ const hz2 = Math.floor(z + grid.half);
8091
8221
  const mass = massOf(slot);
8092
8222
  const speed = Math.hypot(pool.vx[slot], pool.vz[slot]);
8093
8223
  const reach = options.landingRadius * options.landingRadius;
8094
8224
  for (let oz = -1; oz <= 1; oz++)
8095
8225
  for (let ox = -1; ox <= 1; ox++) {
8096
- if (hx + ox < 0 || hz + oz < 0 || hx + ox >= side || hz + oz >= side) continue;
8097
- for (let j = contact.workspace.head[(hz + oz) * side + hx + ox]; j !== -1; j = contact.workspace.next[j]) {
8226
+ if (hx + ox < 0 || hz2 + oz < 0 || hx + ox >= side || hz2 + oz >= side) continue;
8227
+ for (let j = contact.workspace.head[(hz2 + oz) * side + hx + ox]; j !== -1; j = contact.workspace.next[j]) {
8098
8228
  const ex = store.x[j] - x;
8099
8229
  const ez = store.z[j] - z;
8100
8230
  if (j === pool.agent[slot] || ex * ex + ez * ez > reach || !takesPartInContact(store, j)) continue;
@@ -9306,9 +9436,9 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
9306
9436
  Z.attackTimer[i] -= tdt;
9307
9437
  if (Z.attackTimer[i] <= 0) {
9308
9438
  const hx = Math.floor(Z.x[i] + HALF);
9309
- const hz = Math.floor(Z.z[i] + HALF);
9310
- if (hx >= 0 && hz >= 0 && hx < HN && hz < HN)
9311
- for (let j = hHead[hz * HN + hx]; j !== -1; j = hNext[j]) {
9439
+ const hz2 = Math.floor(Z.z[i] + HALF);
9440
+ if (hx >= 0 && hz2 >= 0 && hx < HN && hz2 < HN)
9441
+ for (let j = hHead[hz2 * HN + hx]; j !== -1; j = hNext[j]) {
9312
9442
  if (j !== i && (Z.x[j] - Z.x[i]) ** 2 + (Z.z[j] - Z.z[i]) ** 2 < ss.hitRadius2) {
9313
9443
  Z.attackTimer[i] = N.attackEvery;
9314
9444
  hurtOther(j, C.damage);
@@ -9507,9 +9637,9 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
9507
9637
  for (let i = 0; i < Z.n; i++) {
9508
9638
  if (Z.band[i] !== 0 || engine.active && Z.balance[i] === BALANCE.THROWN) continue;
9509
9639
  const hx = Math.floor(Z.x[i] + HALF);
9510
- const hz = Math.floor(Z.z[i] + HALF);
9511
- if (hx < 0 || hz < 0 || hx >= HN || hz >= HN) continue;
9512
- const h = hz * HN + hx;
9640
+ const hz2 = Math.floor(Z.z[i] + HALF);
9641
+ if (hx < 0 || hz2 < 0 || hx >= HN || hz2 >= HN) continue;
9642
+ const h = hz2 * HN + hx;
9513
9643
  if (engine.active && hHead[h] === -1) hashTouched[hashTouchedN++] = h;
9514
9644
  hNext[i] = hHead[h];
9515
9645
  hHead[h] = i;
@@ -9671,11 +9801,11 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
9671
9801
  let sz = 0;
9672
9802
  if (b === 0) {
9673
9803
  const hx = Math.floor(Z.x[i] + HALF);
9674
- const hz = Math.floor(Z.z[i] + HALF);
9804
+ const hz2 = Math.floor(Z.z[i] + HALF);
9675
9805
  for (let oz = -1; oz <= 1; oz++)
9676
9806
  for (let ox = -1; ox <= 1; ox++) {
9677
9807
  const qx = hx + ox;
9678
- const qz = hz + oz;
9808
+ const qz = hz2 + oz;
9679
9809
  if (qx < 0 || qz < 0 || qx >= HN || qz >= HN) continue;
9680
9810
  for (let j = hHead[qz * HN + qx]; j !== -1; j = hNext[j]) {
9681
9811
  if (j === i || Z.state[j] === STATE.PILE_STEP || Z.state[j] === STATE.DORMANT || balanceOn && (Z.balance[j] === BALANCE.FALLEN || Z.balance[j] === BALANCE.GETTING_UP)) continue;