successful merge menu thumbs

This commit is contained in:
Kevin Ngo
2018-10-06 22:11:51 -07:00
parent 6ce4cacb98
commit 5996d9a190
5 changed files with 56 additions and 40 deletions

View File

@@ -54,31 +54,6 @@ AFRAME.registerComponent('search-result-list', {
}),
});
AFRAME.registerComponent('search-result-image', {
dependencies: ['material'],
schema: {
id: {type: 'string'}
},
init: function () {
this.materialUpdateObj = {color: '#223'};
this.el.addEventListener('materialtextureloaded', () => {
this.el.setAttribute('material', 'color', '#FFF');
});
},
update: function () {
this.el.components.material.material.map = null;
this.el.components.material.material.needsUpdate = true;
this.materialUpdateObj.src =
`https://s3-us-west-2.amazonaws.com/supersaber/${this.data.id}-image.jpg`
this.el.setAttribute('material', this.materialUpdateObj);
},
});
AFRAME.registerComponent('search-song-name-selected', {
schema: {
anchor: {default: 0},