Monochrome everything

This commit is contained in:
Benjamin Bädorf 2021-09-18 15:21:39 +02:00
parent db822f35c0
commit caed36c233
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
2 changed files with 5 additions and 5 deletions

View file

@ -24,8 +24,8 @@ async function main() {
const animations = [
// birds,
shapes,
// circles,
// squares,
circles,
squares,
// horizontalLines,
];

View file

@ -96,7 +96,7 @@ export default class SquaresAnimation {
}
draw(sketch) {
sketch.background('rgba(0, 0, 0, 0.20)');
sketch.background('rgba(30, 30, 30, 0.40)');
if (!this.fresh) {
return;
}
@ -105,9 +105,9 @@ export default class SquaresAnimation {
const color = ((this.data.pitch - this.minPitch) / (this.maxPitch - this.minPitch)) * 360;
for (let i = 0; i < brightness; i++) {
const p = this.data.spectrum[i];
sketch.stroke(color, 100, 100);
sketch.stroke(0, 0, 255);
sketch.fill(color, 100, 100);
sketch.fill(0, 0, 255);
const x = getRandomBetween(0, this.maxX) * this.GRID_SIZE;
const y = getRandomBetween(0, this.maxY) * this.GRID_SIZE;
sketch.beginShape();