Miscellaneous fixes

This commit is contained in:
David Rowe 2017-09-13 14:13:23 +12:00
parent d718ea6928
commit 97b2988005
3 changed files with 7 additions and 13 deletions

View file

@ -37,8 +37,8 @@ Feedback = (function () {
EQUIP_TOOL: { sound: EQUIP_SOUND, volume: 0.3, haptic: 0.6 },
APPLY_PROPERTY: { sound: null, volume: 0, haptic: 0.3 },
APPLY_ERROR: { sound: ERROR_SOUND, volume: 0.2, haptic: 0.7 },
UNDO_ACTION: { sound: UNDO_SOUND, volume: 0.2, haptic: 0.2 }, // TODO
REDO_ACTION: { sound: REDO_SOUND, volume: 0.2, haptic: 0.2 }, // TODO
UNDO_ACTION: { sound: UNDO_SOUND, volume: 0.1, haptic: 0.2 }, // TODO
REDO_ACTION: { sound: REDO_SOUND, volume: 0.1, haptic: 0.2 }, // TODO
GENERAL_ERROR: { sound: ERROR_SOUND, volume: 0.2, haptic: 0.7 }
},

View file

@ -23,8 +23,6 @@ Selection = function (side) {
rootPosition,
rootOrientation,
scaleFactor,
scaleRotation,
scaleCenter,
scalePosition,
scaleOrientation,
scaleRootOffset,
@ -327,10 +325,8 @@ Selection = function (side) {
});
}
// Save most recent scale parameters.
// Save most recent scale factor.
scaleFactor = factor;
scaleRotation = rotation;
scaleCenter = center;
}
function finishDirectScaling() {
@ -338,8 +334,6 @@ Selection = function (side) {
var i,
length;
// Final scale, position, and orientation of root.
rootPosition = Vec3.sum(scaleCenter, Vec3.multiply(scaleFactor, Vec3.multiplyQbyV(scaleRotation, scaleRootOffset)));
rootOrientation = Quat.multiply(scaleRotation, scaleRootOrientation);
selection[0].dimensions = Vec3.multiply(scaleFactor, selection[0].dimensions);
selection[0].position = rootPosition;
selection[0].rotation = rootOrientation;
@ -394,8 +388,8 @@ Selection = function (side) {
// Final scale and position of root.
selection[0].dimensions = Vec3.multiplyVbyV(scaleFactor, selection[0].dimensions);
selection[0].position = scalePosition;
selection[0].rotation = scaleOrientation;
selection[0].position = rootPosition;
selection[0].rotation = rootOrientation;
// Final scale and position of children.
for (i = 1, length = selection.length; i < length; i += 1) {
@ -462,7 +456,7 @@ Selection = function (side) {
}
}
if (undoData.length > 0) {
History.push(undoData, redoData);
History.push({ setProperties: undoData }, { setProperties: redoData });
}
} else {
properties = Entities.getEntityProperties(intersectedEntityID, ["type", "color"]);

View file

@ -1561,7 +1561,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
}
},
{
id: "deleeteRule1",
id: "deleteRule1",
type: "horizontalRule",
properties: {
localPosition: {