Sketch 2026-05-15 16:34

139 views · 0 likes · 1 comments · May 15, 2026

💬 1

This sketch creates an animated bouncing ball that changes color based on its horizontal position and plays a sound effect whenever it hits a wall. The ball's speed can be controlled with arrow keys, and the spacebar resets it to a random starting state.

🔀 Remix This 📖 View Docs ⛶ Full Screen ← Back to Gallery

💬 Comments

Loading comments...

📋 Embed Code

Copy this code to embed this sketch on your website:

<iframe src="https://p5js.ai/embed/51579c55-7a06-4a6c-9e6e-adb2246f2f18" width="400" height="400" frameborder="0" allow="autoplay" title="Sketch 2026-05-15 16:34"></iframe>

Adjust width and height as needed. Preview embed →

❓ About This Sketch 3 questions

What visual effects does the p5.js sketch create?

The sketch generates a dynamic canvas with a ball that bounces around, utilizing HSB color mode for vibrant color manipulation.

How can users interact with the sketch?

Users can control the ball's speed by pressing keys, allowing for an interactive experience as they adjust the speed multiplier.

What creative coding techniques are showcased in this sketch?

This sketch demonstrates procedural sound generation using an oscillator and incorporates responsive design principles for the canvas size.

🎬 Video Preview