What is it?


How does it work?

Like this:

<script src="jquery.js"></script>
<script src="lake.js"></script>
$(function() {
    'speed': 1,
    'scale': 0.5,
    'waves': 10
<img id="lake-img" src="lake.png" style="display: none;"/>

Lake.js takes an img element and inserts a canvas element displaying the image and its flipped reflection directly after the img element.

The new canvas element will be the same width as the original image and double the height.

Frames are precomputed, lake.js will slow down page loads but will perform well on lots of devices.

Where do I get it?



Fork me on GitHub