initial loading indicator (ring)

This commit is contained in:
Kevin Ngo
2018-10-12 18:09:04 -07:00
parent 5b8e13d69d
commit eefebb9b02
3 changed files with 13 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ AFRAME.registerComponent('song', {
this.analyserSetter = {buffer: true};
this.audioAnalyser = this.data.analyserEl.components.audioanalyser;
this.context = this.audioAnalyser.context;
this.songLoadingIndicator = document.getElementById('songLoadingIndicator');
this.victory = this.victory.bind(this);
@@ -118,6 +119,8 @@ AFRAME.registerComponent('song', {
},
onFetchProgress: function (evt) {
const progress = evt.loaded / evt.total;
this.songLoadingIndicator.setAttribute(
'geometry', 'thetaLength', progress * 360);
}
});