0.0.2-alpha • Published 10 months ago

gl-transitor v0.0.2-alpha

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

gl-transitor

A simple way to complex shader image transitions.

Usage

import { GLTransitor } from 'gl-transitor';
import GLTransitorEffects from 'gl-transitor/shaders';

const transitor = GLTransitor.init('#canvas', GLTransitorEffects);

transitor.animate('#img-1', {
    url: 'https://some.url',
});

const from = transitor.createTexture(document.querySelector('#image-1'));

const to = transitor.createTexture(document.querySelector('#image-2'));

transitor.animateTexture(from, to);