Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Nov 24, 2023
1 parent 3a5d169 commit 36db3db
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 202 deletions.
66 changes: 40 additions & 26 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8584,20 +8584,6 @@ function frustumIntersectsAABB3(frustum, aabb) {
*/
class MarqueePicker extends Component {

/**
* Pick mode that picks {@link Entity}s that intersect the marquee box.
*
* @type {number}
*/
static PICK_MODE_INTERSECTS = 0;

/**
* Pick mode that picks {@link Entity}s that are completely inside the marquee box.
*
* @type {number}
*/
static PICK_MODE_INSIDE = 1;

/**
* Creates a MarqueePicker.
*
Expand Down Expand Up @@ -8847,6 +8833,20 @@ class MarqueePicker extends Component {
}
}

/**
* Pick mode that picks {@link Entity}s that intersect the marquee box.
*
* @type {number}
*/
MarqueePicker.PICK_MODE_INTERSECTS = 0;

/**
* Pick mode that picks {@link Entity}s that are completely inside the marquee box.
*
* @type {number}
*/
MarqueePicker.PICK_MODE_INSIDE = 1;

/**
* Controls a {@link MarqueePicker} with mouse input.
*
Expand Down Expand Up @@ -87286,13 +87286,29 @@ class PickController {

this._lastPickedEntityId = null;

this._needFireEvents = false;
this._needFireEvents = 0;

this._needToUpdate = false;

this._tickSub = this._scene.on("tick", () => {
this.runUpdate();
});
}

update() {
this._needToUpdate = true;
}

/**
* Immediately attempts a pick, if scheduled.
*/
update() {
runUpdate() {

if (!this._needToUpdate) {
return;
}

this._needToUpdate = false;

if (!this._configs.pointerEnabled) {
return;
Expand All @@ -87307,8 +87323,6 @@ class PickController {
this.snappedOrPicked = false;
this.hoveredSnappedOrSurfaceOff = false;

this._needFireEvents = false;

const hasHoverSurfaceSubs = this._cameraControl.hasSubs("hoverSurface");

if (this.scheduleSnapOrPick) {
Expand All @@ -87321,7 +87335,7 @@ class PickController {
if (snapPickResult && snapPickResult.snappedWorldPos) {
this.snapPickResult = snapPickResult;
this.snappedOrPicked = true;
this._needFireEvents = true;
this._needFireEvents++;
} else {
this.schedulePickSurface = true; // Fallback
this.snapPickResult = null;
Expand All @@ -87334,7 +87348,7 @@ class PickController {
if (pickResultCanvasPos[0] === this.pickCursorPos[0] && pickResultCanvasPos[1] === this.pickCursorPos[1]) {
this.picked = true;
this.pickedSurface = true;
this._needFireEvents = hasHoverSurfaceSubs;
this._needFireEvents += hasHoverSurfaceSubs ? 1 : 0;
this.schedulePickEntity = false;
this.schedulePickSurface = false;
if (this.scheduleSnapOrPick) {
Expand All @@ -87354,7 +87368,6 @@ class PickController {
if (pickResultCanvasPos[0] === this.pickCursorPos[0] && pickResultCanvasPos[1] === this.pickCursorPos[1]) {
this.picked = true;
this.pickedSurface = false;
this._needFireEvents = false;
this.schedulePickEntity = false;
this.schedulePickSurface = false;
return;
Expand All @@ -87375,10 +87388,10 @@ class PickController {
} else {
this.pickedSurface = true;
}
this._needFireEvents = true;
this._needFireEvents++;
} else if (this.scheduleSnapOrPick) {
this.hoveredSnappedOrSurfaceOff = true;
this._needFireEvents = true;
this._needFireEvents++;
}

} else { // schedulePickEntity == true
Expand All @@ -87390,7 +87403,7 @@ class PickController {
if (this.pickResult) {
this.picked = true;
this.pickedSurface = false;
this._needFireEvents = true;
this._needFireEvents++;
}
}

Expand All @@ -87401,7 +87414,7 @@ class PickController {

fireEvents() {

if (!this._needFireEvents) {
if (this._needFireEvents == 0) {
return;
}

Expand Down Expand Up @@ -87469,10 +87482,11 @@ class PickController {

this.pickResult = null;

this._needFireEvents = false;
this._needFireEvents = 0;
}

destroy() {
this._scene.off(this._tickSub);
}
}

Expand Down
66 changes: 40 additions & 26 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -8580,20 +8580,6 @@ function frustumIntersectsAABB3(frustum, aabb) {
*/
class MarqueePicker extends Component {

/**
* Pick mode that picks {@link Entity}s that intersect the marquee box.
*
* @type {number}
*/
static PICK_MODE_INTERSECTS = 0;

/**
* Pick mode that picks {@link Entity}s that are completely inside the marquee box.
*
* @type {number}
*/
static PICK_MODE_INSIDE = 1;

/**
* Creates a MarqueePicker.
*
Expand Down Expand Up @@ -8843,6 +8829,20 @@ class MarqueePicker extends Component {
}
}

/**
* Pick mode that picks {@link Entity}s that intersect the marquee box.
*
* @type {number}
*/
MarqueePicker.PICK_MODE_INTERSECTS = 0;

/**
* Pick mode that picks {@link Entity}s that are completely inside the marquee box.
*
* @type {number}
*/
MarqueePicker.PICK_MODE_INSIDE = 1;

/**
* Controls a {@link MarqueePicker} with mouse input.
*
Expand Down Expand Up @@ -87282,13 +87282,29 @@ class PickController {

this._lastPickedEntityId = null;

this._needFireEvents = false;
this._needFireEvents = 0;

this._needToUpdate = false;

this._tickSub = this._scene.on("tick", () => {
this.runUpdate();
});
}

update() {
this._needToUpdate = true;
}

/**
* Immediately attempts a pick, if scheduled.
*/
update() {
runUpdate() {

if (!this._needToUpdate) {
return;
}

this._needToUpdate = false;

if (!this._configs.pointerEnabled) {
return;
Expand All @@ -87303,8 +87319,6 @@ class PickController {
this.snappedOrPicked = false;
this.hoveredSnappedOrSurfaceOff = false;

this._needFireEvents = false;

const hasHoverSurfaceSubs = this._cameraControl.hasSubs("hoverSurface");

if (this.scheduleSnapOrPick) {
Expand All @@ -87317,7 +87331,7 @@ class PickController {
if (snapPickResult && snapPickResult.snappedWorldPos) {
this.snapPickResult = snapPickResult;
this.snappedOrPicked = true;
this._needFireEvents = true;
this._needFireEvents++;
} else {
this.schedulePickSurface = true; // Fallback
this.snapPickResult = null;
Expand All @@ -87330,7 +87344,7 @@ class PickController {
if (pickResultCanvasPos[0] === this.pickCursorPos[0] && pickResultCanvasPos[1] === this.pickCursorPos[1]) {
this.picked = true;
this.pickedSurface = true;
this._needFireEvents = hasHoverSurfaceSubs;
this._needFireEvents += hasHoverSurfaceSubs ? 1 : 0;
this.schedulePickEntity = false;
this.schedulePickSurface = false;
if (this.scheduleSnapOrPick) {
Expand All @@ -87350,7 +87364,6 @@ class PickController {
if (pickResultCanvasPos[0] === this.pickCursorPos[0] && pickResultCanvasPos[1] === this.pickCursorPos[1]) {
this.picked = true;
this.pickedSurface = false;
this._needFireEvents = false;
this.schedulePickEntity = false;
this.schedulePickSurface = false;
return;
Expand All @@ -87371,10 +87384,10 @@ class PickController {
} else {
this.pickedSurface = true;
}
this._needFireEvents = true;
this._needFireEvents++;
} else if (this.scheduleSnapOrPick) {
this.hoveredSnappedOrSurfaceOff = true;
this._needFireEvents = true;
this._needFireEvents++;
}

} else { // schedulePickEntity == true
Expand All @@ -87386,7 +87399,7 @@ class PickController {
if (this.pickResult) {
this.picked = true;
this.pickedSurface = false;
this._needFireEvents = true;
this._needFireEvents++;
}
}

Expand All @@ -87397,7 +87410,7 @@ class PickController {

fireEvents() {

if (!this._needFireEvents) {
if (this._needFireEvents == 0) {
return;
}

Expand Down Expand Up @@ -87465,10 +87478,11 @@ class PickController {

this.pickResult = null;

this._needFireEvents = false;
this._needFireEvents = 0;
}

destroy() {
this._scene.off(this._tickSub);
}
}

Expand Down
286 changes: 143 additions & 143 deletions dist/xeokit-sdk.es5.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-sdk.min.cjs.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-sdk.min.es.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/xeokit-sdk.min.es5.js

Large diffs are not rendered by default.

0 comments on commit 36db3db

Please sign in to comment.