useful.js

JavaScript examples, too useful not to share.

Fork me on GitHub

Tile Based Image Viewer

This tile-based image viewer loads only the parts of the image that are visible. Not unlike how Google Maps loads map tiles.

This demo comes with a web service to divide large images into tiles using PHP, but the concept is easily replicated in other languages.

Download (GitHub)

This example allows frames of a rotation to be dragged around.

This example shows a lens instead of zooming in on the whole image. On devices with a touch interface this example will revert to a more intuitive "pinch to zoom" interface.