UNPKG

kinetic-slider

Version:

A WebGL-powered kinetic slider component using PIXI.js

26 lines (25 loc) 1.03 kB
import { type RefObject } from 'react'; import ResourceManager from '../managers/ResourceManager'; import { type PixiRefs } from '../types'; interface UsePixiAppResult { pixiRefs: PixiRefs; isInitialized: boolean; isInitializing: boolean; loadingProgress: { isLoading: boolean; progress: number; assetsLoaded: number; assetsTotal: number; }; } /** * Custom hook to initialize and manage a Pixi Application with comprehensive optimizations * * @param sliderRef - Reference to the slider DOM element * @param images - Array of image URLs to preload * @param displacementImages - Array of displacement image URLs to preload * @param resourceManager - Optional ResourceManager instance for resource tracking * @returns Object containing PixiRefs and initialization status */ export declare const usePixiApp: (sliderRef: RefObject<HTMLDivElement | null>, images?: string[], displacementImages?: string[], resourceManager?: ResourceManager | null) => UsePixiAppResult; export {};