mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
change naming and comment
This commit is contained in:
parent
eb4dee0495
commit
8a0dd55275
1 changed files with 26 additions and 27 deletions
|
@ -40,7 +40,7 @@
|
|||
if (!AudioDevice.getMuted()) {
|
||||
return;
|
||||
}
|
||||
updateTween();
|
||||
updateOverlay();
|
||||
}
|
||||
|
||||
function lerp(a, b, val) {
|
||||
|
@ -49,10 +49,31 @@
|
|||
|
||||
function getOffsetPosition() {
|
||||
return Vec3.sum(MyAvatar.getHeadPosition(), Quat.getFront(MyAvatar.headOrientation));
|
||||
}
|
||||
|
||||
function updateTween() {
|
||||
// increase the tween value based on speed till it's complete
|
||||
}
|
||||
|
||||
function onMuteToggled() {
|
||||
if (AudioDevice.getMuted()) {
|
||||
createOverlay();
|
||||
} else {
|
||||
deleteOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
function createOverlay() {
|
||||
overlayPosition = getOffsetPosition();
|
||||
overlayID = Overlays.addOverlay("sphere", {
|
||||
position: overlayPosition,
|
||||
rotation: MyAvatar.orientation,
|
||||
alpha: 0.9,
|
||||
dimensions: 0.1,
|
||||
solid: true,
|
||||
ignoreRayIntersection: true,
|
||||
visible: true
|
||||
});
|
||||
}
|
||||
|
||||
function updateOverlay() {
|
||||
// increase by TWEEN_SPEED until completion
|
||||
if (tweenPosition < 1) {
|
||||
tweenPosition += TWEEN_SPEED;
|
||||
} else {
|
||||
|
@ -86,28 +107,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function onMuteToggled() {
|
||||
if (AudioDevice.getMuted()) {
|
||||
createOverlay();
|
||||
} else {
|
||||
deleteOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
function createOverlay() {
|
||||
overlayPosition = getOffsetPosition();
|
||||
overlayID = Overlays.addOverlay("sphere", {
|
||||
name: "muteSphere",
|
||||
position: overlayPosition,
|
||||
rotation: MyAvatar.orientation,
|
||||
alpha: 0.9,
|
||||
dimensions: 0.1,
|
||||
solid: true,
|
||||
ignoreRayIntersection: true,
|
||||
visible: true
|
||||
});
|
||||
}
|
||||
|
||||
function deleteOverlay() {
|
||||
Overlays.deleteOverlay(overlayID);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue