shx-3d-render

main
Jan Umbach 2024-06-22 10:07:30 +02:00
parent ca7fa47a59
commit e2f9c16ce3
1 changed files with 10 additions and 13 deletions

View File

@ -403,6 +403,15 @@
}
renderView() {
let currentTimeout = this.renderViewDebounce;
if(currentTimeout) {
clearTimeout(currentTimeout);
}
this.renderViewDebounce = setTimeout(this._renderView.bind(this), 500);
}
_renderView() {
// request data from server
let tJS = this.tJS;
@ -451,19 +460,7 @@
if(this.Viewer3D)
this.Viewer3D.contentWindow.postMessage(JSON.stringify({"changeView":{"currentVariant": this.currentVariant, values: globalInputFormsObjValues[this.currentVariant]}}), "*");
this.loadingSpinner.show();
/*fetch('https://render.shinnex.de/render/' + this.currentVariant, { method: 'POST', body: JSON.stringify(globalInputFormsObjValues[this.currentVariant]) })
.then((response) => {
// stl file
return response.blob();
}).then((blob) => {
// log size in kB
console.log(blob.size / 1024 + 'kB');
});*/
this.loadingSpinner.show();
}