mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-05 18:34:18 +02:00
Some minor tweaks
This commit is contained in:
parent
79603765c4
commit
40beb4bca8
3 changed files with 7 additions and 18 deletions
|
@ -21,7 +21,11 @@ var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
// Define Menu
|
// Define Menu
|
||||||
var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2");
|
var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2");
|
||||||
var whiteIcon = Script.resolvePath("icons/tablet-icons/clap-i.svg?foxv2");
|
var whiteIcon = Script.resolvePath("icons/tablet-icons/clap-i.svg?foxv2");
|
||||||
var isActive = true;
|
|
||||||
|
if ( Settings.getValue("clapAppEnabled") === undefined){
|
||||||
|
Settings.setValue("clapAppEnabled", true);
|
||||||
|
}
|
||||||
|
var isActive = Settings.getValue("clapAppEnabled");
|
||||||
|
|
||||||
var activeButton = tablet.addButton({
|
var activeButton = tablet.addButton({
|
||||||
icon: whiteIcon,
|
icon: whiteIcon,
|
||||||
|
@ -38,6 +42,7 @@ if (isActive) {
|
||||||
function onClick(enabled) {
|
function onClick(enabled) {
|
||||||
|
|
||||||
isActive = !isActive;
|
isActive = !isActive;
|
||||||
|
Settings.setValue("clapAppEnabled", isActive);
|
||||||
activeButton.editProperties({
|
activeButton.editProperties({
|
||||||
isActive: isActive
|
isActive: isActive
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,17 +78,6 @@ module.exports = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
clapSphere: function (pos, vol) {
|
|
||||||
Overlays.editOverlay(DEBUG_CLAP, {
|
|
||||||
position: pos,
|
|
||||||
scale: {
|
|
||||||
x: vol,
|
|
||||||
y: vol,
|
|
||||||
z: vol
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
enableDebug: function () {
|
enableDebug: function () {
|
||||||
DEBUG_RIGHT_HAND = Overlays.addOverlay("line3d", {
|
DEBUG_RIGHT_HAND = Overlays.addOverlay("line3d", {
|
||||||
color: DEBUG_WRONG,
|
color: DEBUG_WRONG,
|
||||||
|
|
|
@ -80,10 +80,6 @@ function clap(volume, position, rotation) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (settingDebug) {
|
|
||||||
ClapDebugger.clapSphere(position, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Helper Functions
|
// Helper Functions
|
||||||
function getHandFingerAnim(side) {
|
function getHandFingerAnim(side) {
|
||||||
|
@ -282,12 +278,10 @@ module.exports = {
|
||||||
});
|
});
|
||||||
Controller.enableMapping(CONTROL_MAP_PACKAGE);
|
Controller.enableMapping(CONTROL_MAP_PACKAGE);
|
||||||
|
|
||||||
// settingDebug STUFF
|
|
||||||
if (settingDebug) {
|
if (settingDebug) {
|
||||||
ClapDebugger.enableDebug();
|
ClapDebugger.enableDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Script.update.connect(update);
|
Script.update.connect(update);
|
||||||
|
|
||||||
Script.scriptEnding.connect(this.disconnectEngine);
|
Script.scriptEnding.connect(this.disconnectEngine);
|
||||||
|
@ -308,6 +302,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
restoreFingerRoleAnimation('left');
|
restoreFingerRoleAnimation('left');
|
||||||
restoreFingerRoleAnimation('right');
|
restoreFingerRoleAnimation('right');
|
||||||
|
|
||||||
Controller.disableMapping(CONTROL_MAP_PACKAGE);
|
Controller.disableMapping(CONTROL_MAP_PACKAGE);
|
||||||
try {
|
try {
|
||||||
Script.update.disconnect(update);
|
Script.update.disconnect(update);
|
||||||
|
|
Loading…
Reference in a new issue