Skip to content
PixiKit

Galaxy Field

A starfield you fly through: layered stars with glow, cross flares and twinkle that part around the pointer and jump to warp speed on click.

pixikit.com/docs/effects/galaxy-field

Customize

Star colors0 of 10
Hue shift140
Saturation0.00
Density1.00
Glow intensity0.30
Star size1.00
Flare intensity1.00
Twinkle intensity0.30
Star speed0.50
Speed1.00
Rotation speed0.10
Layers4
Direction
Mouse interaction
Mouse repulsion
Repulsion strength2.0
Auto center repulsion0.0
Click warp
Intro
Transparent
Background color
Light mode
Opacity1.00
Disable animation

Props

29
NameTypeDefaultDescription
starColorsstring[]NoneUp to four colors the stars are picked from. Replaces the hue shift and saturation coloring.
hueShiftnumber140Shifts the hue of the stars, in degrees.
saturationnumber0Color saturation of the stars, from 0 to 1.
densitynumber1How densely the stars are packed.
glowIntensitynumber0.3Brightness of the glow around each star.
starSizenumber1Size of each star glow.
flareIntensitynumber1Strength of the cross flares on the brightest stars.
twinkleIntensitynumber0.3How much the stars twinkle, from 0 to 1.
starSpeednumber0.5How fast you travel through the stars.
speednumber1Overall speed of the animation.
rotationSpeednumber0.1How fast the starfield rotates.
layersnumber4Number of star layers, from 2 to 8.
direction"forward" | "backward""forward"Whether you fly into the stars or drift back out of them.
mouseInteractionbooleantrueLets the cursor interact with the stars.
mouseRepulsionbooleantruePushes the stars away from the cursor. When off, the field shifts with the cursor instead.
repulsionStrengthnumber2Strength of the push away from the cursor.
autoCenterRepulsionnumber0Pushes the stars away from the center without the cursor. 0 turns it off.
clickWarpbooleantrueClicking jumps forward at warp speed.
introbooleantrueDrops out of warp speed on mount.
focal[number, number]FOCALCenter of the starfield, from 0 to 1.
rotation[number, number]ROTATIONFixed rotation of the starfield as a [cos, sin] pair.
transparentbooleantrueShows the page behind the stars. When off, the stars sit on the background color.
backgroundColorstring"#000000"Background behind the stars when transparent is off, or the paper color in light mode.
lightModebooleanfalseDraws the stars as ink for light backgrounds.
opacitynumber1Opacity of the whole effect.
disableAnimationbooleanfalseFreezes the animation.
dprnumberNoneMaximum device pixel ratio, capped at 2.
classNamestringNone
styleCSSPropertiesNone

More background effects in Pro

View all

Related