Last changes

This commit is contained in:
Benjamin Bädorf 2019-06-15 01:38:23 +02:00
parent 75aec8bbb2
commit a112a9ac97
2 changed files with 3 additions and 3 deletions

View file

@ -89,7 +89,7 @@ export default class CirclesAnimation {
const circle = this.circles[c];
sketch.beginShape();
for (let i = 0; i < circle.spectrum.length; i++) {
const p = circle.spectrum[i];
const p = Math.max(circle.spectrum[i] - (this.averageSpectrum[i] * 0.6), 0);
sketch.curveVertex(
Math.cos((i / this.CIRCLE_POINTS) * 2 * Math.PI) * (this.CIRCLE_RADIUS + c * 15) + this.baseWidth + (this.maxVolume / 2 - circle.volume) + p,
Math.sin((i / this.CIRCLE_POINTS) * 2 * Math.PI) * (this.CIRCLE_RADIUS + c * 15) + this.baseHeight + (this.maxPitch / 2 - circle.pitch) - p,

View file

@ -5,8 +5,8 @@ import HorizontalLinesAnimation from './horizontal-lines.js';
import SquaresAnimation from './squares.js';
import CirclesAnimation from './circles.js';
const ANIMATION_TIME = 10 * 60 * 1000;
// const ANIMATION_TIME = 10 * 1000;
// const ANIMATION_TIME = 10 * 60 * 1000;
const ANIMATION_TIME = 20 * 1000;
async function main() {
const audioCtx = new AudioContext();