Browse Source

Add documentation for new `animatefinished` event.

pull/668/merge
Matthew Petroff 6 years ago
parent
commit
6d8a19991d
2 changed files with 7 additions and 1 deletions
  1. +6
    -0
      doc/events.md
  2. +1
    -1
      src/js/pannellum.js

+ 6
- 0
doc/events.md View File

@@ -27,6 +27,12 @@ If a scene transition fade interval is specified, this event is fired when the
fading is completed after changing scenes.


## `animatefinished`

Fired when any movements / animations finish, i.e. when the renderer stops
rendering new frames. Passes final pitch, yaw, and HFOV values to handler.


## `error`

Fired when an error occured. The error message string is passed to the


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

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


Loading…
Cancel
Save