iobroker.mywebui 1.42.26 → 1.42.28
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/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -120,9 +120,10 @@ export class IobrokerWebui3DScreenEditor extends BaseCustomWebComponentConstruct
|
|
|
120
120
|
document.head.appendChild(link);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
// signals.min.js uses UMD: if AMD define() is present it registers as AMD
|
|
124
|
+
// module instead of setting window.signals. Hide define temporarily.
|
|
125
|
+
// esprima.js is NOT loaded (Script.js disabled — no CodeMirror needed).
|
|
126
|
+
await this._loadScript(EDITOR_BASE + 'js/libs/signals.min.js', true);
|
|
126
127
|
await this._loadScript(EDITOR_BASE + 'js/libs/jsonlint.js');
|
|
127
128
|
|
|
128
129
|
// Dynamically import all editor modules (they use the importmap for 'three')
|
|
@@ -331,13 +332,20 @@ export class IobrokerWebui3DScreenEditor extends BaseCustomWebComponentConstruct
|
|
|
331
332
|
|
|
332
333
|
// ── Helpers ───────────────────────────────────────────────────────────────
|
|
333
334
|
|
|
334
|
-
_loadScript(src) {
|
|
335
|
-
return new Promise((resolve
|
|
335
|
+
_loadScript(src, hideAMD = false) {
|
|
336
|
+
return new Promise((resolve) => {
|
|
336
337
|
if (document.querySelector(`script[src="${src}"]`)) { resolve(); return; }
|
|
337
338
|
const s = document.createElement('script');
|
|
338
339
|
s.src = src;
|
|
339
|
-
|
|
340
|
-
|
|
340
|
+
// Some UMD libs (e.g. signals.min.js) prefer AMD define() over window.*
|
|
341
|
+
// when define is present. Hide it so they fall back to window assignment.
|
|
342
|
+
const savedDefine = hideAMD ? window.define : undefined;
|
|
343
|
+
if (hideAMD) window.define = undefined;
|
|
344
|
+
s.onload = () => {
|
|
345
|
+
if (hideAMD) window.define = savedDefine;
|
|
346
|
+
resolve();
|
|
347
|
+
};
|
|
348
|
+
s.onerror = () => { if (hideAMD) window.define = savedDefine; resolve(); };
|
|
341
349
|
document.head.appendChild(s);
|
|
342
350
|
});
|
|
343
351
|
}
|
|
@@ -49,7 +49,9 @@ const importMapConfig = {
|
|
|
49
49
|
"toastify-js": "./node_modules/toastify-js/src/toastify-es.js",
|
|
50
50
|
"@iobroker/webcomponent-selectid-dialog/": "./node_modules/@iobroker/webcomponent-selectid-dialog/",
|
|
51
51
|
"three": "./3d-lib/three.module.js",
|
|
52
|
-
"three/addons/": "./3d-lib/jsm/"
|
|
52
|
+
"three/addons/": "./3d-lib/jsm/",
|
|
53
|
+
"three-gpu-pathtracer": "data:text/javascript,export class WebGLPathTracer{constructor(){}setScene(){}renderSample(){}updateCamera(){}updateEnvironment(){}updateMaterials(){}get samples(){return 0;}filterGlossyFactor=0.5;}",
|
|
54
|
+
"three-mesh-bvh": "data:text/javascript,export const MeshBVH={};export const acceleratedRaycast=()=>{};export const computeBoundsTree=()=>{};export const disposeBoundsTree=()=>{};"
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
//@ts-ignore
|
|
@@ -20,7 +20,9 @@ const importMapRuntime = {
|
|
|
20
20
|
"long": "./node_modules/long/index.js",
|
|
21
21
|
"@adobe/css-tools": "./node_modules/@adobe/css-tools/dist/esm/adobe-css-tools.mjs",
|
|
22
22
|
"three": "./3d-lib/three.module.js",
|
|
23
|
-
"three/addons/": "./3d-lib/jsm/"
|
|
23
|
+
"three/addons/": "./3d-lib/jsm/",
|
|
24
|
+
"three-gpu-pathtracer": "data:text/javascript,export class WebGLPathTracer{constructor(){}setScene(){}renderSample(){}updateCamera(){}updateEnvironment(){}updateMaterials(){}get samples(){return 0;}filterGlossyFactor=0.5;}",
|
|
25
|
+
"three-mesh-bvh": "data:text/javascript,export const MeshBVH={};export const acceleratedRaycast=()=>{};export const computeBoundsTree=()=>{};export const disposeBoundsTree=()=>{};"
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
//@ts-ignore
|