|
1175 | 1175 | } |
1176 | 1176 | } |
1177 | 1177 |
|
1178 | | - function drawNotification(ctx) { |
1179 | | - drawGlassPanel(ctx, 1002, 62, 390, 96, 28); |
1180 | | - drawRoundedImage(ctx, macToastIcon, 1022, 84, 44, 44, 12); |
| 1178 | + function drawNotification(ctx, x, y) { |
| 1179 | + drawGlassPanel(ctx, x, y, 390, 96, 28); |
| 1180 | + drawRoundedImage(ctx, macToastIcon, x + 20, y + 22, 44, 44, 12); |
1181 | 1181 | ctx.fillStyle = "rgba(10,34,62,0.96)"; |
1182 | 1182 | ctx.font = "900 18px Inter, system-ui, sans-serif"; |
1183 | | - ctx.fillText("Messages", 1082, 88); |
| 1183 | + ctx.fillText("Messages", x + 80, y + 26); |
1184 | 1184 | ctx.font = "800 12px Inter, system-ui, sans-serif"; |
1185 | 1185 | ctx.fillStyle = "rgba(10,34,62,0.58)"; |
1186 | | - ctx.fillText("now", 1178, 90); |
| 1186 | + ctx.fillText("now", x + 176, y + 28); |
1187 | 1187 | ctx.font = "800 13px Inter, system-ui, sans-serif"; |
1188 | 1188 | ctx.fillStyle = "rgba(10,34,62,0.78)"; |
1189 | | - ctx.fillText("Liquid Glass preview is ready for review.", 1082, 116); |
| 1189 | + ctx.fillText("Liquid Glass preview is ready for review.", x + 80, y + 54); |
1190 | 1190 | } |
1191 | 1191 |
|
1192 | 1192 | function drawDock(ctx) { |
|
1211 | 1211 | drawDesktopWidgets(ctx); |
1212 | 1212 | drawFinderWindow(ctx); |
1213 | 1213 | ctx.textBaseline = "top"; |
1214 | | - var toastProgress = Math.max(0, Math.min(1, S.macToast * 1.15)); |
1215 | | - if (toastProgress > 0.01) { |
| 1214 | + if (S.macToastOpacity > 0.01) { |
1216 | 1215 | ctx.save(); |
1217 | | - ctx.globalAlpha = toastProgress; |
1218 | | - ctx.translate(0, (1 - toastProgress) * -34); |
1219 | | - ctx.filter = "blur(" + (1 - toastProgress) * 4 + "px)"; |
1220 | | - drawNotification(ctx); |
| 1216 | + ctx.globalAlpha = S.macToastOpacity; |
| 1217 | + drawNotification(ctx, S.macToastX, S.macToastY); |
1221 | 1218 | ctx.restore(); |
1222 | 1219 | } |
1223 | 1220 | drawDock(ctx); |
|
1372 | 1369 | cardReveal: 0, |
1373 | 1370 | titleFade: 0, |
1374 | 1371 | counter: 0, |
1375 | | - macToast: 0, |
| 1372 | + macToastOpacity: 0, |
| 1373 | + macToastX: 1464, |
| 1374 | + macToastY: 62, |
1376 | 1375 | macPanel: 0, |
1377 | 1376 | p: 0, |
1378 | 1377 | }; |
|
1399 | 1398 | var macControl = document.getElementById("mac-control"); |
1400 | 1399 | var macMedia = document.getElementById("mac-media"); |
1401 | 1400 | if (macToast) { |
1402 | | - macToast.style.opacity = Math.min(1, S.macToast * 1.15); |
1403 | | - macToast.style.transform = |
1404 | | - "translateY(" + |
1405 | | - (1 - S.macToast) * -34 + |
1406 | | - "px) scale(" + |
1407 | | - (0.965 + S.macToast * 0.035) + |
1408 | | - ")"; |
1409 | | - macToast.style.filter = "blur(" + (1 - S.macToast) * 4 + "px)"; |
| 1401 | + macToast.style.opacity = S.macToastOpacity; |
| 1402 | + macToast.style.transform = "translateX(" + (S.macToastX - 1002) + "px)"; |
| 1403 | + macToast.style.filter = "none"; |
1410 | 1404 | } |
1411 | 1405 | if (macControl) { |
1412 | 1406 | macControl.style.opacity = 0.5 + S.macPanel * 0.5; |
|
1467 | 1461 | tl.to(S, { counter: 43, duration: 2, ease: driftEase }, 0.5); |
1468 | 1462 | // Cards stagger in (0→1 reveals all cards sequentially) |
1469 | 1463 | tl.to(S, { cardReveal: 1, duration: 3, ease: breatheEase }, 0.8); |
1470 | | - tl.to(S, { macToast: 1, macPanel: 1, duration: 1.1, ease: breatheEase }, 0.45); |
| 1464 | + tl.set(S, { macToastX: 1464, macToastY: 62, macToastOpacity: 0 }, 0); |
| 1465 | + tl.to(S, { macToastX: 988, macToastOpacity: 1, duration: 0.38, ease: "power3.out" }, 0.45); |
| 1466 | + tl.to(S, { macToastX: 1002, duration: 0.16, ease: "power2.out" }, 0.83); |
| 1467 | + tl.to(S, { macToastY: 72, duration: 0.18, ease: "power2.out" }, 4.25); |
| 1468 | + tl.to(S, { macToastY: 62, duration: 0.22, ease: "power2.out" }, 4.43); |
| 1469 | + tl.to(S, { macPanel: 1, duration: 1.1, ease: breatheEase }, 0.45); |
1471 | 1470 | </script> |
1472 | 1471 | </body> |
1473 | 1472 | </html> |
0 commit comments