@9am/img-halftone
Version:
A web component turns <img> into halftone.
23 lines (22 loc) • 577 B
TypeScript
import type { ChannelOptions, Pair } from './types';
declare class Channel {
static deg2rad(ang?: number): number;
private _canvas;
private _ctx;
private _cells;
private _size;
private _angle;
private _options;
viewBox: Pair;
color: string;
constructor(options: ChannelOptions);
private getOrigin;
update(options: ChannelOptions): Promise<void>;
get angle(): number;
get size(): [number, number];
get cellSize(): Pair;
get name(): string;
get cells(): number[];
destory(): void;
}
export default Channel;