modern-canvas
Version:
A JavaScript WebGL rendering engine. only the ESM.
32 lines (31 loc) • 1.26 kB
TypeScript
import type { GlRenderer } from '../../core';
import type { EffectProperties, Node, Viewport } from '../main';
import type { Texture2D } from '../resources';
import { Effect } from '../main/Effect';
import { Material } from '../resources';
export type CheckerboardStyle = 'grid' | 'gridDark' | 'dot';
export interface DrawboardEffectProperties extends EffectProperties {
checkerboard?: boolean;
checkerboardStyle?: CheckerboardStyle;
pixelGrid?: boolean;
watermark?: string;
watermarkWidth?: number;
watermarkAlpha?: number;
watermarkRotation?: number;
}
export declare class DrawboardEffect extends Effect {
checkerboard: boolean;
checkerboardStyle: CheckerboardStyle;
pixelGrid: boolean;
watermark?: string;
watermarkWidth: number;
watermarkAlpha: number;
watermarkRotation: number;
protected _watermark?: Texture2D;
static material: Material;
constructor(properties?: Partial<DrawboardEffectProperties>, children?: Node[]);
protected _updateProperty(key: string, value: any, oldValue: any): void;
protected _loadWatermark(value?: string): Promise<void>;
protected _checkerboardStyleMap: Record<CheckerboardStyle, number>;
apply(renderer: GlRenderer, source: Viewport): void;
}