@adatechnology/game-destruction-three 0.18.2 → 0.19.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.global.js +11 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4975,10 +4975,12 @@ var IMPACT_SOUNDS = [
|
|
|
4975
4975
|
impact("metal_bullet", [noise2({ type: "highpass", f: 3e3, d: 0.03, vol: 0.8 }), tone2({ f: [2600, 3400], f2: 1800, d: 0.14, vol: 0.28, wet: 0.35 }), tone2({ f: [520, 720], f2: 480, d: 0.35, vol: 0.22, wet: 0.35 })]),
|
|
4976
4976
|
impact("metal_blunt", [noise2({ type: "bandpass", f: 800, q: 1, d: 0.05, vol: 0.5 }), tone2({ f: [150, 210], f2: 120, d: 0.6, vol: 0.5, wet: 0.4 }), tone2({ f: [420, 520], f2: 400, d: 0.4, vol: 0.12 })]),
|
|
4977
4977
|
impact("metal_blade", [noise2({ type: "bandpass", f: [3500, 4500], q: 6, a: 0.01, d: 0.18, vol: 0.45 }), tone2({ f: [2200, 2800], f2: 3e3, d: 0.15, vol: 0.06 })]),
|
|
4978
|
+
impact("metal_ping", [noise2({ type: "highpass", f: 3500, d: 0.02, vol: 0.5 }), tone2({ f: [2600, 3500], f2: 1400, d: 0.14, vol: 0.2, wet: 0.3 })]),
|
|
4978
4979
|
impact("metal_thin", [noise2({ type: "highpass", f: 2500, d: 0.04, vol: 0.6 }), tone2({ f: [900, 1300], f2: 700, d: 0.25, vol: 0.22, wet: 0.3 }), noise2({ type: "bandpass", f: 1200, q: 2, d: 0.08, vol: 0.3 })]),
|
|
4979
4980
|
// wood (the bullet keeps the art scene's `wood_hit`)
|
|
4980
4981
|
impact("wood_blunt", [tone2({ f: [110, 150], f2: 70, d: 0.14, vol: 0.6 }), noise2({ type: "bandpass", f: 500, q: 1.2, d: 0.12, vol: 0.55, wet: 0.2 })]),
|
|
4981
4982
|
impact("wood_blade", [noise2({ type: "bandpass", f: [1800, 2400], q: 2, a: 0.01, d: 0.12, vol: 0.5 }), ...many2(3, () => noise2({ type: "bandpass", f: [2500, 4e3], q: 3, d: 0.02, vol: 0.22, delay: [0.02, 0.1] }))]),
|
|
4983
|
+
impact("wood_splinter", [noise2({ type: "highpass", f: 1800, d: 0.05, vol: 0.6 }), tone2({ f: [380, 480], f2: 170, d: 0.08, vol: 0.3 }), ...many2(4, () => noise2({ type: "bandpass", f: [2500, 4200], q: 3, d: 0.02, vol: 0.2, delay: [0.03, 0.25] }))]),
|
|
4982
4984
|
impact("mdf_puff", [noise2({ type: "lowpass", f: 900, d: 0.08, vol: 1 }), tone2({ f: [180, 230], f2: 110, d: 0.06, vol: 0.3 }), noise2({ type: "highpass", f: 3e3, a: 0.01, d: 0.2, vol: 0.1 })]),
|
|
4983
4985
|
// glass and ceramic
|
|
4984
4986
|
impact("glass_bullet", [noise2({ type: "highpass", f: 4e3, d: 0.05, vol: 0.7 }), tone2({ f: [3200, 4200], f2: 2600, d: 0.2, vol: 0.14, wet: 0.3 }), ...many2(4, () => tone2({ f: [4e3, 7e3], d: 0.05, vol: 0.07, delay: [0.02, 0.2] }))]),
|
|
@@ -5002,6 +5004,7 @@ var IMPACT_SOUNDS = [
|
|
|
5002
5004
|
impact("wax_hit", [noise2({ type: "lowpass", f: 800, d: 0.05, vol: 0.45 }), tone2({ f: [240, 280], f2: 180, d: 0.05, vol: 0.22 })]),
|
|
5003
5005
|
// soft things, paper, plants
|
|
5004
5006
|
impact("soft_bullet", [noise2({ type: "lowpass", f: 450, a: 3e-3, d: 0.1, vol: 1.8 }), noise2({ type: "bandpass", f: 900, q: 1, d: 0.05, vol: 0.5 })]),
|
|
5007
|
+
impact("fabric_hit", [noise2({ type: "lowpass", f: 650, d: 0.14, vol: 0.5 }), tone2({ f: [85, 115], f2: 50, d: 0.12, vol: 0.28 })]),
|
|
5005
5008
|
impact("fabric_rip", [noise2({ type: "bandpass", f: [2e3, 2800], q: 1.5, a: 0.02, d: 0.25, vol: 0.4 }), ...many2(4, () => noise2({ type: "bandpass", f: [3e3, 5e3], q: 4, d: 0.02, vol: 0.14, delay: [0, 0.22] }))]),
|
|
5006
5009
|
impact("paper_hit", [noise2({ type: "bandpass", f: 2200, q: 1, d: 0.05, vol: 0.45 })]),
|
|
5007
5010
|
impact("paper_tear", [noise2({ type: "highpass", f: 2500, a: 0.02, d: 0.3, vol: 0.15 })]),
|
|
@@ -5032,6 +5035,11 @@ var IMPACT_SOUND_KEYS = {
|
|
|
5032
5035
|
impact_wood_ballistic: { sound: "wood_hit" },
|
|
5033
5036
|
impact_wood_blunt: { sound: "wood_blunt" },
|
|
5034
5037
|
impact_wood_slash: { sound: "wood_blade" },
|
|
5038
|
+
break_wood: { sound: "wood_splinter" },
|
|
5039
|
+
// the art scene's key for a part splintering and for a round striking steel or wood: the recordings answer them too
|
|
5040
|
+
splinter: { sound: "wood_splinter" },
|
|
5041
|
+
shot_wood: { sound: "wood_splinter" },
|
|
5042
|
+
shot_metal: { sound: "metal_ping" },
|
|
5035
5043
|
impact_mdf_ballistic: { sound: "mdf_puff" },
|
|
5036
5044
|
impact_mdf_blunt: { sound: "mdf_puff", volumeScale: 0.8 },
|
|
5037
5045
|
impact_glass_ballistic: { sound: "glass_bullet" },
|
|
@@ -5052,6 +5060,7 @@ var IMPACT_SOUND_KEYS = {
|
|
|
5052
5060
|
impact_rubber: { sound: "rubber_hit" },
|
|
5053
5061
|
impact_wax: { sound: "wax_hit" },
|
|
5054
5062
|
impact_soft_ballistic: { sound: "soft_bullet" },
|
|
5063
|
+
impact_soft_blunt: { sound: "fabric_hit" },
|
|
5055
5064
|
impact_soft_slash: { sound: "fabric_rip" },
|
|
5056
5065
|
impact_paper: { sound: "paper_hit" },
|
|
5057
5066
|
impact_paper_slash: { sound: "paper_tear" },
|
|
@@ -5067,6 +5076,7 @@ var IMPACT_SOUND_KEYS = {
|
|
|
5067
5076
|
break_plastic: { sound: "plastic_crack" },
|
|
5068
5077
|
break_mdf: { sound: "mdf_crumble" },
|
|
5069
5078
|
break_soft: { sound: "fabric_rip" },
|
|
5079
|
+
break_fabric: { sound: "fabric_rip" },
|
|
5070
5080
|
break_paper: { sound: "paper_tear" },
|
|
5071
5081
|
break_plant: { sound: "branch_cut" }
|
|
5072
5082
|
};
|
|
@@ -5266,7 +5276,7 @@ function createDestructionSound(engine, options = {}) {
|
|
|
5266
5276
|
const wanted = rule.above && volume >= rule.above.volume ? rule.above.sound : rule.sound;
|
|
5267
5277
|
const sound = rule.fallback && !engine.registry.sound(wanted) ? rule.fallback : wanted;
|
|
5268
5278
|
const params = detail?.seconds === void 0 ? rule.params : { ...rule.params, seconds: detail.seconds };
|
|
5269
|
-
engine.play(sound, { position: point, volume: volume * (rule.volumeScale ?? 1), ...params ? { params } : {} });
|
|
5279
|
+
engine.play(sound, { position: point, volume: volume * (rule.volumeScale ?? 1), intensity: Math.min(1, Math.max(0, volume)), ...params ? { params } : {} });
|
|
5270
5280
|
},
|
|
5271
5281
|
update(dt) {
|
|
5272
5282
|
if (!crackles || fires.length === 0 || options.burnLoop === false) return;
|