mirror of
https://github.com/overte-org/overte.git
synced 2025-08-17 10:37:01 +02:00
Tidying
This commit is contained in:
parent
ad838c6b3c
commit
20b1ab0087
3 changed files with 9 additions and 8 deletions
|
@ -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 }
|
||||
},
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue