animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Single Element Spinner

model output

LLaMA 4 Scout

Single Element Spinner

A 0.40T 0.10
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>Cyan Circle Animation</title>
7    <style>
8        body {
9            background-color: black;
10            margin: 0;
11            padding: 0;
12            overflow: hidden;
13        }
14        .circle {
15            position: absolute;
16            width: 20px;
17            height: 20px;
18            border-radius: 50%;
19            border: 2px solid cyan;
20            top: 50px;
21            left: 50px;
22        }
23    </style>
24</head>
25<body>
26    <div class="circle"></div>
27    <script>
28        const circle = document.querySelector('.circle');
29        let left = 50;
30        const animationDuration = 4; // seconds
31        const startTime = performance.now();
32
33        function animate(timestamp) {
34            const elapsed = (timestamp - startTime) / 1000;
35            if (elapsed < animationDuration) {
36                left = 50 + (elapsed / animationDuration) * (window.innerWidth - 70);
37                circle.style.left = `${left}px`;
38                requestAnimationFrame(animate);
39            }
40        }
41        requestAnimationFrame(animate);
42    </script>
43</body>
44</html>