Sketching out particles and testing some positive affirmations.
```javascript let particles = []; let messages = [<br> "Believe in yourself!",<br> "You are amazing!",<br> "Keep shining!",<br> "Dream big!",<br> "You can do it!",<br> "Stay positive!",<br> "Embrace the journey!",<br> "Big up to you!",<br> "You're doing great"<br> ]; let explosions = []; function setup() {<br> createCanvas(800, 800);<br> noStroke();<br> } ``` function draw() {<br> background(0, 0, 1, 60); // Fading trail effect // Continuously spawn explosions at random intervals<br> if (frameCount % 60 === 0) {<br> // Constraining the space for the explosions<br> createExplosion(random(width - 50), random(height - 50));<br> } // Update and display particles<br> for (let i = particles.length - 1; i >= 0; i--) {<br> particles[i].update();<br> particles[i].show();<br> if (particles[i].finished()) {<br> particles.splice(i, 1);<br> }<br> } // Update and display messages<br> for (let i = explosions.length - 1; i >= 0; i--) {<br> explosions[i].update();<br> explosions[i].show();<br> if (explosions[i].finished()) {<br> explosions.splice(i, 1);<br> }<br> }<br> } function createExplosion(x, y) {<br> let numParticles = random(50, 200);<br> let colors = [random(255), random(255), random(255)];<br> let message = random(messages); // Select a random life-affirming message // Create particles<br> for (let i = 0; i < numParticles; i++) {<br> particles.push(new Particle(x, y, colors));<br> } // Create the message<br> explosions.push(new ExplosionMessage(x, y, message, colors));<br> } class Particle {<br> constructor(x, y, colors) {<br> this.x = x;<br> this.y = y;<br> this.vx = random(-3, 3);<br> this.vy = random(-3, 3);<br> this.alpha = 255;<br> this.colors = colors;<br> } update() {<br> this.x += this.vx;<br> this.y += this.vy;<br> this.alpha -= 5; // Fade out over time<br> } finished() {<br> return this.alpha <= 0;<br> } show() {<br> fill(this.colors[0], this.colors[1], this.colors[2], this.alpha);<br> ellipse(this.x, this.y, 8);<br> rect(this.x + random(2, 5), this.y + random(2, 10), 8);<br> }<br> } class ExplosionMessage {<br> constructor(x, y, message, colors) {<br> this.x = x;<br> this.y = y;<br> this.message = message;<br> this.colors = colors;<br> this.alpha = 255;<br> } update() {<br> this.alpha -= 5; // Fade out over time<br> } finished() {<br> return this.alpha <= 0;<br> } show() {<br> textAlign(CENTER, CENTER);<br> textSize(20);<br> fill(this.colors[0], this.colors[1], this.colors[2], this.alpha);<br> text(this.message, this.x, this.y);<br> }<br> }













