Skip to content
PixiKit

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
NameTypeDefaultDescription
gridSizenumber10Cubes on each side of the grid.
gapnumber0.18Space between cubes, as a fraction of a cell.
faceColorstring"#120F17"The cube faces' colour; match it to the page for a cut-out look.
edgeColorstring"#ffffff"The cube outlines' colour.
edgeWidthnumber1Width of the outlines, in pixels.
edgeStyle"solid" | "dashed" | "dotted" | "none""solid"How the outlines are drawn.
faceOpacitynumber1Opacity of the faces, from 0 for see-through wireframes to 1 for solid cubes.
shadingnumber0.6How much the sides of turned cubes pick up light.
maxAnglenumber45How far cubes turn to face the pointer, in degrees.
radiusnumber3How far the pointer reaches, in cubes.
speednumber1How quickly cubes respond.
bouncenumber0.4How much cubes overshoot and wobble as they settle, 0 to 1.
brushnumber1How strongly fast pointer sweeps spin the cubes they pass over.
perspectivenumber0Camera perspective, from 0 for a flat front view to 1 for strong depth.
autoAnimatebooleantrueDrifts a gentle wave across the grid while the pointer is away.
rippleOnClickbooleantrueClicking sends a ripple through the cubes that lights up their edges.
rippleColorstring"#ffffff"The colour the ripple lights the cubes with.
rippleSpeednumber1Speed of the ripple.
introbooleantrueCubes tumble into place from the centre on mount.
pausedbooleanfalseFreezes the animation.
dprnumberNoneThe highest device pixel ratio drawn, capped at 2.
classNamestringNone
styleCSSPropertiesNone

More interaction effects in Pro

View all

Related