This commit is contained in:
David Rowe 2017-09-27 22:06:28 +13:00
parent ad838c6b3c
commit 20b1ab0087
3 changed files with 9 additions and 8 deletions

View file

@ -23,8 +23,8 @@ Feedback = (function () {
CREATE_SOUND = SoundCache.getSound(Script.resolvePath("../assets/audio/create.wav")),
EQUIP_SOUND = SoundCache.getSound(Script.resolvePath("../assets/audio/equip.wav")),
ERROR_SOUND = SoundCache.getSound(Script.resolvePath("../assets/audio/error.wav")),
UNDO_SOUND = DROP_SOUND, // TODO
REDO_SOUND = DROP_SOUND, // TODO
UNDO_SOUND = DROP_SOUND,
REDO_SOUND = DROP_SOUND,
FEEDBACK_PARAMETERS = {
DROP_TOOL: { sound: DROP_SOUND, volume: 0.3, haptic: 0.75 },
@ -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.1, haptic: 0.2 }, // TODO
REDO_ACTION: { sound: REDO_SOUND, volume: 0.1, haptic: 0.2 }, // TODO
UNDO_ACTION: { sound: UNDO_SOUND, volume: 0.1, haptic: 0.2 },
REDO_ACTION: { sound: REDO_SOUND, volume: 0.1, haptic: 0.2 },
GENERAL_ERROR: { sound: ERROR_SOUND, volume: 0.2, haptic: 0.7 }
},

View file

@ -27,11 +27,11 @@ Hand = function (side) {
isTriggerPressed,
isTriggerClicked,
TRIGGER_ON_VALUE = 0.15, // Per handControllerGrab.js.
TRIGGER_OFF_VALUE = 0.1, // Per handControllerGrab.js.
TRIGGER_ON_VALUE = 0.15, // Per controllerDispatcherUtils.js.
TRIGGER_OFF_VALUE = 0.1, // Per controllerDispatcherUtils.js.
TRIGGER_CLICKED_VALUE = 1.0,
NEAR_GRAB_RADIUS = 0.05, // Different from handControllerGrab.js's value of 0.1.
NEAR_GRAB_RADIUS = 0.05, // Different from controllerDispatcherUtils.js.
NEAR_HOVER_RADIUS = 0.025,
LEFT_HAND = 0,

View file

@ -115,7 +115,8 @@ if (typeof Object.merge !== "function") {
b = JSON.stringify(objectB);
if (a === "{}") {
return JSON.parse(b); // Always return a new object.
} else if (b === "{}") {
}
if (b === "{}") {
return JSON.parse(a); // ""
}
return JSON.parse(a.slice(0, -1) + "," + b.slice(1));