mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
more vis work
This commit is contained in:
parent
a0c19d6b59
commit
aa085e577d
1 changed files with 6 additions and 12 deletions
|
@ -200,15 +200,6 @@ function positionFractionallyTowards(posA, posB, frac) {
|
|||
return Vec3.sum(posA, Vec3.multiply(frac, Vec3.subtract(posB, posA)));
|
||||
}
|
||||
|
||||
function fadeEffects() {
|
||||
if (particleEffect) {
|
||||
Entities.editEntity(particleEffect, {isEmitting: 0, lifespan: 1.0});
|
||||
}
|
||||
if(makingConnectionParticleEffect) {
|
||||
Entities.editEntity(makingConnectionParticleEffect, {isEmitting: 0, lifespan: 1.5});
|
||||
}
|
||||
}
|
||||
|
||||
function deleteParticleEffect() {
|
||||
if (particleEffect) {
|
||||
particleEffect = Entities.deleteEntity(particleEffect);
|
||||
|
@ -241,8 +232,8 @@ function calcParticlePos(myHand, otherHand, otherOrientation, reset) {
|
|||
// this is called frequently, but usually does nothing
|
||||
function updateVisualization() {
|
||||
if (state == STATES.inactive) {
|
||||
fadeEffects();
|
||||
stopHandshakeSound();
|
||||
deleteParticleEffect();
|
||||
deleteMakeConnectionParticleEffect();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -384,6 +375,9 @@ function startHandshake(fromKeyboard) {
|
|||
|
||||
function endHandshake() {
|
||||
debug("ending handshake for", currentHand);
|
||||
|
||||
deleteParticleEffect();
|
||||
deleteMakeConnectionParticleEffect();
|
||||
currentHand = undefined;
|
||||
// note that setting the state to inactive should really
|
||||
// only be done here, unless we change how the triggering works,
|
||||
|
@ -495,7 +489,7 @@ function makeConnection(id) {
|
|||
successfulHandshakeInjector.restart();
|
||||
}
|
||||
Controller.triggerHapticPulse(HAPTIC_DATA.success.strength, HAPTIC_DATA.success.duration, handToHaptic(currentHand));
|
||||
endHandshake();
|
||||
// don't change state (so animation continues while gripped)
|
||||
}, MAKING_CONNECTION_TIMEOUT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue