Cube Grid
A grid of 3D cubes that turn to face the pointer, spin when it sweeps past, ripple with light on a click and drift in a slow wave on their own.
pixikit.com/docs/effects/cube-grid
Customize
Grid size10
Gap0.18
Face color
Edge color
Edge width1.00px
Edge style
Face opacity1.00
Shading0.60
Max angle45deg
Radius3.0
Speed1.00
Bounce0.40
Brush1.0
Perspective0.00
Auto animate
Ripple on click
Ripple color
Ripple speed1.0
Intro
Paused
Dpr
Props
23| Name | Type | Default | Description |
|---|---|---|---|
gridSize | number | 10 | Cubes on each side of the grid. |
gap | number | 0.18 | Space between cubes, as a fraction of a cell. |
faceColor | string | "#120F17" | The cube faces' colour; match it to the page for a cut-out look. |
edgeColor | string | "#ffffff" | The cube outlines' colour. |
edgeWidth | number | 1 | Width of the outlines, in pixels. |
edgeStyle | "solid" | "dashed" | "dotted" | "none" | "solid" | How the outlines are drawn. |
faceOpacity | number | 1 | Opacity of the faces, from 0 for see-through wireframes to 1 for solid cubes. |
shading | number | 0.6 | How much the sides of turned cubes pick up light. |
maxAngle | number | 45 | How far cubes turn to face the pointer, in degrees. |
radius | number | 3 | How far the pointer reaches, in cubes. |
speed | number | 1 | How quickly cubes respond. |
bounce | number | 0.4 | How much cubes overshoot and wobble as they settle, 0 to 1. |
brush | number | 1 | How strongly fast pointer sweeps spin the cubes they pass over. |
perspective | number | 0 | Camera perspective, from 0 for a flat front view to 1 for strong depth. |
autoAnimate | boolean | true | Drifts a gentle wave across the grid while the pointer is away. |
rippleOnClick | boolean | true | Clicking sends a ripple through the cubes that lights up their edges. |
rippleColor | string | "#ffffff" | The colour the ripple lights the cubes with. |
rippleSpeed | number | 1 | Speed of the ripple. |
intro | boolean | true | Cubes tumble into place from the centre on mount. |
paused | boolean | false | Freezes the animation. |
dpr | number | None | The highest device pixel ratio drawn, capped at 2. |
className | string | None | |
style | CSSProperties | None |