animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Animated Concepts #3

model output

Qwen3-VL-8B-Instruct

Animated Concepts #3

A 0.62T 0.12
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>Animation</title>
7<style>
8  body {
9    background-color: #121212;
10    display: flex;
11    justify-content: center;
12    align-items: center;
13    height: 100vh;
14    margin: 0;
15  }
16  .dot {
17    width: 8px;
18    height: 8px;
19    background-color: #e07a5f;
20    border-radius: 50%;
21    position: absolute;
22    transform: translate(-50%, -50%);
23  }
24  .dots-container {
25    position: relative;
26    width: 100px;
27    height: 100px;
28  }
29</style>
30</head>
31<body>
32  <div class="dots-container" id="dotsContainer"></div>
33
34  <script>
35    const container = document.getElementById('dotsContainer');
36    const dot1 = document.createElement('div');
37    const dot2 = document.createElement('div');
38    const dot3 = document.createElement('div');
39    const dot4 = document.createElement('div');
40
41    dot1.className = 'dot';
42    dot2.className = 'dot';
43    dot3.className = 'dot';
44    dot4.className = 'dot';
45
46    container.appendChild(dot1);
47    container.appendChild(dot2);
48    container.appendChild(dot3);
49    container.appendChild(dot4);
50
51    const dots = [dot1, dot2, dot3, dot4];
52    const positions = [
53      { x: 0, y: 0 },
54      { x: 0, y: 0 },
55      { x: 0, y: 0 },
56      { x: 0, y: 0 }
57    ];
58
59    const animate = () => {
60      const centerX = container.offsetWidth / 2;
61      const centerY = container.offsetHeight / 2;
62
63      // Reset positions
64      positions[0] = { x: 0, y: 0 };
65      positions[1] = { x: 0, y: 0 };
66      positions[2] = { x: 0, y: 0 };
67      positions[3] = { x: 0, y: 0 };
68
69      // Animate dots
70      setTimeout(() => {
71        positions[0] = { x: -10, y: 0 };
72        positions[1] = { x: 0, y: -10 };
73        positions[2] = { x: 10, y: 0 };
74        positions[3] = { x: 0, y: 10 };
75
76        dots[0].style.transform = `translate(${positions[0].x}px, ${positions[0].y}px)`;
77        dots[1].style.transform = `translate(${positions[1].x}px, ${positions[1].y}px)`;
78        dots[2].style.transform = `translate(${positions[2].x}px, ${positions[2].y}px)`;
79        dots[3].style.transform = `translate(${positions[3].x}px, ${positions[3].y}px)`;
80
81        setTimeout(() => {
82          positions[0] = { x: 0, y: 0 };
83          positions[1] = { x: 0, y: 0 };
84          positions[2] = { x: 0, y: 0 };
85          positions[3] = { x: 0, y: 0 };
86
87          dots[0].style.transform = `translate(${positions[0].x}px, ${positions[0].y}px)`;
88          dots[1].style.transform = `translate(${positions[1].x}px, ${positions[1].y}px)`;
89          dots[2].style.transform = `translate(${positions[2].x}px, ${positions[2].y}px)`;
90          dots[3].style.transform = `translate(${positions[3].x}px, ${positions[3].y}px)`;
91        }, 1000);
92      }, 100);
93    };
94
95    animate();
96  </script>
97</body>
98</html>