@3dverse/livelink.core 0.5.3 → 0.6.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.
@@ -161,4 +161,13 @@ export declare class GatewayMessageHandler extends EventTarget {
161
161
  _onScriptEventReceived({ data_view }: {
162
162
  data_view: DataView;
163
163
  }): void;
164
+ /***************************************************************************
165
+ * ASSET LOADING EVENT (15)
166
+ **************************************************************************/
167
+ /**
168
+ * Receive
169
+ */
170
+ _onAssetLoadingEventReceived({ data_view }: {
171
+ data_view: DataView;
172
+ }): void;
164
173
  }
@@ -0,0 +1,14 @@
1
+ /**
2
+ *
3
+ */
4
+ export type AssetLoadingEvent = {
5
+ loading_payloads: boolean;
6
+ pending_requests: number;
7
+ pending_scenes: number;
8
+ };
9
+ /**
10
+ *
11
+ */
12
+ export declare function deserialize_AssetLoadingEvent({ data_view }: {
13
+ data_view: DataView;
14
+ }): AssetLoadingEvent;
@@ -5,7 +5,8 @@ import { RTID, UUID } from "../../../sources/types";
5
5
  export type FireEventMessage = {
6
6
  event_map_id: UUID;
7
7
  event_name: string;
8
- entities: Array<RTID>;
8
+ emitter_entity: RTID;
9
+ target_entities: Array<RTID>;
9
10
  data_object: Record<string, unknown>;
10
11
  };
11
12
  /**
@@ -5,7 +5,7 @@ import { RTID } from "../../../sources/types";
5
5
  export type ScriptEvent = {
6
6
  emitter_rtid: RTID;
7
7
  event_name: string;
8
- entity_rtids: Array<RTID>;
8
+ target_rtids: Array<RTID>;
9
9
  data_object: Record<string, object>;
10
10
  };
11
11
  /**
@@ -1,3 +1,4 @@
1
+ export * from "./AssetLoadingEvent";
1
2
  export * from "./AssignClientToScriptMessage";
2
3
  export * from "./AuthenticationResponse";
3
4
  export * from "./ClientConfig";
package/dist/library.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var m=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})},u=(e,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of c(i))!p.call(e,n)&&n!==r&&t(e,n,{get:()=>i[n],enumerable:!(o=l(i,n))||o.enumerable});return e};var C=e=>u(t({},"__esModule",{value:!0}),e);var y={};m(y,{LivelinkCoreModule:()=>s});module.exports=C(y);var s=class e{static#e=null;static#i=null;static async init(){if(e.#e)return;let i=new Function("return import('https://storage.googleapis.com/livelink-prod/core/core.mjs');"),{LivelinkCore:r,CoreEnums:o}=await i();e.#e=r,e.#i=o,console.info("Livelink core initialized")}static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static get Enums(){if(!e.#i)throw new Error("Livelink core not initialized");return e.#i}};
1
+ "use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:!0})},m=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of a(r))!c.call(e,t)&&t!==o&&i(e,t,{get:()=>r[t],enumerable:!(n=p(r,t))||n.enumerable});return e};var u=e=>m(i({},"__esModule",{value:!0}),e);var y={};l(y,{LivelinkCoreModule:()=>s});module.exports=u(y);var C=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class e{static#e=null;static#r=null;static async init(){if(e.#e)return;let r=await e.createImporter(),{LivelinkCore:o,CoreEnums:n}=await r();e.#e=o,e.#r=n,console.info("Livelink core initialized")}static async createImporter(){if(!C)return new Function("return import('https://storage.googleapis.com/livelink-prod/core/core.mjs');");let o=await(await fetch("https://storage.googleapis.com/livelink-prod/core/core.mjs")).text();return new Function("return import('data:text/javascript;base64,"+btoa(o)+"')")}static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static get Enums(){if(!e.#r)throw new Error("Livelink core not initialized");return e.#r}};
2
2
  //# sourceMappingURL=library.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../sources/library.ts", "../sources/LivelinkCoreModule.ts"],
4
- "sourcesContent": ["export * from \"./LivelinkCoreModule\";\nexport type * from \"./core\";\n", "import type { LivelinkCore, CoreEnums } from \"./core\";\n\n/**\n *\n */\ndeclare const LIVELINK_CORE_URL: string;\n\n/**\n *\n */\ntype LivelinkCoreType = typeof LivelinkCore;\n\n/**\n *\n */\ntype CoreEnumsType = typeof CoreEnums;\n\n/**\n *\n */\nexport class LivelinkCoreModule {\n /**\n *\n */\n static #core: LivelinkCoreType | null = null;\n\n /**\n *\n */\n static #enums: CoreEnumsType | null = null;\n\n /**\n *\n */\n static async init() {\n if (LivelinkCoreModule.#core) {\n return;\n }\n\n // Force webpack keep the dynamic import\n const dynamicImport = new Function(\"return import('\" + LIVELINK_CORE_URL + \"');\") as () => Promise<{\n LivelinkCore: LivelinkCoreType;\n CoreEnums: CoreEnumsType;\n }>;\n const { LivelinkCore, CoreEnums } = await dynamicImport();\n\n LivelinkCoreModule.#core = LivelinkCore;\n LivelinkCoreModule.#enums = CoreEnums;\n\n console.info(\"Livelink core initialized\");\n }\n\n /**\n *\n */\n static get Core(): LivelinkCoreType {\n if (!LivelinkCoreModule.#core) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#core;\n }\n\n /**\n *\n */\n static get Enums(): CoreEnumsType {\n if (!LivelinkCoreModule.#enums) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#enums;\n }\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GCoBO,IAAMI,EAAN,MAAMC,CAAmB,CAI5B,MAAOC,GAAiC,KAKxC,MAAOC,GAA+B,KAKtC,aAAa,MAAO,CAChB,GAAIF,EAAmBC,GACnB,OAIJ,IAAME,EAAgB,IAAI,SAAS,8EAA6C,EAI1E,CAAE,aAAAC,EAAc,UAAAC,CAAU,EAAI,MAAMF,EAAc,EAExDH,EAAmBC,GAAQG,EAC3BJ,EAAmBE,GAASG,EAE5B,QAAQ,KAAK,2BAA2B,CAC5C,CAKA,WAAW,MAAyB,CAChC,GAAI,CAACL,EAAmBC,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOD,EAAmBC,EAC9B,CAKA,WAAW,OAAuB,CAC9B,GAAI,CAACD,EAAmBE,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOF,EAAmBE,EAC9B,CACJ",
6
- "names": ["library_exports", "__export", "LivelinkCoreModule", "__toCommonJS", "LivelinkCoreModule", "_LivelinkCoreModule", "#core", "#enums", "dynamicImport", "LivelinkCore", "CoreEnums"]
4
+ "sourcesContent": ["export * from \"./LivelinkCoreModule\";\nexport type * from \"./core\";\n", "import type { LivelinkCore, CoreEnums } from \"./core\";\n\n/**\n *\n */\nconst isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\n/**\n *\n */\ndeclare const LIVELINK_CORE_URL: string;\n\n/**\n *\n */\ntype LivelinkCoreType = typeof LivelinkCore;\n\n/**\n *\n */\ntype CoreEnumsType = typeof CoreEnums;\n\n/**\n *\n */\ntype CoreImporter = () => Promise<{\n LivelinkCore: LivelinkCoreType;\n CoreEnums: CoreEnumsType;\n}>;\n\n/**\n *\n */\nexport class LivelinkCoreModule {\n /**\n *\n */\n static #core: LivelinkCoreType | null = null;\n\n /**\n *\n */\n static #enums: CoreEnumsType | null = null;\n\n /**\n *\n */\n static async init() {\n if (LivelinkCoreModule.#core) {\n return;\n }\n\n const dynamicImport = await LivelinkCoreModule.createImporter();\n const { LivelinkCore, CoreEnums } = await dynamicImport();\n\n LivelinkCoreModule.#core = LivelinkCore;\n LivelinkCoreModule.#enums = CoreEnums;\n\n console.info(\"Livelink core initialized\");\n }\n\n /**\n *\n */\n static async createImporter(): Promise<CoreImporter> {\n if (!isNode) {\n return new Function(\"return import('\" + LIVELINK_CORE_URL + \"');\") as CoreImporter;\n }\n\n const response = await fetch(LIVELINK_CORE_URL);\n const moduleData = await response.text();\n return new Function(\"return import('data:text/javascript;base64,\" + btoa(moduleData) + \"')\") as CoreImporter;\n }\n\n /**\n *\n */\n static get Core(): LivelinkCoreType {\n if (!LivelinkCoreModule.#core) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#core;\n }\n\n /**\n *\n */\n static get Enums(): CoreEnumsType {\n if (!LivelinkCoreModule.#enums) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#enums;\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GCKA,IAAMI,EAAS,OAAO,QAAY,KAAe,QAAQ,UAAY,MAAQ,QAAQ,SAAS,MAAQ,KA4BzFC,EAAN,MAAMC,CAAmB,CAI5B,MAAOC,GAAiC,KAKxC,MAAOC,GAA+B,KAKtC,aAAa,MAAO,CAChB,GAAIF,EAAmBC,GACnB,OAGJ,IAAME,EAAgB,MAAMH,EAAmB,eAAe,EACxD,CAAE,aAAAI,EAAc,UAAAC,CAAU,EAAI,MAAMF,EAAc,EAExDH,EAAmBC,GAAQG,EAC3BJ,EAAmBE,GAASG,EAE5B,QAAQ,KAAK,2BAA2B,CAC5C,CAKA,aAAa,gBAAwC,CACjD,GAAI,CAACP,EACD,OAAO,IAAI,SAAS,8EAA6C,EAIrE,IAAMQ,EAAa,MADF,MAAM,MAAM,4DAAiB,GACZ,KAAK,EACvC,OAAO,IAAI,SAAS,8CAAgD,KAAKA,CAAU,EAAI,IAAI,CAC/F,CAKA,WAAW,MAAyB,CAChC,GAAI,CAACN,EAAmBC,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOD,EAAmBC,EAC9B,CAKA,WAAW,OAAuB,CAC9B,GAAI,CAACD,EAAmBE,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOF,EAAmBE,EAC9B,CACJ",
6
+ "names": ["library_exports", "__export", "LivelinkCoreModule", "__toCommonJS", "isNode", "LivelinkCoreModule", "_LivelinkCoreModule", "#core", "#enums", "dynamicImport", "LivelinkCore", "CoreEnums", "moduleData"]
7
7
  }
package/dist/library.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var i=class e{static#e=null;static#i=null;static async init(){if(e.#e)return;let r=new Function("return import('https://storage.googleapis.com/livelink-prod/core/core.mjs');"),{LivelinkCore:n,CoreEnums:o}=await r();e.#e=n,e.#i=o,console.info("Livelink core initialized")}static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static get Enums(){if(!e.#i)throw new Error("Livelink core not initialized");return e.#i}};export{i as LivelinkCoreModule};
1
+ var i=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,t=class e{static#e=null;static#r=null;static async init(){if(e.#e)return;let o=await e.createImporter(),{LivelinkCore:r,CoreEnums:n}=await o();e.#e=r,e.#r=n,console.info("Livelink core initialized")}static async createImporter(){if(!i)return new Function("return import('https://storage.googleapis.com/livelink-prod/core/core.mjs');");let r=await(await fetch("https://storage.googleapis.com/livelink-prod/core/core.mjs")).text();return new Function("return import('data:text/javascript;base64,"+btoa(r)+"')")}static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static get Enums(){if(!e.#r)throw new Error("Livelink core not initialized");return e.#r}};export{t as LivelinkCoreModule};
2
2
  //# sourceMappingURL=library.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../sources/LivelinkCoreModule.ts"],
4
- "sourcesContent": ["import type { LivelinkCore, CoreEnums } from \"./core\";\n\n/**\n *\n */\ndeclare const LIVELINK_CORE_URL: string;\n\n/**\n *\n */\ntype LivelinkCoreType = typeof LivelinkCore;\n\n/**\n *\n */\ntype CoreEnumsType = typeof CoreEnums;\n\n/**\n *\n */\nexport class LivelinkCoreModule {\n /**\n *\n */\n static #core: LivelinkCoreType | null = null;\n\n /**\n *\n */\n static #enums: CoreEnumsType | null = null;\n\n /**\n *\n */\n static async init() {\n if (LivelinkCoreModule.#core) {\n return;\n }\n\n // Force webpack keep the dynamic import\n const dynamicImport = new Function(\"return import('\" + LIVELINK_CORE_URL + \"');\") as () => Promise<{\n LivelinkCore: LivelinkCoreType;\n CoreEnums: CoreEnumsType;\n }>;\n const { LivelinkCore, CoreEnums } = await dynamicImport();\n\n LivelinkCoreModule.#core = LivelinkCore;\n LivelinkCoreModule.#enums = CoreEnums;\n\n console.info(\"Livelink core initialized\");\n }\n\n /**\n *\n */\n static get Core(): LivelinkCoreType {\n if (!LivelinkCoreModule.#core) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#core;\n }\n\n /**\n *\n */\n static get Enums(): CoreEnumsType {\n if (!LivelinkCoreModule.#enums) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#enums;\n }\n}\n"],
5
- "mappings": "AAoBO,IAAMA,EAAN,MAAMC,CAAmB,CAI5B,MAAOC,GAAiC,KAKxC,MAAOC,GAA+B,KAKtC,aAAa,MAAO,CAChB,GAAIF,EAAmBC,GACnB,OAIJ,IAAME,EAAgB,IAAI,SAAS,8EAA6C,EAI1E,CAAE,aAAAC,EAAc,UAAAC,CAAU,EAAI,MAAMF,EAAc,EAExDH,EAAmBC,GAAQG,EAC3BJ,EAAmBE,GAASG,EAE5B,QAAQ,KAAK,2BAA2B,CAC5C,CAKA,WAAW,MAAyB,CAChC,GAAI,CAACL,EAAmBC,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOD,EAAmBC,EAC9B,CAKA,WAAW,OAAuB,CAC9B,GAAI,CAACD,EAAmBE,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOF,EAAmBE,EAC9B,CACJ",
6
- "names": ["LivelinkCoreModule", "_LivelinkCoreModule", "#core", "#enums", "dynamicImport", "LivelinkCore", "CoreEnums"]
4
+ "sourcesContent": ["import type { LivelinkCore, CoreEnums } from \"./core\";\n\n/**\n *\n */\nconst isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\n/**\n *\n */\ndeclare const LIVELINK_CORE_URL: string;\n\n/**\n *\n */\ntype LivelinkCoreType = typeof LivelinkCore;\n\n/**\n *\n */\ntype CoreEnumsType = typeof CoreEnums;\n\n/**\n *\n */\ntype CoreImporter = () => Promise<{\n LivelinkCore: LivelinkCoreType;\n CoreEnums: CoreEnumsType;\n}>;\n\n/**\n *\n */\nexport class LivelinkCoreModule {\n /**\n *\n */\n static #core: LivelinkCoreType | null = null;\n\n /**\n *\n */\n static #enums: CoreEnumsType | null = null;\n\n /**\n *\n */\n static async init() {\n if (LivelinkCoreModule.#core) {\n return;\n }\n\n const dynamicImport = await LivelinkCoreModule.createImporter();\n const { LivelinkCore, CoreEnums } = await dynamicImport();\n\n LivelinkCoreModule.#core = LivelinkCore;\n LivelinkCoreModule.#enums = CoreEnums;\n\n console.info(\"Livelink core initialized\");\n }\n\n /**\n *\n */\n static async createImporter(): Promise<CoreImporter> {\n if (!isNode) {\n return new Function(\"return import('\" + LIVELINK_CORE_URL + \"');\") as CoreImporter;\n }\n\n const response = await fetch(LIVELINK_CORE_URL);\n const moduleData = await response.text();\n return new Function(\"return import('data:text/javascript;base64,\" + btoa(moduleData) + \"')\") as CoreImporter;\n }\n\n /**\n *\n */\n static get Core(): LivelinkCoreType {\n if (!LivelinkCoreModule.#core) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#core;\n }\n\n /**\n *\n */\n static get Enums(): CoreEnumsType {\n if (!LivelinkCoreModule.#enums) {\n throw new Error(\"Livelink core not initialized\");\n }\n return LivelinkCoreModule.#enums;\n }\n}\n"],
5
+ "mappings": "AAKA,IAAMA,EAAS,OAAO,QAAY,KAAe,QAAQ,UAAY,MAAQ,QAAQ,SAAS,MAAQ,KA4BzFC,EAAN,MAAMC,CAAmB,CAI5B,MAAOC,GAAiC,KAKxC,MAAOC,GAA+B,KAKtC,aAAa,MAAO,CAChB,GAAIF,EAAmBC,GACnB,OAGJ,IAAME,EAAgB,MAAMH,EAAmB,eAAe,EACxD,CAAE,aAAAI,EAAc,UAAAC,CAAU,EAAI,MAAMF,EAAc,EAExDH,EAAmBC,GAAQG,EAC3BJ,EAAmBE,GAASG,EAE5B,QAAQ,KAAK,2BAA2B,CAC5C,CAKA,aAAa,gBAAwC,CACjD,GAAI,CAACP,EACD,OAAO,IAAI,SAAS,8EAA6C,EAIrE,IAAMQ,EAAa,MADF,MAAM,MAAM,4DAAiB,GACZ,KAAK,EACvC,OAAO,IAAI,SAAS,8CAAgD,KAAKA,CAAU,EAAI,IAAI,CAC/F,CAKA,WAAW,MAAyB,CAChC,GAAI,CAACN,EAAmBC,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOD,EAAmBC,EAC9B,CAKA,WAAW,OAAuB,CAC9B,GAAI,CAACD,EAAmBE,GACpB,MAAM,IAAI,MAAM,+BAA+B,EAEnD,OAAOF,EAAmBE,EAC9B,CACJ",
6
+ "names": ["isNode", "LivelinkCoreModule", "_LivelinkCoreModule", "#core", "#enums", "dynamicImport", "LivelinkCore", "CoreEnums", "moduleData"]
7
7
  }
@@ -7,6 +7,13 @@ type LivelinkCoreType = typeof LivelinkCore;
7
7
  *
8
8
  */
9
9
  type CoreEnumsType = typeof CoreEnums;
10
+ /**
11
+ *
12
+ */
13
+ type CoreImporter = () => Promise<{
14
+ LivelinkCore: LivelinkCoreType;
15
+ CoreEnums: CoreEnumsType;
16
+ }>;
10
17
  /**
11
18
  *
12
19
  */
@@ -16,6 +23,10 @@ export declare class LivelinkCoreModule {
16
23
  *
17
24
  */
18
25
  static init(): Promise<void>;
26
+ /**
27
+ *
28
+ */
29
+ static createImporter(): Promise<CoreImporter>;
19
30
  /**
20
31
  *
21
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dverse/livelink.core",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "3dverse Livelink Core types.",
5
5
  "main": "./dist/library.cjs",
6
6
  "module": "./dist/library.mjs",
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "license": "SEE LICENSE IN LICENSE",
27
27
  "devDependencies": {
28
+ "@types/node": "^22.5.3",
28
29
  "esbuild": "^0.20.1",
29
30
  "http-server": "^14.1.1",
30
31
  "npm-run-all": "^4.1.5",