Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 1.68 KB

README.md

File metadata and controls

67 lines (51 loc) · 1.68 KB

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.

View Demo.

Built on top of the three.js.

Usage

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:

  1. document.body - the HTML element where the panorama will be created
  2. {...} - the tour configuration JSON

Build

  1. Install Node.js package to provide npm command

  2. Go to vtour project dir and install dependencies:

    > npm install
    
  3. Run build:

    > npm build-release
    
  4. Check built files in a dist directory

Examples

Look at examples folder to learn the demo tour. The demo tour running steps:

  1. Place vtour files into a some foo directory
  2. Copy files from examples directory to the foo directory:
  • examples/demo.html
  • examples/demo_image_0.png
  • examples/demo_image_1.png
  • examples/picture.png
  1. Run an http server on foo directory

    Python example:

    > cd foo
    > python -m http.server 8000
    
  2. Open browser and go to localhost:8000/demo.html