mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge branch 'tablet-ui' of github.com:highfidelity/hifi into tablet-ui
This commit is contained in:
commit
f63ee4ffe0
1 changed files with 10 additions and 14 deletions
|
@ -46,6 +46,15 @@
|
|||
}
|
||||
|
||||
function updateShowTablet() {
|
||||
if (tabletShown) {
|
||||
var currentMicLevel = getMicLevel();
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.updateAudioBar(currentMicLevel);
|
||||
if (UIWebTablet) {
|
||||
tablet.updateTabletPosition(UIWebTablet.getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
if (HMD.showTablet && !tabletShown) {
|
||||
showTabletUI();
|
||||
} else if (!HMD.showTablet && tabletShown) {
|
||||
|
@ -60,8 +69,7 @@
|
|||
Messages.subscribe("toggleHand");
|
||||
Messages.messageReceived.connect(toggleHand);
|
||||
|
||||
Script.update.connect(updateShowTablet);
|
||||
// Script.setInterval(updateShowTablet, 1000);
|
||||
Script.setInterval(updateShowTablet, 100);
|
||||
|
||||
// Initialise variables used to calculate audio level
|
||||
var accumulatedLevel = 0.0;
|
||||
|
@ -89,16 +97,4 @@
|
|||
}
|
||||
return micLevel;
|
||||
}
|
||||
|
||||
Script.setInterval(function() {
|
||||
if (tabletShown) {
|
||||
var currentMicLevel = getMicLevel();
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.updateAudioBar(currentMicLevel);
|
||||
if (UIWebTablet) {
|
||||
tablet.updateTabletPosition(UIWebTablet.getPosition());
|
||||
}
|
||||
}
|
||||
}, MIC_LEVEL_UPDATE_INTERVAL_MS);
|
||||
|
||||
}()); // END LOCAL_SCOPE
|
||||
|
|
Loading…
Reference in a new issue