Very lightweight 360deg spherical image viewer
npm install spherical-imageVery lightweight 360deg spherical image viewer

!MIT License
- basic
``shell`
$ npm install --save spherical-image
then
`html`
`javascript
import SphericalImage from 'spherical-image';
new SphericalImage(
document.getElementById( 'myCanvas' ),
'./img.jpg'
);
`
or
`html`
`javascript`
const sphericalImage = new SphericalImage(
document.getElementById( 'myCanvas' ),
'./img.jpg'
);
The third argument is options.
`js`
const sphericalImage = new SphericalImage(
document.getElementById( 'myCanvas' ),
'./img.jpg',
options
);
- options.offsetAzimuth: default horizontal rotation in radian. default is 0options.offsetAltitude
- : default vertical rotation in radian. default is 0
- .reset(): reset view rotation..setSize( width, height )
- : set canvas size..destroy()`: destroy the instance. dispose WebGL. detach all events.
-