浏览代码

Add documentation for new `animatefinished` event.

pull/668/merge
Matthew Petroff 6 年前
父节点
当前提交
6d8a19991d
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. +6
    -0
      doc/events.md
  2. +1
    -1
      src/js/pannellum.js

+ 6
- 0
doc/events.md 查看文件

@@ -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 查看文件

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


正在加载...
取消
保存