mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
Minor Code Adjustments
Minor Code Adjustments
This commit is contained in:
parent
ec55884dae
commit
0db2d6f041
2 changed files with 19 additions and 19 deletions
|
@ -1110,16 +1110,16 @@ function findClickedEntity(event) {
|
||||||
var result;
|
var result;
|
||||||
if (expectingRotateAsClickedSurface) {
|
if (expectingRotateAsClickedSurface) {
|
||||||
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
|
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
|
||||||
audioFeedback.rejection();
|
audioFeedback.rejection();
|
||||||
Window.notifyEditError("You have nothing selected, or the selection is locked.");
|
Window.notifyEditError("You have nothing selected, or the selection is locked.");
|
||||||
expectingRotateAsClickedSurface = false;
|
expectingRotateAsClickedSurface = false;
|
||||||
} else {
|
} else {
|
||||||
//Rotate Selection according the Surface Normal
|
//Rotate Selection according the Surface Normal
|
||||||
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(entityResult.surfaceNormal, -1), Vec3.UP));
|
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(entityResult.surfaceNormal, -1), Vec3.UP));
|
||||||
selectionManager._update(false, this);
|
selectionManager._update(false, this);
|
||||||
pushCommandForSelections();
|
pushCommandForSelections();
|
||||||
expectingRotateAsClickedSurface = false;
|
expectingRotateAsClickedSurface = false;
|
||||||
audioFeedback.action();
|
audioFeedback.action();
|
||||||
}
|
}
|
||||||
keepSelectedOnNextClick = true;
|
keepSelectedOnNextClick = true;
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -105,16 +105,16 @@ SelectionManager = (function() {
|
||||||
}
|
}
|
||||||
if (expectingRotateAsClickedSurface) {
|
if (expectingRotateAsClickedSurface) {
|
||||||
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
|
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
|
||||||
audioFeedback.rejection();
|
audioFeedback.rejection();
|
||||||
Window.notifyEditError("You have nothing selected, or the selection is locked.");
|
Window.notifyEditError("You have nothing selected, or the selection is locked.");
|
||||||
expectingRotateAsClickedSurface = false;
|
expectingRotateAsClickedSurface = false;
|
||||||
} else {
|
} else {
|
||||||
//Rotate Selection according the Surface Normal
|
//Rotate Selection according the Surface Normal
|
||||||
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(messageParsed.surfaceNormal, -1), Vec3.UP));
|
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(messageParsed.surfaceNormal, -1), Vec3.UP));
|
||||||
that._update(false, this);
|
that._update(false, this);
|
||||||
pushCommandForSelections();
|
pushCommandForSelections();
|
||||||
expectingRotateAsClickedSurface = false;
|
expectingRotateAsClickedSurface = false;
|
||||||
audioFeedback.action();
|
audioFeedback.action();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (hmdMultiSelectMode) {
|
if (hmdMultiSelectMode) {
|
||||||
|
@ -2411,7 +2411,7 @@ SelectionDisplay = (function() {
|
||||||
SelectionManager.saveProperties();
|
SelectionManager.saveProperties();
|
||||||
if (selectionManager.selections.length === 1 && spaceMode === SPACE_LOCAL) {
|
if (selectionManager.selections.length === 1 && spaceMode === SPACE_LOCAL) {
|
||||||
currentRotation = SelectionManager.localRotation;
|
currentRotation = SelectionManager.localRotation;
|
||||||
}else{
|
} else {
|
||||||
currentRotation = SelectionManager.worldRotation;
|
currentRotation = SelectionManager.worldRotation;
|
||||||
}
|
}
|
||||||
switch(axis) {
|
switch(axis) {
|
||||||
|
|
Loading…
Reference in a new issue