@mml-io/mml-web-client 0.0.0-experimental-9ed5b0c-20250916 → 0.0.0-experimental-79daa47-20250916
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/build/index.js +26 -6
- package/build/index.js.map +2 -2
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -2121,6 +2121,12 @@
|
|
|
2121
2121
|
scene22.removeChatProbe(chatProbe);
|
|
2122
2122
|
}
|
|
2123
2123
|
},
|
|
2124
|
+
getOverlayElement() {
|
|
2125
|
+
if (scene22.getOverlayElement) {
|
|
2126
|
+
return scene22.getOverlayElement();
|
|
2127
|
+
}
|
|
2128
|
+
return null;
|
|
2129
|
+
},
|
|
2124
2130
|
hasGraphicsAdapter() {
|
|
2125
2131
|
return scene22.hasGraphicsAdapter();
|
|
2126
2132
|
},
|
|
@@ -8010,7 +8016,7 @@
|
|
|
8010
8016
|
}
|
|
8011
8017
|
}
|
|
8012
8018
|
};
|
|
8013
|
-
RemoteDocument = class extends
|
|
8019
|
+
RemoteDocument = class extends TransformableElement {
|
|
8014
8020
|
constructor() {
|
|
8015
8021
|
super();
|
|
8016
8022
|
this.scene = null;
|
|
@@ -9314,17 +9320,22 @@
|
|
|
9314
9320
|
}
|
|
9315
9321
|
overriddenHandler(element, event);
|
|
9316
9322
|
};
|
|
9323
|
+
const loadingProgressManager = new LoadingProgressManager();
|
|
9324
|
+
const wrappedScene = createWrappedScene(this.options.mmlScene, loadingProgressManager);
|
|
9317
9325
|
const src = this.options.url;
|
|
9318
9326
|
this.remoteDocumentWrapper = new RemoteDocumentWrapper(
|
|
9319
9327
|
src,
|
|
9320
9328
|
this.options.windowTarget,
|
|
9321
|
-
|
|
9329
|
+
wrappedScene,
|
|
9322
9330
|
eventHandler
|
|
9323
9331
|
);
|
|
9324
9332
|
this.options.targetForWrappers.append(this.remoteDocumentWrapper.remoteDocument);
|
|
9325
|
-
let
|
|
9333
|
+
let sceneLoadingProgressManager = null;
|
|
9326
9334
|
if (this.options.mmlScene.getLoadingProgressManager) {
|
|
9327
|
-
|
|
9335
|
+
sceneLoadingProgressManager = this.options.mmlScene.getLoadingProgressManager();
|
|
9336
|
+
loadingProgressManager.addProgressCallback(() => {
|
|
9337
|
+
sceneLoadingProgressManager == null ? void 0 : sceneLoadingProgressManager.updateDocumentProgress(this);
|
|
9338
|
+
});
|
|
9328
9339
|
}
|
|
9329
9340
|
const isWebsocket = src.startsWith("ws://") || src.startsWith("wss://");
|
|
9330
9341
|
if (isWebsocket) {
|
|
@@ -9336,8 +9347,14 @@
|
|
|
9336
9347
|
this.remoteDocumentWrapper.setDocumentTime(time2);
|
|
9337
9348
|
},
|
|
9338
9349
|
(status) => {
|
|
9339
|
-
if (status === NetworkedDOMWebsocketStatus.
|
|
9340
|
-
|
|
9350
|
+
if (status === NetworkedDOMWebsocketStatus.Reconnecting) {
|
|
9351
|
+
this.remoteDocumentWrapper.remoteDocument.showError(true);
|
|
9352
|
+
loadingProgressManager.setInitialLoad(new Error("Failed to connect"));
|
|
9353
|
+
} else if (status === NetworkedDOMWebsocketStatus.Connected) {
|
|
9354
|
+
this.remoteDocumentWrapper.remoteDocument.showError(false);
|
|
9355
|
+
loadingProgressManager.setInitialLoad(true);
|
|
9356
|
+
} else {
|
|
9357
|
+
this.remoteDocumentWrapper.remoteDocument.showError(false);
|
|
9341
9358
|
}
|
|
9342
9359
|
this.options.statusUpdated(status);
|
|
9343
9360
|
},
|
|
@@ -9361,12 +9378,15 @@
|
|
|
9361
9378
|
overriddenHandler = () => {
|
|
9362
9379
|
};
|
|
9363
9380
|
}
|
|
9381
|
+
sceneLoadingProgressManager == null ? void 0 : sceneLoadingProgressManager.addLoadingDocument(this, this.options.url, loadingProgressManager);
|
|
9364
9382
|
}
|
|
9365
9383
|
dispose() {
|
|
9384
|
+
var _a2, _b2, _c;
|
|
9366
9385
|
if (this.websocket) {
|
|
9367
9386
|
this.websocket.stop();
|
|
9368
9387
|
this.websocket = null;
|
|
9369
9388
|
}
|
|
9389
|
+
(_c = (_b2 = (_a2 = this.options.mmlScene).getLoadingProgressManager) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c.removeLoadingDocument(this);
|
|
9370
9390
|
this.remoteDocumentWrapper.remoteDocument.remove();
|
|
9371
9391
|
}
|
|
9372
9392
|
};
|