UNPKG

wave-roll

Version:

JavaScript Library for Comparative MIDI Piano-Roll Visualization

52 lines 1.5 kB
/** * Texture caching system for piano roll rendering */ import * as PIXI from 'pixi.js'; /** * Centralized texture cache manager */ export declare class TextureCache { private static caches; /** * Get or create a texture from cache */ static getTexture(category: string, key: string, generator: () => PIXI.Texture): PIXI.Texture; /** * Check if a texture exists in cache */ static hasTexture(category: string, key: string): boolean; /** * Remove a specific texture from cache */ static removeTexture(category: string, key: string): void; /** * Clear a specific category cache */ static clearCategory(category: string): void; /** * Clear all caches */ static clearAll(): void; /** * Get all textures in a category */ static getCategoryTextures(category: string): Map<string, PIXI.Texture> | undefined; /** * Get cache statistics */ static getStats(): { categories: number; totalTextures: number; }; } /** * Create a category-specific texture cache helper */ export declare function createTextureCacheHelper(category: string): { get: (key: string, generator: () => PIXI.Texture) => PIXI.Texture<PIXI.TextureSource<any>>; has: (key: string) => boolean; remove: (key: string) => void; clear: () => void; getAll: () => Map<string, PIXI.Texture<PIXI.TextureSource<any>>> | undefined; }; //# sourceMappingURL=texture-cache.d.ts.map