Search code examples
javascripthtmlcanvasperspectiveeaseljs

EaselJS perspective image transformation


Is it possible to make perspective image transformation in html5 canvas? I am using EaselJS right now and can't find a solution for my need.


Solution

  • I don't tried the easel.js yet, but every image transformation is done with matrix operations: translate, rotate, skew etc. Looking on the easel.js source code there is a Matrix2D class, and the documentation to it: http://www.createjs.com/Docs/EaselJS/Matrix2D.html. For a perspective transformation you need to use rotation, scaling and skewing. You need to only play with values and test which is best suited for your needs.