Skip to content

Instantly share code, notes, and snippets.

@jamct
Created Jul 18, 2017
Embed
What would you like to do?
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