@adatechnology/game-destruction-three 0.18.2 → 0.19.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.
@@ -15386,7 +15386,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
15386
15386
  return { id: options.id, samples };
15387
15387
  }
15388
15388
 
15389
- // ../game-audio/dist/chunk-BUYBYP4L.js
15389
+ // ../game-audio/dist/chunk-LZDF5XMZ.js
15390
15390
  var DISTANCE_CURVES = {
15391
15391
  /** The game's `sfx`: `vol / (1 + d² × 0.004)`, cutoff `/ (1 + d × 0.01)`, silent below 0.01 (jogo L62091–62092, L62101). */
15392
15392
  game_sfx: { model: "inverse_square", k: 4e-3, cutoffK: 0.01, minGain: 0.01 },
@@ -17193,10 +17193,12 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17193
17193
  impact2("metal_bullet", [sceneNoise({ type: "highpass", f: 3e3, d: 0.03, vol: 0.8 }), sceneTone({ f: [2600, 3400], f2: 1800, d: 0.14, vol: 0.28, wet: 0.35 }), sceneTone({ f: [520, 720], f2: 480, d: 0.35, vol: 0.22, wet: 0.35 })]),
17194
17194
  impact2("metal_blunt", [sceneNoise({ type: "bandpass", f: 800, q: 1, d: 0.05, vol: 0.5 }), sceneTone({ f: [150, 210], f2: 120, d: 0.6, vol: 0.5, wet: 0.4 }), sceneTone({ f: [420, 520], f2: 400, d: 0.4, vol: 0.12 })]),
17195
17195
  impact2("metal_blade", [sceneNoise({ type: "bandpass", f: [3500, 4500], q: 6, a: 0.01, d: 0.18, vol: 0.45 }), sceneTone({ f: [2200, 2800], f2: 3e3, d: 0.15, vol: 0.06 })]),
17196
+ impact2("metal_ping", [sceneNoise({ type: "highpass", f: 3500, d: 0.02, vol: 0.5 }), sceneTone({ f: [2600, 3500], f2: 1400, d: 0.14, vol: 0.2, wet: 0.3 })]),
17196
17197
  impact2("metal_thin", [sceneNoise({ type: "highpass", f: 2500, d: 0.04, vol: 0.6 }), sceneTone({ f: [900, 1300], f2: 700, d: 0.25, vol: 0.22, wet: 0.3 }), sceneNoise({ type: "bandpass", f: 1200, q: 2, d: 0.08, vol: 0.3 })]),
17197
17198
  // wood (the bullet keeps the art scene's `wood_hit`)
17198
17199
  impact2("wood_blunt", [sceneTone({ f: [110, 150], f2: 70, d: 0.14, vol: 0.6 }), sceneNoise({ type: "bandpass", f: 500, q: 1.2, d: 0.12, vol: 0.55, wet: 0.2 })]),
17199
17200
  impact2("wood_blade", [sceneNoise({ type: "bandpass", f: [1800, 2400], q: 2, a: 0.01, d: 0.12, vol: 0.5 }), ...sceneMany(3, () => sceneNoise({ type: "bandpass", f: [2500, 4e3], q: 3, d: 0.02, vol: 0.22, delay: [0.02, 0.1] }))]),
17201
+ impact2("wood_splinter", [sceneNoise({ type: "highpass", f: 1800, d: 0.05, vol: 0.6 }), sceneTone({ f: [380, 480], f2: 170, d: 0.08, vol: 0.3 }), ...sceneMany(4, () => sceneNoise({ type: "bandpass", f: [2500, 4200], q: 3, d: 0.02, vol: 0.2, delay: [0.03, 0.25] }))]),
17200
17202
  impact2("mdf_puff", [sceneNoise({ type: "lowpass", f: 900, d: 0.08, vol: 1 }), sceneTone({ f: [180, 230], f2: 110, d: 0.06, vol: 0.3 }), sceneNoise({ type: "highpass", f: 3e3, a: 0.01, d: 0.2, vol: 0.1 })]),
17201
17203
  // glass and ceramic
17202
17204
  impact2("glass_bullet", [sceneNoise({ type: "highpass", f: 4e3, d: 0.05, vol: 0.7 }), sceneTone({ f: [3200, 4200], f2: 2600, d: 0.2, vol: 0.14, wet: 0.3 }), ...sceneMany(4, () => sceneTone({ f: [4e3, 7e3], d: 0.05, vol: 0.07, delay: [0.02, 0.2] }))]),
@@ -17220,6 +17222,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17220
17222
  impact2("wax_hit", [sceneNoise({ type: "lowpass", f: 800, d: 0.05, vol: 0.45 }), sceneTone({ f: [240, 280], f2: 180, d: 0.05, vol: 0.22 })]),
17221
17223
  // soft things, paper, plants
17222
17224
  impact2("soft_bullet", [sceneNoise({ type: "lowpass", f: 450, a: 3e-3, d: 0.1, vol: 1.8 }), sceneNoise({ type: "bandpass", f: 900, q: 1, d: 0.05, vol: 0.5 })]),
17225
+ impact2("fabric_hit", [sceneNoise({ type: "lowpass", f: 650, d: 0.14, vol: 0.5 }), sceneTone({ f: [85, 115], f2: 50, d: 0.12, vol: 0.28 })]),
17223
17226
  impact2("fabric_rip", [sceneNoise({ type: "bandpass", f: [2e3, 2800], q: 1.5, a: 0.02, d: 0.25, vol: 0.4 }), ...sceneMany(4, () => sceneNoise({ type: "bandpass", f: [3e3, 5e3], q: 4, d: 0.02, vol: 0.14, delay: [0, 0.22] }))]),
17224
17227
  impact2("paper_hit", [sceneNoise({ type: "bandpass", f: 2200, q: 1, d: 0.05, vol: 0.45 })]),
17225
17228
  impact2("paper_tear", [sceneNoise({ type: "highpass", f: 2500, a: 0.02, d: 0.3, vol: 0.15 })]),
@@ -17249,6 +17252,11 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17249
17252
  impact_wood_ballistic: { sound: "wood_hit" },
17250
17253
  impact_wood_blunt: { sound: "wood_blunt" },
17251
17254
  impact_wood_slash: { sound: "wood_blade" },
17255
+ break_wood: { sound: "wood_splinter" },
17256
+ // the art scene's key for a part splintering and for a round striking steel or wood: the recordings answer them too
17257
+ splinter: { sound: "wood_splinter" },
17258
+ shot_wood: { sound: "wood_splinter" },
17259
+ shot_metal: { sound: "metal_ping" },
17252
17260
  impact_mdf_ballistic: { sound: "mdf_puff" },
17253
17261
  impact_mdf_blunt: { sound: "mdf_puff", volumeScale: 0.8 },
17254
17262
  impact_glass_ballistic: { sound: "glass_bullet" },
@@ -17269,6 +17277,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17269
17277
  impact_rubber: { sound: "rubber_hit" },
17270
17278
  impact_wax: { sound: "wax_hit" },
17271
17279
  impact_soft_ballistic: { sound: "soft_bullet" },
17280
+ impact_soft_blunt: { sound: "fabric_hit" },
17272
17281
  impact_soft_slash: { sound: "fabric_rip" },
17273
17282
  impact_paper: { sound: "paper_hit" },
17274
17283
  impact_paper_slash: { sound: "paper_tear" },
@@ -17284,6 +17293,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17284
17293
  break_plastic: { sound: "plastic_crack" },
17285
17294
  break_mdf: { sound: "mdf_crumble" },
17286
17295
  break_soft: { sound: "fabric_rip" },
17296
+ break_fabric: { sound: "fabric_rip" },
17287
17297
  break_paper: { sound: "paper_tear" },
17288
17298
  break_plant: { sound: "branch_cut" }
17289
17299
  };
@@ -17483,7 +17493,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
17483
17493
  const wanted = rule.above && volume >= rule.above.volume ? rule.above.sound : rule.sound;
17484
17494
  const sound = rule.fallback && !engine.registry.sound(wanted) ? rule.fallback : wanted;
17485
17495
  const params = detail?.seconds === void 0 ? rule.params : { ...rule.params, seconds: detail.seconds };
17486
- engine.play(sound, { position: point, volume: volume * (rule.volumeScale ?? 1), ...params ? { params } : {} });
17496
+ engine.play(sound, { position: point, volume: volume * (rule.volumeScale ?? 1), intensity: Math.min(1, Math.max(0, volume)), ...params ? { params } : {} });
17487
17497
  },
17488
17498
  update(dt) {
17489
17499
  if (!crackles || fires.length === 0 || options.burnLoop === false) return;