@inweb/viewer-three 26.7.2 → 26.7.7
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-three.js +19 -16
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +1 -1
- package/dist/viewer-three.module.js +5 -2
- package/dist/viewer-three.module.js.map +1 -1
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +6 -1
- package/src/Viewer/components/CameraComponent.ts +0 -1
package/dist/viewer-three.js
CHANGED
|
@@ -60197,7 +60197,6 @@ void main() {
|
|
|
60197
60197
|
});
|
|
60198
60198
|
if (sceneCamera) {
|
|
60199
60199
|
this.viewer.camera = sceneCamera.clone();
|
|
60200
|
-
this.viewer.camera.up.set(0, 0, 1);
|
|
60201
60200
|
this.viewer.camera.scale.set(1, 1, 1); // <- Visualize fix
|
|
60202
60201
|
}
|
|
60203
60202
|
const camera = this.viewer.camera;
|
|
@@ -81628,7 +81627,7 @@ void main() {
|
|
|
81628
81627
|
const attrs = e.target.attrs;
|
|
81629
81628
|
if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);
|
|
81630
81629
|
}));
|
|
81631
|
-
this._ref.on("transformend", (
|
|
81630
|
+
this._ref.on("transformend", (() => {
|
|
81632
81631
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
81633
81632
|
const wcsPoints = [];
|
|
81634
81633
|
const points = this._ref.points();
|
|
@@ -81650,7 +81649,7 @@ void main() {
|
|
|
81650
81649
|
}
|
|
81651
81650
|
this._ref.setAttr("wcsPoints", wcsPoints);
|
|
81652
81651
|
}));
|
|
81653
|
-
this._ref.on("dragend", (
|
|
81652
|
+
this._ref.on("dragend", (() => {
|
|
81654
81653
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
81655
81654
|
const wcsPoints = [];
|
|
81656
81655
|
const points = this._ref.points();
|
|
@@ -81840,7 +81839,7 @@ void main() {
|
|
|
81840
81839
|
});
|
|
81841
81840
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
81842
81841
|
}));
|
|
81843
|
-
this._ref.on("dragend", (
|
|
81842
|
+
this._ref.on("dragend", (() => {
|
|
81844
81843
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
81845
81844
|
const position = absoluteTransform.point({
|
|
81846
81845
|
x: this._ref.x(),
|
|
@@ -82028,7 +82027,7 @@ void main() {
|
|
|
82028
82027
|
y: position.y + this._ref.height()
|
|
82029
82028
|
}));
|
|
82030
82029
|
}));
|
|
82031
|
-
this._ref.on("dragend", (
|
|
82030
|
+
this._ref.on("dragend", (() => {
|
|
82032
82031
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82033
82032
|
const position = absoluteTransform.point({
|
|
82034
82033
|
x: this._ref.x(),
|
|
@@ -82253,7 +82252,7 @@ void main() {
|
|
|
82253
82252
|
y: 1
|
|
82254
82253
|
});
|
|
82255
82254
|
}));
|
|
82256
|
-
this._ref.on("transformend", (
|
|
82255
|
+
this._ref.on("transformend", (() => {
|
|
82257
82256
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82258
82257
|
const position = absoluteTransform.point({
|
|
82259
82258
|
x: this._ref.x(),
|
|
@@ -82271,7 +82270,7 @@ void main() {
|
|
|
82271
82270
|
});
|
|
82272
82271
|
this._ref.setAttr("wcsRadiusY", this._worldTransformer.screenToWorld(radiusY));
|
|
82273
82272
|
}));
|
|
82274
|
-
this._ref.on("dragend", (
|
|
82273
|
+
this._ref.on("dragend", (() => {
|
|
82275
82274
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82276
82275
|
const position = absoluteTransform.point({
|
|
82277
82276
|
x: this._ref.x(),
|
|
@@ -82685,7 +82684,7 @@ void main() {
|
|
|
82685
82684
|
y: 1
|
|
82686
82685
|
});
|
|
82687
82686
|
}));
|
|
82688
|
-
this._ref.on("transformend", (
|
|
82687
|
+
this._ref.on("transformend", (() => {
|
|
82689
82688
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82690
82689
|
const position = absoluteTransform.point({
|
|
82691
82690
|
x: this._ref.x(),
|
|
@@ -82697,7 +82696,7 @@ void main() {
|
|
|
82697
82696
|
y: position.y + this._ref.height()
|
|
82698
82697
|
}));
|
|
82699
82698
|
}));
|
|
82700
|
-
this._ref.on("dragend", (
|
|
82699
|
+
this._ref.on("dragend", (() => {
|
|
82701
82700
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82702
82701
|
const position = absoluteTransform.point({
|
|
82703
82702
|
x: this._ref.x(),
|
|
@@ -82986,7 +82985,7 @@ void main() {
|
|
|
82986
82985
|
y: position.y + this._ref.height()
|
|
82987
82986
|
}));
|
|
82988
82987
|
}));
|
|
82989
|
-
this._ref.on("dragend", (
|
|
82988
|
+
this._ref.on("dragend", (() => {
|
|
82990
82989
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
82991
82990
|
const position = absoluteTransform.point({
|
|
82992
82991
|
x: this._ref.x(),
|
|
@@ -83188,12 +83187,12 @@ void main() {
|
|
|
83188
83187
|
markupObject.updateScreenCoordinates();
|
|
83189
83188
|
}));
|
|
83190
83189
|
};
|
|
83191
|
-
this.pan =
|
|
83190
|
+
this.pan = () => {
|
|
83192
83191
|
this.getObjects().forEach((markupObject => {
|
|
83193
83192
|
markupObject.updateScreenCoordinates();
|
|
83194
83193
|
}));
|
|
83195
83194
|
};
|
|
83196
|
-
this.zoomAt =
|
|
83195
|
+
this.zoomAt = () => {
|
|
83197
83196
|
this.getObjects().forEach((markupObject => {
|
|
83198
83197
|
markupObject.updateScreenCoordinates();
|
|
83199
83198
|
}));
|
|
@@ -83456,7 +83455,7 @@ void main() {
|
|
|
83456
83455
|
lastLine = this.addLine([ pos.x, pos.y, pos.x, pos.y ]);
|
|
83457
83456
|
}
|
|
83458
83457
|
}));
|
|
83459
|
-
stage.on("mouseup touchend", (
|
|
83458
|
+
stage.on("mouseup touchend", (() => {
|
|
83460
83459
|
if (!this._markupIsActive) return;
|
|
83461
83460
|
if (isPaint) {
|
|
83462
83461
|
const pos = this.getRelativePointerPosition(stage);
|
|
@@ -83498,7 +83497,7 @@ void main() {
|
|
|
83498
83497
|
lastObj = undefined;
|
|
83499
83498
|
isPaint = false;
|
|
83500
83499
|
}));
|
|
83501
|
-
stage.on("mousemove touchmove", (
|
|
83500
|
+
stage.on("mousemove touchmove", (() => {
|
|
83502
83501
|
if (!this._markupIsActive) return;
|
|
83503
83502
|
if (!isPaint) {
|
|
83504
83503
|
return;
|
|
@@ -83878,7 +83877,7 @@ void main() {
|
|
|
83878
83877
|
y: this._imageInputPos.y
|
|
83879
83878
|
}, null, base64.toString(), 0, 0);
|
|
83880
83879
|
};
|
|
83881
|
-
this._imageInputRef.oncancel =
|
|
83880
|
+
this._imageInputRef.oncancel = () => {
|
|
83882
83881
|
this.removeImageInput();
|
|
83883
83882
|
};
|
|
83884
83883
|
document.body.appendChild(this._imageInputRef);
|
|
@@ -84065,13 +84064,17 @@ void main() {
|
|
|
84065
84064
|
this.addEventListener("optionschange", (event) => this.syncOptions(event.data));
|
|
84066
84065
|
this.scene = new Scene();
|
|
84067
84066
|
this.helpers = new Scene();
|
|
84067
|
+
this.target = new Vector3();
|
|
84068
84068
|
const pixelRatio = window.devicePixelRatio;
|
|
84069
84069
|
const rect = canvas.parentElement.getBoundingClientRect();
|
|
84070
84070
|
const width = rect.width || 1;
|
|
84071
84071
|
const height = rect.height || 1;
|
|
84072
84072
|
const aspect = width / height;
|
|
84073
84073
|
this.camera = new PerspectiveCamera(45, aspect, 0.01, 1000);
|
|
84074
|
-
this.camera.up.set(0,
|
|
84074
|
+
this.camera.up.set(0, 1, 0);
|
|
84075
|
+
this.camera.position.set(0, 0, 1);
|
|
84076
|
+
this.camera.lookAt(this.target);
|
|
84077
|
+
this.camera.updateProjectionMatrix();
|
|
84075
84078
|
this.renderer = new WebGLRenderer({
|
|
84076
84079
|
canvas,
|
|
84077
84080
|
antialias: true,
|