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
npmcommand -
Go to
vtourproject dir and install dependencies:> npm install -
Run build:
> npm build-release -
Check built files in a
distdirectory
Look at examples folder to learn the demo tour. The demo tour running steps:
- Place
vtourfiles into a somefoodirectory - Copy files from
examplesdirectory to thefoodirectory:
examples/demo.htmlexamples/demo_image_0.pngexamples/demo_image_1.pngexamples/picture.png
-
Run an http server on
foodirectoryPython example:
> cd foo > python -m http.server 8000 -
Open browser and go to
localhost:8000/demo.html
