/** * UV Painting System * * Complete UV painting system that handles: * - 3D model painting (via raycasting) * - 2D UV editor painting * - Brush strokes with undo * - Real-time texture updates * - Layer support * - UV wrapping and edge cases */ import { Texture } from './texture'; import { TextureLayer } from './texture_layer'; import { BrushOptions } from './painter'; import { UVPaintCoordinates } from './uv_raycasting'; import { SeamPaintingOptions } from './uv_seam_clipping'; export interface PaintStrokeOptions extends BrushOptions { texture: Texture; layer?: TextureLayer; element?: any; face?: string | number; uv?: [number, number] | [number, number, number, number]; recordUndo?: boolean; updateRealTime?: boolean; /** * Seam handling options */ seamOptions?: SeamPaintingOptions; } export interface BrushStrokeResult { stroke: any; changedPixels: number; success: boolean; } /** * UV Painting System * Handles all painting operations on textures */ export declare class UVPaintingSystem { private static strokeRecorder; private static currentContext; private static lastPaintPosition; private static paintingActive; /** * Start painting stroke * Called when user starts painting (mouse down) */ static startPaintStroke(coords: UVPaintCoordinates, options: PaintStrokeOptions): BrushStrokeResult; /** * Continue painting stroke * Called when user drags (mouse move) */ static continuePaintStroke(coords: UVPaintCoordinates, options: PaintStrokeOptions): BrushStrokeResult; /** * End painting stroke * Called when user releases mouse */ static endPaintStroke(): any | null; /** * Cancel current stroke */ static cancelPaintStroke(): void; /** * Paint at specific coordinates */ private static paintAt; /** * Update texture in real-time * Framework adapters should override this to update 3D viewport */ static updateTextureRealTime(texture: Texture, layer?: TextureLayer): void; /** * Paint from 3D raycast * Converts raycast hit to paint coordinates and paints */ static paintFromRaycast(hit: any, // RaycastHit from framework adapter options: PaintStrokeOptions): BrushStrokeResult | null; /** * Paint from UV editor (2D) * Direct pixel coordinate painting * * In UV editor mode, seams are ignored - paint anywhere on texture */ static paintFromUVEditor(x: number, y: number, texture: Texture, options: PaintStrokeOptions): BrushStrokeResult; /** * Get current stroke for undo */ static getCurrentStroke(): any | null; /** * Apply undo to a stroke * Restores pixels to their previous state */ static applyUndo(stroke: any, texture: Texture, layer?: TextureLayer): void; } //# sourceMappingURL=uv_painting.d.ts.map