Skip to content
PixiKit

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
NameTypeDefaultDescription
widthstring | number"100%"Width of the gallery.
heightstring | number"100%"Height of the gallery.
classNamestring""
imagesGalleryImage[]DEFAULT_IMAGESThe pictures scattered through the space; they repeat forever.
densitynumber5Pictures in each cell of space.
imageSizenumber14Size of a picture, in world units.
cellSizenumber110Size of one cell of space, in world units.
viewRangenumber2How many cells are drawn around the camera in each direction.
fogNearnumber120Distance where pictures start fading into the fog.
fogFarnumber320Distance where pictures are fully hidden by the fog.
dragSpeednumber1Drag and scroll sensitivity, 0.1 to 5.
driftAmountnumber8How far pictures sway around their spot.
frictionnumber0.9How long a drag keeps gliding; closer to 1 glides longer.
autoZoombooleanfalseFlies forward on its own.
autoZoomSpeednumber0.5Speed of the automatic flight.
imageRadiusnumber0.06Corner rounding, as a share of the picture.
allowImageFocusOnClickbooleantrueClicking a picture flies to it; click again to fly on.
backgroundColorstring"#000000"Color behind the pictures.
fogColorstring"#000000"Color distant pictures fade into.
styleCSSPropertiesNone

Related