3
0
Fork 0
mirror of https://thingvellir.net/git/overte synced 2025-03-27 23:52:03 +01:00

Minor Code Adjustments

Minor Code Adjustments
This commit is contained in:
Alezia Kurdis 2020-12-29 22:19:11 -05:00 committed by GitHub
parent ec55884dae
commit 0db2d6f041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 19 deletions
scripts/system/create

View file

@ -1110,16 +1110,16 @@ function findClickedEntity(event) {
var result;
if (expectingRotateAsClickedSurface) {
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
audioFeedback.rejection();
Window.notifyEditError("You have nothing selected, or the selection is locked.");
expectingRotateAsClickedSurface = false;
audioFeedback.rejection();
Window.notifyEditError("You have nothing selected, or the selection is locked.");
expectingRotateAsClickedSurface = false;
} else {
//Rotate Selection according the Surface Normal
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(entityResult.surfaceNormal, -1), Vec3.UP));
selectionManager._update(false, this);
pushCommandForSelections();
expectingRotateAsClickedSurface = false;
audioFeedback.action();
//Rotate Selection according the Surface Normal
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(entityResult.surfaceNormal, -1), Vec3.UP));
selectionManager._update(false, this);
pushCommandForSelections();
expectingRotateAsClickedSurface = false;
audioFeedback.action();
}
keepSelectedOnNextClick = true;
return null;

View file

@ -105,16 +105,16 @@ SelectionManager = (function() {
}
if (expectingRotateAsClickedSurface) {
if (!SelectionManager.hasSelection() || !SelectionManager.hasUnlockedSelection()) {
audioFeedback.rejection();
Window.notifyEditError("You have nothing selected, or the selection is locked.");
expectingRotateAsClickedSurface = false;
audioFeedback.rejection();
Window.notifyEditError("You have nothing selected, or the selection is locked.");
expectingRotateAsClickedSurface = false;
} else {
//Rotate Selection according the Surface Normal
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(messageParsed.surfaceNormal, -1), Vec3.UP));
that._update(false, this);
pushCommandForSelections();
expectingRotateAsClickedSurface = false;
audioFeedback.action();
//Rotate Selection according the Surface Normal
selectionDisplay.rotateSelection(Quat.lookAt(Vec3.ZERO, Vec3.multiply(messageParsed.surfaceNormal, -1), Vec3.UP));
that._update(false, this);
pushCommandForSelections();
expectingRotateAsClickedSurface = false;
audioFeedback.action();
}
} else {
if (hmdMultiSelectMode) {
@ -2411,7 +2411,7 @@ SelectionDisplay = (function() {
SelectionManager.saveProperties();
if (selectionManager.selections.length === 1 && spaceMode === SPACE_LOCAL) {
currentRotation = SelectionManager.localRotation;
}else{
} else {
currentRotation = SelectionManager.worldRotation;
}
switch(axis) {