@threenative/playtest 0.1.0 → 0.3.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/LICENSE +21 -0
- package/README.md +22 -3
- package/dist/capture.d.ts +48 -0
- package/dist/capture.js +87 -0
- package/dist/diagnostics-D89qJhf0.d.ts +841 -0
- package/dist/index.d.ts +53 -21
- package/dist/index.js +3536 -1919
- package/dist/protocol.d.ts +264 -0
- package/dist/protocol.js +42 -0
- package/dist/runner/cli.d.ts +33 -2
- package/dist/runner/cli.js +10100 -3761
- package/dist/runner/index.d.ts +401 -210
- package/dist/runner/index.js +8268 -3341
- package/dist/shared-Ax3-pneQ.d.ts +261 -0
- package/dist/three/index.d.ts +154 -26
- package/dist/three/index.js +617 -16
- package/package.json +13 -3
- package/dist/diagnostics-Ckm_5lrw.d.ts +0 -549
- package/dist/protocol-CeC1lz_G.d.ts +0 -130
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
declare const PLAYTEST_BRIDGE_GLOBAL = "__THREENATIVE_PLAYTEST_BRIDGE__";
|
|
2
|
-
declare const PLAYTEST_PROTOCOL_VERSION: 1;
|
|
3
|
-
declare const PLAYTEST_PROTOCOL_LIMITS: {
|
|
4
|
-
readonly maxEntitiesPerSample: 100;
|
|
5
|
-
readonly maxEventsPerDrain: 1000;
|
|
6
|
-
readonly maxPayloadBytes: 1000000;
|
|
7
|
-
readonly operationTimeoutMs: 5000;
|
|
8
|
-
};
|
|
9
|
-
type JsonPrimitive = boolean | number | string | null;
|
|
10
|
-
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
11
|
-
[key: string]: JsonValue;
|
|
12
|
-
};
|
|
13
|
-
type PlaytestClockMode = "fixed-step" | "render-frame" | "wall-clock";
|
|
14
|
-
interface IPlaytestBridgeDescription {
|
|
15
|
-
capabilities: readonly string[];
|
|
16
|
-
limits: typeof PLAYTEST_PROTOCOL_LIMITS;
|
|
17
|
-
name: string;
|
|
18
|
-
protocolVersion: typeof PLAYTEST_PROTOCOL_VERSION;
|
|
19
|
-
}
|
|
20
|
-
interface IPlaytestBridgeReady {
|
|
21
|
-
ready: boolean;
|
|
22
|
-
reason?: string;
|
|
23
|
-
}
|
|
24
|
-
interface IPlaytestEntityTransform {
|
|
25
|
-
position?: [number, number, number];
|
|
26
|
-
rotation?: [number, number, number, number];
|
|
27
|
-
scale?: [number, number, number];
|
|
28
|
-
}
|
|
29
|
-
interface IPlaytestSetupRequest {
|
|
30
|
-
entities?: Array<{
|
|
31
|
-
entity: string;
|
|
32
|
-
transform: IPlaytestEntityTransform;
|
|
33
|
-
}>;
|
|
34
|
-
resources?: Array<{
|
|
35
|
-
id: string;
|
|
36
|
-
path?: string;
|
|
37
|
-
value: JsonValue;
|
|
38
|
-
}>;
|
|
39
|
-
}
|
|
40
|
-
interface IPlaytestSampleRequest {
|
|
41
|
-
entities?: readonly string[];
|
|
42
|
-
include?: readonly string[];
|
|
43
|
-
resources?: readonly string[];
|
|
44
|
-
}
|
|
45
|
-
interface IPlaytestEntityObservation {
|
|
46
|
-
bounds?: {
|
|
47
|
-
height: number;
|
|
48
|
-
width: number;
|
|
49
|
-
x: number;
|
|
50
|
-
y: number;
|
|
51
|
-
};
|
|
52
|
-
id: string;
|
|
53
|
-
transform?: IPlaytestEntityTransform;
|
|
54
|
-
visible?: boolean;
|
|
55
|
-
}
|
|
56
|
-
interface IPlaytestAnimationObservation {
|
|
57
|
-
advancedFrames: number;
|
|
58
|
-
clip: string;
|
|
59
|
-
}
|
|
60
|
-
interface IPlaytestContactObservation {
|
|
61
|
-
entity: string;
|
|
62
|
-
kind: string;
|
|
63
|
-
with: string;
|
|
64
|
-
}
|
|
65
|
-
interface IPlaytestTagObservation {
|
|
66
|
-
count: number;
|
|
67
|
-
}
|
|
68
|
-
interface IPlaytestWorldRuntimeObservation {
|
|
69
|
-
agent: string;
|
|
70
|
-
core: string;
|
|
71
|
-
randomState: number;
|
|
72
|
-
rapier: string | null;
|
|
73
|
-
step: number;
|
|
74
|
-
}
|
|
75
|
-
interface IPlaytestWorldObservation {
|
|
76
|
-
runtime?: IPlaytestWorldRuntimeObservation;
|
|
77
|
-
seed: number | null;
|
|
78
|
-
}
|
|
79
|
-
interface IPlaytestGameplayObservation {
|
|
80
|
-
animation: Record<string, IPlaytestAnimationObservation>;
|
|
81
|
-
contacts?: IPlaytestContactObservation[];
|
|
82
|
-
states: Record<string, string>;
|
|
83
|
-
tags?: Record<string, IPlaytestTagObservation>;
|
|
84
|
-
world?: IPlaytestWorldObservation;
|
|
85
|
-
}
|
|
86
|
-
interface IPlaytestObservationSnapshot {
|
|
87
|
-
clock: {
|
|
88
|
-
mode: PlaytestClockMode;
|
|
89
|
-
tick?: number;
|
|
90
|
-
timeMs?: number;
|
|
91
|
-
};
|
|
92
|
-
diagnostics?: JsonValue[];
|
|
93
|
-
components?: Record<string, Record<string, JsonValue>>;
|
|
94
|
-
entities?: IPlaytestEntityObservation[];
|
|
95
|
-
gameplay?: IPlaytestGameplayObservation;
|
|
96
|
-
resources?: Record<string, JsonValue>;
|
|
97
|
-
}
|
|
98
|
-
interface IPlaytestAdvanceResult {
|
|
99
|
-
clock: IPlaytestObservationSnapshot["clock"];
|
|
100
|
-
ticks: number;
|
|
101
|
-
}
|
|
102
|
-
interface IPlaytestBridgeV1 {
|
|
103
|
-
advance?(ticks: number): Promise<IPlaytestAdvanceResult>;
|
|
104
|
-
applySetup?(request: IPlaytestSetupRequest): Promise<void>;
|
|
105
|
-
describe(): IPlaytestBridgeDescription | Promise<IPlaytestBridgeDescription>;
|
|
106
|
-
drainEvents?(limit?: number): Promise<JsonValue[]>;
|
|
107
|
-
focus?(): boolean | Promise<boolean>;
|
|
108
|
-
ready(): IPlaytestBridgeReady | Promise<IPlaytestBridgeReady>;
|
|
109
|
-
sample(request: IPlaytestSampleRequest): IPlaytestObservationSnapshot | Promise<IPlaytestObservationSnapshot>;
|
|
110
|
-
}
|
|
111
|
-
/** Request/response envelope used by the host-neutral device transport. */
|
|
112
|
-
interface IPlaytestDeviceRequest {
|
|
113
|
-
argument?: JsonValue;
|
|
114
|
-
id: string;
|
|
115
|
-
method: string;
|
|
116
|
-
}
|
|
117
|
-
interface IPlaytestDeviceResponse {
|
|
118
|
-
error?: {
|
|
119
|
-
message: string;
|
|
120
|
-
};
|
|
121
|
-
id: string;
|
|
122
|
-
result?: JsonValue;
|
|
123
|
-
}
|
|
124
|
-
interface IPlaytestBridgeHost {
|
|
125
|
-
[PLAYTEST_BRIDGE_GLOBAL]?: IPlaytestBridgeV1;
|
|
126
|
-
}
|
|
127
|
-
declare function jsonByteLength(value: JsonValue): number;
|
|
128
|
-
declare function assertJsonSafe(value: unknown, path?: string): asserts value is JsonValue;
|
|
129
|
-
|
|
130
|
-
export { type IPlaytestAdvanceResult as I, type JsonPrimitive as J, PLAYTEST_BRIDGE_GLOBAL as P, type IPlaytestAnimationObservation as a, type IPlaytestBridgeDescription as b, type IPlaytestBridgeHost as c, type IPlaytestBridgeReady as d, type IPlaytestBridgeV1 as e, type IPlaytestContactObservation as f, type IPlaytestDeviceRequest as g, type IPlaytestDeviceResponse as h, type IPlaytestEntityObservation as i, type IPlaytestEntityTransform as j, type IPlaytestGameplayObservation as k, type IPlaytestObservationSnapshot as l, type IPlaytestSampleRequest as m, type IPlaytestSetupRequest as n, type IPlaytestTagObservation as o, type IPlaytestWorldObservation as p, type IPlaytestWorldRuntimeObservation as q, type JsonValue as r, PLAYTEST_PROTOCOL_LIMITS as s, PLAYTEST_PROTOCOL_VERSION as t, type PlaytestClockMode as u, assertJsonSafe as v, jsonByteLength as w };
|