@xeokit/xeokit-sdk 2.4.2-beta-19 → 2.4.2-beta-21
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/xeokit-sdk.cjs.js +17 -4
- package/dist/xeokit-sdk.es.js +17 -4
- package/dist/xeokit-sdk.es5.js +3 -3
- 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/viewer/scene/CameraControl/lib/controllers/PickController.js +8 -0
- package/src/viewer/scene/model/SceneModelMesh.js +9 -4
package/package.json
CHANGED
|
@@ -69,6 +69,8 @@ class PickController {
|
|
|
69
69
|
|
|
70
70
|
this._lastPickedEntityId = null;
|
|
71
71
|
|
|
72
|
+
this._lastHash = null;
|
|
73
|
+
|
|
72
74
|
this._needFireEvents = 0;
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -76,6 +78,7 @@ class PickController {
|
|
|
76
78
|
* Immediately attempts a pick, if scheduled.
|
|
77
79
|
*/
|
|
78
80
|
update() {
|
|
81
|
+
|
|
79
82
|
if (!this._configs.pointerEnabled) {
|
|
80
83
|
return;
|
|
81
84
|
}
|
|
@@ -84,6 +87,11 @@ class PickController {
|
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
86
89
|
|
|
90
|
+
const hash = `${~~this.pickCursorPos[0]}-${~~this.pickCursorPos[1]}-${this.scheduleSnapOrPick}-${this.schedulePickSurface}-${this.schedulePickEntity}`;
|
|
91
|
+
if (this._lastHash === hash) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
87
95
|
this.picked = false;
|
|
88
96
|
this.pickedSurface = false;
|
|
89
97
|
this.snappedOrPicked = false;
|
|
@@ -306,10 +306,15 @@ export class SceneModelMesh {
|
|
|
306
306
|
*/
|
|
307
307
|
get aabb() { // called by SceneModelEntity
|
|
308
308
|
if (this._aabbDirty) {
|
|
309
|
-
if (this.obb
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
if (this.obb) {
|
|
310
|
+
if (this.transform) {
|
|
311
|
+
math.transformOBB3(this.transform.worldMatrix, this.obb, tempOBB3);
|
|
312
|
+
math.transformOBB3(this.model.worldMatrix, tempOBB3, tempOBB3b);
|
|
313
|
+
math.OBB3ToAABB3(tempOBB3b, this._aabb);
|
|
314
|
+
} else {
|
|
315
|
+
math.transformOBB3(this.model.worldMatrix, this.obb, tempOBB3);
|
|
316
|
+
math.OBB3ToAABB3(tempOBB3, this._aabb);
|
|
317
|
+
}
|
|
313
318
|
}
|
|
314
319
|
this._aabbDirty = false;
|
|
315
320
|
}
|