UNPKG

@motion-core/motion-gpu

Version:

Framework-agnostic WebGPU runtime for fullscreen WGSL shaders with explicit Svelte, React, and Vue adapter entrypoints.

23 lines 1.01 kB
import type { Renderer, RendererOptions } from './types.js'; /** * Computes dirty float ranges between two uniform snapshots. * * Adjacent dirty ranges separated by a gap smaller than or equal to * {@link DIRTY_RANGE_MERGE_GAP} are merged to reduce `writeBuffer` calls. * * Returns a shared empty array reference when the buffers are identical — * callers must not mutate the returned array. */ export declare function findDirtyFloatRanges(previous: Float32Array, next: Float32Array, mergeGapThreshold?: number): ReadonlyArray<{ start: number; count: number; }>; /** * Creates the WebGPU renderer used by `FragCanvas`. * * @param options - Renderer creation options resolved from material/context state. * @returns Renderer instance with `render` and `destroy`. * @throws {Error} On WebGPU unavailability, shader compilation issues, or runtime setup failures. */ export declare function createRenderer(options: RendererOptions): Promise<Renderer>; //# sourceMappingURL=renderer.d.ts.map