import Material, { MaterialOpts } from './Material'; import { createStandardShader } from './shader/create'; import { Color } from './core/type'; import Texture2D from './Texture2D'; import type TextureCube from './TextureCube'; import type BoundingBox from './math/BoundingBox'; import { UV_PROJECTION_NONE, UV_PROJECTION_SPHERICAL, UV_PROJECTION_TRIPLANAR } from './shader/source/uvprojection.glsl'; declare let standardShader: ReturnType; type MaterialColor = Color | string; export interface StandardMaterialOpts extends Omit { color: MaterialColor; emission: MaterialColor; emissionIntensity: number; roughness: number; metalness: number; alpha: number; alphaTest: boolean; alphaCutoff: number; /** * Scalar multiplier applied to each normal vector of normal texture. * * This value is considered only if a normal texture is specified. */ normalScale: number; doubleSided: boolean; diffuseMap?: Texture2D; normalMap?: Texture2D; roughnessMap?: Texture2D; metalnessMap?: Texture2D; emissiveMap?: Texture2D; environmentMap?: TextureCube; environmentBox?: BoundingBox; /** * BRDF Lookup is generated by clay.util.cubemap.integrateBrdf */ brdfLookup?: Texture2D; ssaoMap?: Texture2D; aoMap?: Texture2D; occlusionMap?: Texture2D; uvProjection: typeof UV_PROJECTION_NONE | typeof UV_PROJECTION_TRIPLANAR | typeof UV_PROJECTION_SPHERICAL; uvRepeat: [number, number]; uvOffset: [number, number]; aoIntensity: number; environmentMapPrefiltered: boolean; linear: boolean; encodeRGBM: boolean; decodeRGBM: boolean; roughnessChannel: number; metalnessChannel: number; } interface StandardMaterial extends StandardMaterialOpts { } /** * Standard material without custom shader. * @example * const mat = new clay.StandardMaterial({ * color: [1, 1, 1], * diffuseMap: diffuseTexture * }); * mat.roughness = 1; */ declare class StandardMaterial extends Material { constructor(opts?: Partial); clone(): StandardMaterial; } export default StandardMaterial;