mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +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)));
|
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() {
|
function deleteParticleEffect() {
|
||||||
if (particleEffect) {
|
if (particleEffect) {
|
||||||
particleEffect = Entities.deleteEntity(particleEffect);
|
particleEffect = Entities.deleteEntity(particleEffect);
|
||||||
|
@ -241,8 +232,8 @@ function calcParticlePos(myHand, otherHand, otherOrientation, reset) {
|
||||||
// this is called frequently, but usually does nothing
|
// this is called frequently, but usually does nothing
|
||||||
function updateVisualization() {
|
function updateVisualization() {
|
||||||
if (state == STATES.inactive) {
|
if (state == STATES.inactive) {
|
||||||
fadeEffects();
|
deleteParticleEffect();
|
||||||
stopHandshakeSound();
|
deleteMakeConnectionParticleEffect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,6 +375,9 @@ function startHandshake(fromKeyboard) {
|
||||||
|
|
||||||
function endHandshake() {
|
function endHandshake() {
|
||||||
debug("ending handshake for", currentHand);
|
debug("ending handshake for", currentHand);
|
||||||
|
|
||||||
|
deleteParticleEffect();
|
||||||
|
deleteMakeConnectionParticleEffect();
|
||||||
currentHand = undefined;
|
currentHand = undefined;
|
||||||
// note that setting the state to inactive should really
|
// note that setting the state to inactive should really
|
||||||
// only be done here, unless we change how the triggering works,
|
// only be done here, unless we change how the triggering works,
|
||||||
|
@ -495,7 +489,7 @@ function makeConnection(id) {
|
||||||
successfulHandshakeInjector.restart();
|
successfulHandshakeInjector.restart();
|
||||||
}
|
}
|
||||||
Controller.triggerHapticPulse(HAPTIC_DATA.success.strength, HAPTIC_DATA.success.duration, handToHaptic(currentHand));
|
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);
|
}, MAKING_CONNECTION_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue