@3dverse/livelink.core 0.7.12 → 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/_prebuild/EditorMessageHandler.d.ts +5 -5
- package/dist/_prebuild/GatewayConnection.d.ts +6 -0
- package/dist/_prebuild/GatewayMessageHandler.d.ts +7 -4
- package/dist/_prebuild/enums.d.ts +4 -1
- package/dist/_prebuild/messages/editor/ConnectConfirmation.d.ts +18 -17
- package/dist/_prebuild/messages/editor/EditorEntity.d.ts +52 -3
- package/dist/_prebuild/messages/editor/EntityCreationCoreOptions.d.ts +6 -0
- package/dist/_prebuild/messages/editor/EntityUpdatedEvent.d.ts +1 -1
- package/dist/_prebuild/messages/editor/EntityVisibilityChangedEvent.d.ts +3 -0
- package/dist/_prebuild/messages/editor/UpdateComponentsCommand.d.ts +3 -3
- package/dist/_prebuild/messages/editor/index.d.ts +1 -1
- package/dist/_prebuild/messages/gateway/AssetLoadingEvent.d.ts +2 -2
- package/dist/_prebuild/messages/gateway/AssignClientToScriptMessage.d.ts +3 -2
- package/dist/_prebuild/messages/gateway/AuthenticationResponse.d.ts +3 -3
- package/dist/_prebuild/messages/gateway/ClientConfig.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/ClientConfigResponse.d.ts +3 -3
- package/dist/_prebuild/messages/gateway/FireEventMessage.d.ts +3 -3
- package/dist/_prebuild/messages/gateway/FrameData.d.ts +5 -5
- package/dist/_prebuild/messages/gateway/HighlightEntitiesMessage.d.ts +3 -3
- package/dist/_prebuild/messages/gateway/InputState.d.ts +3 -3
- package/dist/_prebuild/messages/gateway/RemoveComponentsCommand.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/RemoveFilterMessage.d.ts +4 -3
- package/dist/_prebuild/messages/gateway/ResizeResponse.d.ts +2 -2
- package/dist/_prebuild/messages/gateway/ScreenSpaceRayQuery.d.ts +4 -3
- package/dist/_prebuild/messages/gateway/ScreenSpaceRayResult.d.ts +2 -2
- package/dist/_prebuild/messages/gateway/ScriptEvent.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/SendSkeletonPoseMessage.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/SessionAuth.d.ts +1 -1
- package/dist/_prebuild/messages/gateway/SetFilterMessage.d.ts +4 -3
- package/dist/_prebuild/messages/gateway/ToggleFilterMessage.d.ts +4 -3
- package/dist/_prebuild/messages/gateway/UpdateEntitiesFromBytesMessage.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/UpdateEntitiesFromJsonMessage.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/ViewportConfig.d.ts +4 -4
- package/dist/_prebuild/messages/gateway/enums.d.ts +6 -6
- package/dist/_prebuild/types/ComponentsHashes.d.ts +53 -0
- package/dist/_prebuild/types/ComponentsRecord.d.ts +186 -0
- package/dist/_prebuild/types/SceneSettingsRecord.d.ts +50 -0
- package/dist/_prebuild/types/assets.d.ts +27 -23
- package/dist/_prebuild/types/components.d.ts +380 -318
- package/dist/_prebuild/types/{settings.d.ts → sceneSettings.d.ts} +85 -70
- package/dist/sources/ActivityWatcher.d.ts +44 -0
- package/dist/sources/LivelinkCore.d.ts +12 -11
- package/dist/sources/RequestHandler.d.ts +2 -0
- package/dist/sources/Serializer.d.ts +6 -6
- package/dist/sources/{types/constants.d.ts → constants.d.ts} +2 -2
- package/dist/sources/controllers/GatewayController.d.ts +10 -3
- package/dist/sources/core.d.ts +25 -5
- package/dist/sources/interfaces/ClientInterface.d.ts +5 -0
- package/dist/sources/interfaces/EntityInterface.d.ts +11 -0
- package/dist/sources/interfaces/SessionInterface.d.ts +9 -4
- package/dist/sources/types/RTID.d.ts +4 -3
- package/dist/sources/types/UUID.d.ts +4 -4
- package/dist/sources/types/dataObjects.d.ts +52 -0
- package/dist/sources/types/index.d.ts +2 -5
- package/dist/sources/types/math.d.ts +38 -17
- package/dist/sources/types/nativeTypes.d.ts +84 -13
- package/package.json +10 -2
- package/dist/_prebuild/messages/editor/EntityCreationOptions.d.ts +0 -6
- package/dist/sources/controllers/ActivityWatcher.d.ts +0 -22
|
@@ -6,199 +6,214 @@ import type { Vec3, UInt32, Float } from "../../sources/types";
|
|
|
6
6
|
/**
|
|
7
7
|
* Settings for debug lines
|
|
8
8
|
*/
|
|
9
|
-
export type DebugLines =
|
|
9
|
+
export type DebugLines = {
|
|
10
10
|
/**
|
|
11
11
|
* Whether to draw debug lines
|
|
12
|
+
* @defaultValue false
|
|
12
13
|
*/
|
|
13
|
-
drawDebugLines
|
|
14
|
+
drawDebugLines?: boolean;
|
|
14
15
|
/**
|
|
15
16
|
* Whether to draw geometry of physics bodies
|
|
17
|
+
* @defaultValue true
|
|
16
18
|
*/
|
|
17
|
-
drawPhysicsBodies
|
|
19
|
+
drawPhysicsBodies?: boolean;
|
|
18
20
|
/**
|
|
19
21
|
* Whether to draw physics body axes
|
|
22
|
+
* @defaultValue true
|
|
20
23
|
*/
|
|
21
|
-
drawPhysicsBodyAxes
|
|
24
|
+
drawPhysicsBodyAxes?: boolean;
|
|
22
25
|
/**
|
|
23
26
|
* Whether to draw the center of mass of physics bodies
|
|
27
|
+
* @defaultValue false
|
|
24
28
|
*/
|
|
25
|
-
drawCenterOfMass
|
|
29
|
+
drawCenterOfMass?: boolean;
|
|
26
30
|
/**
|
|
27
31
|
* Whether to draw joint-related debug lines
|
|
32
|
+
* @defaultValue false
|
|
28
33
|
*/
|
|
29
|
-
drawJoints
|
|
34
|
+
drawJoints?: boolean;
|
|
30
35
|
/**
|
|
31
36
|
* Whether to draw the skeletons of rigged characters
|
|
37
|
+
* @defaultValue false
|
|
32
38
|
*/
|
|
33
|
-
drawSkeletons
|
|
39
|
+
drawSkeletons?: boolean;
|
|
34
40
|
/**
|
|
35
41
|
* Whether to draw certain IK parameters like the forward and up vector of an IK Aim node, or the pole vector of an IK Two Bone node
|
|
42
|
+
* @defaultValue false
|
|
36
43
|
*/
|
|
37
|
-
drawIK
|
|
44
|
+
drawIK?: boolean;
|
|
38
45
|
/**
|
|
39
46
|
* Whether to draw the bouding boxes of entities
|
|
47
|
+
* @defaultValue false
|
|
40
48
|
*/
|
|
41
|
-
drawBoundingBoxes
|
|
49
|
+
drawBoundingBoxes?: boolean;
|
|
42
50
|
/**
|
|
43
51
|
* Whether to draw camera frustums
|
|
52
|
+
* @defaultValue false
|
|
44
53
|
*/
|
|
45
|
-
drawCameraFrustums
|
|
54
|
+
drawCameraFrustums?: boolean;
|
|
46
55
|
/**
|
|
47
56
|
* Whether to draw light-related debug lines
|
|
57
|
+
* @defaultValue false
|
|
48
58
|
*/
|
|
49
|
-
drawLights
|
|
59
|
+
drawLights?: boolean;
|
|
50
60
|
/**
|
|
51
61
|
* Whether to draw reflection probes
|
|
62
|
+
* @defaultValue false
|
|
52
63
|
*/
|
|
53
|
-
drawReflectionProbes
|
|
54
|
-
}
|
|
64
|
+
drawReflectionProbes?: boolean;
|
|
65
|
+
};
|
|
55
66
|
/**
|
|
56
67
|
* Settings for the display
|
|
57
68
|
*/
|
|
58
|
-
export type Display =
|
|
69
|
+
export type Display = {
|
|
59
70
|
/**
|
|
60
71
|
* Maximum number of Frames Per Second the renderer is allowed to produce
|
|
72
|
+
* @defaultValue 30
|
|
61
73
|
*/
|
|
62
|
-
maxFPS
|
|
74
|
+
maxFPS?: UInt32;
|
|
63
75
|
/**
|
|
64
76
|
* Maximum resolution of loaded textures
|
|
77
|
+
* @defaultValue 4294967295
|
|
65
78
|
*/
|
|
66
|
-
maxTextureSize
|
|
79
|
+
maxTextureSize?: UInt32;
|
|
67
80
|
/**
|
|
68
81
|
* Draw frame without input events
|
|
82
|
+
* @defaultValue false
|
|
69
83
|
*/
|
|
70
|
-
forceRedraw
|
|
84
|
+
forceRedraw?: boolean;
|
|
71
85
|
/**
|
|
72
86
|
* When 'Force Redraw' is off, this setting controls the number of frames the renderer will draw before going back to idle
|
|
87
|
+
* @defaultValue 90
|
|
73
88
|
*/
|
|
74
|
-
framePersistence
|
|
89
|
+
framePersistence?: UInt32;
|
|
75
90
|
/**
|
|
76
91
|
* Toggle frustum culling
|
|
92
|
+
* @defaultValue true
|
|
77
93
|
*/
|
|
78
|
-
enableFrustumCulling
|
|
94
|
+
enableFrustumCulling?: boolean;
|
|
79
95
|
/**
|
|
80
96
|
* Toggle texture streaming
|
|
97
|
+
* @defaultValue false
|
|
81
98
|
*/
|
|
82
|
-
enableTextureStreaming
|
|
83
|
-
}
|
|
99
|
+
enableTextureStreaming?: boolean;
|
|
100
|
+
};
|
|
84
101
|
/**
|
|
85
102
|
* Settings for the environment
|
|
86
103
|
*/
|
|
87
|
-
export type Environment =
|
|
104
|
+
export type Environment = {
|
|
88
105
|
/**
|
|
89
106
|
* Solid color used to clear the screen before drawing.
|
|
107
|
+
* @defaultValue 0,0,0
|
|
90
108
|
*/
|
|
91
|
-
clearColor
|
|
109
|
+
clearColor?: Vec3;
|
|
92
110
|
/**
|
|
93
111
|
* Color of the spherical gradient at the top of the sphere.
|
|
112
|
+
* @defaultValue 1,1,1
|
|
94
113
|
*/
|
|
95
|
-
ambientColorTop
|
|
114
|
+
ambientColorTop?: Vec3;
|
|
96
115
|
/**
|
|
97
116
|
* Color of the spherical gradient at the bottom of the sphere.
|
|
117
|
+
* @defaultValue 1,1,1
|
|
98
118
|
*/
|
|
99
|
-
ambientColorBottom
|
|
100
|
-
}
|
|
119
|
+
ambientColorBottom?: Vec3;
|
|
120
|
+
};
|
|
101
121
|
/**
|
|
102
122
|
* Miscellaneous settings
|
|
103
123
|
*/
|
|
104
|
-
export type Misc =
|
|
124
|
+
export type Misc = {
|
|
105
125
|
/**
|
|
106
126
|
* The maximum number of time a linker can reference itself.
|
|
127
|
+
* @defaultValue 2
|
|
107
128
|
*/
|
|
108
|
-
maxLinkersRecursionCount
|
|
129
|
+
maxLinkersRecursionCount?: UInt32;
|
|
109
130
|
/**
|
|
110
131
|
* Plugins to load at startup
|
|
111
132
|
*/
|
|
112
|
-
plugins
|
|
113
|
-
}
|
|
133
|
+
plugins?: Array<string>;
|
|
134
|
+
};
|
|
114
135
|
/**
|
|
115
136
|
* Settings for the physics engine.
|
|
116
137
|
*/
|
|
117
|
-
export type Physics =
|
|
138
|
+
export type Physics = {
|
|
118
139
|
/**
|
|
119
140
|
* The engine that is powering the physics of the scene.
|
|
141
|
+
* @defaultValue physx
|
|
120
142
|
*/
|
|
121
|
-
engine
|
|
143
|
+
engine?: string;
|
|
122
144
|
/**
|
|
123
145
|
* Global gravity applied throughout the scene.
|
|
146
|
+
* @defaultValue 0,-9.8,0
|
|
124
147
|
*/
|
|
125
|
-
gravity
|
|
148
|
+
gravity?: Vec3;
|
|
126
149
|
/**
|
|
127
150
|
* A frame-rate-independent interval that dictates when physics calculations are performed.
|
|
151
|
+
* @defaultValue 0.01666
|
|
128
152
|
*/
|
|
129
|
-
timestepInS
|
|
153
|
+
timestepInS?: Float;
|
|
130
154
|
/**
|
|
131
155
|
* The epsilon used to mark whether the transform of an entity has changed and so whether to notify the physics engine.
|
|
156
|
+
* @defaultValue 0.000001
|
|
132
157
|
*/
|
|
133
|
-
epsilon
|
|
158
|
+
epsilon?: Float;
|
|
134
159
|
/**
|
|
135
160
|
* The approximate size of objects in the simulation. This is used to estimate certain length-related tolerances.
|
|
161
|
+
* @defaultValue 1
|
|
136
162
|
*/
|
|
137
|
-
toleranceLength
|
|
163
|
+
toleranceLength?: Float;
|
|
138
164
|
/**
|
|
139
165
|
* The typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep. For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second.
|
|
166
|
+
* @defaultValue 10
|
|
140
167
|
*/
|
|
141
|
-
toleranceSpeed
|
|
168
|
+
toleranceSpeed?: Float;
|
|
142
169
|
/**
|
|
143
170
|
* The bigger LMD Max is, the greater the area that is searched for future contacts, and so the greater time taken per iteration. Note that XDE resolves contacts pre-collision, not once collision has taken place, like the majority of physics engines. Displacement of any object per iteration should not exceed LMD Max.
|
|
171
|
+
* @defaultValue 1
|
|
144
172
|
*/
|
|
145
|
-
lmdMax
|
|
146
|
-
}
|
|
173
|
+
lmdMax?: Float;
|
|
174
|
+
};
|
|
147
175
|
/**
|
|
148
176
|
* Renderer settings
|
|
149
177
|
*/
|
|
150
|
-
export type Renderer =
|
|
178
|
+
export type Renderer = {
|
|
151
179
|
/**
|
|
152
180
|
* Enable occlusion culling.
|
|
181
|
+
* @defaultValue false
|
|
153
182
|
*/
|
|
154
|
-
cpuOcclusionCulling
|
|
155
|
-
}
|
|
183
|
+
cpuOcclusionCulling?: boolean;
|
|
184
|
+
};
|
|
156
185
|
/**
|
|
157
186
|
* Sound settings
|
|
158
187
|
*/
|
|
159
|
-
export type Sound =
|
|
188
|
+
export type Sound = {
|
|
160
189
|
/**
|
|
161
190
|
* Enable 3dverse sound.
|
|
191
|
+
* @defaultValue false
|
|
162
192
|
*/
|
|
163
|
-
enabled
|
|
164
|
-
}
|
|
193
|
+
enabled?: boolean;
|
|
194
|
+
};
|
|
165
195
|
/**
|
|
166
196
|
* Settings for the scene streaming
|
|
167
197
|
*/
|
|
168
|
-
export type Streaming =
|
|
198
|
+
export type Streaming = {
|
|
169
199
|
/**
|
|
170
200
|
* Scenes that enter this radius around the camera get loaded.
|
|
201
|
+
* @defaultValue 0
|
|
171
202
|
*/
|
|
172
|
-
streamingLoadingRadius
|
|
203
|
+
streamingLoadingRadius?: Float;
|
|
173
204
|
/**
|
|
174
205
|
* Scenes that exit this radius around the camera get unloaded.
|
|
206
|
+
* @defaultValue 0
|
|
175
207
|
*/
|
|
176
|
-
streamingUnloadingRadius
|
|
177
|
-
}
|
|
208
|
+
streamingUnloadingRadius?: Float;
|
|
209
|
+
};
|
|
178
210
|
/**
|
|
179
211
|
* Settings for voxel rendering
|
|
180
212
|
*/
|
|
181
|
-
export type Voxel =
|
|
213
|
+
export type Voxel = {
|
|
182
214
|
/**
|
|
183
215
|
* Maximum number of color samples used to compute the color LUT.
|
|
216
|
+
* @defaultValue 512
|
|
184
217
|
*/
|
|
185
|
-
maxNumberAlbedoValues
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
*/
|
|
190
|
-
export type SettingsBaseType = Partial<{
|
|
191
|
-
debug_lines: DebugLines;
|
|
192
|
-
display: Display;
|
|
193
|
-
environment: Environment;
|
|
194
|
-
misc: Misc;
|
|
195
|
-
physics: Physics;
|
|
196
|
-
renderer: Renderer;
|
|
197
|
-
sound: Sound;
|
|
198
|
-
streaming: Streaming;
|
|
199
|
-
voxel: Voxel;
|
|
200
|
-
}>;
|
|
201
|
-
/**
|
|
202
|
-
*
|
|
203
|
-
*/
|
|
204
|
-
export type SettingType = keyof SettingsBaseType;
|
|
218
|
+
maxNumberAlbedoValues?: UInt32;
|
|
219
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch activity on the gateway.
|
|
3
|
+
*
|
|
4
|
+
* @category Core
|
|
5
|
+
*/
|
|
6
|
+
export declare class ActivityWatcher extends EventTarget {
|
|
7
|
+
#private;
|
|
8
|
+
/**
|
|
9
|
+
* True if activity watcher has timedout
|
|
10
|
+
*/
|
|
11
|
+
get has_timed_out(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Inactivity timeout in seconds.
|
|
14
|
+
*/
|
|
15
|
+
get inactivity_timeout(): number;
|
|
16
|
+
/**
|
|
17
|
+
* Inactivity timeout in seconds.
|
|
18
|
+
*/
|
|
19
|
+
set inactivity_timeout(seconds: number);
|
|
20
|
+
/**
|
|
21
|
+
* Inactivity warning in seconds.
|
|
22
|
+
*/
|
|
23
|
+
get inactivity_warning(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Inactivity warning in seconds.
|
|
26
|
+
*/
|
|
27
|
+
set inactivity_warning(seconds: number);
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
get is_running(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Start the timeouts.
|
|
34
|
+
*/
|
|
35
|
+
start(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Stop the timeouts if running.
|
|
38
|
+
*/
|
|
39
|
+
stop(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Reset the timeouts.
|
|
42
|
+
*/
|
|
43
|
+
reset(): void;
|
|
44
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { AssignClientToScriptMessage, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ScreenSpaceRayQuery, ScreenSpaceRayResult, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage,
|
|
2
|
-
import {
|
|
3
|
-
import { Serializer } from "./Serializer";
|
|
4
|
-
import { RTID, UUID, Vec2i } from "./types";
|
|
1
|
+
import type { AssignClientToScriptMessage, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ScreenSpaceRayQuery, ScreenSpaceRayResult, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage, ViewportConfig } from "../_prebuild/messages/gateway";
|
|
2
|
+
import type { ComponentDescriptor, EditorEntity, EntityCreationCoreOptions, UpdateComponentsCommand } from "../_prebuild/messages/editor";
|
|
5
3
|
import { EntityInterface } from "./interfaces/EntityInterface";
|
|
6
4
|
import { SessionInterface } from "./interfaces/SessionInterface";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { RTID, UUID, Vec2i } from "./types";
|
|
6
|
+
import { ComponentType, SceneSettingsRecord } from "./core";
|
|
7
|
+
import { Serializer } from "./Serializer";
|
|
8
|
+
import { ActivityWatcher } from "./ActivityWatcher";
|
|
10
9
|
/**
|
|
11
10
|
* The LivelinkCore interface.
|
|
12
11
|
*
|
|
@@ -17,6 +16,8 @@ import { ComponentType } from "./core";
|
|
|
17
16
|
* The 3dverse/livelink.js library is versioned and should refer to a specific version of the
|
|
18
17
|
* interface, allowing for interface evolution without breaking compatibility with existing
|
|
19
18
|
* applications.
|
|
19
|
+
*
|
|
20
|
+
* @category Core
|
|
20
21
|
*/
|
|
21
22
|
export declare class LivelinkCore {
|
|
22
23
|
#private;
|
|
@@ -32,7 +33,7 @@ export declare class LivelinkCore {
|
|
|
32
33
|
editor_url: string;
|
|
33
34
|
}): Promise<{
|
|
34
35
|
component_descriptors: Record<string, ComponentDescriptor>;
|
|
35
|
-
settings:
|
|
36
|
+
settings: SceneSettingsRecord;
|
|
36
37
|
serializer: Serializer;
|
|
37
38
|
}>;
|
|
38
39
|
/**
|
|
@@ -94,7 +95,7 @@ export declare class LivelinkCore {
|
|
|
94
95
|
*
|
|
95
96
|
*/
|
|
96
97
|
setViewports({ viewport_configs }: {
|
|
97
|
-
viewport_configs:
|
|
98
|
+
viewport_configs: Array<ViewportConfig>;
|
|
98
99
|
}): void;
|
|
99
100
|
/***************************************************************************
|
|
100
101
|
* CLIENT REMOTE OPERATIONS (5)
|
|
@@ -158,14 +159,14 @@ export declare class LivelinkCore {
|
|
|
158
159
|
*/
|
|
159
160
|
createEntities({ entities, options, }: {
|
|
160
161
|
entities: Array<EntityInterface>;
|
|
161
|
-
options?:
|
|
162
|
+
options?: EntityCreationCoreOptions;
|
|
162
163
|
}): Promise<Array<EditorEntity>>;
|
|
163
164
|
/**
|
|
164
165
|
*
|
|
165
166
|
*/
|
|
166
167
|
spawnEntity({ entity, options, }: {
|
|
167
168
|
entity: EntityInterface;
|
|
168
|
-
options?:
|
|
169
|
+
options?: EntityCreationCoreOptions;
|
|
169
170
|
}): Promise<EditorEntity>;
|
|
170
171
|
/**
|
|
171
172
|
*
|
|
@@ -26,6 +26,8 @@ type RequestResolver<MetaDataType> = {
|
|
|
26
26
|
* From there you can call either resolver.resolve() providing the expected response or
|
|
27
27
|
* resolver.reject().
|
|
28
28
|
*
|
|
29
|
+
* @category Utils
|
|
30
|
+
*
|
|
29
31
|
*/
|
|
30
32
|
export declare class RequestHandler<ChannelType, MetaDataType> {
|
|
31
33
|
#private;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ComponentDescriptor, SettingDescriptor } from "../_prebuild/messages/editor";
|
|
2
|
-
import { ComponentType } from "../_prebuild/types/
|
|
3
|
-
import {
|
|
2
|
+
import { ComponentType } from "../_prebuild/types/ComponentsRecord";
|
|
3
|
+
import { SceneSettingType } from "./core";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* @category Core
|
|
6
6
|
*/
|
|
7
7
|
export type ComponentSerializer = ((args: {
|
|
8
8
|
data_view: DataView;
|
|
9
9
|
offset: number;
|
|
10
|
-
component:
|
|
10
|
+
component: ComponentType;
|
|
11
11
|
}) => number) & {
|
|
12
12
|
size: number;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* @category Core
|
|
16
16
|
*/
|
|
17
17
|
export declare class Serializer {
|
|
18
18
|
#private;
|
|
@@ -25,7 +25,7 @@ export declare class Serializer {
|
|
|
25
25
|
*/
|
|
26
26
|
constructor({ component_descriptors, settings_descriptors, }: {
|
|
27
27
|
component_descriptors: Record<string, ComponentDescriptor>;
|
|
28
|
-
settings_descriptors: Record<string, SettingDescriptor<
|
|
28
|
+
settings_descriptors: Record<string, SettingDescriptor<SceneSettingType>>;
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
@@ -5,5 +5,5 @@ export declare const FTL_EDITOR_ROP_HEADER_SIZE: 25;
|
|
|
5
5
|
export declare const LITTLE_ENDIAN: true;
|
|
6
6
|
export declare const BIG_ENDIAN: false;
|
|
7
7
|
export declare const HEARTBEAT_PERIOD_IN_MS: 2000;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
8
|
+
export declare const DEFAULT_INACTIVITY_WARNING_IN_SEC: 300;
|
|
9
|
+
export declare const DEFAULT_INACTIVITY_TIMEOUT_IN_SEC: 360;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { GatewayDisconnectedReason } from "../../_prebuild/GatewayConnection";
|
|
1
2
|
import { GatewayMessageHandler } from "../../_prebuild/GatewayMessageHandler";
|
|
2
3
|
import { SessionInterface } from "../interfaces/SessionInterface";
|
|
3
|
-
import { ActivityWatcher } from "
|
|
4
|
-
import {
|
|
4
|
+
import { ActivityWatcher } from "../ActivityWatcher";
|
|
5
|
+
import { UUID } from "../types";
|
|
5
6
|
/**
|
|
6
7
|
* The gateway controller is the exposed interface of the Livelink gateway protocol.
|
|
7
8
|
*
|
|
@@ -14,6 +15,10 @@ export declare class GatewayController extends GatewayMessageHandler {
|
|
|
14
15
|
*
|
|
15
16
|
*/
|
|
16
17
|
get activity_watcher(): ActivityWatcher;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
get latency(): number;
|
|
17
22
|
/**
|
|
18
23
|
* Opens a connection to the gateway where the provided session is running.
|
|
19
24
|
*
|
|
@@ -49,5 +54,7 @@ export declare class GatewayController extends GatewayMessageHandler {
|
|
|
49
54
|
/**
|
|
50
55
|
*
|
|
51
56
|
*/
|
|
52
|
-
_onMessageSent(is_heart_beat
|
|
57
|
+
_onMessageSent({ is_heart_beat }: {
|
|
58
|
+
is_heart_beat?: boolean;
|
|
59
|
+
}): void;
|
|
53
60
|
}
|
package/dist/sources/core.d.ts
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
export * from "./LivelinkCore";
|
|
2
2
|
export * from "./Serializer";
|
|
3
|
+
export * from "./ActivityWatcher";
|
|
3
4
|
export * from "./types";
|
|
4
5
|
export * from "./interfaces";
|
|
5
|
-
export type { ComponentHash, ComponentType } from "../_prebuild/types/components";
|
|
6
|
-
export * as Components from "../_prebuild/types/components";
|
|
7
|
-
export type { SettingsBaseType, SettingType } from "../_prebuild/types/settings";
|
|
8
|
-
export * as Settings from "../_prebuild/types/settings";
|
|
9
|
-
export * as CoreEnums from "../_prebuild/enums";
|
|
10
6
|
export * from "../_prebuild/messages/editor";
|
|
11
7
|
export * from "../_prebuild/messages/gateway";
|
|
12
8
|
export * from "../_prebuild/messages/gateway/enums";
|
|
9
|
+
export * from "../_prebuild/types/ComponentsRecord";
|
|
10
|
+
export * from "../_prebuild/types/ComponentsHashes";
|
|
11
|
+
export * from "../_prebuild/types/SceneSettingsRecord";
|
|
12
|
+
export type { GatewayDisconnectedReason } from "../_prebuild/GatewayConnection";
|
|
13
|
+
/**
|
|
14
|
+
* @category Core
|
|
15
|
+
*/
|
|
16
|
+
export * as CoreEnums from "../_prebuild/enums";
|
|
17
|
+
/**
|
|
18
|
+
* @category Engine Schemas
|
|
19
|
+
*/
|
|
20
|
+
export * as Assets from "../_prebuild/types/assets";
|
|
21
|
+
/**
|
|
22
|
+
* All the settings that can be applied to a scene.
|
|
23
|
+
*
|
|
24
|
+
* @category Engine Schemas
|
|
25
|
+
*/
|
|
26
|
+
export * as SceneSettings from "../_prebuild/types/sceneSettings";
|
|
27
|
+
/**
|
|
28
|
+
* All the components that can be attached to an entity.
|
|
29
|
+
*
|
|
30
|
+
* @category Engine Schemas
|
|
31
|
+
*/
|
|
32
|
+
export * as Components from "../_prebuild/types/components";
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { UUID, RTID } from "../types";
|
|
2
2
|
/**
|
|
3
|
+
* Entity interface.
|
|
3
4
|
*
|
|
5
|
+
* @category Core
|
|
4
6
|
*/
|
|
5
7
|
export interface EntityInterface {
|
|
8
|
+
/**
|
|
9
|
+
* Must return the entity Real-Time Identifier or null if the entity has not been instantiated yet.
|
|
10
|
+
*/
|
|
6
11
|
get rtid(): RTID | null;
|
|
12
|
+
/**
|
|
13
|
+
* Must return the entity unique identifier in UUID format.
|
|
14
|
+
*/
|
|
7
15
|
get id(): UUID | null;
|
|
16
|
+
/**
|
|
17
|
+
* Must serialize the entity to JSON format.
|
|
18
|
+
*/
|
|
8
19
|
toJSON(): Record<string, unknown>;
|
|
9
20
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { UUID } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Session interface.
|
|
4
|
+
*
|
|
5
|
+
* @category Core
|
|
6
|
+
*/
|
|
2
7
|
export interface SessionInterface {
|
|
3
8
|
/**
|
|
4
|
-
*
|
|
9
|
+
* Must return the gateway URL or null if the session has not been created yet on the server.
|
|
5
10
|
*/
|
|
6
11
|
get gateway_url(): string | null;
|
|
7
12
|
/**
|
|
8
|
-
*
|
|
13
|
+
* Must return the session key or null if the session has not been created yet on the server.
|
|
9
14
|
*/
|
|
10
15
|
get session_key(): string | null;
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
17
|
+
* Must return the current client unique identifier in UUID format.
|
|
13
18
|
*/
|
|
14
19
|
set client_id(client_id: UUID | null);
|
|
15
20
|
/**
|
|
16
|
-
*
|
|
21
|
+
* Must return true if the session is joinable.
|
|
17
22
|
*/
|
|
18
23
|
isJoinable(): boolean;
|
|
19
24
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @category Engine Types
|
|
3
3
|
*/
|
|
4
4
|
export type RTID = bigint;
|
|
5
5
|
/**
|
|
6
|
+
* @internal
|
|
6
7
|
* 4 for now until 64 bits is supported by backend
|
|
7
8
|
*/
|
|
8
9
|
export declare const RTID_BYTE_SIZE: 4;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* @internal
|
|
11
12
|
*/
|
|
12
13
|
export declare function serialize_RTID({ data_view, offset, value, }: {
|
|
13
14
|
data_view: DataView;
|
|
@@ -15,7 +16,7 @@ export declare function serialize_RTID({ data_view, offset, value, }: {
|
|
|
15
16
|
value: RTID;
|
|
16
17
|
}): number;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* @internal
|
|
19
20
|
*/
|
|
20
21
|
export declare function deserialize_RTID({ data_view, offset }: {
|
|
21
22
|
data_view: DataView;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @category Engine Types
|
|
3
3
|
*/
|
|
4
4
|
export type UUID = string;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare const UUID_BYTE_SIZE: 16;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export declare function serialize_UUID({ data_view, offset, value, }: {
|
|
13
13
|
data_view: DataView;
|
|
@@ -15,7 +15,7 @@ export declare function serialize_UUID({ data_view, offset, value, }: {
|
|
|
15
15
|
value: UUID;
|
|
16
16
|
}): number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* @internal
|
|
19
19
|
*/
|
|
20
20
|
export declare function deserialize_UUID({ data_view, offset }: {
|
|
21
21
|
data_view: DataView;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Texture } from "../../_prebuild/types/assets";
|
|
2
|
+
import { Quat, Vec2, Vec3, Vec4 } from "./math";
|
|
3
|
+
import { Float32, Int32 } from "./nativeTypes";
|
|
4
|
+
import { UUID } from "./UUID";
|
|
5
|
+
/**
|
|
6
|
+
* A complete and unique reference to an entity.
|
|
7
|
+
*
|
|
8
|
+
* @category Engine Types
|
|
9
|
+
*/
|
|
10
|
+
export type EntityRef = {
|
|
11
|
+
/**
|
|
12
|
+
* The UUID of the entity.
|
|
13
|
+
* This is only unique within the scene the entity is created in.
|
|
14
|
+
* If a scene is instantiated multiple times, the same entity will be instantiated multiple times with the same UUID.
|
|
15
|
+
*/
|
|
16
|
+
originalEUID: UUID;
|
|
17
|
+
/**
|
|
18
|
+
* The UUIDs of the chain of linkers that brought the entity to the current scene.
|
|
19
|
+
* This is what allows the entity to be uniquely identified across multiple instances of the same scene.
|
|
20
|
+
*/
|
|
21
|
+
linkage?: Array<UUID>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A reference to an asset.
|
|
25
|
+
*
|
|
26
|
+
* @category Engine Types
|
|
27
|
+
*/
|
|
28
|
+
export type AssetRef<T> = UUID;
|
|
29
|
+
/**
|
|
30
|
+
* The data object to use in the `dataJSON` property of the {@link Components.AnimationController} component.
|
|
31
|
+
*
|
|
32
|
+
* @category Engine Types
|
|
33
|
+
*/
|
|
34
|
+
export type AnimationGraphDataObject = Record<string, Vec3 | Float32 | Int32 | boolean | EntityRef>;
|
|
35
|
+
/**
|
|
36
|
+
* The data object to use in the `dataJSON` property of the {@link Components.ScriptElement} component.
|
|
37
|
+
*
|
|
38
|
+
* @category Engine Types
|
|
39
|
+
*/
|
|
40
|
+
export type ScriptDataObject = Record<string, Quat | Vec4 | Vec3 | Vec2 | Float32 | Int32 | boolean | EntityRef | string>;
|
|
41
|
+
/**
|
|
42
|
+
* The data object to use in the `dataJSON` property of the {@link Components.Camera} component.
|
|
43
|
+
*
|
|
44
|
+
* @category Engine Types
|
|
45
|
+
*/
|
|
46
|
+
export type RenderGraphDataObject = Record<string, Vec4 | Vec3 | Vec2 | Float32 | Int32 | boolean | AssetRef<Texture>>;
|
|
47
|
+
/**
|
|
48
|
+
* The data object to use in the `dataJSON` property of the {@link Components.Material} component.
|
|
49
|
+
*
|
|
50
|
+
* @category Engine Types
|
|
51
|
+
*/
|
|
52
|
+
export type ShaderDataObject = Record<string, Vec4 | Vec3 | Vec2 | Float32 | Int32 | boolean | AssetRef<Texture>>;
|