简体   繁体   English

如何使用 Pannellum 显示全景图像

[英]How to display panorama images with Pannellum

I have a panorama image and try to display it on my website with auto-rotate.我有一张全景图,并尝试通过自动旋转将其显示在我的网站上。 Pannellul https://pannellum.org/documentation/examples/auto-rotate/ works great but the only downfall is that it's 360. Pannellul https://pannellum.org/documentation/examples/auto-rotate/效果很好,但唯一的缺点是它是 360。

I am looking for something similiar to this https://liviucerchez.com/panorama360/example3/ but not a wordpress plugin.我正在寻找与此https://liviucerchez.com/panorama360/example3/类似的东西,但不是 wordpress 插件。 Something portable.便携的东西。

Any tips or suggestions would be great.任何提示或建议都会很棒。 Everytime I google, only 360 panorama appears, which is not what I'm quite looking for, I am trying to have the image only be able to move from left to right, right to left.每次我谷歌时,只出现 360 全景图,这不是我想要的,我试图让图像只能从左到右,从右到左移动。 No vertical movements.没有垂直运动。

you can use something like this:你可以使用这样的东西:

pannellum.viewer('panorama', {
            "type": "equirectangular",
            "panorama": "main-image.jpg",
            "preview": "preview-image.jpg",
            "autoRotate": -2,
            "hfov": 100,
            "vaov": 100,
            "vOffset": 0,
            "minPitch": 0,
            "maxPitch": 0,
            "pitch": 0,
            "showZoomCtrl": false,
            "keyboardZoom": false,
            "mouseZoom": false,
            "minHfov":100,
            "maxHfov":100,
        });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM