import { CBARObject } from "./CBARObject"; import * as THREE from "three"; import { CBARTexture } from "./CBARTexture"; import { Texture } from "three"; import { CBARCollection } from "../CBARCollection"; import { CBARContext } from "../CBARContext"; import { ImageCrop } from "cambrian-base"; import { UniformedDictionary } from "./CBARShaderFunctions"; import { iCBARMaskedMaterial } from "./iCBARMaskedMaterial"; export declare enum CBARTextureType { albedo = "albedo", normals = "normals", bump = "bump", roughness = "roughness", lightMap = "lightMap", alpha = "alpha", emissive = "emissive", displacement = "displacement", metalness = "metalness", environment = "environment" } export declare enum CBARMaterialProperty { color = "color", opacity = "opacity", roughnessValue = "roughnessValue", metalnessValue = "metalnessValue", bumpScaleValue = "bumpScaleValue", lightMapIntensity = "lightMapIntensity", aoMapIntensity = "aoMapIntensity", emissiveIntensity = "emissiveIntensity", displacementScale = "displacementScale", displacementBias = "displacementBias", envMapIntensity = "envMapIntensity" } export interface CBARMaterialProperties { ppi?: number; ppcm?: number; scale?: number; mirrored?: boolean; mirroredX?: boolean; mirroredY?: boolean; repeat?: boolean; crop?: ImageCrop; textures?: Record; properties?: Record; lightingFactor?: number; smoothStep?: number; lightingOffset?: number; } export declare type ShaderUniform = { type: string; value: any; }; export declare abstract class CBARMaterial extends CBARObject> implements iCBARMaskedMaterial, CBARCollection { protected constructor(context: CBARContext, reference?: CBARMaterial); readonly uniforms: UniformedDictionary; protected abstract cloneObject(): CBARMaterial; protected _material?: THREE.Material; wrappingX: THREE.Wrapping; wrappingY: THREE.Wrapping; abstract get threeMaterial(): THREE.Material; setThreeMaterial(value: THREE.Material): void; protected get isPaint(): boolean; private _shader?; protected onBeforeCompileCallback(shader: THREE.Shader): void; protected setTextureMap(texture: CBARTexture): Texture | null; private _materialProperties; getMaterialProperty(name: CBARMaterialProperty): any; setMaterialProperty(name: CBARMaterialProperty, value: any): void; getUniform(name: string): any; setUniform(name: string, value: any): any; get lightingFactor(): number; set lightingFactor(value: number); get lightingOffset(): number; set lightingOffset(value: number); get smoothStep(): number; set smoothStep(value: number); get maskIndex(): number; set maskIndex(value: number); get maskBlendDistance(): number; set maskBlendDistance(value: number); get maskCrop(): THREE.Vector4; set maskCrop(value: THREE.Vector4); ppcm: number; scale: number; get ppi(): number; set ppi(value: number); get pixelsPerMeter(): number; get imageDimensions(): THREE.Vector2 | undefined; get physicalDimensions(): THREE.Vector2 | undefined; get mirroredX(): boolean; set mirroredX(value: boolean); get mirroredY(): boolean; set mirroredY(value: boolean); set(type: CBARTextureType, texture: CBARTexture | undefined): void; private _textures; get values(): Record; add(asset: CBARTexture): void; containsKey(key: string): boolean; remove(asset: CBARTexture): void; length(): number; clearAll(): void; first(): CBARTexture | undefined; last(): CBARTexture | undefined; all(): CBARTexture[]; load(basePath: string | undefined, json: CBARMaterialProperties): Promise>; loadTexture(path: string, type: CBARTextureType, basePath?: string, crop?: ImageCrop): Promise; data(): any; get description(): string; clone(): CBARMaterial; unload(): void; }