<head>
<meta charset="UTF-8">
<title>360º panorama viewer</title>
</head>
<body>
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<a-scene>
<a-entity camera look-controls="reverseMouseDrag: true"></a-entity>
<a-assets>
<img id="panorama" src="https://c1.staticflickr.com/5/4302/35137573294_1287bfd0ae_k.jpg" crossorigin />
</a-assets>
<a-sky src="#panorama" rotation="0 -90 0"></a-sky>
</a-scene>
</body>
上面的代码工作正常,但是当我尝试加载本地图像时,它只会显示黑屏。
<img id="panorama" src="samplelocalimg.jpg" crossorigin />
我计划将所有源文件放入Android WebView并将其加载到那里。并且所有图像都应在本地加载。