Skip to content

Instantly share code, notes, and snippets.

@jamct
Created July 18, 2017 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamct/5f044531c1581a002dc2b451d0528838 to your computer and use it in GitHub Desktop.
Save jamct/5f044531c1581a002dc2b451d0528838 to your computer and use it in GitHub Desktop.
A-Frame Demo: Animation mit Audio
<!DOCTYPE html>
<html>
<head>
<title>A-Frame-Demo 4</title>
<meta name="description" content="Animation mit Audio">
<meta charset="utf-8">
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<audio id="piep" src="beep.mp3"></audio>
</a-assets>
<a-entity position="0 0 0">
<a-box color="blue" position="0 0 -5" sound="src: #piep; autoplay: true; loop: true; volume: 0.0"></a-box>
<a-animation attribute="rotation" from="0 0 0" to="0 360 0" dur="5000" easing="linear" repeat="inifite"></a-animation>
</a-entity>
</a-scene>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment