mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
correctly draw tools when in orbit mode
This commit is contained in:
parent
61d9ea44af
commit
cbacf5f328
1 changed files with 14 additions and 0 deletions
|
@ -247,6 +247,7 @@ var trackLastMouseY = 0;
|
||||||
var trackAsDelete = false;
|
var trackAsDelete = false;
|
||||||
var trackAsRecolor = false;
|
var trackAsRecolor = false;
|
||||||
var trackAsEyedropper = false;
|
var trackAsEyedropper = false;
|
||||||
|
var trackAsOrbit = false;
|
||||||
|
|
||||||
function showPreviewVoxel() {
|
function showPreviewVoxel() {
|
||||||
var voxelColor;
|
var voxelColor;
|
||||||
|
@ -293,6 +294,8 @@ function showPreviewVoxel() {
|
||||||
solid: true,
|
solid: true,
|
||||||
alpha: 0.8
|
alpha: 0.8
|
||||||
});
|
});
|
||||||
|
} else if (trackAsOrbit) {
|
||||||
|
Overlays.editOverlay(voxelPreview, { visible: false });
|
||||||
} else if (!isExtruding) {
|
} else if (!isExtruding) {
|
||||||
guidePosition = { x: intersection.voxel.x,
|
guidePosition = { x: intersection.voxel.x,
|
||||||
y: intersection.voxel.y,
|
y: intersection.voxel.y,
|
||||||
|
@ -440,6 +443,7 @@ function trackMouseEvent(event) {
|
||||||
trackAsDelete = event.isControl;
|
trackAsDelete = event.isControl;
|
||||||
trackAsRecolor = event.isShifted;
|
trackAsRecolor = event.isShifted;
|
||||||
trackAsEyedropper = event.isMeta;
|
trackAsEyedropper = event.isMeta;
|
||||||
|
trackAsOrbit = event.isAlt;
|
||||||
showPreviewGuides();
|
showPreviewGuides();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,6 +460,10 @@ function trackKeyPressEvent(event) {
|
||||||
trackAsEyedropper = true;
|
trackAsEyedropper = true;
|
||||||
moveTools();
|
moveTools();
|
||||||
}
|
}
|
||||||
|
if (event.text == "ALT") {
|
||||||
|
trackAsOrbit = true;
|
||||||
|
moveTools();
|
||||||
|
}
|
||||||
showPreviewGuides();
|
showPreviewGuides();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,6 +480,10 @@ function trackKeyReleaseEvent(event) {
|
||||||
trackAsEyedropper = false;
|
trackAsEyedropper = false;
|
||||||
moveTools();
|
moveTools();
|
||||||
}
|
}
|
||||||
|
if (event.text == "ALT") {
|
||||||
|
trackAsOrbit = false;
|
||||||
|
moveTools();
|
||||||
|
}
|
||||||
|
|
||||||
// on TAB release, toggle our tool state
|
// on TAB release, toggle our tool state
|
||||||
if (event.text == "TAB") {
|
if (event.text == "TAB") {
|
||||||
|
@ -763,6 +775,8 @@ function moveTools() {
|
||||||
recolorToolColor = toolSelectedColor;
|
recolorToolColor = toolSelectedColor;
|
||||||
} else if (trackAsEyedropper) {
|
} else if (trackAsEyedropper) {
|
||||||
eyedropperToolColor = toolSelectedColor;
|
eyedropperToolColor = toolSelectedColor;
|
||||||
|
} else if (trackAsOrbit) {
|
||||||
|
// nothing gets selected in this case...
|
||||||
} else {
|
} else {
|
||||||
addToolColor = toolSelectedColor;
|
addToolColor = toolSelectedColor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue