npm 中文文档 npm 中文文档
指南
npmjs.com (opens new window)
指南
npmjs.com (opens new window)
  • 快速入门

    • npm 是什么?
    • npm 安装和更新
    • npm 防止权限错误
    • npm package.json 文件
    • npm 安装包
    • npm 更新包
    • npm 卸载包
    • npm 创建 Node.js 模块
    • npm 发布和更新包
    • npm 使用语义化版本
    • npm 使用 Dist-tags 标记包
    • npm 包和模块的了解
  • 命令行
  • 配置 npm

Panolens.js


Javascript 360 Panorama Viewer


Panolens.js is an event-driven and WebGL based panorama viewer. Lightweight and flexible. It's built on top of Three.JS.

Examples — Documentation — Migration — FAQ

Panorama Demo

Usage


Include three.min.js and panolens.min.js

To find the correct supported versions, please check dependencies section in package.json or acess PANOLENS.VERSION or PANOLENS.THREE_VERSION at runtime.

  1. ``` html
  2. <script src="js/three.min.js"></script>
  3. <script src="js/panolens.min.js"></script>
  4. ```

The following code generates a 360 image panorama. The first panorama added to the viewer will be the entry point. To link panoramas, use panorama.link( other_panorama, new THREE.Vector3( X, Y, Z ) ) to connect the two.

  1. ``` js
  2. const panorama = new PANOLENS.ImagePanorama( 'asset/equirectangular.jpg' );
  3. const viewer = new PANOLENS.Viewer();
  4. viewer.add( panorama );
  5. ```

Dependency


Panolens.js includes Tween.js by default, meaning TWEEN will be available with window object

How to contribute


Always make your contributions for the latest dev branch, not master, so it can be tracked for the next release.

Development


  1. ``` sh
  2. npm start

  3. ```

Build


  1. ``` sh
  2. npm run build-closure

  3. ```
Last Updated: 2023-06-03 09:37:15