@inweb/viewer-visualize 27.1.0 → 27.1.1
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/dist/viewer-visualize.js +22 -21
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +22 -21
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Components/RenderLoopComponent.d.ts +1 -1
- package/lib/Viewer/Loaders/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/Viewer/Components/RenderLoopComponent.ts +2 -2
- package/src/Viewer/Loaders/VSFCloudLoader.ts +2 -2
- package/src/Viewer/Loaders/VSFFileLoader.ts +1 -1
- package/src/Viewer/Loaders/VSFXCloudLoader.ts +1 -1
- package/src/Viewer/Loaders/VSFXCloudPartialLoader.ts +2 -2
- package/src/Viewer/Loaders/VSFXCloudStreamingLoader.ts +2 -2
- package/src/Viewer/Loaders/VSFXFileLoader.ts +1 -1
- package/src/Viewer/Loaders/index.ts +2 -1
- package/src/Viewer/Viewer.ts +13 -12
package/dist/viewer-visualize.js
CHANGED
|
@@ -3431,13 +3431,13 @@
|
|
|
3431
3431
|
|
|
3432
3432
|
class RenderLoopComponent {
|
|
3433
3433
|
constructor(viewer) {
|
|
3434
|
-
this.animate = (time
|
|
3434
|
+
this.animate = (time) => {
|
|
3435
3435
|
this.requestId = requestAnimationFrame(this.animate);
|
|
3436
3436
|
this.viewer.render(time);
|
|
3437
3437
|
this.viewer.emitEvent({ type: "animate", time });
|
|
3438
3438
|
};
|
|
3439
3439
|
this.viewer = viewer;
|
|
3440
|
-
this.animate
|
|
3440
|
+
this.requestId = requestAnimationFrame(this.animate);
|
|
3441
3441
|
}
|
|
3442
3442
|
dispose() {
|
|
3443
3443
|
cancelAnimationFrame(this.requestId);
|
|
@@ -3837,8 +3837,8 @@
|
|
|
3837
3837
|
this.viewer.models.push(modelImpl);
|
|
3838
3838
|
this.viewer.syncOptions();
|
|
3839
3839
|
this.viewer.syncOverlay();
|
|
3840
|
-
this.viewer.update(true);
|
|
3841
3840
|
this.viewer.emitEvent({ type: "databasechunk", data, file });
|
|
3841
|
+
this.viewer.update(true);
|
|
3842
3842
|
return this;
|
|
3843
3843
|
}
|
|
3844
3844
|
}
|
|
@@ -3882,12 +3882,12 @@
|
|
|
3882
3882
|
this.viewer.models.push(modelImpl);
|
|
3883
3883
|
this.viewer.syncOptions();
|
|
3884
3884
|
this.viewer.syncOverlay();
|
|
3885
|
-
this.viewer.update(true);
|
|
3886
3885
|
this.viewer.emitEvent({ type: "databasechunk", data, file: model.file, model });
|
|
3886
|
+
this.viewer.update(true);
|
|
3887
3887
|
}
|
|
3888
3888
|
else {
|
|
3889
|
-
this.viewer.update();
|
|
3890
3889
|
this.viewer.emitEvent({ type: "geometrychunk", data, file: model.file, model });
|
|
3890
|
+
this.viewer.update();
|
|
3891
3891
|
}
|
|
3892
3892
|
}
|
|
3893
3893
|
return this;
|
|
@@ -3932,8 +3932,8 @@
|
|
|
3932
3932
|
this.viewer.models.push(modelImpl);
|
|
3933
3933
|
this.viewer.syncOptions();
|
|
3934
3934
|
this.viewer.syncOverlay();
|
|
3935
|
-
this.viewer.update(true);
|
|
3936
3935
|
this.viewer.emitEvent({ type: "databasechunk", data, file });
|
|
3936
|
+
this.viewer.update(true);
|
|
3937
3937
|
return this;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
@@ -3973,8 +3973,8 @@
|
|
|
3973
3973
|
this.viewer.models.push(modelImpl);
|
|
3974
3974
|
this.viewer.syncOptions();
|
|
3975
3975
|
this.viewer.syncOverlay();
|
|
3976
|
-
this.viewer.update(true);
|
|
3977
3976
|
this.viewer.emitEvent({ type: "databasechunk", data, file: model.file, model });
|
|
3977
|
+
this.viewer.update(true);
|
|
3978
3978
|
return this;
|
|
3979
3979
|
}
|
|
3980
3980
|
}
|
|
@@ -4023,12 +4023,12 @@
|
|
|
4023
4023
|
this.viewer.models.push(modelImpl);
|
|
4024
4024
|
this.viewer.syncOptions();
|
|
4025
4025
|
this.viewer.syncOverlay();
|
|
4026
|
-
this.viewer.update(true);
|
|
4027
4026
|
this.viewer.emitEvent({ type: "databasechunk", data: chunk, file: model.file, model });
|
|
4027
|
+
this.viewer.update(true);
|
|
4028
4028
|
}
|
|
4029
4029
|
else {
|
|
4030
|
-
this.viewer.update();
|
|
4031
4030
|
this.viewer.emitEvent({ type: "geometrychunk", data: chunk, file: model.file, model });
|
|
4031
|
+
this.viewer.update();
|
|
4032
4032
|
}
|
|
4033
4033
|
};
|
|
4034
4034
|
await model.downloadResource(model.database, chunkLoadHandler, this.abortController.signal);
|
|
@@ -4081,12 +4081,12 @@
|
|
|
4081
4081
|
this.viewer.models.push(modelImpl);
|
|
4082
4082
|
this.viewer.syncOptions();
|
|
4083
4083
|
this.viewer.syncOverlay();
|
|
4084
|
-
this.viewer.update(true);
|
|
4085
4084
|
this.viewer.emitEvent({ type: "databasechunk", data: chunk, file: model.file, model });
|
|
4085
|
+
this.viewer.update(true);
|
|
4086
4086
|
}
|
|
4087
4087
|
else {
|
|
4088
|
-
this.viewer.update();
|
|
4089
4088
|
this.viewer.emitEvent({ type: "geometrychunk", data: chunk, file: model.file, model });
|
|
4089
|
+
this.viewer.update();
|
|
4090
4090
|
}
|
|
4091
4091
|
};
|
|
4092
4092
|
const downloadResourceRange = async (dataId, requestId, ranges) => {
|
|
@@ -18172,8 +18172,8 @@ js: import "konva/skia-backend";
|
|
|
18172
18172
|
this.syncOptions();
|
|
18173
18173
|
this.syncOverlay();
|
|
18174
18174
|
this._renderTime = performance.now();
|
|
18175
|
-
this.render(this._renderTime);
|
|
18176
18175
|
this.emitEvent({ type: "initialize" });
|
|
18176
|
+
this.update(true);
|
|
18177
18177
|
return this;
|
|
18178
18178
|
}
|
|
18179
18179
|
dispose() {
|
|
@@ -18209,8 +18209,8 @@ js: import "konva/skia-backend";
|
|
|
18209
18209
|
this.canvas.style.height = height + "px";
|
|
18210
18210
|
}
|
|
18211
18211
|
this._viewer.resize(0, this.canvas.width, this.canvas.height, 0);
|
|
18212
|
-
this.update(true);
|
|
18213
18212
|
this.emitEvent({ type: "resize", width, height });
|
|
18213
|
+
this.update(true);
|
|
18214
18214
|
}
|
|
18215
18215
|
resize() {
|
|
18216
18216
|
console.warn("Viewer.resize() has been deprecated since 26.9 and will be removed in a future release, use Viewer.setSize() instead.");
|
|
@@ -18277,6 +18277,8 @@ js: import "konva/skia-backend";
|
|
|
18277
18277
|
return this;
|
|
18278
18278
|
}
|
|
18279
18279
|
applyModelTransformMatrix(model) {
|
|
18280
|
+
if (!this.visualizeJs)
|
|
18281
|
+
return;
|
|
18280
18282
|
this.executeCommand("applyModelTransform", model);
|
|
18281
18283
|
}
|
|
18282
18284
|
applySceneGraphSettings(options = this.options) {
|
|
@@ -18322,16 +18324,15 @@ js: import "konva/skia-backend";
|
|
|
18322
18324
|
try {
|
|
18323
18325
|
await this.loadReferences(model);
|
|
18324
18326
|
await loader.load(model, format, params);
|
|
18327
|
+
this.applyModelTransformMatrix(model);
|
|
18328
|
+
this.applySceneGraphSettings();
|
|
18325
18329
|
}
|
|
18326
18330
|
catch (error) {
|
|
18327
18331
|
this.emitEvent({ type: "geometryerror", data: error, file, model });
|
|
18328
18332
|
throw error;
|
|
18329
18333
|
}
|
|
18330
18334
|
this.emitEvent({ type: "geometryend", file, model });
|
|
18331
|
-
|
|
18332
|
-
this.applyModelTransformMatrix(model);
|
|
18333
|
-
this.applySceneGraphSettings();
|
|
18334
|
-
}
|
|
18335
|
+
this.update(true);
|
|
18335
18336
|
return this;
|
|
18336
18337
|
}
|
|
18337
18338
|
openVsfFile(buffer) {
|
|
@@ -18348,7 +18349,6 @@ js: import "konva/skia-backend";
|
|
|
18348
18349
|
visViewer.parseFile(data);
|
|
18349
18350
|
this.syncOptions();
|
|
18350
18351
|
this.syncOverlay();
|
|
18351
|
-
this.update(true);
|
|
18352
18352
|
this.emitEvent({ type: "geometryprogress", data: 1, file: "", buffer });
|
|
18353
18353
|
this.emitEvent({ type: "databasechunk", data, file: "", buffer });
|
|
18354
18354
|
}
|
|
@@ -18357,6 +18357,7 @@ js: import "konva/skia-backend";
|
|
|
18357
18357
|
throw error;
|
|
18358
18358
|
}
|
|
18359
18359
|
this.emitEvent({ type: "geometryend", file: "", buffer });
|
|
18360
|
+
this.update(true);
|
|
18360
18361
|
return this;
|
|
18361
18362
|
}
|
|
18362
18363
|
openVsfxFile(buffer) {
|
|
@@ -18373,7 +18374,6 @@ js: import "konva/skia-backend";
|
|
|
18373
18374
|
visViewer.parseVsfx(data);
|
|
18374
18375
|
this.syncOptions();
|
|
18375
18376
|
this.syncOverlay();
|
|
18376
|
-
this.update(true);
|
|
18377
18377
|
this.emitEvent({ type: "geometryprogress", data: 1, file: "", buffer });
|
|
18378
18378
|
this.emitEvent({ type: "databasechunk", data, file: "", buffer });
|
|
18379
18379
|
}
|
|
@@ -18382,6 +18382,7 @@ js: import "konva/skia-backend";
|
|
|
18382
18382
|
throw error;
|
|
18383
18383
|
}
|
|
18384
18384
|
this.emitEvent({ type: "geometryend", file: "", buffer });
|
|
18385
|
+
this.update(true);
|
|
18385
18386
|
return this;
|
|
18386
18387
|
}
|
|
18387
18388
|
cancel() {
|
|
@@ -18408,8 +18409,8 @@ js: import "konva/skia-backend";
|
|
|
18408
18409
|
visViewer.createLocalDatabase();
|
|
18409
18410
|
this.syncOptions();
|
|
18410
18411
|
this.syncOverlay();
|
|
18411
|
-
this.update(true);
|
|
18412
18412
|
this.emitEvent({ type: "clear" });
|
|
18413
|
+
this.update(true);
|
|
18413
18414
|
return this;
|
|
18414
18415
|
}
|
|
18415
18416
|
is3D() {
|
|
@@ -18702,7 +18703,7 @@ js: import "konva/skia-backend";
|
|
|
18702
18703
|
this.syncOverlay();
|
|
18703
18704
|
this.setActiveDragger(draggerName);
|
|
18704
18705
|
this.emitEvent({ type: "drawviewpoint", data: viewpoint });
|
|
18705
|
-
this.update();
|
|
18706
|
+
this.update(true);
|
|
18706
18707
|
}
|
|
18707
18708
|
createViewpoint() {
|
|
18708
18709
|
if (!this.visualizeJs)
|