-
Notifications
You must be signed in to change notification settings - Fork 0
Background Configuration
The AnimatedBackground component provides highly customizable background effects for your portfolio's home page. All configuration is managed under the background key in your settings.json file. For full examples and advanced use cases, see ANIMATED%20BACKGROUND%20GUIDE.md.
- Animated Background Configuration Guide
- To disable animated backgrounds for accessibility, set
"type": "none", "enabled": falsein your config. - Consider providing a UI toggle for users with motion sensitivity.
The animated background is configured in the background section of your settings.json file:
{
"home": {
"background": {
"type": "animated-network",
"enabled": true,
"particles": { /* particle settings */ },
"animation": { /* animation settings */ },
"gradient": { /* gradient settings */ }
}
}
}Creates moving particles with connecting lines between nearby particles.
Best for: Modern, tech-focused portfolios, interactive experiences Performance: Medium (depends on particle count and connection distance)
Shows moving particles without connections between them.
Best for: Cleaner look while maintaining interactivity Performance: Better than animated-network (no connection calculations)
Displays a static gradient background.
Best for: Minimal designs, performance-critical scenarios Performance: Excellent (no animations)
Disables the background effect entirely.
Best for: Accessibility, performance optimization, custom backgrounds Performance: Best (no rendering)
{
"type": "animated-network", // Background type
"enabled": true // Enable/disable the effect
}All particle-based backgrounds support these options:
{
"particles": {
"count": 150, // Base particle count for 1920x1080 screen (density reference)
"minParticles": 30, // Minimum particles for small screens (smartphones)
"maxParticles": 400, // Maximum particles for large screens (4K displays)
"size": 2, // Base particle size in pixels (0.5-10)
"color": "#ef4444", // Particle color (hex, rgb, rgba, or CSS color)
"speed": 0.5, // Movement speed (0.1-5)
"glow": true, // Enable glow effect (boolean)
"glowSize": 8, // Glow size in pixels (0-50)
"pulseIntensity": 0.3, // Opacity pulsing intensity (0-1)
"pulseSpeed": 0.002, // Pulsing animation speed (0.001-0.01)
"mouseInfluence": 120, // Mouse interaction distance (0-300)
"mouseForce": 3, // Mouse repulsion strength (0-10)
"returnSpeed": 0.05 // Return to normal speed (0.01-1)
}
}The particle system now uses density-based scaling to maintain consistent visual density across different screen sizes:
-
count: Base particle count for a 1920x1080 (Full HD) reference screen -
minParticles: Minimum particles for very small screens (phones in portrait mode) -
maxParticles: Maximum particles for very large screens (4K, ultrawide displays)
How it works:
- Calculates screen area ratio compared to Full HD (1920x1080)
- Applies square root scaling to maintain visual density
- Enforces min/max bounds for performance and visual quality
- Dynamically adjusts on window resize - particle count updates when window size changes significantly
Examples:
- Phone (375x667): ~30-40 particles
- Tablet (768x1024): ~80-100 particles
- Laptop (1366x768): ~110-130 particles
- Desktop (1920x1080): 150 particles (base)
- 4K (3840x2160): ~300 particles (capped by maxParticles)
Responsive Behavior:
- Particles are added when window expands (e.g., mobile → desktop)
- Particles are removed when window shrinks (e.g., desktop → mobile)
- Changes only occur when difference is significant (>5 particles) to avoid constant adjustments
{
"particles": {
"connections": {
"enabled": true, // Show connections
"distance": 200, // Max connection distance (50-400)
"color": "rgba(147, 51, 234, 0.2)", // Connection color
"width": 2, // Line width (0.1-10)
"maxOpacity": 0.5 // Maximum line opacity (0-1)
}
}
}{
"animation": {
"speed": 1, // Overall speed multiplier (0.1-5)
"smoothness": 60 // Target FPS (15-120)
}
}{
"gradient": {
"enabled": false, // Show gradient (can combine with particles)
"colors": [ // 2-5 gradient colors
"rgba(15, 23, 42, 1)",
"rgba(30, 41, 59, 0.8)",
"rgba(51, 65, 85, 0.6)"
],
"direction": "to bottom right" // Gradient direction
}
}{
"particles": {
"count": 50, // Reduce particle count
"glow": false // Disable glow effects
},
"animation": {
"smoothness": 30 // Lower FPS target
}
}{
"particles": {
"count": 300, // More particles
"glowSize": 15 // Larger glow effects
},
"animation": {
"smoothness": 120 // Higher FPS for smoother animation
}
}{
"particles": {
"color": "#3b82f6",
"connections": {
"color": "rgba(59, 130, 246, 0.2)"
}
}
}{
"particles": {
"color": "#f59e0b",
"connections": {
"color": "rgba(245, 158, 11, 0.3)"
}
}
}{
"particles": {
"color": "rgba(255, 255, 255, 0.3)",
"glow": false,
"connections": {
"color": "rgba(255, 255, 255, 0.1)",
"width": 1
}
}
}- Set
enabled: falsefor users with motion sensitivity - Use
prefers-reduced-motionCSS queries in your styles - Provide a toggle option in your UI
- Consider performance impact on mobile devices
- Reduce
count(try 50-100 particles) - Lower
smoothness(try 30 FPS) - Disable
gloweffects - Reduce
distancefor connections
- Check color contrast against your content
- Adjust
maxOpacityfor connections - Modify
pulseIntensityfor better visibility - Test on different screen sizes
- Adjust
mouseInfluencefor better responsiveness - Modify
mouseForcefor appropriate interaction strength - Tune
returnSpeedfor smoother transitions
See examples/background-configurations.json for complete configuration examples and docs/ANIMATED%20BACKGROUND%20GUIDE.md for additional examples and use cases.
The configuration includes full JSON Schema support with:
- IntelliSense in VS Code
- Real-time validation
- Detailed property descriptions
- Type checking and constraints
This ensures your configuration is always valid and provides helpful suggestions while editing.
© 2025 Krishna GSVV
Portfolio: VKrishna04.me
GitHub: VKrishna04
Org: Life Experimentalists
Use this sidebar for your wiki, GitHub Pages, or static documentation site. Copy/paste or import as needed.