-
Notifications
You must be signed in to change notification settings - Fork 0
/
3-sound.html
43 lines (40 loc) · 1.46 KB
/
3-sound.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
43
<html>
<head>
<title>A-Frame Workshop</title>
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://unpkg.com/[email protected]/aframe/build/aframe-ar.min.js"></script>
<script src="/assets/components/play-on-parent-marker-visible.js"></script>
</head>
<body style="margin: 0px; overflow: hidden;">
<a-scene
embedded
arjs="sourceType: webcam; debugUIEnabled: false;"
vr-mode-ui="enabled: false"
renderer="logarithmicDepthBuffer: true; colorManagement: true;"
loading-screen="dotsColor: white; backgroundColor: black"
>
<a-assets>
<a-asset-item
id="headrest"
src="https://nomad-project.co.uk/objects/collection/headrest/_headrest/headrest.gltf"
></a-asset-item>
<a-asset-item
id="headrest-sound"
src="https://nomad-project.co.uk/static/mp3/headrest.mp3"
response-type="arraybuffer"
preload="auto"
></a-asset-item>
</a-assets>
<a-marker type="pattern" preset="hiro">
<a-sound src="#headrest-sound" play-on-parent-marker-visible></a-sound>
<a-entity
position="0 1 0"
scale="0.1 0.1 0.1"
gltf-model="#headrest"
animation="property: rotation; from: '0 0 0'; to: '0 360 0'; dur: 10000; loop: true; easing: linear; autoplay: true;"
></a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html>