Skip to content

huanjinliu/warpvas-perspective

Repository files navigation

warpvas-perspective

English | 中文

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-perspective

Usage

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!

About

A derivative strategy library for warpvas enabling perspective transformation effects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors