@I_am_oil_oil: Sharing a fun website animation tip. Yesterday I shared a hero animation effect for https://oiloil.org — the little character's eyes and the dog's head on the hero section can follow my mouse, and it looks really smooth. Everyone can probably guess how the little character's eyes are done: first generate a character without eyeballs...
Summary
Sharing a fun website animation trick: use the AI video generation model MiniMax H3 to create a 240-frame sprite sheet, switch background position based on mouse angle, achieve a smooth dog-head-follows-mouse effect, and extend it to creative uses like scroll-controlled playback/rewind.
View Cached Full Text
Cached at: 08/06/26, 04:36 AM
Sharing a neat trick for making fun animations on websites. Yesterday I shared the hero-screen animation effect from the site https://oiloil.org — the little character’s eyes and the puppy’s head on the hero screen follow my mouse movement, and they look quite smooth.
You can probably figure out how the character’s eyes were done: first generate a character image without eyeballs, then draw an eye in code and make it follow the mouse.
But the puppy might leave you guessing. My approach here wasn’t 3D modeling — it’s done through image swapping. My initial idea was also AI image generation, like CodeX’s built-in pet feature: generate a single multi-frame image, then extract and slice the frames, and switch between them in the UI based on the mouse position. But AI image generation gave too few frames — not smooth at all. Even if I added more frames using reference images, the puppy’s consistency couldn’t match the strength of generating everything in a single image.
So I thought of using AI video generation to produce a video with strong consistency, coherence, and a high frame rate. Here I used the Minimax H3 model. The overall implementation process is as follows:
- MiniMax H3 generates a green-background video at 24 FPS, about 5 seconds, 124 frames.
- Cut out frames facing different directions from the video, then interpolate them into 240 directional frames.
- Merge the 240 frames into a single 16 × 15 WebP sprite sheet.
- Based on the angle of the mouse relative to the puppy, calculate which frame of the sprite sheet to display.
- Add inertia, maximum head-turn speed, and deceleration to the frame index in code.
- The browser only changes background-position — no video playback, and no loading 240 images at once.
This approach can actually be used to create many fun effects, for example: dragging a progress bar to control a product expanding, disassembling, assembling, melting, or growing. Or map video frames to page scrolling, creating the kind of cinematic shot that can play forward, in reverse, or stop at any time — like on Apple’s site.
I’m even wondering: if each frame of an AI-generated video can be unique, then generating one video is like generating hundreds of images — which, when you do the math, might be cheaper than generating images.
Hope this idea brings you some inspiration ~
Oil® — 欧呦
Source: https://www.oiloil.org/ Hover
When you move your mouse over it, the button changes color so you know it’s clickable.
Hover meLift + color changeControl groupI don’t respond
Move your mouse over each one to feel the difference between “clickable” and “not clickable”
Spring Motion
When the popup appears, it gives a slight bounce, swaying gently like a spring.
It goes past the target value, then bounces back: overshoot
Click the track or “Replay” to watch the bounce again
Frosted Glass / Backdrop Blur Look
The nav bar is semi-transparent, so the content scrolling behind it looks blurry.
Mountain Homestay · Cloudtopbackdrop-filter: blur(10px)
Click the switch in the top-right corner to compare the difference with and without background blur.
Similar Articles
@I_am_oil_oil: I've open-sourced my Skill for making animations with AI video: https://github.com/oil-oil/oil-motion… The overall flow of the Skill is roughly like this: reference material, expression purpose, and control method ↓ First confirm what the start, middle, and end should look like…
The author open-sourced oil-motion, an Agent Skill for integrating continuous motion generated by AI video into web interactions such as scrolling and mouse, providing a complete solution covering generation, inspection, compression, and front-end integration.
@xiangxiang103: Just discovered an amazing site! https://motionsites.ai It's full of high-end AI website prompts. Copy-paste to your AI and instantly get stunning animated landing pages, SaaS, portfolios... Make in minutes what used to take days. Too good!
Discovered a wonderful site motionsites.ai offering high-end AI website prompts. Copy-paste to quickly generate animated landing pages, SaaS, and portfolios, greatly improving efficiency.
@10xmylife: This website is awesome, it has all kinds of animations and is open source
Introducing Amicro, an open-source React micro-interaction and transition component library that lets you add beautiful animations via CLI.
@Saccc_c: Discovered an animation generation tool that directly converts natural language into cool Lottie animations. The effects shown in the video below can be generated in one go — very impressive. (The prompt guide is in the comments, you can feed it directly to AI to help write high-quality prompts.) Combining it with video production tools like HyperFrames opens up even more possibilities. Finally...
An open-source tool that uses AI agents (such as Claude Code/Codex) to directly convert natural language into production-ready Lottie animations, supporting one-click installation and a prompt guide.
@mate_mattt: Threw my article at GPT 5.6 Sol, had it create a playable demo learning animation with Three.js — works great!
User @mate_mattt gave their article to GPT 5.6 Sol to create a playable demo learning animation using Three.js, with excellent results.