ayush2917 commited on
Commit
58dce87
·
verified ·
1 Parent(s): ebb8813

Update static/js/krishna-animation.js

Browse files
Files changed (1) hide show
  1. static/js/krishna-animation.js +84 -5
static/js/krishna-animation.js CHANGED
@@ -1,6 +1,85 @@
1
- // This is a placeholder script for handling additional animation logic if needed
2
- document.addEventListener('DOMContentLoaded', () => {
3
- // The Lottie animation is already loaded via the lottie-player tag in templates
4
- // Add any additional animation logic here if needed (e.g., play/pause on user interaction)
5
- console.log('Krishna animation script loaded');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  });
 
1
+ // static/js/krishna-animation.js
2
+ document.addEventListener('DOMContentLoaded', function () {
3
+ particlesJS('particles-js', {
4
+ "particles": {
5
+ "number": {
6
+ "value": 100,
7
+ "density": {
8
+ "enable": true,
9
+ "value_area": 800
10
+ }
11
+ },
12
+ "color": {
13
+ "value": ["#FFD700", "#FF69B4", "#00CED1"] // Gold, pink, turquoise particles
14
+ },
15
+ "shape": {
16
+ "type": "circle",
17
+ "stroke": {
18
+ "width": 0,
19
+ "color": "#000000"
20
+ }
21
+ },
22
+ "opacity": {
23
+ "value": 0.8,
24
+ "random": true,
25
+ "anim": {
26
+ "enable": true,
27
+ "speed": 1,
28
+ "opacity_min": 0.3,
29
+ "sync": false
30
+ }
31
+ },
32
+ "size": {
33
+ "value": 5,
34
+ "random": true,
35
+ "anim": {
36
+ "enable": true,
37
+ "speed": 2,
38
+ "size_min": 1,
39
+ "sync": false
40
+ }
41
+ },
42
+ "line_linked": {
43
+ "enable": false
44
+ },
45
+ "move": {
46
+ "enable": true,
47
+ "speed": 2,
48
+ "direction": "none",
49
+ "random": true,
50
+ "straight": false,
51
+ "out_mode": "out",
52
+ "bounce": false,
53
+ "attract": {
54
+ "enable": false,
55
+ "rotateX": 600,
56
+ "rotateY": 1200
57
+ }
58
+ }
59
+ },
60
+ "interactivity": {
61
+ "detect_on": "canvas",
62
+ "events": {
63
+ "onhover": {
64
+ "enable": true,
65
+ "mode": "repulse"
66
+ },
67
+ "onclick": {
68
+ "enable": true,
69
+ "mode": "push"
70
+ },
71
+ "resize": true
72
+ },
73
+ "modes": {
74
+ "repulse": {
75
+ "distance": 100,
76
+ "duration": 0.4
77
+ },
78
+ "push": {
79
+ "particles_nb": 4
80
+ }
81
+ }
82
+ },
83
+ "retina_detect": true
84
+ });
85
  });