/** * The canvas draws fewer pixels when frames come late, and stays so: a * phone or an old laptop, a browser that saves energy on battery and draws * thirty frames a second, many sliders on one page. * * createSlider( element, { plugins: [ canvas( { effects } ), quality() ] } ); * * While the slider moves, it measures the time between its frames. When * `frames` of them in a row are later than `late` ms, the canvas takes the * next of `steps`: its device pixels per px. It never goes back up, so * the picture does not change back and forth. On a battery that is low * and not charging, where the browser says so, it takes a step at once. * * Events of the slider: `quality:lower`, with the device pixels per px it * draws with now. */ import type { Slider } from '../index.js'; /** * @param options Options. * @param options.late Time between frames that is late, ms. * @param options.frames Late frames in a row that make a step. * @param options.steps Device pixels per px, one after the * other. */ export declare function quality({ late, frames, steps }?: { late?: number; frames?: number; steps?: number[]; }): (slider: Slider) => { name: string; /** The device pixels per px the canvas has been lowered to; none: 0. */ readonly density: number; destroy: () => void; };