Galaxy Animation
A mesmerizing Dynamic 3D galaxy for your interactive background with twinkling stars and cosmic elements.
Installation
Usage
1import Galaxy from '@/components/pumki-ui/animations/galaxy'1<Galaxy />Example
Props
| Prop | Type | Default | Description |
|---|---|---|---|
focal | [number, number] | [0.5, 0.5] | Sets the focal point of the galaxy effect as [x, y] coordinates from 0 to 1 |
rotation | [number, number] | [1.0, 0.0] | Controls the rotation matrix of the galaxy as [x, y] rotation values |
starSpeed | number | 0.5 | Controls the speed of star movement and animation |
density | number | 1 | Controls the density of stars in the galaxy |
hueShift | number | 140 | Shifts the hue of all stars by the specified degrees (0-360) |
disableAnimation | boolean | false | When true, stops all time-based animations |
speed | number | 1.0 | Global speed multiplier for all animations |
mouseInteraction | boolean | true | Enables or disables mouse interaction with the galaxy |
glowIntensity | number | 0.3 | Controls the intensity of the star glow effect |
saturation | number | 0.0 | Controls color saturation of stars (0 = grayscale, 1 = full color) |
mouseRepulsion | boolean | true | When true, stars are repelled by the mouse cursor |
twinkleIntensity | number | 0.3 | Controls how much stars twinkle (0 = no twinkle, 1 = maximum twinkle) |
rotationSpeed | number | 0.1 | Speed of automatic galaxy rotation |
repulsionStrength | number | 2 | Strength of mouse repulsion effect when mouseRepulsion is enabled |
autoCenterRepulsion | number | 0 | Creates repulsion from center of canvas. Overrides mouse repulsion when > 0 |
transparent | boolean | true | Makes the black background transparent, showing only stars |
Last updated on