/** * UV Seam Clipping * * Handles UV seam detection and clipping during painting. * Prevents painting across seams and ensures brush strokes stay within face boundaries. * * Implements Blockbench's exact seam handling: * 1. Paint only the UV island you hit * 2. Clip brush to UV triangle boundaries * 3. Handle overlapping UVs (mirrored textures) * 4. Support connected painting mode * 5. UV editor painting ignores seams */ import { MeshFace } from '../geometry/mesh_face'; import { CubeFace } from '../geometry/cube_face'; /** * Check if a pixel is inside a face's UV triangle * * For cubes: Check if pixel is inside UV rectangle * For meshes: Check if pixel is inside UV triangle using barycentric coordinates */ export declare function isPixelInFaceUVBounds(pixelX: number, pixelY: number, face: MeshFace | CubeFace, element: any, textureWidth: number, textureHeight: number): boolean; /** * Get all faces that share the same UV pixel * * Used for handling overlapping UVs (mirrored textures) * If two islands share the same texture pixels, both get painted */ export declare function getFacesSharingUVPixel(pixelX: number, pixelY: number, element: any, textureWidth: number, textureHeight: number): Array<{ face: MeshFace | CubeFace; faceKey: string | number; }>; /** * Check if two faces are in the same UV island * * Used for connected painting mode */ export declare function areFacesInSameUVIsland(face1: MeshFace | CubeFace, face2: MeshFace | CubeFace, element: any): boolean; /** * Painting options for seam handling */ export interface SeamPaintingOptions { /** * Paint only the hit island (default: true) * If false, paint across seams (connected painting mode) */ clipToIsland?: boolean; /** * Paint overlapping UVs (mirrored textures) * If true, paint all faces that share the same UV pixel */ paintOverlappingUVs?: boolean; /** * Ignore seams (UV editor mode) * If true, paint anywhere on texture regardless of seams */ ignoreSeams?: boolean; } /** * Check if a pixel should be painted based on seam handling rules */ export declare function shouldPaintPixel(pixelX: number, pixelY: number, hitFace: MeshFace | CubeFace, hitElement: any, textureWidth: number, textureHeight: number, options?: SeamPaintingOptions): boolean; //# sourceMappingURL=uv_seam_clipping.d.ts.map