Add multiple Panolens.js 360-panoramic viewers to a page with ease.
- Requires Panolens.js, which is based on Panolens.js by pchen66
- Implements
PanoElement
andPanoPage
You can either install via npm and include the scripts in your build process, or use a CDN.
-
Using npm packages
Install dependencies
# with yarn yarn add pano # with npm npm install --save pano
Import Pano
import * as Pano from 'pano'
-
Using the CDN
Include scripts via CDN by adding them to your
index.html
:<script type="text/javascript" src="//sinanbolel.firebaseapp.com/cdn/pano-vendor-v3.0.0.min.js"></script> <script type="text/javascript" src="//sinanbolel.firebaseapp.com/cdn/pano-v3.0.0.min.js"></script>
-
Instantiate
Pano.Page
object/** ES6 */ import { Page } from 'pano' const panoPage = new Page('pano') panoPage.init() /** ES5 */ var Pano = require('pano') var panoPage = new Pano.Page('pano') panoPage.init()
-
Add
<pano>
elemement HTMLInclude the required
width
,height
,src
,caption
(optional) attributes for the<pano>
element(s) in your view:<pano width="1024" height="512" src="https://sbolel.github.io/pano/img/588ca1b0bf_o.jpg" caption="Equirectangular Panorama"/></pano>
-
Initialize all
<pano>
elements on the pagevar panoPage = new Pano.Page('pano') panoPage.init()
- prescottprue - Webpack implementation, tests, coverage
- pchen66 - Original Panolens.js implementation