Endless Drift
An endless field of pictures hanging in space: drag to glide sideways, scroll to fly through, far pictures fade into fog, and a click flies to one.
pixikit.com/docs/components/endless-drift
Customize
Density5
Image size14
Cell size110
View range2
Fog near120
Fog far320
Drag speed1.0
Drift amount8.0
Friction0.90
Auto zoom
Auto zoom speed0.5
Image radius0.06
Allow image focus on click
Background color
Fog color
Props
20| Name | Type | Default | Description |
|---|---|---|---|
width | string | number | "100%" | Width of the gallery. |
height | string | number | "100%" | Height of the gallery. |
className | string | "" | |
images | GalleryImage[] | DEFAULT_IMAGES | The pictures scattered through the space; they repeat forever. |
density | number | 5 | Pictures in each cell of space. |
imageSize | number | 14 | Size of a picture, in world units. |
cellSize | number | 110 | Size of one cell of space, in world units. |
viewRange | number | 2 | How many cells are drawn around the camera in each direction. |
fogNear | number | 120 | Distance where pictures start fading into the fog. |
fogFar | number | 320 | Distance where pictures are fully hidden by the fog. |
dragSpeed | number | 1 | Drag and scroll sensitivity, 0.1 to 5. |
driftAmount | number | 8 | How far pictures sway around their spot. |
friction | number | 0.9 | How long a drag keeps gliding; closer to 1 glides longer. |
autoZoom | boolean | false | Flies forward on its own. |
autoZoomSpeed | number | 0.5 | Speed of the automatic flight. |
imageRadius | number | 0.06 | Corner rounding, as a share of the picture. |
allowImageFocusOnClick | boolean | true | Clicking a picture flies to it; click again to fly on. |
backgroundColor | string | "#000000" | Color behind the pictures. |
fogColor | string | "#000000" | Color distant pictures fade into. |
style | CSSProperties | None |