Browse Source

Add animateFinished event fired on animations finishing

pull/668/merge
Will Calderbank 6 years ago
committed by Matthew Petroff
parent
commit
a40b906ebd
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/js/pannellum.js

+ 1
- 0
src/js/pannellum.js View File

@@ -1372,6 +1372,7 @@ function animate() {
} else if (renderer && (renderer.isLoading() || (config.dynamic === true && update))) { } else if (renderer && (renderer.isLoading() || (config.dynamic === true && update))) {
requestAnimationFrame(animate); requestAnimationFrame(animate);
} else { } else {
fireEvent('animateFinished', {pitch: _this.getPitch(), yaw: _this.getYaw(), hfov: _this.getHfov()});
animating = false; animating = false;
prevTime = undefined; prevTime = undefined;
var autoRotateStartTime = config.autoRotateInactivityDelay - var autoRotateStartTime = config.autoRotateInactivityDelay -


Loading…
Cancel
Save