【问题标题】:Pannellum 360 image viewer -Getting pitch and yawPannellum 360 图像查看器 - 获取俯仰和偏航
【发布时间】:2018-03-24 09:25:14
【问题描述】:

我正在尝试使用 pannellum。我怎样才能在另一个函数中获得热点俯仰和偏航。

"pitch":8,
"yaw": 20,
"cssClass": "custom-hotspot2",
"clickHandlerFunc": clickHandlerBox2,

我想在下面的函数中得到俯仰和偏航(8 和 20) 试了下面的函数

function clickHandlerBox2(hotSpotDiv, args) {
var pitch=viewer.getPitch();
var yaw=viewer.getYaw();
}

但是这个是根据pannellum查看器的运动给出动态数据。我怎样才能得到与上面提到的完全相同的俯仰和偏航?

【问题讨论】:

    标签: javascript pannellum


    【解决方案1】:

    要获得俯仰和偏航(8 和 20)试试这个

    "clickHandlerArgs": {"pitch": 8, "yaw": 20},

    然后在 clickHandlerBox2 函数中调用它

    args.pitch and args.yaw

    【讨论】:

    • 感谢您的回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-06
    • 1970-01-01
    • 2013-02-18
    • 1970-01-01
    • 2019-01-15
    相关资源
    最近更新 更多