UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

27 lines • 1.27 kB
import { type SceneDef } from '@expofp/renderer'; export declare const DIM_INTENSITY = 0.5; export declare const VENUE_DIM_INTENSITY = 1; export declare const DIM_TRANSITION_MS = 300; export declare const DEFAULT_DIM_EASING: 'cubic'; export type DimmingEasing = 'linear' | 'cubic'; export interface DimmingAnimator { getValue(): number; setTarget(dimmed: boolean, options?: { immediate?: boolean; }): void; stop(): void; } /** * Writes a venue-wide dim onto a scene's root layer, from which it descends to every layer and def * that does not set a `dim` of its own. * * Only the write — the caller commits it through `update`, which is what lets an eased dim call * this on every frame: the "unchanged means no update" guard is what keeps a settled transition * free. * @param scene - The scene to dim, or a falsy value before one exists. * @param value - The dim intensity, `0` to `1`. * @returns Whether the root layer changed and so needs an update. */ export declare function applyVenueDim(scene: SceneDef | null | undefined, value: number): boolean; export declare function createDimmingAnimator(applyValue: (value: number) => void, durationMs?: number, easing?: DimmingEasing): DimmingAnimator; //# sourceMappingURL=dimming.d.ts.map