3d-viewer test

main
Jan Umbach 2024-06-14 11:40:04 +02:00
parent 043ef2b5b6
commit f63b414869
1 changed files with 9 additions and 2 deletions

View File

@ -127,8 +127,12 @@
renderView() {
// request data from server
let tJS = this.tJS;
iframe.contentWindow.postMessage(JSON.stringify(globalInputFormsObjValues[this.currentVariant]), "*");
fetch('https://render.shinnex.de/render/' + this.currentVariant, { method: 'POST', body: JSON.stringify(globalInputFormsObjValues[this.currentVariant]) })
/*fetch('https://render.shinnex.de/render/' + this.currentVariant, { method: 'POST', body: JSON.stringify(globalInputFormsObjValues[this.currentVariant]) })
.then((response) => {
// stl file
return response.blob();
@ -136,7 +140,7 @@
// log size in kB
console.log(blob.size / 1024 + 'kB');
});
});*/
}
@ -145,8 +149,11 @@
let content = this.content;
let container = this.container;
// edit inner html
content.innerHTML = "";
renderView();
for(let key in globalInputFormsObj) {
if(key === this.currentVariant) {