how to initiate Marzipano viewer http://www.marzipano.net/

1.9k views Asked by At

Since Marzipano documentation is bad for newbies i have no idea how to initialize a pano

I decided to get only the pano viewer and keep away of integrating the Marzipano tool!

so far i have now a generated 360 panoramic zip file through the Marzipano tool and would like to render it on my website

how could that be done ?

http://www.marzipano.net/

1

There are 1 answers

0
MK4 On

this is how you create a viewer.

opts = { controls: { mouseViewMode: "drag" } }
const viewer = new Marzipano.Viewer(document.getElementById(domID), opts);

let defaultCubeGeometry = [{ tileSize: 256, size: 256, fallbackOnly: true }, { tileSize: 1024, size: 1024 }];
let cubeGeometry = new Marzipano.CubeGeometry(defaultCubeGeometry);

let limiter = return new Marzipano.util.compose(
  Marzipano.RectilinearView.limit.resolution(resolution),
  Marzipano.RectilinearView.limit.vfov(vfov.min, vfov.max),
  Marzipano.RectilinearView.limit.hfov(vfov.min, vfov.max),
  Marzipano.RectilinearView.limit.pitch(pitch.min, pitch.max)
);

let initialView = { yaw:0, pitch:0, roll:0 };
let view = new Marzipano.RectilinearView(initialView, limiter);
let source = new Marzipano.ImageUrlSource.fromString(imageUrl);
let scene = viewer.createScene({ source, geometry, view });
scene.switchTo();

this should be the complete initialization of viewer