我正在尝试使用 Laravel 和 Marzipano 制作我自己的虚拟之旅,但我无法让照片在页面上显示。页面变为空白,当我单击时,鼠标变为典型的 360 照片运动十字。我不知道问题出在哪里,因为这是我第一次使用它,而且我从未使用过类似的东西。这是我的代码:
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Trial</title>
<script type="text/javascript" src="{{ url('js/marzipano/marzipano.js') }}"></script>
</head>
<body>
<div id="domID"></div>
<script type="text/javascript">
var panoElement = document.getElementById("domID");
var opts = {
controls: {
mouseViewMode: "drag"
}
}
var viewer = new Marzipano.Viewer(panoElement, opts);
var levels = [
{ tileSize: 512, size: 512 },
{ tileSize: 512, size: 1024 }
];
var geometry = new Marzipano.CubeGeometry(levels);
var source = Marzipano.ImageUrlSource.fromString("imgs/R0010598.JPG");
var view = new Marzipano.RectilinearView();
var scene = viewer.createScene({
source: source,
geometry: geometry,
view: view
});
scene.switchTo();
</script>
</body>
</html>
谢谢你。