Toggle Sidebar B
AppearanceLight & dark mode D

Ballpit

Physics ball pit simulation with bouncing colorful spheres.

Default

Count, gravity, friction and bounce are wired to the controls underneath. Move the pointer over the pit to push the balls around.

Light previewReplay previewOpen in new tab
New Creative Components

Balls! What's not to like about them?

Get started Learn more

Customize

Ball Count100
Gravity0
Friction0.998
Wall Bounce0.95

API Reference

Ballpit

PropTypeDefaultDescription
countnumber200Sets the number of balls in the ballpit.
gravitynumber0.5Controls the gravity affecting the balls.
frictionnumber0.9975Sets the friction applied to the ball movement.
wallBouncenumber0.95Determines how much balls bounce off walls.
followCursorbooleantrueEnables or disables the sphere following the cursor.
colorsarray[0, 0, 0]Defines the colors of the balls.
ambientColornumber16777215Sets the ambient light color.
ambientIntensitynumber1Controls the intensity of ambient light.
lightIntensitynumber200Sets the intensity of the main light source.
minSizenumber0.5Specifies the minimum size of the balls.
maxSizenumber1Specifies the maximum size of the balls.
size0number1Initial size value for the cursor ball.
maxVelocitynumber0.15Limits the maximum velocity of the balls.
maxXnumber5Defines the maximum X-coordinate boundary.
maxYnumber5Defines the maximum Y-coordinate boundary.
maxZnumber2Defines the maximum Z-coordinate boundary.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Purely decorative canvas. Place it behind content with enough contrast.