-
Notifications
You must be signed in to change notification settings - Fork 0
/
panner.html
42 lines (39 loc) · 1.62 KB
/
panner.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
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Panner </title>
<meta name="description" content="Music in WebVR by combining A-Frame and Tone.js">
<link rel="icon" href="favicon.png" sizes="16x16" type="image/png">
<script type="text/javascript" src="bundle.js"></script>
</head>
<body>
<a-scene background="color: #111" cursor="rayOrigin: mouse">
<a-camera wasd-controls look-controls position="0 0 10"></a-camera>
<a-assets>
<a-mixin id="light" light="color: #DDDDFF; distance: 120; intensity: 2; type: directional"></a-mixin>
<a-mixin id="torusKnot" random-material
geometry="primitive: torusKnot; p: 2; q: 2;
radiusTubular: 0.05;
segmentsRadial: 8;
segmentsTubular: 100;"
>
</a-mixin>
</a-assets>
<a-entity animation="property: rotation; to: 0 0 360; dur: 4000; easing: linear; loop: true">
<a-entity mixin="light" position="30 0 0"></a-entity>
</a-entity>
<a-entity animation="property: rotation; to: 360 0 0; dur: 4000; easing: linear; loop: true">
<a-entity mixin="light" position="0 0 40"></a-entity>
</a-entity>
<a-entity class="toggle" tone-transport-toggle visible="false" random-material geometry="primitive: sphere; radius: 0.5" position="0 1 -1">
<a-text value="play / pause" position="-0.5 1 0" width="5"></a-text>
</a-entity>
<a-entity panner-container id="panner-container">
</a-entity>
<!-- VR interaction -->
<a-entity laser-controls="hand: left" raycaster="objects: .toggle"></a-entity>
<a-entity laser-controls="hand: right" raycaster="objects: .toggle"></a-entity>
</a-scene>
</body>
</html>