Selaa lähdekoodia

Add documentation for new `animatefinished` event.

pull/668/merge
Matthew Petroff 6 vuotta sitten
vanhempi
commit
6d8a19991d
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. +6
    -0
      doc/events.md
  2. +1
    -1
      src/js/pannellum.js

+ 6
- 0
doc/events.md Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 -


Ladataan…
Peruuta
Tallenna