animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Nice spinny stuff

model output

Gemini 3 Flash Preview

Nice spinny stuff

A 0.82T 0.27
compare with ground truth →
1<!DOCTYPE html>
2<html lang="en">
3<head>
4    <meta charset="UTF-8">
5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6    <title>Pink Dot Trail Animation</title>
7    <style>
8        /* Base page styling to match the white background */
9        body {
10            margin: 0;
11            padding: 0;
12            background-color: #ffffff;
13            display: flex;
14            justify-content: center;
15            align-items: center;
16            height: 100vh;
17            overflow: hidden;
18        }
19
20        /* Container positioned towards the top-left as seen in the video */
21        .container {
22            position: absolute;
23            top: 15%;
24            left: 15%;
25            /* Slight tilt to match the angle of the movement in the video */
26            transform: rotate(-12deg);
27        }
28
29        /* Each dot is a circle with a specific pink color */
30        .dot {
31            position: absolute;
32            background-color: #f7b4c4; /* Soft pink matching the video */
33            border-radius: 50%;
34            /* Staggered ease-in-out animation creates the bunching/trailing effect */
35            animation: wavy-motion 2.5s infinite ease-in-out;
36        }
37
38        /* 
39           Keyframes recreate a flattened elliptical path.
40           The horizontal movement (translateX) combined with vertical (translateY) 
41           and the natural slow-down of ease-in-out creates the "bunching up" 
42           seen at the turn points in the video.
43        */
44        @keyframes wavy-motion {
45            0%, 100% {
46                transform: translate(0, 0);
47            }
48            25% {
49                transform: translate(45px, -18px);
50            }
51            50% {
52                transform: translate(90px, 0px);
53            }
54            75% {
55                transform: translate(45px, 18px);
56            }
57        }
58
59        /* 
60           Individual dot properties:
61           --s: Size (diameter)
62           --d: Animation delay (staggered to create the follow-the-leader trail)
63           Sizes gradually decrease to create the tail effect.
64        */
65        .dot:nth-child(1) { width: 12px; height: 12px; animation-delay: -0.64s; }
66        .dot:nth-child(2) { width: 10px; height: 10px; animation-delay: -0.56s; }
67        .dot:nth-child(3) { width: 9px;  height: 9px;  animation-delay: -0.48s; }
68        .dot:nth-child(4) { width: 8px;  height: 8px;  animation-delay: -0.40s; }
69        .dot:nth-child(5) { width: 7px;  height: 7px;  animation-delay: -0.32s; }
70        .dot:nth-child(6) { width: 6px;  height: 6px;  animation-delay: -0.24s; }
71        .dot:nth-child(7) { width: 5px;  height: 5px;  animation-delay: -0.16s; }
72        .dot:nth-child(8) { width: 4px;  height: 4px;  animation-delay: -0.08s; }
73        .dot:nth-child(9) { width: 3px;  height: 3px;  animation-delay: 0s;      }
74
75    </style>
76</head>
77<body>
78
79    <div class="container">
80        <!-- Sequence of dots forming the trail -->
81        <div class="dot"></div>
82        <div class="dot"></div>
83        <div class="dot"></div>
84        <div class="dot"></div>
85        <div class="dot"></div>
86        <div class="dot"></div>
87        <div class="dot"></div>
88        <div class="dot"></div>
89        <div class="dot"></div>
90    </div>
91
92</body>
93</html>