Marzipano and Angular - Getting white screen

285 views
Skip to first unread message

Patryk Preisner

unread,
Jan 24, 2020, 4:46:48 PM1/24/20
to marzipano
Hey, i wanted to use Marzipano in my Angular project and i allready managed to install and import it to my type script. I followed the tutorial but in the end i get a complete white page with hotizontal and vertical scroll bars. hovering over it looks like i could scroll but still no image.

this is the code i use:

html:

<div id="pano"></div>

ts:
import { Component, OnInit } from '@angular/core';
import * as Marzipano from 'marzipano';

@Component({
  selector: 'app-landingpage',
  templateUrl: './landingpage.component.html',
  styleUrls: ['./landingpage.component.css']
})
export class LandingpageComponent implements OnInit {

  constructor() { }

  ngOnInit() {
    var panoElement = document.getElementById('pano');
    var viewerOpts = {
      controls: {
        mouseViewMode: 'drag'    // drag|qtvr
      }
    };

    var viewer = new Marzipano.Viewer(panoElement, viewerOpts)
    var levels = [
      { tileSize: 512, size: 512 },
      { tileSize: 512, size: 1024 }
    ];

    var geometry = new Marzipano.CubeGeometry(levels);
    var source = Marzipano.ImageUrlSource.fromString("assets/tiles/{z}/{f}/{y}/{x}.jpg");
    var view = new Marzipano.RectilinearView();

    var scene = viewer.createScene({
      source: source,
      geometry: geometry,
      view: view
    });

  }

}

any guesses?

Bryll Delfin

unread,
Apr 5, 2020, 6:53:52 AM4/5/20
to marzipano
I actually have the same issue right now. Does it have any updates on this?

Patryk Preisner

unread,
Apr 24, 2020, 6:22:57 AM4/24/20
to marzipano
Actually i stopped trying and switched to "photo-sphere-viewer". This one works fine for me.
Reply all
Reply to author
Forward
0 new messages