import { Pose } from './engine'; import { BotAvatarFace, BotAvatarShading } from './types'; export interface DrawConfig { path: Path2D; face: BotAvatarFace; faceX: number; faceY: number; faceScale: number; color: string; ink: string; shading: BotAvatarShading; /** intensities and geometry of the lighting; omitted means the stock look */ shadow?: number; highlight?: number; depth?: number; /** degrees clockwise from the top, where the light comes from */ light?: number; rim?: number; spread?: number; /** identifies the outline for the material caches (the type name) */ typeKey?: string; /** * no animation loop follows this draw (reduced motion, paused): build * materials now instead of on idle time */ still?: boolean; /** thin parts (antennae) drawn behind the body with `partsDepth` of its depth */ parts?: Path2D; partsDepth?: number; /** the resolved surface: the whirl is white on dark, black on light */ theme?: 'dark' | 'light'; /** the device pixel ratio the context is scaled by: with it given the context's transform is taken as that scale and never read back */ dpr?: number; /** plastic's side slices: filled as vectors, or blitted from sprites of the outline. `auto` (the default) blits on WebKit, where a conic-gradient fill costs thirty times a flat one. */ sides?: 'auto' | 'vector' | 'sprite'; /** the whirl's knobs; 1 everywhere is the stock look */ whirl?: { strength: number; size: number; width: number; length: number; tilt: number; }; } export declare const OVERSCAN = 1.5; /** the body's centre sits this fraction of the box below the canvas centre: hops and flips need the room above, not below */ export declare const RISE = 0.1; /** * Draw one frame. `box` is the avatar's layout size in CSS px; the canvas * is `box * OVERSCAN` square with the body's centre `RISE * box` below * its middle, and the context already scaled for the device pixel ratio. */ export declare function draw(ctx: CanvasRenderingContext2D, box: number, pose: Pose, cfg: DrawConfig): void;