JavaScript Spectacles
Move a spectacles-shaped lens over a photo and see a second image through the glasses. Plain JavaScript and CSS masks, no libraries. Works with mouse and touch.
Demo Initial release · 26 September 2021 Any modern browser
Features
- Spectacles-shaped lens that follows the pointer
- Shows a second image through the lenses, lined up with the photo
- Mouse and touch support
- No libraries: plain JavaScript and CSS masks
Download
Initial release, released 26 September 2021. Files are hosted on center4solution.com.
-
DownloadSource code (ZIP) Both demos with their images · 38 MB
SHA-256
2cbf325aed76b4a26810953863b76efcc91e43ea32c582b9743d6085dc791fa0javascript-spectacles-main.zip
First time installing? Read the user guide guide. Older versions are in the changelog.
What's new in Initial release
- Single and multi-image spectacles demos.
- Mouse and touch support.