New Release!
Browse files- index.html +283 -118
index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<style>
|
| 8 |
* {
|
| 9 |
margin: 0;
|
|
@@ -16,185 +16,350 @@
|
|
| 16 |
overflow: hidden;
|
| 17 |
}
|
| 18 |
|
| 19 |
-
.
|
| 20 |
display: flex;
|
| 21 |
flex-direction: column;
|
| 22 |
align-items: center;
|
| 23 |
justify-content: center;
|
| 24 |
min-height: 100vh;
|
| 25 |
-
background: linear-gradient(135deg, #
|
| 26 |
padding: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
width: 200px;
|
| 31 |
height: auto;
|
| 32 |
margin-bottom: 40px;
|
| 33 |
-
animation:
|
| 34 |
-
filter: drop-shadow(0 10px 30px rgba(
|
| 35 |
}
|
| 36 |
|
| 37 |
-
@keyframes
|
| 38 |
-
0%, 100% { transform: scale(1); }
|
| 39 |
-
50% { transform: scale(1.05); }
|
| 40 |
}
|
| 41 |
|
| 42 |
-
.
|
| 43 |
-
font-size:
|
| 44 |
font-weight: bold;
|
| 45 |
color: white;
|
| 46 |
text-align: center;
|
| 47 |
margin-bottom: 20px;
|
| 48 |
-
text-shadow:
|
|
|
|
| 49 |
}
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
-
.
|
| 60 |
-
font-size: 1.
|
| 61 |
color: #ffd700;
|
| 62 |
text-align: center;
|
| 63 |
-
margin-bottom:
|
| 64 |
font-weight: 500;
|
| 65 |
-
animation:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
}
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
}
|
| 72 |
|
| 73 |
-
.
|
| 74 |
display: flex;
|
| 75 |
gap: 30px;
|
| 76 |
-
margin-bottom: 40px;
|
| 77 |
flex-wrap: wrap;
|
| 78 |
justify-content: center;
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
|
| 83 |
backdrop-filter: blur(10px);
|
| 84 |
-
border-radius: 15px;
|
| 85 |
-
padding: 25px 30px;
|
| 86 |
-
min-width: 100px;
|
| 87 |
-
text-align: center;
|
| 88 |
-
border: 2px solid rgba(255, 255, 255, 0.2);
|
| 89 |
-
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
| 90 |
}
|
| 91 |
|
| 92 |
-
.
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
color:
|
| 96 |
-
line-height: 1;
|
| 97 |
-
margin-bottom: 10px;
|
| 98 |
-
font-family: 'Courier New', monospace;
|
| 99 |
}
|
| 100 |
|
| 101 |
-
.
|
| 102 |
-
font-size:
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
letter-spacing: 2px;
|
| 106 |
}
|
| 107 |
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
}
|
| 116 |
|
| 117 |
@media (max-width: 768px) {
|
| 118 |
-
.
|
| 119 |
-
.
|
| 120 |
-
.
|
| 121 |
-
.
|
| 122 |
-
.
|
| 123 |
-
.countdown-timer { gap: 15px; }
|
| 124 |
}
|
| 125 |
</style>
|
| 126 |
</head>
|
| 127 |
<body>
|
| 128 |
-
<div class="
|
| 129 |
-
<
|
| 130 |
-
<img src="dicta-logo.jpg" alt="Dicta Logo" class="countdown-logo">
|
| 131 |
-
</a>
|
| 132 |
-
|
| 133 |
-
<h1 class="countdown-title">π Demo Temporarily Suspended</h1>
|
| 134 |
-
|
| 135 |
-
<p class="countdown-subtitle">Something BIG is coming...</p>
|
| 136 |
-
|
| 137 |
-
<p class="countdown-baity">β¨ The wait will be worth it β¨</p>
|
| 138 |
|
| 139 |
-
<div class="
|
| 140 |
-
<
|
| 141 |
-
<
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
<div class="
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
<
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
</div>
|
| 156 |
</div>
|
| 157 |
-
|
| 158 |
-
<p class="countdown-message">
|
| 159 |
-
We're upgrading DictaLM 2.0 to bring you an even better experience.<br/>
|
| 160 |
-
Stay tuned for enhanced capabilities and improved performance!<br/><br/>
|
| 161 |
-
<span dir='rtl'>ΧΧ ΧΧ Χ ΧΧ©ΧΧ¨ΧΧΧ ΧΧͺ DictaLM 2.0 ΧΧΧ ΧΧΧΧΧ ΧΧΧ ΧΧΧΧΧ ΧΧΧΧ Χ’ΧΧ ΧΧΧͺΧ¨.<br/>
|
| 162 |
-
ΧΧΧ©ΧΧ¨Χ ΧΧ’ΧΧΧΧ ΧΧ ΧΧΧΧΧΧΧͺ ΧΧ©ΧΧ€Χ¨ΧΧͺ ΧΧΧΧ¦ΧΧ’ΧΧ ΧΧΧΧΧ ΧΧΧͺΧ¨!</span>
|
| 163 |
-
</p>
|
| 164 |
</div>
|
| 165 |
|
| 166 |
<script>
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
}
|
| 192 |
-
|
| 193 |
-
update()
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
}
|
| 196 |
|
| 197 |
-
|
| 198 |
</script>
|
| 199 |
</body>
|
| 200 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Introducing Dicta-LM 3.0!</title>
|
| 7 |
<style>
|
| 8 |
* {
|
| 9 |
margin: 0;
|
|
|
|
| 16 |
overflow: hidden;
|
| 17 |
}
|
| 18 |
|
| 19 |
+
.announcement-container {
|
| 20 |
display: flex;
|
| 21 |
flex-direction: column;
|
| 22 |
align-items: center;
|
| 23 |
justify-content: center;
|
| 24 |
min-height: 100vh;
|
| 25 |
+
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
|
| 26 |
padding: 20px;
|
| 27 |
+
position: relative;
|
| 28 |
+
overflow: hidden;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Fireworks canvas */
|
| 32 |
+
#fireworks-canvas {
|
| 33 |
+
position: absolute;
|
| 34 |
+
top: 0;
|
| 35 |
+
left: 0;
|
| 36 |
+
width: 100%;
|
| 37 |
+
height: 100%;
|
| 38 |
+
pointer-events: none;
|
| 39 |
+
z-index: 1;
|
| 40 |
}
|
| 41 |
|
| 42 |
+
.content {
|
| 43 |
+
position: relative;
|
| 44 |
+
z-index: 2;
|
| 45 |
+
display: flex;
|
| 46 |
+
flex-direction: column;
|
| 47 |
+
align-items: center;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.announcement-logo {
|
| 51 |
width: 200px;
|
| 52 |
height: auto;
|
| 53 |
margin-bottom: 40px;
|
| 54 |
+
animation: bounce 2s ease-in-out infinite;
|
| 55 |
+
filter: drop-shadow(0 10px 30px rgba(255,215,0,0.5));
|
| 56 |
}
|
| 57 |
|
| 58 |
+
@keyframes bounce {
|
| 59 |
+
0%, 100% { transform: translateY(0) scale(1); }
|
| 60 |
+
50% { transform: translateY(-10px) scale(1.05); }
|
| 61 |
}
|
| 62 |
|
| 63 |
+
.announcement-title {
|
| 64 |
+
font-size: 3.5em;
|
| 65 |
font-weight: bold;
|
| 66 |
color: white;
|
| 67 |
text-align: center;
|
| 68 |
margin-bottom: 20px;
|
| 69 |
+
text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.5);
|
| 70 |
+
animation: titleGlow 2s ease-in-out infinite;
|
| 71 |
}
|
| 72 |
|
| 73 |
+
@keyframes titleGlow {
|
| 74 |
+
0%, 100% {
|
| 75 |
+
text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.5);
|
| 76 |
+
transform: scale(1);
|
| 77 |
+
}
|
| 78 |
+
50% {
|
| 79 |
+
text-shadow: 0 0 30px rgba(255,215,0,1), 0 0 60px rgba(255,215,0,0.8), 0 0 80px rgba(255,215,0,0.5);
|
| 80 |
+
transform: scale(1.02);
|
| 81 |
+
}
|
| 82 |
}
|
| 83 |
|
| 84 |
+
.announcement-subtitle {
|
| 85 |
+
font-size: 1.8em;
|
| 86 |
color: #ffd700;
|
| 87 |
text-align: center;
|
| 88 |
+
margin-bottom: 15px;
|
| 89 |
font-weight: 500;
|
| 90 |
+
animation: sparkle 1.5s ease-in-out infinite;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
@keyframes sparkle {
|
| 94 |
+
0%, 100% { opacity: 1; }
|
| 95 |
+
50% { opacity: 0.7; }
|
| 96 |
}
|
| 97 |
|
| 98 |
+
.announcement-tagline {
|
| 99 |
+
font-size: 1.3em;
|
| 100 |
+
color: #e0e0e0;
|
| 101 |
+
text-align: center;
|
| 102 |
+
margin-bottom: 50px;
|
| 103 |
+
font-weight: 300;
|
| 104 |
+
max-width: 600px;
|
| 105 |
+
line-height: 1.6;
|
| 106 |
}
|
| 107 |
|
| 108 |
+
.buttons-container {
|
| 109 |
display: flex;
|
| 110 |
gap: 30px;
|
|
|
|
| 111 |
flex-wrap: wrap;
|
| 112 |
justify-content: center;
|
| 113 |
+
margin-bottom: 40px;
|
| 114 |
}
|
| 115 |
|
| 116 |
+
.btn {
|
| 117 |
+
padding: 18px 40px;
|
| 118 |
+
font-size: 1.2em;
|
| 119 |
+
font-weight: 600;
|
| 120 |
+
border: none;
|
| 121 |
+
border-radius: 50px;
|
| 122 |
+
cursor: pointer;
|
| 123 |
+
text-decoration: none;
|
| 124 |
+
transition: all 0.3s ease;
|
| 125 |
+
display: inline-flex;
|
| 126 |
+
align-items: center;
|
| 127 |
+
gap: 10px;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.btn-primary {
|
| 131 |
+
background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
|
| 132 |
+
color: #1a1a2e;
|
| 133 |
+
box-shadow: 0 8px 30px rgba(255,215,0,0.4);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.btn-primary:hover {
|
| 137 |
+
transform: translateY(-3px) scale(1.05);
|
| 138 |
+
box-shadow: 0 12px 40px rgba(255,215,0,0.6);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.btn-secondary {
|
| 142 |
background: rgba(255, 255, 255, 0.1);
|
| 143 |
+
color: white;
|
| 144 |
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
| 145 |
backdrop-filter: blur(10px);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
}
|
| 147 |
|
| 148 |
+
.btn-secondary:hover {
|
| 149 |
+
background: rgba(255, 255, 255, 0.2);
|
| 150 |
+
transform: translateY(-3px) scale(1.05);
|
| 151 |
+
border-color: rgba(255, 255, 255, 0.5);
|
|
|
|
|
|
|
|
|
|
| 152 |
}
|
| 153 |
|
| 154 |
+
.celebration-emojis {
|
| 155 |
+
font-size: 2em;
|
| 156 |
+
margin-bottom: 30px;
|
| 157 |
+
animation: float 3s ease-in-out infinite;
|
|
|
|
| 158 |
}
|
| 159 |
|
| 160 |
+
@keyframes float {
|
| 161 |
+
0%, 100% { transform: translateY(0); }
|
| 162 |
+
50% { transform: translateY(-15px); }
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/* Sparkle particles */
|
| 166 |
+
.sparkle {
|
| 167 |
+
position: absolute;
|
| 168 |
+
width: 10px;
|
| 169 |
+
height: 10px;
|
| 170 |
+
background: radial-gradient(circle, #ffd700 0%, transparent 70%);
|
| 171 |
+
border-radius: 50%;
|
| 172 |
+
pointer-events: none;
|
| 173 |
+
animation: sparkleFloat 4s ease-in-out infinite;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
@keyframes sparkleFloat {
|
| 177 |
+
0%, 100% {
|
| 178 |
+
opacity: 0;
|
| 179 |
+
transform: translateY(0) scale(0);
|
| 180 |
+
}
|
| 181 |
+
50% {
|
| 182 |
+
opacity: 1;
|
| 183 |
+
transform: translateY(-100px) scale(1);
|
| 184 |
+
}
|
| 185 |
}
|
| 186 |
|
| 187 |
@media (max-width: 768px) {
|
| 188 |
+
.announcement-title { font-size: 2.2em; }
|
| 189 |
+
.announcement-subtitle { font-size: 1.3em; }
|
| 190 |
+
.announcement-tagline { font-size: 1.1em; }
|
| 191 |
+
.btn { padding: 15px 30px; font-size: 1em; }
|
| 192 |
+
.buttons-container { gap: 15px; }
|
|
|
|
| 193 |
}
|
| 194 |
</style>
|
| 195 |
</head>
|
| 196 |
<body>
|
| 197 |
+
<div class="announcement-container">
|
| 198 |
+
<canvas id="fireworks-canvas"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
+
<div class="content">
|
| 201 |
+
<a href="https://dicta.org.il">
|
| 202 |
+
<img src="dicta-logo.jpg" alt="Dicta Logo" class="announcement-logo">
|
| 203 |
+
</a>
|
| 204 |
+
|
| 205 |
+
<div class="celebration-emojis">π π π π π</div>
|
| 206 |
+
|
| 207 |
+
<h1 class="announcement-title">Introducing Dicta-LM 3.0!</h1>
|
| 208 |
+
|
| 209 |
+
<p class="announcement-subtitle">β¨ The Future of Hebrew AI is Here β¨</p>
|
| 210 |
+
|
| 211 |
+
<p class="announcement-tagline">
|
| 212 |
+
We're thrilled to announce the next generation of Hebrew language models.<br/>
|
| 213 |
+
More powerful. More accurate. More incredible than ever before.
|
| 214 |
+
</p>
|
| 215 |
+
|
| 216 |
+
<div class="buttons-container">
|
| 217 |
+
<a href="https://chat.dicta.org.il" class="btn btn-primary">
|
| 218 |
+
π Try it out now!
|
| 219 |
+
</a>
|
| 220 |
+
<a href="http://dicta.org.il/dicta-lm-3" class="btn btn-secondary">
|
| 221 |
+
π View the Release
|
| 222 |
+
</a>
|
| 223 |
</div>
|
| 224 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
</div>
|
| 226 |
|
| 227 |
<script>
|
| 228 |
+
// Fireworks Animation
|
| 229 |
+
const canvas = document.getElementById('fireworks-canvas');
|
| 230 |
+
const ctx = canvas.getContext('2d');
|
| 231 |
+
|
| 232 |
+
function resizeCanvas() {
|
| 233 |
+
canvas.width = window.innerWidth;
|
| 234 |
+
canvas.height = window.innerHeight;
|
| 235 |
+
}
|
| 236 |
+
resizeCanvas();
|
| 237 |
+
window.addEventListener('resize', resizeCanvas);
|
| 238 |
+
|
| 239 |
+
class Particle {
|
| 240 |
+
constructor(x, y, color, velocity, decay) {
|
| 241 |
+
this.x = x;
|
| 242 |
+
this.y = y;
|
| 243 |
+
this.color = color;
|
| 244 |
+
this.velocity = velocity;
|
| 245 |
+
this.alpha = 1;
|
| 246 |
+
this.decay = decay;
|
| 247 |
+
this.gravity = 0.02;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
draw() {
|
| 251 |
+
ctx.save();
|
| 252 |
+
ctx.globalAlpha = this.alpha;
|
| 253 |
+
ctx.beginPath();
|
| 254 |
+
ctx.arc(this.x, this.y, 2, 0, Math.PI * 2);
|
| 255 |
+
ctx.fillStyle = this.color;
|
| 256 |
+
ctx.fill();
|
| 257 |
+
ctx.restore();
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
update() {
|
| 261 |
+
this.velocity.y += this.gravity;
|
| 262 |
+
this.x += this.velocity.x;
|
| 263 |
+
this.y += this.velocity.y;
|
| 264 |
+
this.alpha -= this.decay;
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
class Firework {
|
| 269 |
+
constructor(x, targetY) {
|
| 270 |
+
this.x = x;
|
| 271 |
+
this.y = canvas.height;
|
| 272 |
+
this.targetY = targetY;
|
| 273 |
+
this.velocity = { x: 0, y: -8 - Math.random() * 4 };
|
| 274 |
+
this.color = `hsl(${Math.random() * 60 + 30}, 100%, 60%)`;
|
| 275 |
+
this.exploded = false;
|
| 276 |
+
this.particles = [];
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
draw() {
|
| 280 |
+
if (!this.exploded) {
|
| 281 |
+
ctx.beginPath();
|
| 282 |
+
ctx.arc(this.x, this.y, 3, 0, Math.PI * 2);
|
| 283 |
+
ctx.fillStyle = this.color;
|
| 284 |
+
ctx.fill();
|
| 285 |
}
|
| 286 |
+
this.particles.forEach(p => p.draw());
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
explode() {
|
| 290 |
+
const particleCount = 80 + Math.random() * 40;
|
| 291 |
+
const colors = [
|
| 292 |
+
'#ffd700', '#ff6b6b', '#4ecdc4', '#45b7d1',
|
| 293 |
+
'#96ceb4', '#ffeaa7', '#dfe6e9', '#fd79a8'
|
| 294 |
+
];
|
| 295 |
|
| 296 |
+
for (let i = 0; i < particleCount; i++) {
|
| 297 |
+
const angle = (Math.PI * 2 / particleCount) * i;
|
| 298 |
+
const speed = 2 + Math.random() * 4;
|
| 299 |
+
const color = colors[Math.floor(Math.random() * colors.length)];
|
| 300 |
+
|
| 301 |
+
this.particles.push(new Particle(
|
| 302 |
+
this.x,
|
| 303 |
+
this.y,
|
| 304 |
+
color,
|
| 305 |
+
{
|
| 306 |
+
x: Math.cos(angle) * speed,
|
| 307 |
+
y: Math.sin(angle) * speed
|
| 308 |
+
},
|
| 309 |
+
0.01 + Math.random() * 0.015
|
| 310 |
+
));
|
| 311 |
+
}
|
| 312 |
+
this.exploded = true;
|
| 313 |
}
|
| 314 |
+
|
| 315 |
+
update() {
|
| 316 |
+
if (!this.exploded) {
|
| 317 |
+
this.y += this.velocity.y;
|
| 318 |
+
if (this.y <= this.targetY) {
|
| 319 |
+
this.explode();
|
| 320 |
+
}
|
| 321 |
+
}
|
| 322 |
+
this.particles.forEach(p => p.update());
|
| 323 |
+
this.particles = this.particles.filter(p => p.alpha > 0);
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
isDone() {
|
| 327 |
+
return this.exploded && this.particles.length === 0;
|
| 328 |
+
}
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
let fireworks = [];
|
| 332 |
+
|
| 333 |
+
function createFirework() {
|
| 334 |
+
const x = Math.random() * canvas.width;
|
| 335 |
+
const targetY = canvas.height * 0.2 + Math.random() * canvas.height * 0.3;
|
| 336 |
+
fireworks.push(new Firework(x, targetY));
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
function animate() {
|
| 340 |
+
ctx.fillStyle = 'rgba(30, 58, 95, 0.2)';
|
| 341 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 342 |
+
|
| 343 |
+
fireworks.forEach(fw => {
|
| 344 |
+
fw.draw();
|
| 345 |
+
fw.update();
|
| 346 |
+
});
|
| 347 |
+
|
| 348 |
+
fireworks = fireworks.filter(fw => !fw.isDone());
|
| 349 |
+
|
| 350 |
+
if (Math.random() < 0.03) {
|
| 351 |
+
createFirework();
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
requestAnimationFrame(animate);
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
// Initial burst of fireworks
|
| 358 |
+
for (let i = 0; i < 5; i++) {
|
| 359 |
+
setTimeout(createFirework, i * 300);
|
| 360 |
}
|
| 361 |
|
| 362 |
+
animate();
|
| 363 |
</script>
|
| 364 |
</body>
|
| 365 |
</html>
|