Projective transformation of a plane (dom element).
Can be usefull to quickly add perspective to a dom element, or simply to animate a quad for transition purpose.
Based on this original post.
Another nice article can be found here.
npm i css-quad --save
import CssQuad from 'css-quad';
const cssQuad = new CssQuad(domElement);
Run npm i && npm start
to build the demo.
This method has to be called whenever the dom element size changes.
This method has to be called on RAF.
Position of the quad anchors relative to the viewport.