import * as PIXI from 'pixi.js-legacy'; export type TEXTURE_CACHE_KEYS = 'headers' | 'items' | 'chars' | 'graphics' | 'descriptions' | 'masks' | 'texts' | 'rects'; export type RenderTextureCache = Record; export type TextureCache = Record; export type ContainerCache = Record; export type GraphicsCache = Record; export type TooltipsCache = PIXI.Container; export type TextureCaches = { headers: ContainerCache; items: ContainerCache; chars: TextureCache; graphics: RenderTextureCache; descriptions: any; masks: GraphicsCache; texts: RenderTextureCache; rects: RenderTextureCache; }; export type Caches = { clearTextureCaches: () => void; clearItemTextureCaches: () => void; addTextureToCache: (cacheKey: keyof TextureCaches, key: string, texture: PIXI.RenderTexture | PIXI.Texture | PIXI.Container | PIXI.Graphics) => void; getTextureFromCache: (cacheKey: keyof TextureCaches, key: string) => PIXI.RenderTexture | PIXI.Texture | PIXI.Container | PIXI.Graphics; }; /** * Cache of all textures and texts that are created by other rendering hooks. * The cache will keep these between renderes. This makes it possible to reuse similar items and text. * Making the rendering of the garden alot faster. * * This hook is used by the Garden and is not intended to be used or implemented * outside the Garden component. */ declare const useTextureCaches: () => Caches; export default useTextureCaches;