vtour is a JavaScript library to create and view the cylindrical panoramas.
Features:
- Create virtual 3D tours with transitions between multiple cylindrical panoramas,
- Specify photospots to show additional pictures on a panorama scene.
Built on top of the three.js.
Download and unpack the release build
Include three.min.js
, OrbitControls.js
and vtour.min.js
<script src="three.min.js"></script>
<script src="OrbitControls.js"></script>
<script src="vtour.min.js"></script>
Start a tour in a script section
var tour = VTOUR.start(document.body, {
entrySceneUid: "scene_0",
scenes: [{uid: "scene_0", title: "Scene", image: "scene.jpg"}]
});
The VTOUR.start()
method arguments:
document.body
- the HTML element where the panorama will be created{...}
- the tour configuration JSON
-
Install Node.js package to provide
npm
command -
Go to
vtour
project dir and install dependencies:> npm install
-
Run build:
> npm build-release
-
Check built files in a
dist
directory
Look at examples
folder to learn the demo tour. The demo tour running steps:
- Place
vtour
files into a somefoo
directory - Copy files from
examples
directory to thefoo
directory:
examples/demo.html
examples/demo_image_0.png
examples/demo_image_1.png
examples/picture.png
-
Run an http server on
foo
directoryPython example:
> cd foo > python -m http.server 8000
-
Open browser and go to
localhost:8000/demo.html