warpvas-perspective
v1.0.2
Published
A derivative strategy library for warpvas enabling perspective transformation effects
Downloads
109
Maintainers
Readme
warpvas-perspective
This library is a derivative strategy library for warpvas, implementing perspective transformation effects through this strategy.
Installation
npm i -S warpvas warpvas-perspective
# or
pnpm add warpvas warpvas-perspectiveUsage
import { Warpvas } from 'warpvas';
import perspective from 'warpvas-perspective';
const warpvas = new Warpvas(image);
warpvas.setSplitStrategy(perspective);
warpvas.render();❗Important Note
When applying this perspective strategy, if three vertices form a triangle while the fourth vertex is contained within that triangle, the perspective transformation will fail and throw an error. Please handle this error condition appropriately in your implementation!
