@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...

X AI KOLs Following Tools

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.

Sharing a fun website animation trick. Yesterday I shared a hero animation effect from https://oiloil.org — the little character's eyes and the dog's head on the hero section follow my mouse, and it looks pretty smooth. You can probably guess how the little character's eyes are done: first generate an image of the character without eyeballs, then draw an eye in code and make it follow the mouse. But you might not know how the dog was done. My approach here wasn't 3D modeling — it's done by switching images. My initial idea was also AI image generation, like CodeX's built-in pet feature: generate a single multi-frame image, cut it out, and switch frames on the UI based on mouse position. But AI image generation gives too low a frame rate — not smooth at all. And even if you add more images, using reference images can't keep the dog as consistent as generating everything in one image. So I thought of using AI video generation instead, to create a video with strong consistency and smooth, high frame rate. I used the Minimax H3 model. The overall process is: 1. Use MiniMax H3 to generate a ~5-second, 24 FPS, 124-frame video with a green background. 2. Extract different orientations from the video, then interpolate to 240 directional frames. 3. Merge the 240 frames into a single 16 × 15 WebP sprite sheet. 4. Based on the angle of the mouse relative to the dog, compute which frame of the sprite sheet to display. 5. Use code to add inertia, a max turn speed, and a deceleration curve to the frame index. 6. The browser only changes background-position — it doesn't play a video or load 240 images at once. With this idea you can actually create a lot of interesting effects, e.g. drag a progress bar to control a product expanding, disassembling, reassembling, melting, or growing. Or map page scrolling to video frames to get a camera that plays forward, plays backward, and can pause at any moment, like on Apple's website. I was even thinking: if every frame of an AI-generated video can be different, then generating one video is essentially like generating hundreds of images — which might end up being cheaper than generating images. Hope this idea inspires you~
Original Article
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:

  1. MiniMax H3 generates a green-background video at 24 FPS, about 5 seconds, 124 frames.
  2. Cut out frames facing different directions from the video, then interpolate them into 240 directional frames.
  3. Merge the 240 frames into a single 16 × 15 WebP sprite sheet.
  4. Based on the angle of the mouse relative to the puppy, calculate which frame of the sprite sheet to display.
  5. Add inertia, maximum head-turn speed, and deceleration to the frame index in code.
  6. 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…

X AI KOLs Timeline

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.

@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...

X AI KOLs Following

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.