Gore Wang , 2016 @ WTT
Email:sunrise91.t3@gmail.com
2015 年底由 Mozilla 推出的 WebVR framework。
<a-scene>
<!-- Asset management system. -->
<a-assets>
<a-asset-item id="horse-obj" src="horse.obj"></a-asset-item>
<a-asset-item id="horse-mtl" src="horse.mtl"></a-asset-item>
<img id="advertisement" src="ad.png">
<audio id="neigh" src="neigh.mp3"></a-mixin>
<video id="kentucky-derby" src="derby.mp4">
</a-assets>
<!-- Scene. -->
<a-entity obj-model="obj: #horse-obj; mtl: #horse.mtl"></a-entity>
<a-plane src="#advertisement"></a-plane>
<a-sound src="#neigh"></a-sound>
<a-entity geometry="primitive: plane" material="src: #kentucky-derby"></a-entity>
</a-scene>
<a-scene>
<a-assets>
<a-mixin id="red" material="color: red"></a-mixin>
<a-mixin id="blue" material="color: blue"></a-mixin>
<a-mixin id="cube" geometry="primitive: box"></a-mixin>
</a-assets>
<a-entity mixin="red cube"></a-entity>
<a-entity mixin="blue cube"></a-entity>
</a-scene>
<a-entity>
<a-entity id="ani-cube" geometry="primitive: box">
<a-animation attribute="rotation"
dur="10000"
fill="forwards"
to="0 360 0"
easing="ease-out"
repeat="indefinite"></a-animation>
<a-animation begin="fly_up" attribute="position"
from="0 0 0" to="0 3 0" dur="1000"></a-animation>
</a-entity>
</a-entity>
document.querySelector('#ani-cube').emit('fly_up');
Trigger Animation
33m19s