Create the right “wet floor” with the perspective of the image in Javascript
In the context of one of my current projects, the task was set to make a “wet floor”. It was planned to put a huge number of pictures on the floor (but only a couple per page, with replacement). In perspective. In the future, by the way, temporal and spatial.
Finding nothing worthwhile, I started writing my bike. And, sitting on over two evenings, a small js-library with a generic name iWet was composed .
UPD: Version 0.2
Added a white mask. See Demo.
Laid out the source mask in .psd
Cured bug with flickering pictures when loading pages
Added readme.txt and licence.txt
Minimal cosmetic code changes
')
Why the developer may not approach other "wet-floor" solutions:
We need an elegant, cross-browser, fully client solution.
Original pictures are untouchable
Need a perspective image
Dissatisfaction with the canvas, which builds pixel "ladders" when trying to distort the perspective
Cons, in general, also will not keep you waiting:
When resizing windows, the reflection coordinates of the image are not updated (for now?)
Transferring the image with a large number of them on the second line looks ugly
The image size is replaced with difficulty (200 × 200 by default)
The rendering process is visible when the page loads