@adatechnology/game-audio 0.2.1 → 0.3.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.
- package/dist/index.d.ts +5 -0
- package/dist/index.global.js +18 -20
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +18 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -802,6 +802,11 @@ type AudioTestModuleOptions = {
|
|
|
802
802
|
seed?: number;
|
|
803
803
|
/** First sound chosen (default `bench_ping`). */
|
|
804
804
|
sound?: string;
|
|
805
|
+
/**
|
|
806
|
+
* Draws the thing the probe stands for, where the sound comes from with the `probe` source (for example a portable radio of `game-items-three`). The module
|
|
807
|
+
* draws nothing of its own: without it the area has no probe and the sounds come from the bench settings.
|
|
808
|
+
*/
|
|
809
|
+
probe?: (THREE: unknown) => unknown;
|
|
805
810
|
};
|
|
806
811
|
/** What the scenarios use of the context the test room passes. */
|
|
807
812
|
interface AudioScenarioLike {
|
package/dist/index.global.js
CHANGED
|
@@ -2025,25 +2025,23 @@ var GameAudio = (() => {
|
|
|
2025
2025
|
if (value > 0) loop?.set({ frequency: value });
|
|
2026
2026
|
}
|
|
2027
2027
|
};
|
|
2028
|
-
const items = () =>
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
}
|
|
2046
|
-
];
|
|
2028
|
+
const items = () => {
|
|
2029
|
+
const probe = options.probe;
|
|
2030
|
+
if (!probe) return [];
|
|
2031
|
+
return [
|
|
2032
|
+
{
|
|
2033
|
+
id: PROBE_ID,
|
|
2034
|
+
name: text.probe,
|
|
2035
|
+
movable: false,
|
|
2036
|
+
build: (THREE) => {
|
|
2037
|
+
const root = probe(THREE);
|
|
2038
|
+
root.userData = root.userData ?? {};
|
|
2039
|
+
root.userData[PROBE_ID] = true;
|
|
2040
|
+
return root;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
];
|
|
2044
|
+
};
|
|
2047
2045
|
const controls = () => [
|
|
2048
2046
|
{ kind: "choice", id: "sound", name: text.controls.sound, options: soundOptions(), default: state.sound },
|
|
2049
2047
|
{ kind: "choice", id: "source", name: text.controls.source, hint: text.hints.source, options: [{ id: "bench", name: text.options.bench }, { id: "probe", name: text.options.probe }], default: state.source },
|
|
@@ -2120,7 +2118,7 @@ var GameAudio = (() => {
|
|
|
2120
2118
|
}
|
|
2121
2119
|
];
|
|
2122
2120
|
const area = () => ({
|
|
2123
|
-
placements: [{ item: PROBE_ID, position: PROBE_AT, asleep: true }],
|
|
2121
|
+
placements: options.probe ? [{ item: PROBE_ID, position: PROBE_AT, asleep: true }] : [],
|
|
2124
2122
|
view: { eye: [0, 1.7, 3], target: [0, 1.4, -10] }
|
|
2125
2123
|
});
|
|
2126
2124
|
const module = {
|