shx-3d-render
parent
002e0b4118
commit
15e4bdabf5
|
@ -163,7 +163,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.id !== this.uuid) return;
|
if(data.id !== this.uuid) {
|
||||||
|
if(status === "init" ) {
|
||||||
|
Viewer3D.contentWindow.postMessage(JSON.stringify({"init":{"uuid":this.uuid}}), "*");
|
||||||
|
this.Viewer3DContainer.querySelector('.shx-loading-spinner-container').classList.remove('shx-loading-spinner-container-done');
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
console.log("Message received from the child: ", data); // Message received from child
|
console.log("Message received from the child: ", data); // Message received from child
|
||||||
|
|
||||||
|
@ -200,10 +206,7 @@
|
||||||
function createIFrame() {
|
function createIFrame() {
|
||||||
this.Viewer3D = document.createElement('iframe');
|
this.Viewer3D = document.createElement('iframe');
|
||||||
|
|
||||||
const Viewer3D = this.Viewer3D;
|
const Viewer3D = this.Viewer3D;
|
||||||
this.Viewer3D.onload = () => {
|
|
||||||
Viewer3D.contentWindow.postMessage(JSON.stringify({"init":{"uuid":this.uuid}}), "*");
|
|
||||||
};
|
|
||||||
|
|
||||||
this.Viewer3D.src = "https://3d-viewer.shinnex.de/";
|
this.Viewer3D.src = "https://3d-viewer.shinnex.de/";
|
||||||
this.Viewer3D.classList.add('shx-threejs-renderer');
|
this.Viewer3D.classList.add('shx-threejs-renderer');
|
||||||
|
|
Loading…
Reference in New Issue