recoloring ui stuff

This commit is contained in:
Diego F. Goberna
2018-12-07 22:39:54 +01:00
parent 94b8361fc1
commit 3d3b1a4e85
11 changed files with 35 additions and 13 deletions

View File

@@ -37,5 +37,6 @@ AFRAME.registerComponent('gameover', {
this.gameOverEls[i].emit('gameover', null, false);
}
this.el.emit('textglowoff', null, false);
this.el.emit('bgcolorgameover', null, false);
}
});

View File

@@ -5,23 +5,37 @@ let i = 0;
* three.js renderer by default will not upload textures from non-visible entities.
*/
AFRAME.registerComponent('gpu-preloader', {
dependencies: ['materials'],
play: function () {
this.preloadMineEnvMaps();
setTimeout(() => {
this.preloadBeamMap();
this.preloadAtlas();
this.preloadLogo();
//this.prelodBeamMap();
this.preloadBeatEnvMap();
this.preloadCutParticles();
this.preloadKeyboard();
this.preloadMissMap();
//this.preloadMissMap();
this.preloadPlayButton();
this.preloadSearchPrevPage();
//this.preloadWallMap();
this.preloadWrongMap();
//this.preloadWrongMap();
this.preloadGenres();
}, 1000);
},
preloadAtlas: function () {
const stage = document.querySelector('#stageObj');
this.preloadTexture(stage.getObject3D('mesh').children[0].material.uniforms.src.value);
},
preloadLogo: function () {
const logo = document.querySelector('#logoBody');
this.preloadTexture(logo.getObject3D('mesh').children[0].material.uniforms.src.value);
},
preloadBeamMap: function () {
const beams = document.querySelector('[beams]');
this.preloadTexture(beams.components.beams.texture);