Last changes
This commit is contained in:
parent
75aec8bbb2
commit
a112a9ac97
|
@ -89,7 +89,7 @@ export default class CirclesAnimation {
|
||||||
const circle = this.circles[c];
|
const circle = this.circles[c];
|
||||||
sketch.beginShape();
|
sketch.beginShape();
|
||||||
for (let i = 0; i < circle.spectrum.length; i++) {
|
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(
|
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.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,
|
Math.sin((i / this.CIRCLE_POINTS) * 2 * Math.PI) * (this.CIRCLE_RADIUS + c * 15) + this.baseHeight + (this.maxPitch / 2 - circle.pitch) - p,
|
||||||
|
|
|
@ -5,8 +5,8 @@ import HorizontalLinesAnimation from './horizontal-lines.js';
|
||||||
import SquaresAnimation from './squares.js';
|
import SquaresAnimation from './squares.js';
|
||||||
import CirclesAnimation from './circles.js';
|
import CirclesAnimation from './circles.js';
|
||||||
|
|
||||||
const ANIMATION_TIME = 10 * 60 * 1000;
|
// const ANIMATION_TIME = 10 * 60 * 1000;
|
||||||
// const ANIMATION_TIME = 10 * 1000;
|
const ANIMATION_TIME = 20 * 1000;
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const audioCtx = new AudioContext();
|
const audioCtx = new AudioContext();
|
||||||
|
|
Loading…
Reference in a new issue