-
Notifications
You must be signed in to change notification settings - Fork 48
/
basic_events2.html
36 lines (34 loc) · 1.54 KB
/
basic_events2.html
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
29
30
31
32
33
34
35
36
<html>
<head>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@7.2.0/dist/aframe-extras.min.js"></script>
</head>
<body>
<a-scene background="color: #ECECEC">
<a-box position="-3 0.5 -4" rotation="0 60 0" color="green"
animation="property: position;
to: -2 0.5 -4; dur: 1000; loop: true; dir: alternate;">
</a-box>
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"
animation="startEvents: click; property: position;
from: -1 1.5 -3; to: -1 0.5 -3; dur: 1000">
</a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"
animation="startEvents: click; property: scale;
from: 2 2 2; to: 1 1 1; dur: 1000">
</a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"
animation__enter="startEvents: mouseenter; property: scale;
to: 2 2 2; dur: 1000"
animation__leave="startEvents: mouseleave; property: scale;
to: 1 1 1; dur: 1000">
</a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-entity movement-controls="fly: true" position="0 0 0">
<a-entity camera position="0 1.6 0" look-controls wasd-controls></a-entity>
<a-entity cursor="rayOrigin:mouse"></a-entity>
<a-entity laser-controls="hand: right"></a-entity>
</a-entity>
</a-scene>
</body>
</html>