//#region src/elements/EFMotionBlur.d.ts /** * `` applies motion blur to its child for two types of motion: * * **Translation** — N `feOffset` copies along the velocity vector, Gaussian-blended. * * **Spiral** (rotation + zoom combined) — N displaced copies using a single * spiral vector map that encodes the weighted sum of tangential (rotation) and * radial (zoom) components. Because tangent ⊥ radial with equal magnitude, * the combined map always has magnitude r/maxR regardless of the rot/zoom ratio. * One pass correctly captures simultaneous rotation and scaling as a spiral * smear rather than the generic blur that sequential stages produce. */ declare const _EFMotionBlurBase: { new (): HTMLElement; prototype: HTMLElement; }; declare class EFMotionBlur extends _EFMotionBlurBase { static observedAttributes: string[]; /** Controls filter primitive density. "preview" for real-time playback, "render" for export. */ static renderQuality: "preview" | "render"; private _outer; private _filterEl; private _svg; private _filterId; private _spiralMapURI; private _lastMapW; private _lastMapH; private _lastSpiralAngle; private _rafId; private _prevCx; private _prevCy; private _prevAngle; private _prevScale; private _filterNode; private _transOffsets; private _spiralDisplacements; private _spiralFeImage; private _spiralBlur; private _lastStepConfig; /** Translation blur: pixel displacement in X (screen space). */ _computedDx: number; /** Translation blur: pixel displacement in Y (screen space). */ _computedDy: number; _computedAngle: number; _computedDirectionalAmount: number; /** Signed rotation arc displacement (px at half-diagonal). Negative = CW, positive = CCW. */ _computedRotAmount: number; /** Absolute rotation delta in degrees (for step count calculation). */ _computedRotDeg: number; _computedIsotropicAmount: number; _hasExplicitAngle: boolean; _hasExplicitAmount: boolean; get _computedAmount(): number; set _computedAmount(v: number); connectedCallback(): void; disconnectedCallback(): void; private _startRafIfStandalone; /** * Standalone blur measurement: compares element position and transform between * consecutive rAF frames. Does not seek animations — safe for running CSS animations. */ private _sampleStandalone; private _stopRaf; attributeChangedCallback(name: string, _old: string | null, newValue: string | null): void; get angle(): number; set angle(v: number); get amount(): number; set amount(v: number); get shutterAngle(): number; set shutterAngle(v: number); get fps(): number; set fps(v: number); get sensitivity(): number; set sensitivity(v: number); get threshold(): number; set threshold(v: number); get shutterMs(): number; /** * One-time DOM setup. Creates the SVG filter host and two wrapper divs * (_outer for the SVG definition, _filterEl for the filtered content). * The SVG filter is rebuilt dynamically in _update(). */ private _inject; /** * Rebuilds wrapper transforms and the SVG filter. Called on attribute changes * and after each sample(). * * The SVG contains up to two filter stages: * 1. feOffset×N — directional (translation) blur * 2. Spiral (feImage + feDisplacementMap×N + feComposite blend + feGaussianBlur) * — combined rotation + zoom in one pass via a spiral vector map. * * On first call (or when step counts change), builds the full SVG filter DOM. * On subsequent calls, updates only the attributes that change per frame. */ private _update; /** * Refreshes the serialization cache on _outer. The serializer reads this * instead of calling XMLSerializer on the SVG defs, which is important * when rotation/zoom displacement maps embed large base64 data URIs. */ private _refreshSerializationCache; /** * Builds the full SVG filter DOM tree. Called once when step configuration changes. * Stores references to mutable elements for fast per-frame attribute updates. */ private _buildFilterDOM; /** * Generates or refreshes the spiral displacement map. * Cached by element size and spiral angle (quantized to ~5°). * The feImage href is updated in the fast path when the map URI changes. */ private _ensureMaps; /** * Samples the child's current position and transform, computing blur amounts. * Called by `updateAnimations` after all animation times are settled. */ sample(_timestamp?: number): void; /** * Deterministic two-seek measurement. Seeks all animations back by shutterMs, * reads positions and transforms, restores. Returns null when no seekable * animations exist or currentTime < shutterMs. */ private _computeDeterministicTransform; /** * Converts measured deltas to blur amounts and calls _update() when changed. * * Translation → directional box blur amount + angle. * Rotation → arc displacement amount (signed: + = CCW, − = CW). * Arc length at half-diagonal radius: R × |Δθ_rad|. * Stored signed so the displacement map is applied in the * correct tangential direction. * Scale → radial displacement amount: |Δscale| × half-diagonal. */ private _applyTransform; } declare global { interface HTMLElementTagNameMap { "ef-motionblur": EFMotionBlur; } } //#endregion export { EFMotionBlur }; //# sourceMappingURL=EFMotionBlur.d.ts.map