@adatechnology/game-test-room 0.7.0 → 0.8.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 +13 -1
- package/dist/index.global.js +1788 -102
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as THREE_NS from 'three';
|
|
2
|
+
import { AudioEngine } from '@adatechnology/game-audio';
|
|
2
3
|
import { DestructibleSpec, Vec3, DestructionWorld, DestructionOptions, DestructionEvent, MaterialDef } from '@adatechnology/game-destruction';
|
|
3
4
|
export { DestructionEvent, Vec3 } from '@adatechnology/game-destruction';
|
|
4
5
|
import { SpecFromObjectOptions, DestructionRenderer, Quality } from '@adatechnology/game-destruction-three';
|
|
5
6
|
import { Arsenal, WeaponState, WeaponDef } from '@adatechnology/game-weapons';
|
|
6
7
|
import { FluidRenderer } from '@adatechnology/game-fluids-three';
|
|
7
8
|
import { ContainerSpec, FluidWorld, LiquidDef, ItemUseDef, SurfaceSpec } from '@adatechnology/game-fluids';
|
|
8
|
-
import { ModuleControl, ControlValue, ModuleLayer, DestructibleImpl, AnimationClipSpec, TestableModule } from '@adatechnology/game-contracts';
|
|
9
|
+
import { ModuleControl, ControlValue, ModuleLayer, DestructibleImpl, AnimationClipSpec, EnvironmentBus, TestableModule } from '@adatechnology/game-contracts';
|
|
9
10
|
export { AnimationClipSpec, DestructibleImpl, ItemAnimationContract, ModuleScenario, TestableItem, TestableModule } from '@adatechnology/game-contracts';
|
|
10
11
|
|
|
11
12
|
type NewEntry = NewLogEntry;
|
|
@@ -194,6 +195,13 @@ interface TestRoomOptions {
|
|
|
194
195
|
/** Called for every destruction event (to log, play sounds, sync over LAN). Fluid events reach the log too. */
|
|
195
196
|
onEvent?: (event: DestructionEvent) => void;
|
|
196
197
|
onSound?: (key: string, point: Vec3, volume: number) => void;
|
|
198
|
+
/**
|
|
199
|
+
* The sound engine of the room (@adatechnology/game-audio): the destruction renderer's sound keys play on it, and modules get it as `host.audio`.
|
|
200
|
+
* Default: a new engine of the room's own (it makes no AudioContext until the first sound); `false` for a silent room.
|
|
201
|
+
*/
|
|
202
|
+
audio?: AudioEngine | false;
|
|
203
|
+
/** The environment store modules get as `host.environment` (the weather module writes it, the others read it). Default: a new one with a calm dry day. */
|
|
204
|
+
environment?: EnvironmentBus;
|
|
197
205
|
/** Show the built-in HUD and panels (default true). */
|
|
198
206
|
ui?: boolean;
|
|
199
207
|
/** Room counters the bench panel shows and `TestRoom.metrics()` returns (default all); `false` for none. */
|
|
@@ -238,6 +246,10 @@ interface SpawnedObject {
|
|
|
238
246
|
movable: boolean;
|
|
239
247
|
}
|
|
240
248
|
interface TestRoom {
|
|
249
|
+
/** The room's sound engine, or `null` in a silent room. */
|
|
250
|
+
readonly audio: AudioEngine | null;
|
|
251
|
+
/** The environment store lent to modules as `host.environment`. */
|
|
252
|
+
readonly environment: EnvironmentBus;
|
|
241
253
|
readonly world: DestructionWorld;
|
|
242
254
|
readonly renderer: DestructionRenderer;
|
|
243
255
|
readonly scene: THREE_NS.Scene;
|