import { ConstructorProps, ContextManager, Observable } from '@zcomponent/core'; import * as THREE from 'three'; import { MeshStandardMaterial } from './MeshStandardMaterial'; /** * An extension of the MeshStandardMaterial, providing more advanced physically-based rendering properties: * - Clearcoat: Some materials — like car paints, carbon fiber, and wet surfaces — require a clear, reflective layer on top of another layer that may be irregular or rough. Clearcoat approximates this effect, without the need for a separate transparent surface. * - Physically-based transparency: One limitation of .opacity is that highly transparent materials are less reflective. Physically-based .transmission provides a more realistic option for thin, transparent surfaces like glass. * - Advanced reflectivity: More flexible reflectivity for non-metallic materials. * - Sheen: Can be used for representing cloth and fabric materials. * * As a result of these complex shading features, `MeshPhysicalMaterial` has a higher performance cost, per pixel, than other three.js materials. * Most effects are disabled by default, and add cost as they are enabled. For best results, always specify an environment map when using this material. * Root element: [THREE.MeshPhysicalMaterial](https://threejs.org/docs/index.html#api/en/materials/MeshPhysicalMaterial) * @zcomponent * @zgroup Materials * @zicon material * @ztag three/Material/Mesh/MeshPhysicalMaterial * @zparents three/Object3D/Mesh/** * @zparents three/Object3D/Group/** * @zparents three/MaterialHost/** */ export declare class MeshPhysicalMaterial extends MeshStandardMaterial { element: THREE.MeshPhysicalMaterial; /** * Constructs a new mesh physical material. * @param contextManager - Context manager. * @param props - Properties. */ constructor(contextManager: ContextManager, props: ConstructorProps); /** * The color that white light turns into due to absorption when reaching the attenuation distance. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype color-norm-rgb-linear * @zdefault [1, 1, 1] */ attenuationColor: Observable<[number, number, number], never>; /** * Represents the intensity of the clear coat layer, from 0.0 to 1.0. * * Use clear coat related properties to enable multilayer materials that have a thin translucent layer over the base layer. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0 */ clearcoat: Observable; /** * How much .clearcoatNormalMap affects the clear coat layer, from (0,0) to (1,1) * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @zdefault [1, 1] */ clearcoatNormalScale: Observable<[number, number], never>; /** * Roughness of the clear coat layer, from 0.0 to 1.0. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0 */ clearcoatRoughness: Observable; /** * Index-of-refraction for non-metallic materials, from 1.0 to 2.333 * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @zdefault 1.5 */ ior: Observable; /** * Degree of reflectivity, from 0.0 to 1.0. Corresponds to an index-of-refraction of 1.5. * * * This models the reflectivity of non-metallic materials. * It has no effect when metalness is 1.0 * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0.5 */ reflectivity: Observable; /** * The intensity of the sheen layer, from 0.0 to 1.0 * * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0 */ sheen: Observable; /** * Roughness of the sheen layer, from 0.0 to 1.0 * * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 1 */ sheenRoughness: Observable; /** * * The sheen tint. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype color-norm-rgb-linear * @zdefault [1, 1, 1] */ sheenColor: Observable<[number, number, number], never>; /** * A float that scales the amount of specular reflection for non-metals only. * * When set to zero, the model is effectively Lambertian. From 0.0 to 1.0. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0 */ specularIntensity: Observable; /** * A Color that tints the specular reflection at normal incidence for non-metals only * * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype color-norm-rgb-linear * @zdefault [1, 1, 1] */ specularColor: Observable<[number, number, number], never>; /** * The thickness of the volume beneath the surface. * The value is given in the coordinate space of the mesh. * * If the value is 0 the material is thin-walled. * Otherwise the material is a volume boundary. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @zdefault 0 */ thickness: Observable; /** * Degree of transmission (or optical transparency), from 0.0 to 1.0. * * Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are fully transmissive. * The transmission property can be used to model these materials. * * When transmission is non-zero, opacity should be set to 1. * @zprop * @zgroup MeshPhysicalMaterial * @zgrouppriority 30 * @ztype proportion * @zdefault 0 */ transmission: Observable; }