let particles = [];
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
}
function draw() {
background(10, 20, 40, 60);
// ساخت ذرههای جدید
if (frameCount % 5 === 0) {
particles.push(new Particle(mouseX, mouseY));
}
// آپدیت و نمایش
for (let i = particles.length - 1; i >= 0; i--) {
particles[i].update();
particles[i].show();
if (particles[i].finished()) {
particles.splice(i, 1);
}
}
}
class Particle {
constructor(x, y) {
this.pos = createVector(x, y);
this.vel = p5.Vector.random2D().mult(random(1, 3));
this.lifespan = 255;
this.angle = random(TWO_PI);
this.radius = random(2, 6);
this.color = color(random(100,255), random(100,255), random(200,255));
}
update() {
this.pos.add(this.vel);
this.lifespan -= 3;
this.angle += 0.1;
}
finished() {
return this.lifespan < 0;
}
show() {
push();
translate(this.pos.x, this.pos.y);
let offset = sin(this.angle) * 5;
fill(red(this.color), green(this.color), blue(this.color), this.lifespan);
ellipse(offset, 0, this.radius * 2);
pop();
}
}
آسمون ما نمیای پر پرواز😎😎
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
}
function draw() {
background(10, 20, 40, 60);
// ساخت ذرههای جدید
if (frameCount % 5 === 0) {
particles.push(new Particle(mouseX, mouseY));
}
// آپدیت و نمایش
for (let i = particles.length - 1; i >= 0; i--) {
particles[i].update();
particles[i].show();
if (particles[i].finished()) {
particles.splice(i, 1);
}
}
}
class Particle {
constructor(x, y) {
this.pos = createVector(x, y);
this.vel = p5.Vector.random2D().mult(random(1, 3));
this.lifespan = 255;
this.angle = random(TWO_PI);
this.radius = random(2, 6);
this.color = color(random(100,255), random(100,255), random(200,255));
}
update() {
this.pos.add(this.vel);
this.lifespan -= 3;
this.angle += 0.1;
}
finished() {
return this.lifespan < 0;
}
show() {
push();
translate(this.pos.x, this.pos.y);
let offset = sin(this.angle) * 5;
fill(red(this.color), green(this.color), blue(this.color), this.lifespan);
ellipse(offset, 0, this.radius * 2);
pop();
}
}
آسمون ما نمیای پر پرواز😎😎
🆒1
Forwarded from "اُقیآنوسِبيکَرآنِغَمهآ"
Forwarded from کارامل ماکیاتو
میخوام چنلهای جدیدی رو پیدا کنم و بخونم. این پیام رو فوروارد کنید اگه چنل من رو میخونید تا منم بیام چنلتون ☕️
Forwarded from 𝗕𝗹𝘂𝗲 𝗹𝗶𝗹𝗶𝘂𝗺💙✨ (_)
فور کن چنلت🐇💁🏻♀.
ازت فور کنم ویو بگیری.
چنل حتما جوین باش.
Forwarded from "اُقیآنوسِبيکَرآنِغَمهآ"
Listen to Marize Ham (feat. Sogand) by Hiphopologist, Sogand, Ashkan Kagan on #SoundCloud
https://on.soundcloud.com/nA9FFbWxhOXL3qJj2k
https://on.soundcloud.com/nA9FFbWxhOXL3qJj2k
SoundCloud
Marize Ham (feat. Sogand)
Hiphopologist ft. Sogand - Marize Ham
Music Producer: Ashkan Kagan
Beat Producers: Ashkan Kagan, Emvd Emvi, Echkei, Dudelorix
Project Manager: Arsam
BELAAD
https://on.soundcloud.com/pzfRKigPePaQ3tJ
Music Producer: Ashkan Kagan
Beat Producers: Ashkan Kagan, Emvd Emvi, Echkei, Dudelorix
Project Manager: Arsam
BELAAD
https://on.soundcloud.com/pzfRKigPePaQ3tJ