throttle beat detection for logo light

This commit is contained in:
Kevin Ngo
2018-09-25 04:35:39 -07:00
parent b41c5e127c
commit 7a0e1bacdd
3 changed files with 9 additions and 14 deletions

11
package-lock.json generated
View File

@@ -95,9 +95,9 @@
"integrity": "sha512-mVxIH5qjik3qnbmeuXnYWFyKkcdLdZEQIFIFky1Z3QY8gZFsbCgocImwAx9UV9DTsIywa/lt3nXyNrpgOQgNCg=="
},
"aframe-audioanalyser-component": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/aframe-audioanalyser-component/-/aframe-audioanalyser-component-3.0.3.tgz",
"integrity": "sha1-7/GajmB5Ul3ZR99LpDG5vKI+fQc="
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/aframe-audioanalyser-component/-/aframe-audioanalyser-component-4.0.0.tgz",
"integrity": "sha512-piyQ6Ui8AmojGEWUx1LpsX2K7R0WiUzeehea699mAf3oE+BxGyDPNlFvi0ti3t9cdhj6ybvySu7xKRZ3f4llyA=="
},
"aframe-cubemap-component": {
"version": "0.1.4",
@@ -157,11 +157,6 @@
"resolved": "https://registry.npmjs.org/aframe-slice9-component/-/aframe-slice9-component-1.0.0.tgz",
"integrity": "sha1-+w+EQdrdHosRzCRRK6eqaS1iK+E="
},
"aframe-state-component": {
"version": "5.0.0-beta5",
"resolved": "https://registry.npmjs.org/aframe-state-component/-/aframe-state-component-5.0.0-beta5.tgz",
"integrity": "sha512-tv/Fk63fadB1Slwztj0rBpMTwymivsu4XnoA6NswBvVwauLuWvW/06L6aoz+GPiykl6S3GuLi7gDyaqG/wNXng=="
},
"aframe-super-keyboard": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/aframe-super-keyboard/-/aframe-super-keyboard-2.0.2.tgz",

View File

@@ -8,7 +8,7 @@
"dependencies": {
"aframe-animation-component": "^5.1.1",
"aframe-animation-timeline-component": "^1.3.1",
"aframe-audioanalyser-component": "^3.0.3",
"aframe-audioanalyser-component": "^4.0.0",
"aframe-cubemap-component": "^0.1.2",
"aframe-event-decorators": "^1.0.2",
"aframe-event-set-component": "^4.0.1",

View File

@@ -5,7 +5,7 @@
<a-entity id="twister" twister position="0 0 -60" rotation="90 0 0"></a-entity>
<a-entity id="audioColumns" audioanalyser="src: #introSong; fftSize: 64; enableBeatDetection: true; enableLevels: false; enableWaveform: false" audio-columns="height: 28; mirror: 10; scale: 10; thickness: 0.4; separation: 0.45" position="0 -17 1" proxy-event="event: audioanalyser-beat; to: #logolight"></a-entity>
<a-entity id="audioColumns" audioanalyser="src: #introSong; fftSize: 64; enableBeatDetection: true; enableLevels: false; enableWaveform: false; beatDetectionThrottle: 5000" audio-columns="height: 28; mirror: 10; scale: 10; thickness: 0.4; separation: 0.45" position="0 -17 1" proxy-event="event: audioanalyser-beat; to: #logolight"></a-entity>
<!-- Corridor. -->
<a-entity geometry="height: 0.3; depth: 50; width: 4.1" position="0 0 -31.85" materials="black"></a-entity>
@@ -43,9 +43,9 @@
<a-entity light="type: directional; intensity: 3" position="0 10 10"></a-entity>
<a-entity id="logolight"
position="0 6 0"
light="type: spot; penumbra: 1; intensity: 5; angle: 20"
<a-entity id="logolight"
position="0 6 0"
light="type: spot; penumbra: 1; intensity: 5; angle: 20"
animation="property: rotation; from: 0 50 0; to: 0 -50 0; dur:300; easing: linear; startEvents: audioanalyser-beat"
></a-entity>
<a-entity id="logosparks" particleplayer="src: #logoSparks; scale: 1.4; pscale: 0.35; count: 10; dur: 600; on: logoflicker" position="-2.8 5.5 -7.2"></a-entity>
@@ -55,5 +55,5 @@
<a-entity obj-model="obj:#logofront-u-obj" material="color: #e81e23" logoflicker="delay: 1200"></a-entity>
</a-entity>
<a-entity geometry="primitive: plane; width: 3; height: 3" material="shader: flat; src: #floor" position="0 0 0" rotation="-90 0 0"></a-entity>
<a-entity geometry="primitive: plane; width: 3; height: 3" material="shader: flat; src: #floor" rotation="-90 0 0"></a-entity>
</a-entity>