Giter Site home page Giter Site logo

iv-panorama's Introduction

简介

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.