[npm bump] audio floor beat, split audioanalyser to separate entity
This commit is contained in:
@@ -12,6 +12,7 @@ AFRAME.registerComponent('audio-columns', {
|
||||
dependencies: ['audioanalyser'],
|
||||
|
||||
schema: {
|
||||
analyser: {type: 'selector', default: '#audioanalyser'},
|
||||
height: {default: 1.0},
|
||||
mirror: {default: 3},
|
||||
scale: {default: 4.0},
|
||||
@@ -20,7 +21,7 @@ AFRAME.registerComponent('audio-columns', {
|
||||
},
|
||||
|
||||
init: function () {
|
||||
this.analyser = this.el.components.audioanalyser;
|
||||
this.analyser = this.data.analyser.components.audioanalyser;
|
||||
|
||||
// Number of levels is half the FFT size.
|
||||
this.frequencyBinCount = this.analyser.data.fftSize / 2;
|
||||
|
||||
@@ -161,8 +161,8 @@ AFRAME.registerComponent('song-preview-system', {
|
||||
},
|
||||
|
||||
updateAnalyser: function () {
|
||||
document.getElementById('audioAnalyser').setAttribute('audioanalyser', 'src', this.audio);
|
||||
document.getElementById('introSong').pause();
|
||||
document.getElementById('audioColumns').setAttribute('audioanalyser', 'src', this.audio);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user