@visactor/vrender-animate
Version:
This module provides a graph-based animation system for VRender.
24 lines (23 loc) • 952 B
TypeScript
import type { EasingType } from '@visactor/vrender-core';
import { HybridEffectBase } from './base/CustomEffectBase';
export interface ColorEffectConfig {
effectType: 'grayscale' | 'sepia';
strength: number;
useWebGL: boolean;
}
export declare class Grayscale extends HybridEffectBase {
private colorConfig;
constructor(from: null, to: null, duration: number, easing: EasingType, params: any);
protected getShaderSources(): {
vertex: string;
fragment: string;
} | null;
protected applyWebGLEffect(canvas: HTMLCanvasElement): HTMLCanvasElement | null;
private setColorUniforms;
protected applyCanvas2DEffect(canvas: HTMLCanvasElement): HTMLCanvasElement | null;
private canUseCSSFilter;
private applyCSSFilter;
private applyGrayscaleEffect;
private applySepiaEffect;
protected afterStageRender(stage: any, canvas: HTMLCanvasElement): HTMLCanvasElement | void | null | false;
}