bird0867 commited on
Commit
1977d3d
·
verified ·
1 Parent(s): 2fd84ec

make the blobs larger, vary their alpha or transparency and make them overlap somewhat

Browse files
Files changed (1) hide show
  1. index.html +34 -37
index.html CHANGED
@@ -17,15 +17,15 @@
17
  .blob {
18
  position: absolute;
19
  border-radius: 50%;
20
- filter: blur(60px);
21
- opacity: 0.7;
22
  mix-blend-mode: screen;
23
  }
24
  .orbit-blob {
25
  position: absolute;
26
  border-radius: 50%;
27
- filter: blur(40px);
28
- opacity: 0.5;
29
  mix-blend-mode: screen;
30
  }
31
  .container {
@@ -70,32 +70,30 @@
70
  const blob2 = document.getElementById('blob2');
71
  const blob3 = document.getElementById('blob3');
72
  // Set initial positions for main blobs
73
- blob1.style.width = '600px';
74
- blob1.style.height = '600px';
75
- blob1.style.top = '20%';
76
- blob1.style.left = '20%';
77
-
78
- blob2.style.width = '500px';
79
- blob2.style.height = '500px';
80
- blob2.style.top = '60%';
81
- blob2.style.left = '70%';
82
 
83
- blob3.style.width = '400px';
84
- blob3.style.height = '400px';
85
- blob3.style.top = '40%';
86
- blob3.style.left = '50%';
87
 
88
- // Set initial positions for orbiting blobs
 
 
 
 
89
  const orbitBlobs = [
90
- { el: document.getElementById('orbitBlob1'), size: 150, color: 'bg-teal-500', angle: 0, speed: 0.005, distance: 400 },
91
- { el: document.getElementById('orbitBlob2'), size: 120, color: 'bg-yellow-500', angle: Math.PI/3, speed: 0.003, distance: 350 },
92
- { el: document.getElementById('orbitBlob3'), size: 180, color: 'bg-indigo-500', angle: Math.PI/1.5, speed: 0.004, distance: 450 },
93
- { el: document.getElementById('orbitBlob4'), size: 100, color: 'bg-green-500', angle: Math.PI, speed: 0.006, distance: 300 },
94
- { el: document.getElementById('orbitBlob5'), size: 140, color: 'bg-red-500', angle: Math.PI*1.5, speed: 0.0035, distance: 380 },
95
- { el: document.getElementById('orbitBlob6'), size: 160, color: 'bg-cyan-500', angle: Math.PI*1.8, speed: 0.0045, distance: 420 }
96
  ];
97
-
98
- orbitBlobs.forEach(blob => {
99
  blob.el.style.width = `${blob.size}px`;
100
  blob.el.style.height = `${blob.size}px`;
101
  blob.el.className = `orbit-blob ${blob.color}`;
@@ -106,10 +104,10 @@
106
  const x = e.clientX;
107
  const y = e.clientY;
108
  // Move blobs toward cursor with different speeds (increased by 30%)
109
- blob1.style.transform = `translate(${x * 0.026}px, ${y * 0.026}px)`;
110
- blob2.style.transform = `translate(${x * -0.0195}px, ${y * -0.0195}px)`;
111
- blob3.style.transform = `translate(${x * 0.013}px, ${y * 0.013}px)`;
112
- });
113
 
114
  // Animation loop for orbiting blobs
115
  function animateOrbitBlobs() {
@@ -134,7 +132,7 @@
134
  // Continuous animation with Anime.js for main blobs
135
  anime({
136
  targets: '#blob1',
137
- scale: [1, 1.2, 1],
138
  borderRadius: ['50%', '40%', '50%'],
139
  duration: 8000,
140
  easing: 'easeInOutQuad',
@@ -143,7 +141,7 @@
143
 
144
  anime({
145
  targets: '#blob2',
146
- scale: [1, 1.3, 1],
147
  borderRadius: ['50%', '60%', '50%'],
148
  duration: 10000,
149
  easing: 'easeInOutCubic',
@@ -152,19 +150,18 @@
152
 
153
  anime({
154
  targets: '#blob3',
155
- scale: [1, 1.1, 1],
156
  borderRadius: ['50%', '45%', '50%'],
157
  duration: 12000,
158
  easing: 'easeInOutQuart',
159
  loop: true
160
  });
161
-
162
- // Add subtle pulsing animation to orbiting blobs
163
  orbitBlobs.forEach((blob, index) => {
164
  anime({
165
  targets: blob.el,
166
- scale: [1, 1.1, 1],
167
- opacity: [0.5, 0.7, 0.5],
168
  duration: 3000 + index * 500,
169
  easing: 'easeInOutSine',
170
  loop: true,
 
17
  .blob {
18
  position: absolute;
19
  border-radius: 50%;
20
+ filter: blur(80px);
21
+ opacity: 0.8;
22
  mix-blend-mode: screen;
23
  }
24
  .orbit-blob {
25
  position: absolute;
26
  border-radius: 50%;
27
+ filter: blur(60px);
28
+ opacity: 0.6;
29
  mix-blend-mode: screen;
30
  }
31
  .container {
 
70
  const blob2 = document.getElementById('blob2');
71
  const blob3 = document.getElementById('blob3');
72
  // Set initial positions for main blobs
73
+ blob1.style.width = '800px';
74
+ blob1.style.height = '800px';
75
+ blob1.style.top = '15%';
76
+ blob1.style.left = '10%';
 
 
 
 
 
77
 
78
+ blob2.style.width = '700px';
79
+ blob2.style.height = '700px';
80
+ blob2.style.top = '55%';
81
+ blob2.style.left = '65%';
82
 
83
+ blob3.style.width = '600px';
84
+ blob3.style.height = '600px';
85
+ blob3.style.top = '35%';
86
+ blob3.style.left = '45%';
87
+ // Set initial positions for orbiting blobs
88
  const orbitBlobs = [
89
+ { el: document.getElementById('orbitBlob1'), size: 200, color: 'bg-teal-500', angle: 0, speed: 0.005, distance: 350 },
90
+ { el: document.getElementById('orbitBlob2'), size: 170, color: 'bg-yellow-500', angle: Math.PI/3, speed: 0.003, distance: 300 },
91
+ { el: document.getElementById('orbitBlob3'), size: 230, color: 'bg-indigo-500', angle: Math.PI/1.5, speed: 0.004, distance: 400 },
92
+ { el: document.getElementById('orbitBlob4'), size: 150, color: 'bg-green-500', angle: Math.PI, speed: 0.006, distance: 250 },
93
+ { el: document.getElementById('orbitBlob5'), size: 190, color: 'bg-red-500', angle: Math.PI*1.5, speed: 0.0035, distance: 330 },
94
+ { el: document.getElementById('orbitBlob6'), size: 210, color: 'bg-cyan-500', angle: Math.PI*1.8, speed: 0.0045, distance: 370 }
95
  ];
96
+ orbitBlobs.forEach(blob => {
 
97
  blob.el.style.width = `${blob.size}px`;
98
  blob.el.style.height = `${blob.size}px`;
99
  blob.el.className = `orbit-blob ${blob.color}`;
 
104
  const x = e.clientX;
105
  const y = e.clientY;
106
  // Move blobs toward cursor with different speeds (increased by 30%)
107
+ blob1.style.transform = `translate(${x * 0.03}px, ${y * 0.03}px)`;
108
+ blob2.style.transform = `translate(${x * -0.022}px, ${y * -0.022}px)`;
109
+ blob3.style.transform = `translate(${x * 0.015}px, ${y * 0.015}px)`;
110
+ });
111
 
112
  // Animation loop for orbiting blobs
113
  function animateOrbitBlobs() {
 
132
  // Continuous animation with Anime.js for main blobs
133
  anime({
134
  targets: '#blob1',
135
+ scale: [1, 1.3, 1],
136
  borderRadius: ['50%', '40%', '50%'],
137
  duration: 8000,
138
  easing: 'easeInOutQuad',
 
141
 
142
  anime({
143
  targets: '#blob2',
144
+ scale: [1, 1.4, 1],
145
  borderRadius: ['50%', '60%', '50%'],
146
  duration: 10000,
147
  easing: 'easeInOutCubic',
 
150
 
151
  anime({
152
  targets: '#blob3',
153
+ scale: [1, 1.2, 1],
154
  borderRadius: ['50%', '45%', '50%'],
155
  duration: 12000,
156
  easing: 'easeInOutQuart',
157
  loop: true
158
  });
159
+ // Add subtle pulsing animation to orbiting blobs
 
160
  orbitBlobs.forEach((blob, index) => {
161
  anime({
162
  targets: blob.el,
163
+ scale: [1, 1.2, 1],
164
+ opacity: [0.6, 0.8, 0.6],
165
  duration: 3000 + index * 500,
166
  easing: 'easeInOutSine',
167
  loop: true,