1.0.2 • Published 6 years ago

iv-panorama v1.0.2

Weekly downloads
1
License
apache-2.0
Repository
github
Last release
6 years ago

简介

Travis license

现在随着宽带的降费提速,用户对于需要高网速、高流量的应用适应越来越强。现在 VR 也随着设备的普及慢慢进入大众,但是一个在线的 VR 应用对流量的要求也远远超过目前的运营商能提供的网速上限,特别是一些 VR 视频大户,常常推出的视频就是 10K 的大小。

现在 Web 对 VR 支持度也不是特别友好,但是,对于全景视频来说,在机器换代更新的前提下,全景在性能方面的瓶颈慢慢消失了。所以,基于此情况,该项目专门针对 720° 全景视频而开发。

特性

  • 依赖于 Three.js,需要预先挂载到 window 对象上
  • 灵活配置,内置支持陀螺仪和 touch 控制。
  • 支持灵敏度参数的动态调整
  • 使用 ES6 语法
  • 兼容 React,jQuery

安装

腾讯内部开发者,使用 tnpm 进行下载:

tnpm install iv-panorama

外部开发者,直接通过 npm 下载:

npm install iv-panorama

使用方法

通过 import 导入模块,在实例化时,传入相关的参数定义。

import VRPlayer from 'iv-panorama';

new VRPlayer({
        player: {
            url: '/test/003.mp4'
        },
        container:document.getElementById('container')
    });

如果想预览全景图片,则直接传入 image 参数:

let panorama = new VRPlayer({
    image: {
            url: './banner.png'
        },
        container:document.getElementById('container')
    });

相关的资源,在 github 仓库的 example 文件夹里面。

demo 预览

下载:

tnpm install http-server -g

然后,直接运行:

tnpm run compile

文档

API

许可证

iv-panorama is under the Apache License. See the LICENSE file for details.

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago