# Getting Started
New version
Photo Sphere Viewer 4 is not compatible with previous versions. If you are using version 3 , please follow the migration guide. You can also read the version 3 documentation (opens new window).
Playground
Test Photo Sphere Viewer with you own panorama in the Playground
# Install Photo Sphere Viewer
# With npm or yarn
npm install photo-sphere-viewer
yarn add photo-sphere-viewer
# Via CDN
Photo Sphere Viewer is available on jsDelivr (opens new window)
# Manually
You can also download the latest release (opens new window)
# Dependencies
# Required
- three.js (opens new window) (use
build/three.min.js
file) - uEvent 2 (opens new window) (use
browser.js
file)
# Optionals
- promise-polyfill (opens new window) for IE compatibility (use
dist/polyfill.min.js
file)
# Your first viewer
Include all JS & CSS files in your page manually or with your favorite bundler and init the viewer.
The panorama
must be an equirectangular projection (opens new window) of your photo. Other modes are supported through adapters.
Cropped panoramas
If your image is not covering a full 360°×180° sphere, it will be deformed. You can fix it by providing cropping data.
Caching
Previous version of Photo Sphere Viewer had a caching system, which was buggy and thus disabled by default.
Photo Sphere Viewer 4 uses THREE.js Cache (opens new window), enabled by default. You can disable this cache by calling THREE.Cache.enabled = false;
after importing Photo Sphere Viewer.