load() instead of event listeners
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
AFRAME.registerComponent('assets-loaded', {
|
||||
init: function () {
|
||||
this.el.addEventListener('loaded', this.onLoad.bind(this));
|
||||
this.el.addEventListener('timeout', this.onLoad.bind(this));
|
||||
},
|
||||
|
||||
onLoad: function (ev) {
|
||||
document.getElementById('tutorial2d').style.display = 'none';
|
||||
}
|
||||
});
|
||||
5
src/components/tutorial-2d.js
Normal file
5
src/components/tutorial-2d.js
Normal file
@@ -0,0 +1,5 @@
|
||||
AFRAME.registerComponent('tutorial-2d', {
|
||||
play: function () {
|
||||
document.getElementById('tutorial2d').style.display = 'none';
|
||||
}
|
||||
});
|
||||
@@ -58,4 +58,4 @@ html {
|
||||
width: 80%;
|
||||
left: 10%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
stage-colors="color: blue"
|
||||
fog="color: #a00; density: 0.035; type: exponential"
|
||||
vr-mode-ui="enterVRButton: #vrButton"
|
||||
assets-loaded>
|
||||
tutorial-2d>
|
||||
|
||||
<a-assets timeout="10000">
|
||||
{% include './assets.html' %}
|
||||
|
||||
Reference in New Issue
Block a user