import { ConstructorProps, ContextManager, Observable } from '@zcomponent/core'; import * as THREE from 'three'; import { Material } from './Material'; /** * A standard physically based material, using Metallic-Roughness workflow. * * * Physically based rendering (PBR) has recently become the standard in many 3D applications, such as Unity, Unreal and 3D Studio Max. * * This approach differs from older approaches in that instead of using approximations for the way in which light interacts with a surface, a physically correct model is used. * The idea is that, instead of tweaking materials to look good under specific lighting, a material can be created that will react 'correctly' under all lighting scenarios. * In practice this gives a more accurate and realistic looking result than the MeshLambertMaterial or MeshPhongMaterial, at the cost of being somewhat more computationally expensive. * MeshStandardMaterial uses per-fragment shading. * * * Note that for best results you should always specify an environment map when using this material. * * Root element: [THREE.MeshStandardMaterial](https://threejs.org/docs/index.html#api/en/materials/MeshStandardMaterial) * * @zcomponent * @zgroup Materials * @zicon material * @ztag three/Material/Mesh/MeshStandardMaterial * @zparents three/Object3D/Mesh/** * @zparents three/Object3D/Group/** * @zparents three/MaterialHost/** */ export declare class MeshStandardMaterial extends Material { element: THREE.MeshStandardMaterial; /** * Constructs a new mesh standard material. * @param contextManager - Context manager. * @param props - Properties. * @param obj - Optional object to wrap. */ constructor(contextManager: ContextManager, props: ConstructorProps, obj?: THREE.MeshStandardMaterial); /** * Color of the material, by default set to white. * * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype color-norm-rgb-linear * @zdefault [1, 1, 1] */ color: Observable<[number, number, number], never>; /** * Intensity of the ambient occlusion effect. * * Zero is no occlusion effect. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault 1 */ aoMapIntensity: Observable; /** * How much the bump map affects the material. * * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype proportion * @zdefault 1 */ bumpScale: Observable; /** * How much the displacement map affects the mesh (where black is no displacement,and white is maximum displacement). * * Without a displacement map set, this value is not applied. * * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault 1 */ displacementScale: Observable; /** * The offset of the displacement map's values on the mesh's vertices. * * Without a displacement map set, this value is not applied. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype proportion * @zdefault 0 */ displacementBias: Observable; /** * Emissive (light) color of the material, essentially a solid color unaffected by other lighting. * * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype color-norm-rgb-linear * @zdefault [0, 0, 0] */ emissive: Observable<[number, number, number], never>; /** * Intensity of the emissive light. Modulates the emissive color. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault 1 */ emissiveIntensity: Observable; /** * Scales the effect of the environment map by multiplying its color. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault 1 */ envMapIntensity: Observable; /** * Define whether the material is rendered with flat shading. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault false */ flatShading: Observable; /** * Whether the material is affected by fog. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault true */ fog: Observable; /** * Intensity of the baked light. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault 1 */ lightMapIntensity: Observable; /** * How much the material is like a metal. * * Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. * * A value between 0.0 and 1.0 could be used for a rusty metal look. * If metalnessMap is also provided, both values are multiplied. * * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype proportion * @zdefault 0 */ metalness: Observable; /** @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault TangentSpaceNormalMap */ normalMapType: Observable; /** * The type of normal map. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault [1, 1] */ normalScale: Observable<[number, number], never>; /** * How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. * * If roughnessMap is also provided, both values are multiplied. * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @ztype proportion * @zdefault 1 */ roughness: Observable; /** * Render geometry as wireframe (i.e. render as flat polygons). * @zprop * @zgroup MeshStandardMaterial * @zgrouppriority 20 * @zdefault false */ wireframe: Observable; } /** * The normal map type. */ export declare enum NormalMapType { TangentSpaceNormalMap = "TangentSpaceNormalMap", ObjectSpaceNormalMap = "ObjectSpaceNormalMap" } export declare function translateNormalMapType(v: NormalMapType): THREE.NormalMapTypes;