06.26 · 3D & Advanced

Infinite Zoom

The view keeps zooming into pictures inside pictures. Best for page intros.

Watch it

It moves by itself. Pause it to look closely, or turn on slow motion to see each picture take over.

Try it

Change a setting and see the difference as it moves.

Speed

How long each picture takes to fill the box.

Number of scenes

One scene holds a copy of itself; more scenes take turns.

Direction

In dives into each picture; out pulls back to the one around it.

More optionsFewer options

Outlines and numbers each scene, so you can see where the next one waits.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add an infinite zoom to [the section you want it in]. Give each picture, such as [a painting, a screen or a photo], a frame in its middle, the same shape as the view, that holds a smaller copy of the next picture, so the pictures nest inside each other. Move the view steadily into or out of the middle, growing or shrinking every picture by the same factor each second so the speed feels even. Each time a picture exactly fills the view, draw it as the outermost one, so the loop never jumps. Draw only the pictures big enough to see, and keep them sharp at full size. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Page intros
  • Portfolios and galleries
  • Story and game sites
  • Music and art pages

Avoid on

  • Long reading pages
  • Forms and checkout