AI Emoji Rain - Colorful Emojis Falling from the Sky

56 views Β· Dec 15, 2025

Watch a delightful shower of emojis fall from the sky with realistic physics! Hearts, stars, suns, moons, and more tumble down and bounce at the bottom. Click anywhere to spawn a burst of emojis. A fun and cheerful animation for your browser. Created with xelsed-alpha6-flash.

#xelsedia#xelsedai#generativeart#p5js#creativecoding#emoji#animation#physics#fun#colorful
πŸ”€ Remix This πŸ“– View Docs β›Ά Full Screen ← Back to Gallery
πŸ“‹ Embed Code

Copy this code to embed this sketch on your website:

<iframe src="https://p5js.ai/embed/8baebee0-255f-4d07-bcd9-cfb118c6bb91" width="400" height="400" frameborder="0" allow="autoplay" title="AI Emoji Rain - Colorful Emojis Falling from the Sky"></iframe>

Adjust width and height as needed. Preview embed β†’

❓ About This Sketch 3 questions

What visual effect does the AI Emoji Rain sketch create?

The sketch visually displays a cheerful shower of colorful emojis, such as hearts and stars, falling from the sky with realistic physics, creating a delightful animation.

How can users interact with the AI Emoji Rain sketch?

Users can interact with the sketch by clicking anywhere on the canvas, which spawns a burst of emojis that rain down from that location.

What creative coding concepts are showcased in this emoji animation?

The sketch demonstrates concepts such as particle systems, physics-based motion, and dynamic graphics rendering using p5.js.

πŸ’¬ AI Chat History 2 messages
πŸ‘€ You
Create an emoji rain animation. Random emojis fall from the top of the screen like raindrops. Use text() to draw emojis. Each emoji has gravity and bounces once when hitting the bottom. Use an array of common emojis like heart, star, sun, moon, fire, rainbow, etc. Emojis spawn at random x positions at the top. About 2-3 new emojis spawn per second. Emojis fade out after bouncing. Click to spawn a burst of 10 emojis at mouse position. Light blue sky gradient background. Fun and colorful. Keep code under 50 lines.
πŸ€– AI
Here’s a compact emoji-rain sketch that fits in under 50 lines.

### sketch.js
```js
let emojis=[],chars=['❀️','⭐','β˜€οΈ','πŸŒ™','πŸ”₯','🌈','πŸ’§','πŸ€','🌸','πŸ˜ƒ'],g=0.3,c1,c2;
function setup(){
createCanvas(windowWidth,windowHeight);
textAlign(CENTER,CENTER);
c1=color(135,206,250);c2=color(180,228,255);
}
function spawn(x,y){
emojis.push({x,y,vy:random(1,3),vx:random(-0.5,0.5),s:random(32,56),ch:random(chars),b:false,a:255});
}
function draw(){
for(let y=0;y<height;y++)stroke(lerpColor(c1,c2,y/height)),line(0,y,width,y);
if(random()<0.04)spawn(random(width),-20);
noStroke();
for(let i=emojis.length-1;i>=0;i--){
let e=emojis[i];
e.vy+=g;e.x+=e.vx;e.y+=e.vy;
if(e.y+e.s/2>height){
e.y=height-e.s/2;
if(!e.b){e.vy*=-0.6;e.b=true;}else e.vy=0;
}
if(e.b)e.a-=4;
if(e.a<=0){emojis.splice(i,1);continue;}
fill(0,0,0,e.a);textSize(e.s);text(e.ch,e.x,e.y);
}
}
function mousePressed(){for(let i=0;i<10;i++)spawn(mouseX,mouseY);}
function windowResized(){resizeCanvas(windowWidth,windowHeight);}
```

- Uses `text()` to draw emojis: https://p5js.org/reference/#/p5/text
- Spawns ~2–3 emojis/sec via `if (random() < 0.04)` (at 60 FPS): https://p5js.org/reference/#/p5/random
- Light blue gradient via `lerpColor`: https://p5js.org/reference/#/p5/lerpColor

### index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoji Rain</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/p5@1.11.3/lib/p5.min.js"></script>
<script src="sketch.js"></script>
</body>
</html>
```

### style.css
(You can keep your existing file as-is.)
```css
body {
margin: 0;
padding: 0;
overflow: hidden;
}

canvas {
display: block;
}
```

Click anywhere to spawn a burst of 10 emojis at the mouse position.
🎬 Video Preview