Reputation: 81
I am trying to make a 360 degree view of an image using html. My sample code is given below:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Panorama</title>
<meta name="description" content="Panorama — A-Frame">
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-sky src="images/gallery/pan0.png" rotation="0 -130 0"></a-sky>
</a-scene>
</body>
</html>
The problem is, when I run the code, nothing is showing. Is there any way to solve this?
Upvotes: 3
Views: 2561
Reputation: 45
I have made changes to the code.Try this code this should work :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Panorama</title>
<meta name="description" content="Panorama — A-Frame">
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<img id="panorama" src="images/gallery/pan0.png"/>
</a-assets>
<a-sky src="#panorama" rotation="0 -130 0"></a-sky>
</a-scene>
</body>
</html>
Upvotes: 1