@3dverse/livelink.core 1.1.10 → 1.1.11
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/messages/editor/index.d.ts +2 -2
- package/dist/library.cjs +1 -1
- package/dist/library.mjs +1 -1
- package/dist/sources/CoreEvents.d.ts +4 -2
- package/dist/sources/internal/EditorEvents.d.ts +70 -2
- package/package.json +1 -1
- /package/dist/_prebuild/messages/editor/{DetachComponentCommand.d.ts → DetachComponentsCommand.d.ts} +0 -0
- /package/dist/_prebuild/messages/editor/{DetachComponentEvent.d.ts → DetachComponentsEvent.d.ts} +0 -0
|
@@ -5,5 +5,5 @@ export * from "./EntityUpdatedEvent";
|
|
|
5
5
|
export * from "./UpdateComponentsCommand";
|
|
6
6
|
export * from "./EntityVisibilityChangedEvent";
|
|
7
7
|
export * from "./ReparentEntityCommand";
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
8
|
+
export * from "./DetachComponentsEvent";
|
|
9
|
+
export * from "./DetachComponentsCommand";
|
package/dist/library.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},L=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c(e))!l.call(o,i)&&i!==r&&d(o,i,{get:()=>e[i],enumerable:!(t=p(e,i))||t.enumerable});return o};var m=o=>L(d({},"__esModule",{value:!0}),o);var I={};u(I,{DynamicLoader:()=>s});module.exports=m(I);var g=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class o{static#e=null;static#o=null;static get Core(){if(!o.#e)throw new Error("Livelink core not initialized");return o.#e}static load(e="prod"){return o.#o||(o.#o=o.#r(e)),o.#o}static async#r(e){let r=await o.#i(e),{LivelinkCore:t}=await r();o.#e=t;let i={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${t.VERSION} %c ${t.COMMIT_SHA} %c${e}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${i[e]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(e){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(e!=="prod"?`core.${e}.mjs`:"core.mjs");if(!g)return new Function("return import('"+r+"')");let i=await(await fetch(r)).text(),a=await new Function("return import('node:vm')")();return a.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new a.SourceTextModule(i,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(i)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.
|
|
1
|
+
"use strict";var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},L=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c(e))!l.call(o,i)&&i!==r&&d(o,i,{get:()=>e[i],enumerable:!(t=p(e,i))||t.enumerable});return o};var m=o=>L(d({},"__esModule",{value:!0}),o);var I={};u(I,{DynamicLoader:()=>s});module.exports=m(I);var g=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class o{static#e=null;static#o=null;static get Core(){if(!o.#e)throw new Error("Livelink core not initialized");return o.#e}static load(e="prod"){return o.#o||(o.#o=o.#r(e)),o.#o}static async#r(e){let r=await o.#i(e),{LivelinkCore:t}=await r();o.#e=t;let i={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${t.VERSION} %c ${t.COMMIT_SHA} %c${e}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${i[e]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(e){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(e!=="prod"?`core.${e}.mjs`:"core.mjs");if(!g)return new Function("return import('"+r+"')");let i=await(await fetch(r)).text(),a=await new Function("return import('node:vm')")();return a.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new a.SourceTextModule(i,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(i)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.11");
|
|
2
2
|
//# sourceMappingURL=library.cjs.map
|
package/dist/library.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class e{static#e=null;static#o=null;static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static load(o="prod"){return e.#o||(e.#o=e.#r(o)),e.#o}static async#r(o){let r=await e.#i(o),{LivelinkCore:i}=await r();e.#e=i;let t={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${i.VERSION} %c ${i.COMMIT_SHA} %c${o}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${t[o]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(o){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(o!=="prod"?`core.${o}.mjs`:"core.mjs");if(!a)return new Function("return import('"+r+"')");let t=await(await fetch(r)).text(),d=await new Function("return import('node:vm')")();return d.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new d.SourceTextModule(t,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(t)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.
|
|
1
|
+
var a=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class e{static#e=null;static#o=null;static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static load(o="prod"){return e.#o||(e.#o=e.#r(o)),e.#o}static async#r(o){let r=await e.#i(o),{LivelinkCore:i}=await r();e.#e=i;let t={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${i.VERSION} %c ${i.COMMIT_SHA} %c${o}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${t[o]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(o){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(o!=="prod"?`core.${o}.mjs`:"core.mjs");if(!a)return new Function("return import('"+r+"')");let t=await(await fetch(r)).text(),d=await new Function("return import('node:vm')")();return d.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new d.SourceTextModule(t,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(t)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.11");export{s as DynamicLoader};
|
|
2
2
|
//# sourceMappingURL=library.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./internal/GatewayEvents";
|
|
2
2
|
export * from "./internal/EditorEvents";
|
|
3
|
-
import { AssetLoadingStatusEvent, AudioReceivedEvent, ClientConnectedEvent, ClientsDisconnectedEvent, FrameReceivedEvent, ScriptEventTriggeredEvent } from "./internal/GatewayEvents";
|
|
4
|
-
import { EntitiesUpdatedEvent, EntityVisibilityChangedEvent, LoadingCompletedEvent } from "./internal/EditorEvents";
|
|
3
|
+
import type { AssetLoadingStatusEvent, AudioReceivedEvent, ClientConnectedEvent, ClientsDisconnectedEvent, FrameReceivedEvent, ScriptEventTriggeredEvent } from "./internal/GatewayEvents";
|
|
4
|
+
import type { EntitiesCreatedEvent, EntitiesDeletedEvent, EntitiesUpdatedEvent, EntityVisibilityChangedEvent, LoadingCompletedEvent } from "./internal/EditorEvents";
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
@@ -40,6 +40,8 @@ export type CoreEvents = {
|
|
|
40
40
|
"on-script-event-received": ScriptEventTriggeredEvent;
|
|
41
41
|
"on-asset-loading-status-received": AssetLoadingStatusEvent;
|
|
42
42
|
"on-loading-completed": LoadingCompletedEvent;
|
|
43
|
+
"on-entities-created": EntitiesCreatedEvent;
|
|
43
44
|
"on-entities-updated": EntitiesUpdatedEvent;
|
|
45
|
+
"on-entities-deleted": EntitiesDeletedEvent;
|
|
44
46
|
"on-entity-visibility-changed": EntityVisibilityChangedEvent;
|
|
45
47
|
};
|
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
import type { ComponentName, ComponentsRecord, EntityCore } from "../../_prebuild/engine_types/ComponentsRecord";
|
|
2
2
|
import type { SceneSettingsRecord } from "../../_prebuild/engine_types/SceneSettingsRecord";
|
|
3
3
|
import type { RTID, UUID } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export type Emitter = {
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier of the client.
|
|
10
|
+
* This is unique for each client in a session.
|
|
11
|
+
* This is only valid for the duration of the session.
|
|
12
|
+
*/
|
|
13
|
+
client_id: UUID;
|
|
14
|
+
/**
|
|
15
|
+
* The type of the client.<br/>
|
|
16
|
+
* - "user" for authenticated users<br/>
|
|
17
|
+
* - "api" for client using the rest API<br/>
|
|
18
|
+
* - "guest" for unauthenticated users<br/>
|
|
19
|
+
* - "unknown" for unknown clients
|
|
20
|
+
*/
|
|
21
|
+
client_type: "user" | "guest" | "api" | "unknown";
|
|
22
|
+
/**
|
|
23
|
+
* Indicates if the client is headless (no streaming).
|
|
24
|
+
*/
|
|
25
|
+
is_headless: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The unique identifier of the user on the 3dverse platform.
|
|
28
|
+
* The same user can have multiple clients in a session.
|
|
29
|
+
* In this case, the user_id is the same for all clients spawned by the same user.
|
|
30
|
+
*/
|
|
31
|
+
user_id: UUID;
|
|
32
|
+
/**
|
|
33
|
+
* The username associated to the user on the 3dverse platform.
|
|
34
|
+
*/
|
|
35
|
+
username: string;
|
|
36
|
+
/**
|
|
37
|
+
* The unique identifier of the session from which the event was emitted.
|
|
38
|
+
*/
|
|
39
|
+
session_id: UUID;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export declare class EditionEvent extends Event {
|
|
45
|
+
/**
|
|
46
|
+
* Information about the emitter of the event.
|
|
47
|
+
*/
|
|
48
|
+
readonly emitter: Emitter | null;
|
|
49
|
+
}
|
|
4
50
|
/**
|
|
5
51
|
*
|
|
6
52
|
*/
|
|
@@ -17,7 +63,16 @@ export declare class LoadingCompletedEvent extends Event {
|
|
|
17
63
|
/**
|
|
18
64
|
*
|
|
19
65
|
*/
|
|
20
|
-
export declare class
|
|
66
|
+
export declare class EntitiesCreatedEvent extends EditionEvent {
|
|
67
|
+
/**
|
|
68
|
+
* A map of created entities, aggregated by their parent RTIDs.
|
|
69
|
+
*/
|
|
70
|
+
readonly created_entities: Map<RTID, Array<EntityCore>>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
export declare class EntitiesUpdatedEvent extends EditionEvent {
|
|
21
76
|
/**
|
|
22
77
|
* An array of entities that have been updated.
|
|
23
78
|
*/
|
|
@@ -30,7 +85,20 @@ export declare class EntitiesUpdatedEvent extends Event {
|
|
|
30
85
|
/**
|
|
31
86
|
*
|
|
32
87
|
*/
|
|
33
|
-
export declare class
|
|
88
|
+
export declare class EntitiesDeletedEvent extends EditionEvent {
|
|
89
|
+
/**
|
|
90
|
+
* An array of EUIDs of entities that have been deleted.
|
|
91
|
+
*/
|
|
92
|
+
readonly deleted_entity_euids: Array<UUID>;
|
|
93
|
+
/**
|
|
94
|
+
* An array of RTIDs of entities that have been deleted.
|
|
95
|
+
*/
|
|
96
|
+
readonly deleted_entity_rtids: Array<RTID>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
export declare class EntityVisibilityChangedEvent extends EditionEvent {
|
|
34
102
|
/**
|
|
35
103
|
* The RTID of the entity whose visibility state has changed.
|
|
36
104
|
*/
|
package/package.json
CHANGED
/package/dist/_prebuild/messages/editor/{DetachComponentCommand.d.ts → DetachComponentsCommand.d.ts}
RENAMED
|
File without changes
|
/package/dist/_prebuild/messages/editor/{DetachComponentEvent.d.ts → DetachComponentsEvent.d.ts}
RENAMED
|
File without changes
|