@adatechnology/game-test-room 0.13.0 → 0.15.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/README.md +16 -0
- package/dist/index.d.ts +165 -17
- package/dist/index.global.js +558 -98
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +510 -92
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -94,6 +94,22 @@ A `SceneryObject` is `{ spec, position?, rotationY?, colors?, build?, label?, to
|
|
|
94
94
|
|
|
95
95
|
`tap` is the room's water tap: omitted, the room draws a post with an arm beside the table; `{ build(THREE), spout, position?, rotationY? }` puts the host's model there (the origin where it stands, `spout` where the water leaves it; by default it stands on the table top with the spout over its right half); `null` removes it.
|
|
96
96
|
|
|
97
|
+
## Test table
|
|
98
|
+
|
|
99
|
+
`room.testTable` lays the catalogue on a table a page at a time, so every item can be tried one by one with the same hit. The table is a `scenery` piece with a `top` (id `test_table`, or `testTable: { scenery }`); the room never draws one of its own, the host passes its model (the example uses the long dining table of the furniture catalogue, `furnitureSpec` of `game-floorplan-three`). Without that piece the table lays nothing; `testTable: false` also leaves the panel out.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
createTestRoom({ ..., scenery: { test_table: { spec, build, top, position: [-8, 0, 3] } } })
|
|
103
|
+
room.testTable.open('Items') // clears the room and lays the first page of the group along the front edge of the table
|
|
104
|
+
room.testTable.next() // the next page (a page holds what fits on the table)
|
|
105
|
+
room.testTable.find('item_canned_beans') // the page that holds that item, with it picked
|
|
106
|
+
room.testTable.select(objectId) // the item the trials hit (the first one until another is picked)
|
|
107
|
+
room.testTable.trial('shot') // 'shot' | 'punch' | 'stab' | 'fire' | 'blast'
|
|
108
|
+
room.testTable.relay() // puts the table and the page back as they were
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
A trial equips its tool, puts the player in front of the item, aims at its centre and uses the tool: a 9 mm pistol from 2.5 m, the fists and a knife up close, a flamethrower burst from 1.6 m, and a fragmentation grenade set off just behind the item (`DEFAULT_TRIALS`; `testTable: { trials: { shot: { weapon: 'rifle_5_56' } } }` changes one). What happens goes to the log like any other hit. With the UI on, the **Test table** panel (between the inspector and the log) has the group, the pages, a search that lays the page of an item, the items on the table (a click picks one) and a button per trial plus **Put back**.
|
|
112
|
+
|
|
97
113
|
## Models of thrown and placed explosives
|
|
98
114
|
|
|
99
115
|
The room knows the arsenal's ids, not the weapons' models. `projectileModel({ weapon, explosive, kind })` (`kind`: `grenade`, `molotov`, `rocket` or `charge`) is the host's hook: it answers `{ model, axis? }` (`axis`: the length of the model, default +y; a rocket points it along its flight) or `null`, and the room draws a plain primitive (a sphere, a cylinder, a box) only where it answers nothing. `@adatechnology/game-weapons-three` has one: `projectileModel(THREE, query)`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as THREE_NS from 'three';
|
|
2
2
|
import { AudioEngine } from '@adatechnology/game-audio';
|
|
3
|
-
import { Vec3, DestructionWorld, BlastOptions, DestructibleSpec, DestructionOptions, DestructionEvent } from '@adatechnology/game-destruction';
|
|
3
|
+
import { Vec3 as Vec3$1, DestructionWorld, BlastOptions, DestructibleSpec, DestructionOptions, DestructionEvent } from '@adatechnology/game-destruction';
|
|
4
4
|
export { DestructionEvent, Vec3 } from '@adatechnology/game-destruction';
|
|
5
|
-
import { BusySink, HandTargets, ModuleControl, ControlValue, ModuleLayer, EnvironmentBus, BusyTask, BusyOptions, TestableModule, DestructibleImpl, AnimationClipSpec, BlastShoveOptions } from '@adatechnology/game-contracts';
|
|
5
|
+
import { BusySink, Vec3, HandTargets, ModuleControl, ControlValue, ModuleLayer, EnvironmentBus, BusyTask, BusyOptions, TestableModule, DestructibleImpl, AnimationClipSpec, BlastShoveOptions } from '@adatechnology/game-contracts';
|
|
6
6
|
export { AnimationClipSpec, DestructibleImpl, ItemAnimationContract, ModuleScenario, TestableItem, TestableModule } from '@adatechnology/game-contracts';
|
|
7
7
|
import { DestructionRenderer, SpecFromObjectOptions, Quality } from '@adatechnology/game-destruction-three';
|
|
8
8
|
import { Arsenal, WeaponState, WeaponDef } from '@adatechnology/game-weapons';
|
|
@@ -63,6 +63,140 @@ interface LogOptions {
|
|
|
63
63
|
}
|
|
64
64
|
declare function createLog(options?: LogOptions): WritableLog;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* What a trial does to one object: a shot, a punch, a knife blow, a flame on it or a blast beside it. The test table runs one on the object it has picked, so every item of the
|
|
68
|
+
* catalogue can be tried one by one with the same hit.
|
|
69
|
+
*/
|
|
70
|
+
type TrialKind = 'shot' | 'punch' | 'stab' | 'fire' | 'blast';
|
|
71
|
+
declare const TRIAL_KINDS: readonly TrialKind[];
|
|
72
|
+
/**
|
|
73
|
+
* How the room runs a trial: the tool (an id of the arsenal), where the player stands and how long the trigger is held.
|
|
74
|
+
* `distance` is metres from the front face of the object (the side the player comes from) to the eye, `lift` metres the eye is above the object's centre, `hold` seconds the
|
|
75
|
+
* trigger stays down (a flame). For `blast` the explosive of `weapon` goes off `distance` metres behind the object, and the player watches from `watch` metres in front.
|
|
76
|
+
*/
|
|
77
|
+
interface TrialTool {
|
|
78
|
+
readonly weapon: string;
|
|
79
|
+
readonly distance: number;
|
|
80
|
+
readonly lift: number;
|
|
81
|
+
readonly hold?: number;
|
|
82
|
+
readonly watch?: number;
|
|
83
|
+
}
|
|
84
|
+
/** The tools of the trials: a 9 mm pistol, the fists, a knife, a flamethrower and a fragmentation grenade, all of the default arsenal. */
|
|
85
|
+
declare const DEFAULT_TRIALS: Readonly<Record<TrialKind, TrialTool>>;
|
|
86
|
+
/** The test table: which piece of the arena it is, the gap between the things laid on it and the trial tools (each one replaces the default's fields it gives). */
|
|
87
|
+
interface TestTableOptions {
|
|
88
|
+
/** Id of the `scenery` piece with a `top` the items are laid on (default `test_table`). */
|
|
89
|
+
readonly scenery?: string;
|
|
90
|
+
/** Metres between two items on the table (default 0.12). */
|
|
91
|
+
readonly gap?: number;
|
|
92
|
+
/** Metres kept free at each end of the table (default 0.1). */
|
|
93
|
+
readonly margin?: number;
|
|
94
|
+
readonly trials?: Partial<Record<TrialKind, Partial<TrialTool>>>;
|
|
95
|
+
}
|
|
96
|
+
/** One item laid on the table. */
|
|
97
|
+
interface TestTableObject {
|
|
98
|
+
readonly objectId: string;
|
|
99
|
+
readonly itemId: string;
|
|
100
|
+
readonly name: string;
|
|
101
|
+
}
|
|
102
|
+
/** The page of a group that lies on the table now. */
|
|
103
|
+
interface TestTablePage {
|
|
104
|
+
/** The catalogue group (its translated name, as the catalogue tabs show it). */
|
|
105
|
+
readonly group: string;
|
|
106
|
+
/** Index of the page, from 0. */
|
|
107
|
+
readonly page: number;
|
|
108
|
+
/** Index in the group of the first item on the table, and how many the group has. */
|
|
109
|
+
readonly first: number;
|
|
110
|
+
readonly total: number;
|
|
111
|
+
readonly objects: readonly TestTableObject[];
|
|
112
|
+
/** The object the trials hit (the first one until another is picked). */
|
|
113
|
+
readonly selected: string | null;
|
|
114
|
+
readonly hasPrev: boolean;
|
|
115
|
+
readonly hasNext: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** The test table of the room: lays a group of the catalogue on the table a page at a time, picks one object and runs the trials on it. */
|
|
118
|
+
interface TestTable {
|
|
119
|
+
/** The groups of the catalogue that can be laid (every group with items). */
|
|
120
|
+
groups(): string[];
|
|
121
|
+
/** Every item that can be laid, with its group (what a search looks in). */
|
|
122
|
+
items(): Array<{
|
|
123
|
+
id: string;
|
|
124
|
+
name: string;
|
|
125
|
+
group: string;
|
|
126
|
+
}>;
|
|
127
|
+
/** Clears the room and lays page `page` (default 0) of `group`; null when the room has no table or the group no items. */
|
|
128
|
+
open(group: string, page?: number): TestTablePage | null;
|
|
129
|
+
next(): TestTablePage | null;
|
|
130
|
+
prev(): TestTablePage | null;
|
|
131
|
+
/** Lays the page of the group that holds `itemId` and picks it; null when no group has it (or the room has no table). */
|
|
132
|
+
find(itemId: string): TestTablePage | null;
|
|
133
|
+
/** Puts the table and the page back as they were before the trials: everything is restored and laid again. */
|
|
134
|
+
relay(): TestTablePage | null;
|
|
135
|
+
state(): TestTablePage | null;
|
|
136
|
+
/** Picks the object the trials hit; false when it is not on the table. */
|
|
137
|
+
select(objectId: string): boolean;
|
|
138
|
+
/** Runs a trial on the picked object (or on `objectId`): the room equips the tool, puts the player in front of it, aims and uses it. False when there is nothing to hit. */
|
|
139
|
+
trial(kind: TrialKind, objectId?: string): boolean;
|
|
140
|
+
/** Follow the table: a page laid, an object picked, a trial run. Returns the unsubscribe function. */
|
|
141
|
+
on(listener: (page: TestTablePage | null) => void): () => void;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* How many items, from `start`, fit side by side along a table of `length` metres with `gap` between them (`width(i)` is the width of item i). At least one, so an item longer
|
|
145
|
+
* than the table still gets a page of its own. Pure.
|
|
146
|
+
*/
|
|
147
|
+
declare function fitRow(width: (index: number) => number, start: number, total: number, length: number, gap: number): number;
|
|
148
|
+
/** The x of the centre of each item of a row laid side by side, centred on `centreX`, with `gap` between them. Pure. */
|
|
149
|
+
declare function rowCentres(widths: readonly number[], centreX: number, gap: number): number[];
|
|
150
|
+
/**
|
|
151
|
+
* Where the player's eye goes for a trial on an object whose box is `min`..`max` (world), and where it looks. The player comes from +z (the side of the room the table faces),
|
|
152
|
+
* so a melee blow lands on the front face. A blast is watched from `watch` metres. Pure.
|
|
153
|
+
*/
|
|
154
|
+
declare function trialView(tool: TrialTool, kind: TrialKind, min: Vec3, max: Vec3): {
|
|
155
|
+
eye: Vec3;
|
|
156
|
+
target: Vec3;
|
|
157
|
+
};
|
|
158
|
+
/** What the test table needs of the room. */
|
|
159
|
+
interface TestTableContext {
|
|
160
|
+
/** The catalogue by group: the ids and names of the items of each one. */
|
|
161
|
+
readonly groups: () => ReadonlyMap<string, ReadonlyArray<{
|
|
162
|
+
readonly id: string;
|
|
163
|
+
readonly name: string;
|
|
164
|
+
}>>;
|
|
165
|
+
/** The top of the table in the world (null: the room has no such piece, or its top is broken). */
|
|
166
|
+
readonly top: () => {
|
|
167
|
+
readonly minX: number;
|
|
168
|
+
readonly maxX: number;
|
|
169
|
+
readonly minZ: number;
|
|
170
|
+
readonly maxZ: number;
|
|
171
|
+
readonly top: number;
|
|
172
|
+
} | null;
|
|
173
|
+
/** Width (x) and depth (z) of an item's model at rotation 0, metres. */
|
|
174
|
+
readonly measure: (itemId: string) => {
|
|
175
|
+
readonly w: number;
|
|
176
|
+
readonly d: number;
|
|
177
|
+
};
|
|
178
|
+
readonly spawn: (itemId: string, position: Vec3) => {
|
|
179
|
+
readonly objectId: string;
|
|
180
|
+
};
|
|
181
|
+
readonly clear: () => void;
|
|
182
|
+
readonly resetAll: () => void;
|
|
183
|
+
/** The world box of an object still in the room, else null. */
|
|
184
|
+
readonly box: (objectId: string) => {
|
|
185
|
+
readonly min: Vec3;
|
|
186
|
+
readonly max: Vec3;
|
|
187
|
+
} | null;
|
|
188
|
+
/** Puts the tool in hand (added to the hotbar) and waits for its draw. False for an id the arsenal does not have. */
|
|
189
|
+
readonly equip: (weapon: string) => boolean;
|
|
190
|
+
readonly look: (eye: Vec3, target: Vec3) => void;
|
|
191
|
+
readonly use: (hold: number) => void;
|
|
192
|
+
/** Sets off the explosive of `weapon` at `point`. False when the weapon throws or places no explosive. */
|
|
193
|
+
readonly blastAt: (weapon: string, point: Vec3) => boolean;
|
|
194
|
+
readonly log: (type: string, text: string, data: Record<string, unknown>) => void;
|
|
195
|
+
readonly translate: (key: string, vars?: Record<string, string | number>) => string;
|
|
196
|
+
}
|
|
197
|
+
/** The test table over a room (see `TestTable`). */
|
|
198
|
+
declare function createTestTable(context: TestTableContext, options?: TestTableOptions): TestTable;
|
|
199
|
+
|
|
66
200
|
/** Locales shipped with the package. Unknown locales fall back to `en`. */
|
|
67
201
|
type TestRoomLocale = 'en' | 'pt-BR';
|
|
68
202
|
interface RoomStrings {
|
|
@@ -289,7 +423,7 @@ interface TestRoomItem {
|
|
|
289
423
|
container: ContainerSpec;
|
|
290
424
|
part?: string;
|
|
291
425
|
uses?: string[];
|
|
292
|
-
offset?: Vec3;
|
|
426
|
+
offset?: Vec3$1;
|
|
293
427
|
};
|
|
294
428
|
/** The item is also a weapon the player can equip from the catalogue (e.g. a crowbar, a knife, a pistol on the table). */
|
|
295
429
|
weapon?: string;
|
|
@@ -313,7 +447,7 @@ interface SceneryObject {
|
|
|
313
447
|
/** What the destruction world is given. */
|
|
314
448
|
spec: DestructibleSpec;
|
|
315
449
|
/** World position of the spec's origin. Required for a new id; for a default id it defaults to the object it replaces. */
|
|
316
|
-
position?: Vec3;
|
|
450
|
+
position?: Vec3$1;
|
|
317
451
|
/** Turn about the vertical axis, radians (default 0). */
|
|
318
452
|
rotationY?: number;
|
|
319
453
|
/** Colour per part id, then per material id, for the default drawing (`buildFromSpec`). */
|
|
@@ -336,7 +470,7 @@ interface SceneryObject {
|
|
|
336
470
|
/**
|
|
337
471
|
* Where a water tap of the piece pours (a sink, a tub), in the spec's space: the room's tap (its stream and its HUD button) pours there, and the piece's own model is the tap. The first piece with a `spout` wins over the table tap.
|
|
338
472
|
*/
|
|
339
|
-
spout?: Vec3;
|
|
473
|
+
spout?: Vec3$1;
|
|
340
474
|
}
|
|
341
475
|
/** What the room asks when something thrown or set down needs a model: the tool in the hand, the explosive it carries (an id of the arsenal) and how it is used. */
|
|
342
476
|
interface ProjectileQuery {
|
|
@@ -347,16 +481,16 @@ interface ProjectileQuery {
|
|
|
347
481
|
/** A model for a projectile: the object, and the axis along its length (default +y, what the room's own primitives use; a rocket points that axis along its flight). */
|
|
348
482
|
interface ProjectileModel {
|
|
349
483
|
model: THREE_NS.Object3D;
|
|
350
|
-
axis?: Vec3;
|
|
484
|
+
axis?: Vec3$1;
|
|
351
485
|
}
|
|
352
486
|
/** The room's tap (a stream of water): how it is drawn and where the water leaves it. */
|
|
353
487
|
interface SceneryTap {
|
|
354
488
|
/** Draws the tap in its own space (the origin where it stands). */
|
|
355
489
|
build: (THREE: ThreeNamespace) => THREE_NS.Object3D;
|
|
356
490
|
/** Where the water leaves the spout, in the space of the model. */
|
|
357
|
-
spout: Vec3;
|
|
491
|
+
spout: Vec3$1;
|
|
358
492
|
/** World position of the model's origin. Default: standing on the `table` top, with the spout over its right half (no table, no tap). */
|
|
359
|
-
position?: Vec3;
|
|
493
|
+
position?: Vec3$1;
|
|
360
494
|
/** Turn about the vertical axis, radians (default 0). */
|
|
361
495
|
rotationY?: number;
|
|
362
496
|
}
|
|
@@ -416,7 +550,7 @@ interface TestRoomOptions {
|
|
|
416
550
|
area?: string;
|
|
417
551
|
/** Called for every destruction event (to log, play sounds, sync over LAN). Fluid events reach the log too. */
|
|
418
552
|
onEvent?: (event: DestructionEvent) => void;
|
|
419
|
-
onSound?: (key: string, point: Vec3, volume: number) => void;
|
|
553
|
+
onSound?: (key: string, point: Vec3$1, volume: number) => void;
|
|
420
554
|
/**
|
|
421
555
|
* 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`.
|
|
422
556
|
* Default: a new engine of the room's own (it makes no AudioContext until the first sound); `false` for a silent room.
|
|
@@ -459,6 +593,11 @@ interface TestRoomOptions {
|
|
|
459
593
|
readonly state?: Readonly<Record<string, string>>;
|
|
460
594
|
readonly onChange?: (moduleId: string, encoded: string) => void;
|
|
461
595
|
};
|
|
596
|
+
/**
|
|
597
|
+
* The test table (`room.testTable`): a `scenery` piece with a `top` (default id `test_table`) the room lays a group of the catalogue on, a page at a time, to try each item with a
|
|
598
|
+
* shot, a punch, a knife, a flame or a blast. Without that piece the table lays nothing; `false` leaves the panel out too.
|
|
599
|
+
*/
|
|
600
|
+
testTable?: TestTableOptions | false;
|
|
462
601
|
}
|
|
463
602
|
/** Counters the room measures itself. `fps` and `frame_ms` use the real frame time, so slow motion does not change them. */
|
|
464
603
|
type RoomMetricId = 'fps' | 'frame_ms' | 'draw_calls' | 'triangles' | 'objects' | 'fragments' | 'particles' | 'decals'
|
|
@@ -500,8 +639,10 @@ interface TestRoom {
|
|
|
500
639
|
readonly renderer: DestructionRenderer;
|
|
501
640
|
readonly scene: THREE_NS.Scene;
|
|
502
641
|
readonly camera: THREE_NS.PerspectiveCamera;
|
|
642
|
+
/** The test table: lays the catalogue on the `test_table` piece a page at a time and runs the trials (shot, punch, knife, fire, blast) on one item. */
|
|
643
|
+
readonly testTable: TestTable;
|
|
503
644
|
/** Spawn a catalogue item at a world position (default in front of the player). */
|
|
504
|
-
spawn(itemId: string, position?: Vec3, rotationY?: number): SpawnedObject;
|
|
645
|
+
spawn(itemId: string, position?: Vec3$1, rotationY?: number): SpawnedObject;
|
|
505
646
|
/** Remove every spawned object, fragment and particle. */
|
|
506
647
|
clear(): void;
|
|
507
648
|
/** Repair every spawned object in place. */
|
|
@@ -517,14 +658,14 @@ interface TestRoom {
|
|
|
517
658
|
readonly tool: WeaponState;
|
|
518
659
|
/** Play an item use on the held item (`drink`, `pour`...). Returns false when nothing is held or the use does not apply. */
|
|
519
660
|
useItem(useId: string): boolean;
|
|
520
|
-
/** Use the current tool once from the camera (tests and scripted demos). `hold` seconds for continuous tools. */
|
|
661
|
+
/** Use the current tool once from the camera (tests and scripted demos), as the click does: bare hands punch (or let go of what they hold). `hold` seconds for continuous tools. */
|
|
521
662
|
use(hold?: number): void;
|
|
522
663
|
/** Grab what the camera looks at (or drop what is held). */
|
|
523
664
|
grab(): boolean;
|
|
524
665
|
/** Throw what is held at `speed` m/s (default 9). */
|
|
525
666
|
throwHeld(speed?: number): boolean;
|
|
526
667
|
/** Point the camera (scripted demos and tests). */
|
|
527
|
-
look(position: Vec3, target: Vec3): void;
|
|
668
|
+
look(position: Vec3$1, target: Vec3$1): void;
|
|
528
669
|
/** Object and part the camera looks at, with its state, for the inspector. */
|
|
529
670
|
inspect(): {
|
|
530
671
|
objectId: string;
|
|
@@ -551,7 +692,7 @@ interface TestRoom {
|
|
|
551
692
|
resume(): void;
|
|
552
693
|
readonly paused: boolean;
|
|
553
694
|
/** Walk the player in a straight line to the floor position `to` (x and z; y is ignored) over `seconds` of simulated time, during the next `step()` / frames. Colliders still block. 0 seconds moves at once. */
|
|
554
|
-
walk(to: Vec3, seconds: number): void;
|
|
695
|
+
walk(to: Vec3$1, seconds: number): void;
|
|
555
696
|
/** 0.25x simulation speed. */
|
|
556
697
|
setSlowMotion(on: boolean): void;
|
|
557
698
|
/** Run the simulation 10x per frame (fire, melting and drying take a tenth of the time). */
|
|
@@ -563,6 +704,13 @@ interface TestRoom {
|
|
|
563
704
|
* that brings an `area` is laid out by it; any other group is laid in rows (small items in front, fixed big ones behind). Unknown: nothing.
|
|
564
705
|
*/
|
|
565
706
|
openArea(group: string): SpawnedObject[];
|
|
707
|
+
/** The loaded modules (`loadModule`): id, name, catalogue group and whether it lays an area of its own. */
|
|
708
|
+
modules(): Array<{
|
|
709
|
+
id: string;
|
|
710
|
+
name: string;
|
|
711
|
+
group?: string;
|
|
712
|
+
hasArea: boolean;
|
|
713
|
+
}>;
|
|
566
714
|
/**
|
|
567
715
|
* `openArea` with the loading indicator: shows "Opening <area>…", waits for it to be painted and then lays the area (an area with hundreds of items takes a second or more and would
|
|
568
716
|
* otherwise look frozen). Resolves with the spawned objects. Use it where a person waits for the result (a page that opens an area on load); scenarios call `openArea`, which is synchronous.
|
|
@@ -623,8 +771,8 @@ interface TestRoom {
|
|
|
623
771
|
};
|
|
624
772
|
/** Draws the room from another camera (a debug view: the player's camera, the arms and the tool stay as they are) until it is given null. Look at the arms from the side or at a hand from 25 cm. */
|
|
625
773
|
setDebugCamera(view: {
|
|
626
|
-
position: Vec3;
|
|
627
|
-
target: Vec3;
|
|
774
|
+
position: Vec3$1;
|
|
775
|
+
target: Vec3$1;
|
|
628
776
|
fov?: number;
|
|
629
777
|
} | null): void;
|
|
630
778
|
/** What the avatar was last given. */
|
|
@@ -766,7 +914,7 @@ interface ScenarioReport {
|
|
|
766
914
|
declare function createTestRoom(options: TestRoomOptions): TestRoom;
|
|
767
915
|
|
|
768
916
|
/** Spec of the brick target wall: `cols` x `rows` brick panels, the bottom row anchored, mortar joints between neighbours. */
|
|
769
|
-
declare function brickWallSpec(cols?: number, rows?: number, panel?: Vec3): DestructibleSpec;
|
|
917
|
+
declare function brickWallSpec(cols?: number, rows?: number, panel?: Vec3$1): DestructibleSpec;
|
|
770
918
|
|
|
771
919
|
/** Default look of each built-in destruction material (`0xRRGGBB`). */
|
|
772
920
|
declare const MATERIAL_COLORS: Record<string, number>;
|
|
@@ -805,4 +953,4 @@ declare function encodeBenchState(controls: readonly BenchControl[], layers: rea
|
|
|
805
953
|
/** Reads an encoded state as hostile input: unknown ids, NaN, options not offered and malformed pairs are dropped; numbers are clamped. */
|
|
806
954
|
declare function decodeBenchState(encoded: string, controls: readonly ModuleControl[], layers: readonly ModuleLayer[]): Map<string, ControlValue>;
|
|
807
955
|
|
|
808
|
-
export { type AnimationInfo, type BenchControl, type BenchHandle, type BenchLayer, type BuildFromSpecOptions, type CameraMode, DEFAULT_HAND_STANCES, DEFAULT_STRIKE_CLIPS, 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 RoomAvatar, type RoomAvatarState, type RoomFirstPersonState, type RoomLoading, type RoomMetricId, type RoomStrings, type ScenarioContext, type ScenarioReport, type SceneryObject, type SceneryTap, type SpawnedObject, type TestRoom, type TestRoomItem, type TestRoomLocale, type TestRoomLog, type TestRoomOptions, type TestRoomScenario, type ThirdPersonOptions, type ThreeNamespace, type WritableLog, brickWallSpec, buildFromSpec, createLoading, createLog, createTestRoom, decodeBenchState, encodeBenchState, loadingMarkup, locales, nextPaint, resolveStrings };
|
|
956
|
+
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 RoomAvatar, type RoomAvatarState, type RoomFirstPersonState, type RoomLoading, type RoomMetricId, type RoomStrings, type ScenarioContext, type ScenarioReport, type SceneryObject, type SceneryTap, type SpawnedObject, 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 TrialKind, type TrialTool, type WritableLog, brickWallSpec, buildFromSpec, createLoading, createLog, createTestRoom, createTestTable, decodeBenchState, encodeBenchState, fitRow, loadingMarkup, locales, nextPaint, resolveStrings, rowCentres, trialView };
|