@adatechnology/game-test-room 0.26.0 → 0.27.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 +2 -0
- package/dist/index.global.js +735 -571
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// src/room.ts
|
|
2
2
|
import { createDestruction, JOINT_DEFAULTS, resolveStrings as resolveDestructionStrings } from "@adatechnology/game-destruction";
|
|
3
3
|
import { createAudioEngine, createAudioSink, loadKitSamples, loadUserSamples } from "@adatechnology/game-audio";
|
|
4
|
-
import {
|
|
4
|
+
import { registerFittedSounds } from "@adatechnology/game-audio/fitted";
|
|
5
|
+
import { createDestructionRenderer, createDestructionSound, dragSoundKey, impactKey, impactSoundIds, impactSoundKeys, specFromObject3D } from "@adatechnology/game-destruction-three";
|
|
5
6
|
import { bodyMass, KNOCK_CHEST, KNOCK_DOWN_SPEED, knockOf, surfaceOfMaterial } from "@adatechnology/game-contracts";
|
|
6
7
|
|
|
7
8
|
// src/body-sounds.ts
|
|
@@ -5577,13 +5578,14 @@ function createTestRoom(options) {
|
|
|
5577
5578
|
const preload = () => {
|
|
5578
5579
|
window.removeEventListener("keydown", preload, true);
|
|
5579
5580
|
window.removeEventListener("pointerdown", preload, true);
|
|
5580
|
-
void audio.loadSamples([...HAND_RECORDED_IDS]).catch(() => void 0);
|
|
5581
|
+
void audio.loadSamples([...HAND_RECORDED_IDS, ...impactSoundIds()]).catch(() => void 0);
|
|
5581
5582
|
};
|
|
5582
5583
|
window.addEventListener("keydown", preload, true);
|
|
5583
5584
|
window.addEventListener("pointerdown", preload, true);
|
|
5584
5585
|
});
|
|
5585
5586
|
}
|
|
5586
5587
|
const bodySounds = createBodySounds(audio);
|
|
5588
|
+
if (audio && options.fittedSounds !== false) registerFittedSounds(audio);
|
|
5587
5589
|
const playSound = (key2, point, volume, detail) => {
|
|
5588
5590
|
destructionSound?.onSound(key2, point, volume, detail);
|
|
5589
5591
|
if (detail) options.onSound?.(key2, point, volume, detail);
|