This website works better with JavaScript.
首頁
說明
登入
heuzef
/
pannellum
镜像来自
https://github.com/mpetroff/pannellum.git
關註
1
收藏
0
複製
0
程式碼
問題管理
0
版本發佈
22
Wiki
Activity
瀏覽代碼
Fix yaw out of bounds in `mouseEventToCoords`.
If `config.yaw` is close to -180 or 180, `yaw` might be out of bounds.
pull/452/head
Tortila90
7 年之前
committed by
Matthew Petroff
父節點
c89710c031
當前提交
7c162a039c
共有
1 個文件被更改
,包括
4 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
src/js/pannellum.js
+ 4
- 0
src/js/pannellum.js
查看文件
@@ -704,6 +704,10 @@ function mouseEventToCoords(event) {
var root = Math.sqrt(x*x + a*a);
var pitch = Math.atan((y * c + focal * s) / root) * 180 / Math.PI;
var yaw = Math.atan2(x / root, a / root) * 180 / Math.PI + config.yaw;
if (yaw < -180)
yaw += 360;
if (yaw > 180)
yaw -= 360;
return [pitch, yaw];
}
Write
Preview
Loading…
取消
儲存