Wrap an image around a cylindrical object in HTML5 / JavaScript
Simple cylinder wrap with Canvas 2D Very simple example using sin and cos to create the curved map. The images is cut into strips approx 1 pixel wide then rendered as half a squashed circle. As perspective is a linear effect related to distance I also add a small amount of perspective by scaling up … Read more