diff --git a/src/components/intro-song.js b/src/components/intro-song.js new file mode 100644 index 0000000..4365a3a --- /dev/null +++ b/src/components/intro-song.js @@ -0,0 +1,9 @@ +AFRAME.registerComponent('intro-song', { + multiple: true, + + play: function () { + const audio = document.getElementById('introSong'); + audio.volume = 0.5; + audio.play(); + } +}); diff --git a/src/index.html b/src/index.html index bcd494e..4971c3a 100644 --- a/src/index.html +++ b/src/index.html @@ -6,6 +6,9 @@
+ + +