Skip to content
PixiKit

Bounce Pit

A soft-lit pit of physics balls you can shove with the pointer, grab, throw and blast apart. They pile up under gravity or float and drift without it.

pixikit.com/docs/effects/bounce-pit

Customize

Count200
Colors1 of 10
Material
Min size0.50
Max size1.00
Gravity0.00
Friction0.9975
Wall bounce0.95
Bounce0.85
Depth2.0
Drift0.40
Follow cursor
Cursor size1.0
Grab
Click effect
Light color
Light intensity1.0
Exposure1.00
Shadows0.60
Intro
Dpr2.00

Props

23
NameTypeDefaultDescription
countnumber200The number of balls in the pit.
colorsstring[]["#ffffff"]The ball colours, handed out in turn; any CSS colours.
material"satin" | "matte" | "gloss" | "frosted" | "metal""satin"The surface finish: soft satin, chalky matte, polished gloss, see-through frosted or brushed metal.
minSizenumber0.5The smallest ball radius; the view is about 18 units tall.
maxSizenumber1The largest ball radius.
gravitynumber0.5The pull toward the floor: 0 lets the balls float, around 0.5 piles them up.
frictionnumber0.9975How much speed the balls keep each frame; 1 never slows them down.
wallBouncenumber0.95How much speed the balls keep when they hit the edges, 0 to 1.
bouncenumber0.85How bouncy the balls are against each other, 0 to 1.
depthnumber2How deep the pit is, so balls can sit in front of and behind each other.
driftnumber0A gentle wandering that keeps floating balls moving on their own.
followCursorbooleantrueA ball follows the pointer and shoves the others out of the way.
cursorSizenumber1The radius of the pointer ball.
grabbooleantruePress on a ball to pick it up, drag it around and throw it.
clickEffect"burst" | "none""burst"A click on an empty spot blasts the nearby balls away with a flash of light.
lightColorstring"#ffffff"The colour of the light that follows the pointer and lights the balls around it.
lightIntensitynumber1The brightness of the pointer light.
exposurenumber1The overall brightness of the balls.
shadowsnumber0.6The strength of the soft shadows the balls cast on each other.
introbooleantrueThe balls pour in from the top on mount, or burst out from the centre when gravity is near zero.
dprnumber2The highest device pixel ratio drawn, capped at 2.
classNamestringNone
styleCSSPropertiesNoneInline styles for the container.

Related