@adatechnology/game-test-room 0.26.0 → 0.28.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 +24 -2
- package/dist/index.global.js +901 -614
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +87 -6
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -485,7 +485,9 @@ interface RoomAvatar {
|
|
|
485
485
|
*/
|
|
486
486
|
eye?(out?: THREE_NS.Vector3): THREE_NS.Vector3;
|
|
487
487
|
/** Hides the head and neck from `camera` while the view is `first` (shadows, mirrors and other cameras keep seeing them). */
|
|
488
|
-
setView?(mode: CameraMode, camera: THREE_NS.Object3D | null
|
|
488
|
+
setView?(mode: CameraMode, camera: THREE_NS.Object3D | null, options?: {
|
|
489
|
+
readonly arms?: boolean;
|
|
490
|
+
}): void;
|
|
489
491
|
/**
|
|
490
492
|
* Plays the strike `clipId` (on the body, in both views) and answers the seconds until its impact, or null when this avatar has no such clip. The room then waits that long
|
|
491
493
|
* before the blow lands (`strikeClips`); an avatar without `strike`, or one that answers null, gets the blow at the click.
|
|
@@ -704,6 +706,19 @@ interface SceneryTap {
|
|
|
704
706
|
/** Turn about the vertical axis, radians (default 0). */
|
|
705
707
|
rotationY?: number;
|
|
706
708
|
}
|
|
709
|
+
/** What the room needs of first-person arms: a root it puts in the scene, and the pose of each frame (the eye, the hand targets of the tool and the stance, how fast the body moves). */
|
|
710
|
+
interface RoomFirstPersonArms {
|
|
711
|
+
readonly root: THREE_NS.Object3D;
|
|
712
|
+
update(dt: number, state: {
|
|
713
|
+
camera: THREE_NS.Object3D;
|
|
714
|
+
targets?: HandTargets | null;
|
|
715
|
+
stance?: string;
|
|
716
|
+
speed?: number;
|
|
717
|
+
running?: boolean;
|
|
718
|
+
crouch?: boolean;
|
|
719
|
+
}): void;
|
|
720
|
+
dispose(): void;
|
|
721
|
+
}
|
|
707
722
|
interface TestRoomOptions {
|
|
708
723
|
THREE: ThreeNamespace;
|
|
709
724
|
/** Element the bench fills (canvas + HUD). */
|
|
@@ -777,6 +792,8 @@ interface TestRoomOptions {
|
|
|
777
792
|
audio?: AudioEngine | false;
|
|
778
793
|
/** Where the kit's recorded sound files (game-audio `assets/sfx/`) are served, for the room's engine (default `./sfx/`); `null` plays the recipes only. */
|
|
779
794
|
samplesBaseUrl?: string | null;
|
|
795
|
+
/** The fitted copies of the recordings (`registerFittedSounds` of game-audio/fitted) in place of the older recipes of the same ids (default true). */
|
|
796
|
+
fittedSounds?: boolean;
|
|
780
797
|
/**
|
|
781
798
|
* Where the owner's own sounds are served (`sfx:user` of game-audio writes them to `.sfx-local/`, kept out of git), default `./sfx-local/`; `null`
|
|
782
799
|
* leaves them out. They load after the kit's: a sound the kit lacks plays the owner's file, and one the kit has keeps the kit's in front.
|
|
@@ -788,6 +805,11 @@ interface TestRoomOptions {
|
|
|
788
805
|
ui?: boolean;
|
|
789
806
|
/** The player's body (see `TestRoom.setAvatar`). */
|
|
790
807
|
avatar?: RoomAvatar;
|
|
808
|
+
/**
|
|
809
|
+
* Arms drawn for the first-person view (the viewmodel arms, `createFirstPersonArms` of game-characters-three fits it): in first person the room hides the body's arms from the eye, draws
|
|
810
|
+
* these on `FIRST_PERSON_LAYER` with the tool in the hands, and brings their hands to the tool's grips. Absent: the body's arms are the ones seen.
|
|
811
|
+
*/
|
|
812
|
+
firstPersonArms?: RoomFirstPersonArms;
|
|
791
813
|
/** The view the room starts in (default `first`; the V key and `TestRoom.setCameraMode` change it). */
|
|
792
814
|
cameraMode?: CameraMode;
|
|
793
815
|
/**
|
|
@@ -1297,4 +1319,4 @@ declare function encodeBenchState(controls: readonly BenchControl[], layers: rea
|
|
|
1297
1319
|
/** Reads an encoded state as hostile input: unknown ids, NaN, options not offered and malformed pairs are dropped; numbers are clamped. */
|
|
1298
1320
|
declare function decodeBenchState(encoded: string, controls: readonly ModuleControl[], layers: readonly ModuleLayer[]): Map<string, ControlValue>;
|
|
1299
1321
|
|
|
1300
|
-
export { type AnimationInfo, type BenchControl, type BenchHandle, type BenchLayer, type BuildFromSpecOptions, type CameraMode, DEFAULT_HAND_STANCES, DEFAULT_STRIKE_CLIPS, DEFAULT_TRIALS, type HudState, type InspectInfo, type KickLeg, LOADING_CLASS, LOADING_CSS, type LoadingOptions, type LoadingState, type LogEntry, MATERIAL_COLORS, type ModuleReport, type NewEntry, type NewLogEntry, type ProjectileModel, type ProjectileQuery, type PunchHand, type RoomAvatar, type RoomAvatarState, type RoomDoorEvent, type RoomDoorState, type RoomFirstPersonState, type RoomGraphicsOptions, type RoomLoading, type RoomMetricId, type RoomPushEvent, type RoomPushState, type RoomReachView, type RoomSeat, type RoomStrings, type ScenarioContext, type ScenarioReport, type SceneryObject, type SceneryTap, type SpawnedObject, type StrikeComboOption, TRIAL_KINDS, type TestRoom, type TestRoomItem, type TestRoomLocale, type TestRoomLog, type TestRoomOptions, type TestRoomScenario, type TestTable, type TestTableContext, type TestTableObject, type TestTableOptions, type TestTablePage, type ThirdPersonOptions, type ThreeNamespace, type ToolMenuGroup, type ToolMenuSection, type ToolMenuTool, type TrialKind, type TrialTool, type UseStatus, type WritableLog, brickWallSpec, buildFromSpec, createLoading, createLog, createTestRoom, createTestTable, decodeBenchState, encodeBenchState, fitRow, loadingMarkup, locales, nextPaint, resolveStrings, rowCentres, trialView };
|
|
1322
|
+
export { type AnimationInfo, type BenchControl, type BenchHandle, type BenchLayer, type BuildFromSpecOptions, type CameraMode, DEFAULT_HAND_STANCES, DEFAULT_STRIKE_CLIPS, DEFAULT_TRIALS, type HudState, type InspectInfo, type KickLeg, LOADING_CLASS, LOADING_CSS, type LoadingOptions, type LoadingState, type LogEntry, MATERIAL_COLORS, type ModuleReport, type NewEntry, type NewLogEntry, type ProjectileModel, type ProjectileQuery, type PunchHand, type RoomAvatar, type RoomAvatarState, type RoomDoorEvent, type RoomDoorState, type RoomFirstPersonArms, type RoomFirstPersonState, type RoomGraphicsOptions, type RoomLoading, type RoomMetricId, type RoomPushEvent, type RoomPushState, type RoomReachView, type RoomSeat, type RoomStrings, type ScenarioContext, type ScenarioReport, type SceneryObject, type SceneryTap, type SpawnedObject, type StrikeComboOption, TRIAL_KINDS, type TestRoom, type TestRoomItem, type TestRoomLocale, type TestRoomLog, type TestRoomOptions, type TestRoomScenario, type TestTable, type TestTableContext, type TestTableObject, type TestTableOptions, type TestTablePage, type ThirdPersonOptions, type ThreeNamespace, type ToolMenuGroup, type ToolMenuSection, type ToolMenuTool, type TrialKind, type TrialTool, type UseStatus, type WritableLog, brickWallSpec, buildFromSpec, createLoading, createLog, createTestRoom, createTestTable, decodeBenchState, encodeBenchState, fitRow, loadingMarkup, locales, nextPaint, resolveStrings, rowCentres, trialView };
|