import type { PreparedIdMaskFrame } from "#render-preparation/mask-frame-artifact"; import type { Detection, DetectionFrame } from "supervision-js-core"; import type { DetectionPickResult } from "supervision-js-core"; import { type InteractionStyle } from "supervision-js-core"; import type { Container as PixiContainer, Filter as PixiFilter, Graphics as PixiGraphics, ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Text as PixiText, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js"; type PixiInteractionMesh = PixiMesh; type ContainerConstructor = new () => PixiContainer; type GraphicsConstructor = new () => PixiGraphics; type TextConstructor = new (options: { text?: string; style?: unknown; }) => PixiText; type ImageSourceConstructor = new (options: { autoGenerateMipmaps?: boolean; dynamic: boolean; height: number; resource: HTMLCanvasElement; scaleMode?: "linear" | "nearest"; width: number; }) => PixiImageSource; type MeshConstructor = new (options: { geometry: PixiMeshGeometry; shader: PixiShader; }) => PixiInteractionMesh; type MeshGeometryConstructor = new (options: { indices: Uint32Array; positions: Float32Array; shrinkBuffersToFit: boolean; topology: "triangle-list"; uvs: Float32Array; }) => PixiMeshGeometry; type ShaderFactory = { from(options: { gl: { fragment: string; vertex: string; }; gpu: { fragment: { entryPoint: string; source: string; }; vertex: { entryPoint: string; source: string; }; }; resources: Record; }): PixiShader; }; type UniformGroupConstructor = new (uniforms: Record" | "vec4"; value: Float32Array; }>) => PixiUniformGroup; export interface PixiInteractionMaskArtifact { readonly frame: PreparedIdMaskFrame; readonly texture: PixiTexture; } export interface PixiInteractionPresentationLayerFrameContext { readonly frame: DetectionFrame | undefined; readonly hoveredPick: DetectionPickResult | null; readonly idMaskArtifact?: PixiInteractionMaskArtifact | null; readonly mediaTime: number; readonly selectedPick: DetectionPickResult | null; readonly selectedPicks?: readonly DetectionPickResult[]; readonly viewportScale?: number; /** Annotation capture pixels per CSS pixel. */ readonly strokePixelRatio?: number; } export interface PixiInteractionPresentationLayer { createDisplay(dimensions: { readonly width: number; readonly height: number; }): PixiContainer; getLabelDisplay(): PixiContainer | null; drawFrame(context: PixiInteractionPresentationLayerFrameContext): void; releaseMaskTexture(texture: PixiTexture): void; setInteractionStyle(interactionStyle: InteractionStyle | null | undefined): void; setBackgroundAntialiasFilter(filter: PixiFilter | null): void; destroy(): void; } export declare function createPixiInteractionPresentationLayer(options: { readonly Container: ContainerConstructor; readonly Graphics: GraphicsConstructor; readonly ImageSource?: ImageSourceConstructor; readonly Mesh?: MeshConstructor; readonly MeshGeometry?: MeshGeometryConstructor; readonly Shader?: ShaderFactory; readonly Text: TextConstructor; readonly UniformGroup?: UniformGroupConstructor; readonly interactionStyle?: InteractionStyle | null; readonly isDetectionVisible?: (detection: Detection) => boolean; }): PixiInteractionPresentationLayer; export {}; //# sourceMappingURL=pixi-interaction-presentation-layer.d.ts.map