基本信息
源码名称:html5实现3D全景图
源码大小:14.62M
文件格式:.rar
开发语言:js
更新时间:2020-04-07
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 5 元 
   源码介绍

    利用html5实现的360度全景图浏览(带天地)

   

    
// Load the predefined panorama
function loadPredefinedPanorama(evt) {
    evt.preventDefault();

    var div = document.getElementById('container');

    var PSV = new PhotoSphereViewer({
        // Path to the panorama
        panorama: 'sun.jpg',

        // Container
        container: div,

        // Deactivate the animation
        time_anim: false,

        // Display the navigation bar
        navbar: true,

        // Resize the panorama
        size: {
            width: '100%',
            height: '500px'
        }
    });
}

// Load a panorama stored on the user's computer
function upload() {
    // Retrieve the chosen file and create the FileReader object
    var file = document.getElementById('pano').files[0];
    var reader = new FileReader();

    reader.onload = function() {
        var div = document.getElementById('your-pano');

        var PSV = new PhotoSphereViewer({
            // Panorama, given in base 64
            panorama: reader.result,

            // Container
            container: div,

            // Deactivate the animation
            time_anim: false,

            // Display the navigation bar
            navbar: true,

            // Resize the panorama
            size: {
                width: '100%',
                height: '500px'
            }
        });
    };

    reader.readAsDataURL(file);
}