@3dverse/livelink.core 0.7.4 → 0.7.6
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 +33 -26
- package/dist/_prebuild/GatewayConnection.d.ts +2 -1
- package/dist/_prebuild/GatewayMessageHandler.d.ts +12 -2
- package/dist/_prebuild/messages/editor/EntityVisibilityChangedEvent.d.ts +5 -0
- package/dist/_prebuild/messages/editor/index.d.ts +1 -0
- package/dist/_prebuild/messages/gateway/enums.d.ts +3 -0
- package/dist/sources/LivelinkCore.d.ts +12 -0
- package/dist/sources/controllers/ActivityWatcher.d.ts +18 -0
- package/dist/sources/controllers/GatewayController.d.ts +21 -0
- package/dist/sources/types/constants.d.ts +2 -0
- package/dist/sources/types/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RTID, UUID } from "../sources/types";
|
|
2
2
|
import { EntityInterface } from "../sources/interfaces/EntityInterface";
|
|
3
|
-
import { ConnectConfirmation, EditorEntity, EntityCreationOptions, EntityUpdatedEvent, UpdateComponentsCommand } from "./messages/editor";
|
|
3
|
+
import { ConnectConfirmation, EditorEntity, EntityCreationOptions, EntityUpdatedEvent, EntityVisibilityChangedEvent, UpdateComponentsCommand } from "./messages/editor";
|
|
4
4
|
import { ComponentType } from "./types/components";
|
|
5
5
|
/**
|
|
6
6
|
* This follows the Livelink protocol specifications for the broker messages.
|
|
@@ -39,7 +39,7 @@ export declare class EditorMessageHandler extends EventTarget {
|
|
|
39
39
|
entities: Array<EntityInterface>;
|
|
40
40
|
options?: EntityCreationOptions;
|
|
41
41
|
}): Promise<EditorEntity[]>;
|
|
42
|
-
|
|
42
|
+
onEntitiesCreated(data: Array<EditorEntity>): void;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
@@ -97,6 +97,13 @@ export declare class EditorMessageHandler extends EventTarget {
|
|
|
97
97
|
findEntitiesByNames({ entity_names }: {
|
|
98
98
|
entity_names: Array<String>;
|
|
99
99
|
}): Promise<Array<EditorEntity>>;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
setEntityVisibility({ entity_rtid, is_visible }: {
|
|
104
|
+
entity_rtid: RTID;
|
|
105
|
+
is_visible: boolean;
|
|
106
|
+
}): void;
|
|
100
107
|
onFindEntitiesByNames(data: Record<string, EditorEntity>): void;
|
|
101
108
|
/**
|
|
102
109
|
*
|
|
@@ -107,32 +114,32 @@ export declare class EditorMessageHandler extends EventTarget {
|
|
|
107
114
|
onClientColor(data: any): void;
|
|
108
115
|
onSceneStatsUpdate(data: any): void;
|
|
109
116
|
onServerError(data: any): void;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
onCreateEntity(data: any): void;
|
|
118
|
+
onCreateEntities(data: any): void;
|
|
119
|
+
onRestoreEntities(data: any): void;
|
|
120
|
+
onSpawnEntity(data: any): void;
|
|
121
|
+
onEntityReparented(data: any): void;
|
|
115
122
|
deleteEntities({ entity_uuids }: {
|
|
116
123
|
entity_uuids: Array<UUID>;
|
|
117
124
|
}): Promise<Array<UUID>>;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
125
|
+
onEntitiesDeleted(data: Array<UUID>): void;
|
|
126
|
+
onAnimationSequenceInstanceAdded(data: any): void;
|
|
127
|
+
onAnimationSequenceInstanceUpdated(data: any): void;
|
|
128
|
+
onAnimationSequenceInstanceRemoved(data: any): void;
|
|
129
|
+
onEntityVisibilityChanged(data: EntityVisibilityChangedEvent): void;
|
|
130
|
+
onActionError(data: any): void;
|
|
131
|
+
onAttachComponents(data: any): void;
|
|
132
|
+
onUpdateComponents(emitter_id: UUID | null, entitiesUpdatedEvent: Record<UUID, EntityUpdatedEvent>): void;
|
|
133
|
+
onDetachComponents(data: any): void;
|
|
134
|
+
onDeleteEntities(data: any): void;
|
|
135
|
+
onDeleteEntitiesWithRtid(data: any): void;
|
|
136
|
+
onReparentEntity(data: any): void;
|
|
137
|
+
onEntitiesOverridden(data: any): void;
|
|
138
|
+
onUpdateSettings(data: any): void;
|
|
139
|
+
onSelectEntities(data: any): void;
|
|
140
|
+
onAddAnimationSequenceInstance(data: any): void;
|
|
141
|
+
onUpdateAnimationSequenceInstance(data: any): void;
|
|
142
|
+
onRemoveAnimationSequenceInstance(data: any): void;
|
|
143
|
+
onSetEntityVisibility(data: any): void;
|
|
137
144
|
onUnhandledMessage(type: string, data: any): void;
|
|
138
145
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See : https://gitlab.com/3dverse/platform/libs/js/asyncapi-server-generator
|
|
5
5
|
*/
|
|
6
6
|
import { AssignClientToScriptMessage, AuthenticationResponse, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ResizeResponse, ScreenSpaceRayQuery, ScreenSpaceRayResult, SessionAuth, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage, ViewportConfigs } from "./messages/gateway";
|
|
7
|
-
import { UUID, Vec2ui16 } from "../sources/types";
|
|
7
|
+
import { UUID, Vec2ui16, GatewayDisconnectedReason } from "../sources/types";
|
|
8
8
|
/**
|
|
9
9
|
* Message handlers interface.
|
|
10
10
|
* This follows the Livelink protocol specifications for the gateway messages.
|
|
@@ -24,7 +24,17 @@ export declare class GatewayMessageHandler extends EventTarget {
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
_onConnected(): void;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
_onDisconnected({ reason }: {
|
|
32
|
+
reason: GatewayDisconnectedReason;
|
|
33
|
+
}): void;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
_onMessageSent(is_heart_beat?: boolean): void;
|
|
28
38
|
/***************************************************************************
|
|
29
39
|
* AUTHENTICATION (0)
|
|
30
40
|
**************************************************************************/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AssignClientToScriptMessage, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ScreenSpaceRayQuery, ScreenSpaceRayResult, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage, ViewportConfigs } from "../_prebuild/messages/gateway";
|
|
2
|
+
import { ActivityWatcher } from "./controllers/ActivityWatcher";
|
|
2
3
|
import { Serializer } from "./Serializer";
|
|
3
4
|
import { RTID, UUID, Vec2i } from "./types";
|
|
4
5
|
import { EntityInterface } from "./interfaces/EntityInterface";
|
|
@@ -19,6 +20,10 @@ import { ComponentType } from "./core";
|
|
|
19
20
|
*/
|
|
20
21
|
export declare class LivelinkCore {
|
|
21
22
|
#private;
|
|
23
|
+
/**
|
|
24
|
+
* Get the gateway activity watcher.
|
|
25
|
+
*/
|
|
26
|
+
get activity_watcher(): ActivityWatcher;
|
|
22
27
|
/**
|
|
23
28
|
* Connect to the session
|
|
24
29
|
*/
|
|
@@ -191,6 +196,13 @@ export declare class LivelinkCore {
|
|
|
191
196
|
findEntitiesByNames({ entity_names }: {
|
|
192
197
|
entity_names: Array<string>;
|
|
193
198
|
}): Promise<Array<EditorEntity>>;
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated
|
|
201
|
+
*/
|
|
202
|
+
setEntityVisibility({ entity_rtid, is_visible }: {
|
|
203
|
+
entity_rtid: RTID;
|
|
204
|
+
is_visible: boolean;
|
|
205
|
+
}): Promise<void>;
|
|
194
206
|
/**
|
|
195
207
|
*
|
|
196
208
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch activity on the gateway.
|
|
3
|
+
*/
|
|
4
|
+
export declare class ActivityWatcher extends EventTarget {
|
|
5
|
+
#private;
|
|
6
|
+
/**
|
|
7
|
+
* Start the timeouts.
|
|
8
|
+
*/
|
|
9
|
+
start(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Stop the timeouts if running.
|
|
12
|
+
*/
|
|
13
|
+
stop(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Reset the timeouts.
|
|
16
|
+
*/
|
|
17
|
+
reset(): void;
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GatewayMessageHandler } from "../../_prebuild/GatewayMessageHandler";
|
|
2
2
|
import { SessionInterface } from "../interfaces/SessionInterface";
|
|
3
|
+
import { ActivityWatcher } from "./ActivityWatcher";
|
|
3
4
|
import { UUID } from "../types";
|
|
4
5
|
/**
|
|
5
6
|
* The gateway controller is the exposed interface of the Livelink gateway protocol.
|
|
@@ -9,6 +10,10 @@ import { UUID } from "../types";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class GatewayController extends GatewayMessageHandler {
|
|
11
12
|
#private;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
get activity_watcher(): ActivityWatcher;
|
|
12
17
|
/**
|
|
13
18
|
* Opens a connection to the gateway where the provided session is running.
|
|
14
19
|
*
|
|
@@ -27,4 +32,20 @@ export declare class GatewayController extends GatewayMessageHandler {
|
|
|
27
32
|
* Closes the connection to the gateway.
|
|
28
33
|
*/
|
|
29
34
|
disconnect(): void;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
_onInactivityTimeout: () => void;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
_onConnected(): void;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
_onDisconnected(): void;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
_onMessageSent(is_heart_beat?: boolean): void;
|
|
30
51
|
}
|
|
@@ -5,3 +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 INACTIVITY_WARNING_IN_SEC: 300;
|
|
9
|
+
export declare const INACTIVITY_TIMEOUT_IN_SEC: 360;
|