-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShape with animation
More file actions
28 lines (24 loc) · 1.02 KB
/
Shape with animation
File metadata and controls
28 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="https://glitch.com/favicon.ico" />
<title>Moving Box</title>
<!-- import the webpage's stylesheet -->
<link rel="stylesheet" href="/style.css" />
<!-- import the webpage's javascript file -->
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<!-- we import arjs version without NFT but with marker + location based support -->
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
</head>
<!-- VR box with animation using Hiro as marker -->
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs>
<a-marker preset="hiro">
<a-box position="0 0 0" animation="property: position; to: 1 8 -10; dur: 2000; easing: linear; loop: true" color="#b0e0e6"></a-box>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html>