使用 autoLoad 参数自动加载全景图
效果:
Auto load
代码:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29OCTYPE HTML> <html lang="ch"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="author"content=“KaiSarH,huankai7@163.com”> <title>autoLoad</title> <link rel="stylesheet" href="pannellum.css"/> <script type="text/javascript" src="pannellum.js"></script> <style> #panorama { width: 1200px; height: 800px; } </style> </head> <body> <div id="panorama"></div> <script> pannellum.viewer('panorama', { "type": "equirectangular", "panorama": "test/test5.jpg", // 对autoLoad进行赋值,可以实现全景视频的自动播放 "autoLoad": true }); </script> </body> </html>
总结:
- 当我们设置了"autoLoad":true的时候,就不需要我们进行点击而可以直接自动播放全景图了
最后
以上就是舒适跳跳糖最近收集整理的关于Pannellum:实例之自动加载全景图的全部内容,更多相关Pannellum内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复