@3dverse/livelink.core 0.5.4 → 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.
- package/dist/_prebuild/GatewayMessageHandler.d.ts +9 -0
- package/dist/_prebuild/messages/gateway/AssetLoadingEvent.d.ts +14 -0
- package/dist/_prebuild/messages/gateway/index.d.ts +1 -0
- package/dist/library.cjs +1 -1
- package/dist/library.cjs.map +3 -3
- package/dist/library.mjs +1 -1
- package/dist/library.mjs.map +3 -3
- package/dist/sources/LivelinkCoreModule.d.ts +11 -0
- package/package.json +2 -1
|
@@ -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;
|
package/dist/library.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
package/dist/library.cjs.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,
|
|
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#
|
|
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
|
package/dist/library.mjs.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": "
|
|
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.
|
|
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",
|