mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 14:12:50 +02:00
david's comments
This commit is contained in:
parent
57ee9786af
commit
7d47bfa2e4
1 changed files with 16 additions and 10 deletions
|
@ -899,6 +899,9 @@ SelectionDisplay = (function() {
|
|||
yRailOverlay,
|
||||
zRailOverlay
|
||||
];
|
||||
|
||||
const nonLayeredOverlays = [selectionBox, iconSelectionBox];
|
||||
|
||||
var maximumHandleInAllOverlays = handleDuplicator;
|
||||
|
||||
overlayNames[handleTranslateXCone] = "handleTranslateXCone";
|
||||
|
@ -1015,18 +1018,21 @@ SelectionDisplay = (function() {
|
|||
|
||||
// We want to first check the drawInFront overlays (i.e. the handles, but really everything except the selectionBoxes)
|
||||
// so that you can click on them even when they're behind things
|
||||
var overlayIncludesLayered = overlayIncludes.filter(function (value, index, arr) {
|
||||
return value != selectionBox && value != iconSelectionBox;
|
||||
});
|
||||
var overlayIncludesLayered = [];
|
||||
var overlayIncludesNonLayered = [];
|
||||
for (var i = 0; i < overlayIncludes.length; i++) {
|
||||
var value = overlayIncludes[i];
|
||||
if (nonLayeredOverlays.includes(value)) {
|
||||
overlayIncludesNonLayered.push(value);
|
||||
} else {
|
||||
overlayIncludesLayered.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
var intersectObj = Overlays.findRayIntersection(queryRay, true, overlayIncludesLayered, overlayExcludes);
|
||||
|
||||
if (!intersectObj.intersects) {
|
||||
var overlayIncludesNonLayered = overlayIncludes.filter(function (value, index, arr) {
|
||||
return value == selectionBox || value == iconSelectionBox;
|
||||
});
|
||||
if (overlayIncludesNonLayered.length > 0) {
|
||||
intersectObj = Overlays.findRayIntersection(queryRay, true, overlayIncludesNonLayered, overlayExcludes);
|
||||
}
|
||||
if (!intersectObj.intersects && overlayIncludesNonLayered.length > 0) {
|
||||
intersectObj = Overlays.findRayIntersection(queryRay, true, overlayIncludesNonLayered, overlayExcludes);
|
||||
}
|
||||
|
||||
if (wantDebug) {
|
||||
|
|
Loading…
Reference in a new issue