Ballpit
Customize Ballpit
Ball Count200
Gravity0.7
Friction0.80
Wall Bounce0.95
Max Velocity0.15
Min Size0.5
Max Size1.0
Control Ball Size1.0
Props
| Property | Type | Default | Description |
|---|---|---|---|
| count | number | 200 | Number of balls in the ballpit |
| gravity | number | 0.7 | Gravity strength affecting ball movement (0-2) |
| friction | number | 0.8 | Friction coefficient for ball movement (0.5-1) |
| wallBounce | number | 0.95 | Bounce factor when balls hit walls (0.5-1) |
| followCursor | boolean | | Enable balls to follow mouse cursor movement |
| maxVelocity | number | 0.15 | Maximum velocity for ball movement (0.05-0.5) |
| minSize | number | 0.5 | Minimum size of balls (0.1-2) |
| maxSize | number | 1 | Maximum size of balls (0.5-3) |
| size0 | number | 1 | Control ball size multiplier (0.5-3) |
| className | string | custom-ballpit | Additional CSS class names for styling |
| width | string | 100% | Width of the ballpit container |
| height | string | 500px | Height of the ballpit container |
| enableCollision | boolean | | Enable or disable ball collision detection |
| ballColor | string | random | Color of balls - 'random' or specific hex color |
| animationSpeed | number | 1 | Animation speed multiplier (0.1-3) |
Dependencies
ogl
Created with ❤️ by Cybershoora