Add interactive particle animation background

This commit is contained in:
openhands
2025-02-16 22:03:33 +00:00
parent ab4d78e857
commit c8dc854fb3
4 changed files with 135 additions and 35 deletions

85
js/particles-config.js Normal file
View File

@@ -0,0 +1,85 @@
particlesJS('particles-js', {
particles: {
number: {
value: 50,
density: {
enable: true,
value_area: 800
}
},
color: {
value: '#ffffff'
},
shape: {
type: 'circle'
},
opacity: {
value: 0.6,
random: true,
anim: {
enable: true,
speed: 1,
opacity_min: 0.3,
sync: false
}
},
size: {
value: 5,
random: true,
anim: {
enable: true,
speed: 2,
size_min: 0.5,
sync: false
}
},
line_linked: {
enable: true,
distance: 150,
color: '#ffffff',
opacity: 0.4,
width: 3
},
move: {
enable: true,
speed: 1,
direction: 'none',
random: true,
straight: false,
out_mode: 'out',
bounce: false,
attract: {
enable: false,
rotateX: 600,
rotateY: 1200
}
}
},
interactivity: {
detect_on: 'window',
events: {
onhover: {
enable: true,
mode: 'grab'
},
onclick: {
enable: true,
mode: 'repulse'
},
resize: true
},
modes: {
grab: {
distance: 200,
line_linked: {
opacity: 0.5
}
},
repulse: {
distance: 100,
duration: 0.4
}
}
},
retina_detect: true
});

9
js/particles.min.js vendored Normal file

File diff suppressed because one or more lines are too long