load() instead of event listeners

This commit is contained in:
Diego F. Goberna
2018-11-16 16:57:29 +01:00
parent 46ebe3b574
commit 13d0305272
4 changed files with 7 additions and 12 deletions

View File

@@ -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';
}
});

View File

@@ -0,0 +1,5 @@
AFRAME.registerComponent('tutorial-2d', {
play: function () {
document.getElementById('tutorial2d').style.display = 'none';
}
});