@inweb/viewer-visualize 25.3.23 → 25.3.25
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.
|
@@ -5117,16 +5117,19 @@ class Viewer extends EventEmitter2 {
|
|
|
5117
5117
|
canvas.style.touchAction = "none";
|
|
5118
5118
|
canvas.width = canvas.clientWidth * window.devicePixelRatio;
|
|
5119
5119
|
canvas.height = canvas.clientHeight * window.devicePixelRatio;
|
|
5120
|
-
const visualizeJs = await loadVisualizeJs(this.visualizeJsUrl, (
|
|
5121
|
-
const {loaded: loaded,
|
|
5122
|
-
|
|
5120
|
+
const visualizeJs = await loadVisualizeJs(this.visualizeJsUrl, (event => {
|
|
5121
|
+
const {loaded: loaded, total: total} = event;
|
|
5122
|
+
if (onProgress) onProgress(new ProgressEvent("progress", {
|
|
5123
|
+
lengthComputable: true,
|
|
5123
5124
|
loaded: loaded,
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
type: "
|
|
5128
|
-
|
|
5129
|
-
|
|
5125
|
+
total: total
|
|
5126
|
+
}));
|
|
5127
|
+
this.emitEvent({
|
|
5128
|
+
type: "initializeprogress",
|
|
5129
|
+
data: loaded / total,
|
|
5130
|
+
loaded: loaded,
|
|
5131
|
+
total: total
|
|
5132
|
+
});
|
|
5130
5133
|
}));
|
|
5131
5134
|
this._visualizeJs = visualizeJs;
|
|
5132
5135
|
this.visualizeJs.canvas = canvas;
|
|
@@ -5146,6 +5149,9 @@ class Viewer extends EventEmitter2 {
|
|
|
5146
5149
|
this.syncOptions();
|
|
5147
5150
|
this._renderTime = performance.now();
|
|
5148
5151
|
this.render(this._renderTime);
|
|
5152
|
+
this.emitEvent({
|
|
5153
|
+
type: "initialize"
|
|
5154
|
+
});
|
|
5149
5155
|
return this;
|
|
5150
5156
|
}
|
|
5151
5157
|
dispose() {
|