0
点赞
收藏
分享

微信扫一扫

Pannellum:实例之自动加载全景图

禾木瞎写 2022-03-12 阅读 65


使用 ​autoLoad​ 参数​自动加载​全景图

效果:

​​Auto load​​

代码:

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

总结:

  1. 当我们设置了"autoLoad":true的时候,就不需要我们进行点击而可以直接自动播放全景图了


举报

相关推荐

0 条评论