@xeokit/xeokit-sdk 2.6.0-beta-6 → 2.6.0-beta-8
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/web-ifc.wasm +0 -0
- package/dist/xeokit-sdk.cjs.js +18 -18
- package/dist/xeokit-sdk.es.js +18 -18
- package/dist/xeokit-sdk.es5.js +4 -6
- package/dist/xeokit-sdk.min.cjs.js +2 -2
- package/dist/xeokit-sdk.min.es.js +2 -2
- package/dist/xeokit-sdk.min.es5.js +2 -2
- package/package.json +1 -1
- package/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.js +7 -7
- package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.js +5 -10
- package/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +1 -1
- package/src/viewer/Plugin.js +1 -1
- package/src/viewer/Viewer.js +1 -1
- package/src/viewer/scene/CameraControl/lib/CameraUpdater.js +4 -1
- package/src/viewer/scene/model/dtx/triangles/DTXTrianglesLayer.js +3 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/EdgesEmphasisRenderer.js +1 -1
- package/src/viewer/scene/utils/FileLoader.js +1 -1
- package/src/viewer/scene/utils.js +1 -1
package/package.json
CHANGED
|
@@ -189,6 +189,10 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
|
|
|
189
189
|
const mouseWorldPos = math.vec3();
|
|
190
190
|
const mouseHoverCanvasPos = math.vec2();
|
|
191
191
|
this._currentAngleMeasurement = null;
|
|
192
|
+
|
|
193
|
+
const getTop = el => el.offsetTop + (el.offsetParent && getTop(el.offsetParent));
|
|
194
|
+
const getLeft = el => el.offsetLeft + (el.offsetParent && getLeft(el.offsetParent));
|
|
195
|
+
|
|
192
196
|
this._onMouseHoverSurface = cameraControl.on(
|
|
193
197
|
this._snapping
|
|
194
198
|
? "hoverSnapOrSurface"
|
|
@@ -220,13 +224,9 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
|
|
|
220
224
|
mouseHoverCanvasPos.set(canvasPos);
|
|
221
225
|
switch (this._mouseState) {
|
|
222
226
|
case MOUSE_FINDING_ORIGIN:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
const canvasLeftEdge = canvasBoundRect.left + scrollLeft;
|
|
227
|
-
const canvasTopEdge = canvasBoundRect.top + scrollTop;
|
|
228
|
-
this.markerDiv.style.left = `${canvasLeftEdge + canvasPos[0] - 5}px`;
|
|
229
|
-
this.markerDiv.style.top = `${canvasTopEdge + canvasPos[1] - 5}px`;
|
|
227
|
+
this.markerDiv.style.left = `${getLeft(canvas) + canvasPos[0] - 5}px`;
|
|
228
|
+
this.markerDiv.style.top = `${getTop(canvas) + canvasPos[1] - 5}px`;
|
|
229
|
+
|
|
230
230
|
break;
|
|
231
231
|
case MOUSE_FINDING_CORNER:
|
|
232
232
|
if (this._currentAngleMeasurement) {
|
|
@@ -197,6 +197,9 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
|
|
|
197
197
|
|
|
198
198
|
this._mouseState = MOUSE_FIRST_CLICK_EXPECTED;
|
|
199
199
|
|
|
200
|
+
const getTop = el => el.offsetTop + (el.offsetParent && getTop(el.offsetParent));
|
|
201
|
+
const getLeft = el => el.offsetLeft + (el.offsetParent && getLeft(el.offsetParent));
|
|
202
|
+
|
|
200
203
|
this._onCameraControlHoverSnapOrSurface = cameraControl.on(
|
|
201
204
|
this._snapping
|
|
202
205
|
? "hoverSnapOrSurface"
|
|
@@ -207,16 +210,8 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
|
|
|
207
210
|
pointerCanvasPos.set(event.canvasPos);
|
|
208
211
|
if (this._mouseState === MOUSE_FIRST_CLICK_EXPECTED) {
|
|
209
212
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const canvasBoundRect = canvas.getBoundingClientRect();
|
|
213
|
-
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
214
|
-
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
215
|
-
const canvasLeftEdge = canvasBoundRect.left + scrollLeft;
|
|
216
|
-
const canvasTopEdge = canvasBoundRect.top + scrollTop;
|
|
217
|
-
|
|
218
|
-
this._markerDiv.style.left = `${canvasLeftEdge + canvasPos[0] - 5}px`;
|
|
219
|
-
this._markerDiv.style.top = `${canvasTopEdge + canvasPos[1] - 5}px`;
|
|
213
|
+
this._markerDiv.style.left = `${getLeft(canvas) + canvasPos[0] - 5}px`;
|
|
214
|
+
this._markerDiv.style.top = `${getTop(canvas) + canvasPos[1] - 5}px`;
|
|
220
215
|
|
|
221
216
|
this._markerDiv.style.background = "pink";
|
|
222
217
|
if (event.snappedToVertex || event.snappedToEdge) {
|
package/src/viewer/Plugin.js
CHANGED
package/src/viewer/Viewer.js
CHANGED
|
@@ -3,7 +3,7 @@ import {CameraFlightAnimation} from "./scene/camera/CameraFlightAnimation.js";
|
|
|
3
3
|
import {CameraControl} from "./scene/CameraControl/CameraControl.js";
|
|
4
4
|
import {MetaScene} from "./metadata/MetaScene.js";
|
|
5
5
|
import {LocaleService} from "./localization/LocaleService.js";
|
|
6
|
-
import html2canvas from 'html2canvas/dist/html2canvas.esm.js';
|
|
6
|
+
import html2canvas from '../../node_modules/html2canvas/dist/html2canvas.esm.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The 3D Viewer at the heart of the xeokit SDK.
|
|
@@ -103,6 +103,9 @@ class CameraUpdater {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
} else {
|
|
107
|
+
dollyDistFactor = 1;
|
|
108
|
+
followPointerWorldPos = null;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
const dollyDeltaForDist = (updates.dollyDelta * dollyDistFactor);
|
|
@@ -309,4 +312,4 @@ class CameraUpdater {
|
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
|
|
312
|
-
export {CameraUpdater};
|
|
315
|
+
export {CameraUpdater};
|
|
@@ -860,7 +860,9 @@ export class DTXTrianglesLayer {
|
|
|
860
860
|
// Color
|
|
861
861
|
|
|
862
862
|
let f0;
|
|
863
|
-
if (!visible || culled || xrayed
|
|
863
|
+
if (!visible || culled || xrayed
|
|
864
|
+
|| (highlighted && !this.model.scene.highlightMaterial.glowThrough)
|
|
865
|
+
|| (selected && !this.model.scene.selectedMaterial.glowThrough)) {
|
|
864
866
|
f0 = RENDER_PASSES.NOT_RENDERED;
|
|
865
867
|
} else {
|
|
866
868
|
if (transparent) {
|