Skip to content

Instantly share code, notes, and snippets.

@batcoder1
Last active June 16, 2017 07:00
Show Gist options
  • Save batcoder1/2c7d444b641d897b3edf9dcbc46497c9 to your computer and use it in GitHub Desktop.
Save batcoder1/2c7d444b641d897b3edf9dcbc46497c9 to your computer and use it in GitHub Desktop.
escultura
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>escultura</title>
<meta name="description" content="Cursor Handler - A-Frame School">
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="https://npmcdn.com/aframe-animation-component@3.0.1"></script>
<script src="https://npmcdn.com/aframe-event-set-component@3.0.1"></script>
<script src="https://npmcdn.com/aframe-layout-component@3.0.1"></script>
<script src="https://npmcdn.com/aframe-template-component@3.1.1"></script>
<script src="handle-events.js"></script>
</head>
<body>
<a-scene >
<a-assets>
<img id="logo" src="images/autentia.png" />
<img id="ground" src="images/muro.jpg" position="0 0 -5">
<img id="sky" src="images/sky.jpg">
<script id="orbiter" type="text/html">
<a-entity animation__rotate="property: rotation; dur: 2000; easing: ${easing}; loop: true; to: 0 ${giroz} ${girox}">
<a-sphere radius="0.2" color="red" position="${orbitradius} 0 0">
</a-sphere>
</a-entity>
</script>
</a-assets>
<a-entity id="container" position="0 0 -4">
<a-torus-knot id="torus" color="green" arc="150" p="2" q="7" radius="3" radius-tubular="0.1"></a-torus-knot>
<!-- Orbiters. -->
<a-entity template="src: #orbiter" data-orbitradius="4" data-easing="linear" position="1 0.8 0" data-girox="0" data-giroz="360"></a-entity>
<a-entity template="src: #orbiter" data-orbitradius="2.4" data-easing="linear" position="0 -1.6 0" data-girox="0" data-giroz="360"></a-entity>
<a-entity template="src: #orbiter" data-orbitradius="2.4" data-easing="linear" position="0 -1.6 0" data-girox="360" data-giroz="0"></a-entity>
<a-entity template="src: #orbiter" data-orbitradius="2.7" data-easing="linear" position="1 0 0" data-girox="360" data-giroz="360"></a-entity>
<a-entity template="src: #orbiter" data-orbitradius="3" data-easing="linear" position="0 1.5 0" data-girox="360" data-giroz="0"></a-entity>
<a-entity template="src: #orbiter" data-orbitradius="2" data-easing="linear" position="0 1 0" data-girox="360" data-giroz="360"></a-entity>
</a-entity>
<a-plane fog color="red" height="10" width="10" rotation="-90 0 0" position="0 -5 0"></a-plane>
<!-- Lights. -->
<a-light type="ambient" color="#333"></a-light>
<a-light type="directional" position="-1 1 -0.5"></a-light>
<a-light type="directional" position="10 0 0" intensity="1">
<a-animation attribute="rotation" easing="linear" dur="10000" to="360 0 0" ></a-animation>
</a-light>
<!-- Sky. -->
<a-sky src="#sky"></a-sky>
<a-light intensity="1">
<a-animation attribute="intensity" to="5"></a-animation>
</a-light>
<a-camera position="0 -1 4"></a-camera>
</a-scene>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment