|
|
|
@ -3005,6 +3005,10 @@ AFRAME.registerComponent('collision-check', { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function jump(){ |
|
|
|
|
document.getElementById("rig").emit(`jump`, null, false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// used for testing |
|
|
|
|
AFRAME.registerComponent('startfunctions', { |
|
|
|
|
init: function () { |
|
|
|
@ -3040,7 +3044,7 @@ AFRAME.registerComponent('startfunctions', { |
|
|
|
|
</template> |
|
|
|
|
</a-assets> |
|
|
|
|
|
|
|
|
|
<a-entity id="rig"> |
|
|
|
|
<a-entity id="rig" animation="property: position.y; to: 0.4; dir: alternate; loop:1; startEvents:jump; dur: 400"> |
|
|
|
|
<a-sound src="../content/street-crowd-ambience.mp3" autoplay=true loop=true volume=0.2></a-sound><!-- warning skipped on Quest, does autoplay there --> |
|
|
|
|
<a-sound id="snapping-sound" src="url(../content/magnets_snap.mp3)"></a-sound> |
|
|
|
|
<a-entity id="player" networked="template:#avatar-template;attachTemplateToLocal:false;" |
|
|
|
|