perspective.js:变换图像的透视图并将其绘制在画布上
Perspective.js Perspective.js是一个JavaScript库,可让您将矩形图像转换为画布元素上四边形的任意形式。 它用于在画布上使用透视图绘制图像。 这是原始的Futomi Hatano的Perspective.js的衍生作品可在。 从NPM安装 npm install perspectivejs 用法示例 // ctx (CanvasRenderingContext2D): The 2D context of a HTML5 canvas element. // image (Image): The image to transform. var p = new Perspective ( ctx , image ) ; p . draw ( [ [ 30 , 30 ] ,