animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Thinking about SVG-preloaders

model output

LLaMA 4 Scout

Thinking about SVG-preloaders

A 0.71T 0.14
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>Loading Animation</title>
7    <style>
8        body {
9            background-color: black;
10            display: flex;
11            justify-content: center;
12            align-items: center;
13            height: 100vh;
14            margin: 0;
15        }
16        .loader {
17            position: relative;
18        }
19        .dot {
20            position: absolute;
21            width: 10px;
22            height: 10px;
23            border-radius: 50%;
24            background-color: #fff;
25            opacity: 0.5;
26        }
27    </style>
28</head>
29<body>
30    <div class="loader">
31        <!-- dots will be generated here -->
32    </div>
33
34    <script>
35        const loader = document.querySelector('.loader');
36        const colors = ['#FFA07A', '#34C759', '#8BC34A', '#03A9F4', '#FFC107', '#FF69B4', '#33CCFF', '#66CC00', '#CC33FF', '#FF9900'];
37        const dots = [];
38
39        for (let i = 0; i < 10; i++) {
40            const dot = document.createElement('div');
41            dot.classList.add('dot');
42            dot.style.transform = `rotate(${i * 36}deg) translate(50px)`;
43            dot.style.background = colors[i];
44            loader.appendChild(dot);
45            dots.push(dot);
46        }
47
48        let angle = 0;
49        function animate() {
50            dots.forEach((dot, index) => {
51                dot.style.transform = `rotate(${angle + index * 36}deg) translate(50px)`;
52            });
53            angle = (angle + 2) % 360;
54            requestAnimationFrame(animate);
55        }
56        animate();
57    </script>
58</body>
59</html>