Aspect ratio calculator / Layered 2.5D Cat

Layered 2.5D Cat

A cut-out cat with a face made of sliding layers. It watches, swats, meows and can be picked up.

Interactive · 2026 series · All animations

Move the yarn, tap the cat, or press and drag up to lift it. Free under the MIT License.

What it is

A cat drawn as flat cut-out shapes with a dark outline, like a sticker or a paper puppet. Its face is not one drawing but a stack of layers, and when the cat looks at the yarn the layers slide by different amounts. That small trick is what people call 2.5D: nothing is truly three-dimensional, yet the head appears to turn.

About the cat. It is modelled on a real cat: the long-haired grey tabby that lives with the person who runs this site. The round body, the chest ruff and the steady stare come from that cat.

It does everything the soft 3D cat does, in a lighter and crisper style, and it is modelled on the same grey tabby.

What it does

What you doWhat the cat does
Move the pointer, or drag a fingerTurns its face toward the yarn. Eyes, nose, stripes and ears slide at different speeds, and the eye on the far side narrows.
Tap or click the catHalf the time it meows with a speech bubble and a sound. The other half it swats the yarn away with a front paw.
Press on the cat and drag upwardYou lift it by the scruff. The body stretches, the legs and tail dangle, the eyes go wide and the ears tip back. It swings when you move it.
Let goIt drops to the floor where you released it and lands with a small squash.

How the layers work

Each part of the face has a depth number. The page multiplies that number by how far the cat is looking left, right, up or down, and moves the part by that many pixels.

LayerDepthHow it moves
Ears−0.5Behind the head, so they slide the opposite way
Head shape0.25Moves a little
Cream cheeks0.5A bit more
Forehead stripes0.7More again
Eyes0.95Clearly ahead of the head
Whiskers1.15
Muzzle and mouth1.2 to 1.25
Nose1.35The nearest point, so it moves the most

Everything except the whiskers is clipped to the outline of the head, so a feature that slides too far disappears behind the edge, as it would on a real turning head. The depth numbers are the rel(...) calls in the file, and changing them changes how strong the effect is.

Make it your cat

The panel under the cat has presets (grey tabby, orange, black, white, tuxedo), colour pickers for the fur, stripes, chest fluff, muzzle, eyes, nose and outline, a fluffiness slider, a meow-chance slider and a name. Press Copy settings to get a settings block, then paste it over CONFIG near the top of the script in the downloaded file.

SettingWhat it changesExample
fur, stripes, chest, muzzleCoat coloursfur: '#e09a4a'
eyes, nose, innerEar, whiskersFace detailseyes: '#5fa8d8'
outlineThe line around every shapeoutline: '#3a332b'
fluffSize of the cheek tufts, chest bib and tailfluff: 0.3
showStripesTabby marks on or offshowStripes: false
meowChance, meowTextHow often it meows, and what the bubble saysmeowChance: 0.5
name, toyTitle text and yarn colourname: 'Miso'

2.5D or soft 3D?

This version is lighter to run, has cleaner lines, and suits stickers, small screens and playful pages. The soft 3D cat has shaded, rounded fur and a head that really rotates in space. Both use the same settings names, so a settings block copied from one works in the other, apart from outline, which only this one uses.

How to take it

1. Download the file

Press Download the HTML file above. You get layered-2-5d-cat.html. Open it in a browser, or upload it to your own site. It works offline.

2. Copy the code

View the code
Loading…

3. Embed it on your page

<iframe src="https://aspect.tools/flat-cat" style="border:0;width:100%;max-width:560px;aspect-ratio:1/2.1" title="Layered 2.5D Cat" loading="lazy"></iframe>

License and credit

MIT License. You can use it, change it, share it and sell things made with it, for personal or commercial work. The one condition: keep the copyright and license notice that is at the top of the file.
Layered 2.5D Cat, 2026 series, by aspect.tools (https://aspect.tools/2-5d-cat), MIT License

A visible credit is appreciated but not required.

Questions

What does 2.5D mean?

Flat drawings arranged in layers that move by different amounts, so the picture seems to have depth without being a real 3D model.

How does the cat turn its head if it is flat?

The ears, head, cheeks, stripes, eyes, muzzle and nose are separate layers. Each slides by its own depth when the cat looks at the yarn.

Can I recolour it?

Yes. Use the panel under the cat or edit CONFIG in the file. There are presets for grey tabby, orange, black, white and tuxedo.

How do I pick the cat up?

Press on the cat and drag upward. It hangs by the scruff until you let go.

Is it lighter than the 3D cat?

Yes. It draws far fewer shapes per frame, so it runs smoothly on slower phones.

Related tools and guides