@inweb/viewer-visualize 26.11.0 → 26.12.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 +59 -6
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +2 -1
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Viewer.d.ts +2 -1
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +4 -0
package/dist/viewer-visualize.js
CHANGED
|
@@ -536,6 +536,51 @@
|
|
|
536
536
|
"wheel",
|
|
537
537
|
];
|
|
538
538
|
const CANVAS_EVENTS = CanvasEvents;
|
|
539
|
+
class Info {
|
|
540
|
+
constructor() {
|
|
541
|
+
this.performance = {
|
|
542
|
+
fps: 0,
|
|
543
|
+
frameTime: 0,
|
|
544
|
+
timeToFirstRender: 0,
|
|
545
|
+
loadTime: 0,
|
|
546
|
+
};
|
|
547
|
+
this.render = {
|
|
548
|
+
viewport: { width: 0, height: 0 },
|
|
549
|
+
antialiasing: "",
|
|
550
|
+
drawCalls: 0,
|
|
551
|
+
triangles: 0,
|
|
552
|
+
points: 0,
|
|
553
|
+
lines: 0,
|
|
554
|
+
};
|
|
555
|
+
this.scene = {
|
|
556
|
+
objects: 0,
|
|
557
|
+
triangles: 0,
|
|
558
|
+
points: 0,
|
|
559
|
+
lines: 0,
|
|
560
|
+
edges: 0,
|
|
561
|
+
};
|
|
562
|
+
this.optimizedScene = {
|
|
563
|
+
objects: 0,
|
|
564
|
+
triangles: 0,
|
|
565
|
+
points: 0,
|
|
566
|
+
lines: 0,
|
|
567
|
+
edges: 0,
|
|
568
|
+
};
|
|
569
|
+
this.memory = {
|
|
570
|
+
geometries: 0,
|
|
571
|
+
geometryBytes: 0,
|
|
572
|
+
textures: 0,
|
|
573
|
+
textureBytes: 0,
|
|
574
|
+
materials: 0,
|
|
575
|
+
totalEstimatedGpuBytes: 0,
|
|
576
|
+
usedJSHeapSize: 0,
|
|
577
|
+
};
|
|
578
|
+
this.system = {
|
|
579
|
+
webglRenderer: "",
|
|
580
|
+
webglVendor: "",
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
}
|
|
539
584
|
|
|
540
585
|
class OdaGeAction {
|
|
541
586
|
constructor(module) {
|
|
@@ -16826,14 +16871,13 @@ js: import "konva/skia-backend";
|
|
|
16826
16871
|
});
|
|
16827
16872
|
};
|
|
16828
16873
|
this.pan = () => {
|
|
16829
|
-
this.
|
|
16830
|
-
markupObject.updateScreenCoordinates();
|
|
16831
|
-
});
|
|
16874
|
+
this.updateScreenCoordinatesForAll();
|
|
16832
16875
|
};
|
|
16833
16876
|
this.zoomAt = () => {
|
|
16834
|
-
this.
|
|
16835
|
-
|
|
16836
|
-
|
|
16877
|
+
this.updateScreenCoordinatesForAll();
|
|
16878
|
+
};
|
|
16879
|
+
this.changeCameraMode = () => {
|
|
16880
|
+
this.clearOverlay();
|
|
16837
16881
|
};
|
|
16838
16882
|
this.redirectToViewer = (event) => {
|
|
16839
16883
|
if (this._viewer)
|
|
@@ -16867,11 +16911,13 @@ js: import "konva/skia-backend";
|
|
|
16867
16911
|
this._viewer.addEventListener("changeactivedragger", this.changeActiveDragger);
|
|
16868
16912
|
this._viewer.addEventListener("pan", this.pan);
|
|
16869
16913
|
this._viewer.addEventListener("zoomat", this.zoomAt);
|
|
16914
|
+
this._viewer.addEventListener("changecameramode", this.changeCameraMode);
|
|
16870
16915
|
}
|
|
16871
16916
|
}
|
|
16872
16917
|
dispose() {
|
|
16873
16918
|
var _a, _b;
|
|
16874
16919
|
if (this._viewer) {
|
|
16920
|
+
this._viewer.removeEventListener("changecameramode", this.changeCameraMode);
|
|
16875
16921
|
this._viewer.removeEventListener("zoomat", this.zoomAt);
|
|
16876
16922
|
this._viewer.removeEventListener("pan", this.pan);
|
|
16877
16923
|
this._viewer.removeEventListener("changeactivedragger", this.changeActiveDragger);
|
|
@@ -17046,6 +17092,11 @@ js: import "konva/skia-backend";
|
|
|
17046
17092
|
ref.parent === this._groupGeometry ||
|
|
17047
17093
|
ref.parent === this._groupTexts);
|
|
17048
17094
|
}
|
|
17095
|
+
updateScreenCoordinatesForAll() {
|
|
17096
|
+
this.getObjects().forEach((markupObject) => {
|
|
17097
|
+
markupObject.updateScreenCoordinates();
|
|
17098
|
+
});
|
|
17099
|
+
}
|
|
17049
17100
|
initializeKonva() {
|
|
17050
17101
|
const stage = new Konva.Stage({
|
|
17051
17102
|
container: this._markupContainer,
|
|
@@ -17941,6 +17992,7 @@ js: import "konva/skia-backend";
|
|
|
17941
17992
|
this.options = new Options(this);
|
|
17942
17993
|
this.loaders = [];
|
|
17943
17994
|
this.models = [];
|
|
17995
|
+
this.info = new Info();
|
|
17944
17996
|
this.canvasEvents = CANVAS_EVENTS.slice();
|
|
17945
17997
|
this.canvaseventlistener = (event) => this.emit(event);
|
|
17946
17998
|
this._activeDragger = null;
|
|
@@ -18696,6 +18748,7 @@ js: import "konva/skia-backend";
|
|
|
18696
18748
|
exports.Component = Component;
|
|
18697
18749
|
exports.Dragger = Dragger;
|
|
18698
18750
|
exports.FileLoader = FileLoader;
|
|
18751
|
+
exports.Info = Info;
|
|
18699
18752
|
exports.Loader = Loader;
|
|
18700
18753
|
exports.Markup = KonvaMarkup;
|
|
18701
18754
|
exports.OdBaseDragger = OdBaseDragger;
|