restyled genres menu
This commit is contained in:
@@ -18,6 +18,7 @@ AFRAME.registerComponent('gpu-preloader', {
|
||||
this.preloadSearchPrevPage();
|
||||
this.preloadWallMap();
|
||||
this.preloadWrongMap();
|
||||
this.preloadGenres();
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
@@ -85,6 +86,11 @@ AFRAME.registerComponent('gpu-preloader', {
|
||||
this.preloadTexture(wrong.getObject3D('mesh').material.map);
|
||||
},
|
||||
|
||||
preloadGenres: function () {
|
||||
const genres = document.querySelector('.genreIcon');
|
||||
this.preloadTexture(genres.getObject3D('mesh').material.map);
|
||||
},
|
||||
|
||||
preloadTexture: function (texture) {
|
||||
if (!texture || !texture.image) {
|
||||
console.warn('[gpu-preloader] Error preloading texture', texture);
|
||||
|
||||
@@ -65,7 +65,7 @@ AFRAME.registerComponent('search-genre', {
|
||||
};
|
||||
|
||||
this.el.addEventListener('click', evt => {
|
||||
this.search(evt.target.closest('.genre').dataset.genre);
|
||||
this.search(evt.target.closest('.genre').dataset.bindForKey);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user