import { OutlinerElement, OutlinerElementData } from './outliner_element'; import { MeshFace } from './mesh_face'; import type { MeshFaceData } from './mesh_face'; import { Vector3 } from '../modeling/transform'; export interface MeshData extends OutlinerElementData { vertices?: Record | Vector3[]; faces?: Record; seams?: Record; shading?: 'flat' | 'smooth'; visibility?: boolean; color?: number; armature?: string; origin?: [number, number, number]; rotation?: [number, number, number]; } export interface MeshSelection { vertices: string[]; edges: Array<[string, string]>; faces: string[]; } export declare class Mesh extends OutlinerElement { private _vertices; private _faces; private _seams; shading: 'flat' | 'smooth'; visibility: boolean; color: number; armature?: string; constructor(data?: MeshData, uuid?: string); get vertices(): Record; get faces(): Record; get seams(): Record; /** * Get position (alias for origin) */ get position(): Vector3; /** * Get list of all vertices as array */ get vertice_list(): Vector3[]; /** * Get selected vertices from mesh selection */ getSelectedVertices(make?: boolean, meshSelection?: Record): string[]; /** * Get selected edges from mesh selection */ getSelectedEdges(make?: boolean, meshSelection?: Record): Array<[string, string]>; /** * Get selected faces from mesh selection */ getSelectedFaces(make?: boolean, meshSelection?: Record): string[]; addVertices(...vectors: Vector3[]): string[]; addFaces(...faces: MeshFace[]): string[]; /** * Remove vertex */ removeVertex(vkey: string): boolean; /** * Remove face */ removeFace(fkey: string): boolean; /** * Set seam marker (legacy method - not used by Blockbench's algorithm) * * NOTE: Blockbench does NOT store seams explicitly. * Seams are detected implicitly by comparing UVs of shared edges. * This method exists for backward compatibility but is not used * by the core seam detection algorithm (see `isUVSeam()` in uv_unwrapping.ts). * * @deprecated Use `isUVSeam()` for seam detection instead */ setSeam(edge: [string, string], value: any): void; /** * Get seam marker (legacy method - not used by Blockbench's algorithm) * * NOTE: Blockbench does NOT store seams explicitly. * Seams are detected implicitly by comparing UVs of shared edges. * This method exists for backward compatibility but is not used * by the core seam detection algorithm (see `isUVSeam()` in uv_unwrapping.ts). * * @deprecated Use `isUVSeam()` for seam detection instead */ getSeam(edge: [string, string]): any; /** * Get world center (accounting for mesh selection) */ getWorldCenter(ignore_mesh_selection?: boolean, meshSelection?: Record): Vector3; getCenter(global?: boolean): Vector3; /** * Get mesh size (with optional axis and selection_only) */ getSize(axis?: 0 | 1 | 2, selection_only?: boolean, meshSelection?: Record): number | [number, number, number]; /** * Get armature (parent armature) */ getArmature(): any; extend(data: MeshData): this; getSaveCopy(): any; getUndoCopy(aspects?: { uv_only?: boolean; }): any; /** * Iterate over all faces */ forAllFaces(callback: (face: MeshFace, key: string) => void): void; /** * Calculate normals for smooth shading */ calculateNormals(): Record; } //# sourceMappingURL=mesh.d.ts.map