@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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-visualize",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.25",
|
|
4
4
|
"description": "3D CAD and BIM data Viewer powered by Visualize",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"ts-docs": "typedoc"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@inweb/client": "^25.3.
|
|
33
|
-
"@inweb/eventemitter2": "^25.3.
|
|
34
|
-
"@inweb/viewer-core": "^25.3.
|
|
32
|
+
"@inweb/client": "^25.3.25",
|
|
33
|
+
"@inweb/eventemitter2": "^25.3.25",
|
|
34
|
+
"@inweb/viewer-core": "^25.3.25"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"canvas": "^2.11.2",
|
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -213,10 +213,10 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
213
213
|
canvas.width = canvas.clientWidth * window.devicePixelRatio;
|
|
214
214
|
canvas.height = canvas.clientHeight * window.devicePixelRatio;
|
|
215
215
|
|
|
216
|
-
const visualizeJs: any = await loadVisualizeJs(this.visualizeJsUrl, (
|
|
217
|
-
const { loaded,
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
const visualizeJs: any = await loadVisualizeJs(this.visualizeJsUrl, (event) => {
|
|
217
|
+
const { loaded, total } = event;
|
|
218
|
+
if (onProgress) onProgress(new ProgressEvent("progress", { lengthComputable: true, loaded, total }));
|
|
219
|
+
this.emitEvent({ type: "initializeprogress", data: loaded / total, loaded, total });
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
this._visualizeJs = visualizeJs;
|
|
@@ -245,6 +245,8 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
245
245
|
this._renderTime = performance.now();
|
|
246
246
|
this.render(this._renderTime);
|
|
247
247
|
|
|
248
|
+
this.emitEvent({ type: "initialize" });
|
|
249
|
+
|
|
248
250
|
return this;
|
|
249
251
|
}
|
|
250
252
|
|