A panoramic experiment with Three.JS

The concept behind this panoramic tour is very simple. We are using three.js JavaScript 3D library to wrap a spherical panoramic image around a 3D sphere.

Then we define a scene and add a camera to display the the applied image texture to our sphere.

In order for our demo to look like the way it is, we place the camera inside the sphere, and by applying a very subtle rotation to the camera we make it seem like that the object is rotating.

Then we add some mouse events to the element that we have injected out scene into, to correspond to new camera X, Y, and Z positions.

We also bound the mouse wheel (scroll) event to our camera's field of view to add the zoom effect.

twitter: @NorikDavtian
github: Download Source
license: MIT