shx-3d-render

main
Jan Umbach 2024-06-19 20:41:00 +02:00
parent 19ca99322f
commit 1b2797f1d7
1 changed files with 11 additions and 8 deletions

View File

@ -196,17 +196,20 @@
this.container.appendChild(this.Viewer3DContainer);
this.Viewer3D = document.createElement('iframe');
this.Viewer3D.src = "https://3d-viewer.shinnex.de/";
this.Viewer3D.classList.add('shx-threejs-renderer');
this.Viewer3D.style.width = this.container.offsetWidth + 'px';
this.Viewer3D.style.height = this.container.offsetWidth + 'px';
this.Viewer3DContainer.appendChild(this.Viewer3D);
function createIFrame() {
this.Viewer3D = document.createElement('iframe');
this.Viewer3D.src = "https://3d-viewer.shinnex.de/";
this.Viewer3D.classList.add('shx-threejs-renderer');
this.Viewer3D.style.width = this.container.offsetWidth + 'px';
this.Viewer3D.style.height = this.container.offsetWidth + 'px';
this.Viewer3DContainer.appendChild(this.Viewer3D);
this.Viewer3D.onload = () => {
this.Viewer3D.contentWindow.postMessage(JSON.stringify({"init":{"uuid":this.uuid}}), "*");
this.Viewer3D.onload = () => {
this.Viewer3D.contentWindow.postMessage(JSON.stringify({"init":{"uuid":this.uuid}}), "*");
};
}
setTimeout(createIFrame.bind(this), 1000);
}
initCurrentVariant(id) {