/** * Material Operations * * Functions for creating, managing, and assigning materials */ import { Material, MaterialData, MaterialShading, MaterialAlpha } from './material'; import { Project } from '../project/project'; import { Mesh } from '../geometry/mesh'; import { MeshFace } from '../geometry/mesh_face'; import { Cube } from '../geometry/cube'; import { CubeFace } from '../geometry/cube_face'; import { Texture } from '../texturing/texture'; /** * Create a new material */ export declare function createMaterial(project: Project, data?: MaterialData): Material; /** * Get material by UUID */ export declare function getMaterial(project: Project, materialUuid: string): Material | null; /** * Get material by index */ export declare function getMaterialByIndex(project: Project, index: number): Material | null; /** * Find material index by UUID */ export declare function findMaterialIndex(project: Project, materialUuid: string): number; /** * Delete material */ export declare function deleteMaterial(project: Project, materialUuid: string): boolean; /** * Update material */ export declare function updateMaterial(project: Project, materialUuid: string, data: Partial): boolean; /** * Assign material to mesh faces */ export declare function assignMaterialToFaces(mesh: Mesh, materialUuid: string, faceKeys?: string[]): number; /** * Assign material to cube faces */ export declare function assignMaterialToCubeFaces(cube: Cube, materialUuid: string, faceDirections?: Array<'north' | 'south' | 'east' | 'west' | 'up' | 'down'>): number; /** * Get faces using a material */ export declare function getFacesUsingMaterial(project: Project, materialUuid: string): Array<{ element: Mesh | Cube; face: MeshFace | CubeFace; key: string; }>; /** * Set material texture */ export declare function setMaterialTexture(project: Project, materialUuid: string, textureUuid: string | null): boolean; /** * Set material shading mode */ export declare function setMaterialShading(project: Project, materialUuid: string, shading: MaterialShading): boolean; /** * Set material alpha mode */ export declare function setMaterialAlpha(project: Project, materialUuid: string, alpha: MaterialAlpha): boolean; /** * Set material emissive */ export declare function setMaterialEmissive(project: Project, materialUuid: string, emissive: boolean): boolean; /** * Set material double-sided */ export declare function setMaterialDoubleSided(project: Project, materialUuid: string, double_sided: boolean): boolean; /** * Duplicate material */ export declare function duplicateMaterial(project: Project, materialUuid: string): Material | null; /** * Get material count */ export declare function getMaterialCount(project: Project): number; /** * Get all materials */ export declare function getAllMaterials(project: Project): Material[]; /** * Find materials using a texture */ export declare function getMaterialsUsingTexture(project: Project, textureUuid: string): Material[]; /** * Create material from texture */ export declare function createMaterialFromTexture(project: Project, texture: Texture | string, name?: string): Material; /** * Assign material to selected faces */ export declare function assignMaterialToSelection(project: Project, materialUuid: string, selection?: { meshes?: Array<{ mesh: Mesh; faces: string[]; }>; cubes?: Array<{ cube: Cube; faces: Array<'north' | 'south' | 'east' | 'west' | 'up' | 'down'>; }>; }): number; //# sourceMappingURL=material_operations.d.ts.map