Reverse-Engineering Web Animations with Claude Code
Lukas Margeriego watch the original →
the gist
A workflow for replicating complex Awwwards-style animations by using Claude Code to perform frame-by-frame visual analysis, synthetic cursor tracking, and iterative refinement of geometry and easing.
Reverse-Engineering Motion via Synthetic Analysis
To replicate high-end web animations, the author uses Chrome Inspect to isolate the target DOM element and feeds the raw code into Claude Code alongside reference screenshots. The core technique involves forcing Claude Code to perform a technical analysis of hover variants, easing functions, and animation speeds before writing any code. When initial builds fail to capture complex motion, the author employs a "synthetic cursor" trick: Claude captures screenshots of the animation across multiple states (neutral, hover, active) to reverse-engineer the underlying logic. For grid-based interactions, the author instructs Claude to drive scale via cursor position relative to the grid, using frame-by-frame lerping for smoothness.
Solving Complex Geometry and Asset Management
For non-trivial layouts like rotating 3D domes, the author corrects Claude's initial 2D assumptions by forcing a re-analysis of the site's perspective. By identifying that cards sit on the interior of a dome rather than a flat circle, the author guides Claude to implement a vertex shader and perspective camera. Assets are generated at scale using the Higgsfield MCP, which allows for the creation of specific media counts (e.g., 42 assets) directly within the project context. An auto-asset manager is then implemented to map these generated files to the UI components.
Iterative Refinement and Visual Remixing
Page loaders are built by forcing Claude to analyze the sequence frame-by-frame until the homepage transition is visible. The author refines timing by explicitly setting transition durations (e.g., 0.8 seconds for image transitions, 1 second for the final fade-out). Finally, the project is integrated with MagicPath, allowing the user to treat the code-built components as visual canvas elements that can be remixed or restyled (e.g., switching to dark mode) via natural language prompts.