Skip to content

Commit 434a08c

Browse files
committed
fa le bolle colorate
ok ora fa le bolle colorate
1 parent 4ccf7f2 commit 434a08c

3 files changed

Lines changed: 40 additions & 5 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"liveServer.settings.port": 5501
45
}

assets/immagine.jpg

123 KB
Loading

code.js

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const configurazione = {
2-
testo: "F",
2+
testo: "spype", // c spype
33

44
dimensione: 0.8,
55
interlinea: 0.7,
@@ -9,7 +9,7 @@ export const configurazione = {
99
sensibilitàMicrofonoBase: 1,
1010
densitàPuntiBase: 1,
1111

12-
nascondiInterfaccia: false,
12+
nascondiInterfaccia: true,
1313
};
1414

1515
/**
@@ -42,6 +42,36 @@ export function disegnaPunto({
4242
beta = 0,
4343
gamma = 0,
4444
}) {
45+
const size = sin((frameCount + indice) * 0.01) * (volume * unita * 1) * unita;
46+
47+
let r = random(255);
48+
let g = random(255);
49+
let b = random(255);
50+
51+
fill(r, g, b);
52+
53+
noStroke();
54+
let larghezza = map(volume, 0, 1, 4, 800);
55+
let myrand = randomGaussian(larghezza, larghezza * 2);
56+
let myrand2 = randomGaussian(larghezza, larghezza / 2);
57+
let myrand3 = randomGaussian(-10, 10);
58+
push();
59+
translate(x, y);
60+
ellipse(
61+
myrand3,
62+
random(-100, 100),
63+
((size * myrand) / myrand) * myrand2 * 0.2
64+
);
65+
pop();
66+
67+
/* rumore tv
68+
let larghezza = map(volume, 0, 1, 50, 600);
69+
let myrand = randomGaussian(larghezza, larghezza * 2);
70+
stroke("red");
71+
rect(x * 1.2 - myrand / 2, y + myrand / 20, myrand / 80, 1, 2);
72+
*/
73+
74+
/*
4575
const size = sin((frameCount + indice) * 6) * ((volume * unita) / 2) * unita;
4676
4777
if (indice % 2 == 0) {
@@ -55,6 +85,7 @@ export function disegnaPunto({
5585
translate(x, y);
5686
ellipse(0, 0, size);
5787
pop();
88+
*/
5889
}
5990

6091
/**
@@ -77,10 +108,13 @@ export function impostazioni() {
77108
* @param {function} disegnaTesto - La funzione che disegna il testo
78109
*/
79110
export function sotto(disegnaTesto) {
80-
background("deeppink");
111+
background("black");
81112

82113
// [INFO] Rimuovi il commento per disegnare il testo
83-
fill("white");
114+
let r = random(255);
115+
let g = random(255);
116+
let b = random(255);
117+
fill(r, g, b);
84118
disegnaTesto();
85119
}
86120

0 commit comments

Comments
 (0)