How to Evaluate LLMs on Replicating Complex Motion Effects
This article presents a practical evaluation method for testing how well large language models replicate complex scroll-driven animation effects. It breaks down such effects into shape, particle, and interaction layers, then defines four measurable metric groups: visual fidelity, interaction completeness, runtime feasibility, and iteration efficiency. Based on observed model behavior, it summarizes three typical response patterns and four root causes of failure, including poor handling of minified code, weak easing and physics intuition, missing performance budgets, and absent self-verification loops. It closes with a five-step workflow for reliable replication and a set of transferable selection criteria for developers.
1. Background: Why Motion Replication Is a Strong Capability Test
Once generative models move into real engineering work, asking for a simple sorting algorithm no longer separates models in any meaningful way. The real differentiator is composite work that demands visual understanding, front-end engineering, resource retrieval and analysis, and iterative self-correction at the same time. Replicating a highly complex scroll animation compresses all four capabilities into a single task.
Such animations can be abstracted into three layers:
- Shape layer: the first screen shows a numeric form, the middle transitions into a pointer form, and the final section converges into a logo form.
- Particle layer: each shape is built from a large number of particles that disperse and converge as scrolling progresses.
- Interaction layer: pointer movement creates local disturbance in the particles, producing a “gravity field” style response.
From an engineering perspective, this is equivalent to a combined problem of “a scroll-progress-driven particle system + shape interpolation + pointer interaction.” If any one piece is missing, the result gives itself away visually almost immediately.
2. Evaluation Design: Turning Subjective Impressions into Measurable Metrics
In the original test, the requester’s prompt was deliberately restrained: it described only “what was wanted,” not “how to do it,” and explicitly allowed the model to choose between fetching source code and analyzing screenshots. This design is worth borrowing, because it also brings “methodology selection” into scope.
A reusable evaluation design should contain four metric groups:
- Fidelity: whether shape outlines, particle density, convergence rhythm, and easing curves match the reference.
- Interaction completeness: whether scrolling is reversible in both directions, whether pointer disturbance is continuous, and whether boundaries show jumps.
- Runtime feasibility: whether the output is a standalone runnable page, whether the console is free of errors, and whether resources are self-contained.
- Iteration efficiency: how many round trips are needed to go from the first version to an acceptable one, and the quality of self-correction along the way.
A sketch of the acceptance script could look like this:
// Pseudocode: acceptance check for scroll progress to particle cohesion mappingconst progress = getScrollProgress(); // 0 ~ 1const cohesion = easeInOutCubic(progress); // cohesion factorparticles.forEach(p => {p.x = lerp(p.scatterX, p.targetX, cohesion);p.y = lerp(p.scatterY, p.targetY, cohesion);});assert(isReversible(progress), 'Scrolling must be reversible');
3. Observed Behavior: Three Typical Patterns
Given the same prompt, different models follow highly typed behavior paths, and those paths are more informative than the final output itself.
Pattern 1: Ship a working version first, then converge. The first version usually deviates noticeably in shape and rhythm, but the structure is correct and it runs. The model then actively performs “difference localization,” for example adjusting particle count, fixing the easing function, or rewriting the shape sampling logic. This path has the highest engineering value, because a human can take over and keep converging.
Pattern 2: Deliver a high-completeness result in one shot. In a minority of cases, the model hits most visual features directly, but the detail easing still feels “mechanical” and lacks the natural lag of the reference implementation.
Pattern 3: Drift off-task or oversimplify. This shows up as downgrading the particle system to static graphics plus opacity animation, or substituting approximate shapes for real shape sampling. Such results “look right” in a screenshot but break down immediately under interaction.
Notably, in the observed tests every participant abandoned the route of driving the operating system’s graphical interface and instead used a built-in browser or a local browser extension to load the page and extract resources. That choice is reasonable: on a web runtime, scripts and styles are eventually loaded locally, so retrieval costs far less than pixel-by-pixel screenshot comparison. But it has a side effect — a task meant to test “computer operation ability” gets bypassed, so a separate case is needed for that.
4. Root Causes: Four Reasons Models Fail
Grouping the failed samples converges to four root causes, which is more useful for engineering selection.
- Difficulty restoring compressed and split resources. Production scripts are usually minified and split on demand, with meaningless variable names and fragmented logic. Without the habit of “rebuild a readable structure first, then rewrite,” a model makes ineffective patches inside obfuscated code.
- Missing easing and physics intuition. The appeal of the dispersion effect comes from non-linear easing and slight damping. Defaulting to linear interpolation is the main source of the “cheap feel” in first versions.
- Weak performance budget awareness. Particle count, per-frame computation, and whether batch drawing is used directly determine whether a mid-range device can hold a high frame rate. Implementations without a budget drop frames easily on high-resolution screens.
- No self-verification loop. Stronger models proactively compare screenshots, read console errors, and check reversibility; weaker ones “write it and hand it in” with no loop.
5. Engineering Recommendations: A Replication Workflow That Works
To replicate this kind of effect reliably in a real project, the following workflow is recommended:
- Step 1: Layer the requirements. Split “shape, particles, interaction, performance” into four independent acceptance lines instead of a vague “make it identical.”
- Step 2: Prioritize the resource side. Get style and script resources first, build a readable local structure, then start rewriting; use screenshot comparison as a supplement.
- Step 3: Parameterize the implementation. Extract particle count, cohesion radius, and easing strength into configuration items for fast tuning.
const CONFIG = {particleCount: 1200,cohesionRadius: 220,damping: 0.08,easing: 'easeOutCubic'};
- Step 4: Add a performance fallback. Use batch drawing, cap the number of updates per frame, and pause rendering when the page is not visible.
- Step 5: Close the verification loop. Compare screenshots at fixed scroll sample points, confirm zero console errors, and verify consistency under bidirectional scrolling.
If the demo page needs to be published, general cloud capabilities can handle hosting and observability: object storage for static assets, a content delivery network to reduce first-screen latency, and logging plus monitoring alerts to track frame rate and error rate on real devices. These are all standard industry categories and involve no proprietary interfaces.
6. Conclusion: The Real Output Is a Methodology
The greatest value of this side-by-side test is not “who won,” but that it exposes a transferable set of criteria: behavior paths matter more than final screenshots, self-verification loops matter more than a single output, and performance budgets matter more than visual similarity. For developers, baking these criteria into the selection process pays off far more over time than chasing a one-off leaderboard ranking.
