MeshPhysicalMaterial class
An extension of the MeshStandardMaterial, providing more advanced physically-based rendering properties:
- Anisotropy: Ability to represent the anisotropic property of materials as observable with brushed metals.
- 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.
- Iridescence: Allows to render the effect where hue varies depending on the viewing angle and illumination angle. This can be seen on soap bubbles, oil films, or on the wings of many insects.
- 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.
- Inheritance
-
- Object
- Material
- MeshStandardMaterial
- MeshPhysicalMaterial
Constructors
-
MeshPhysicalMaterial([Map<
MaterialProperty, dynamic> ? parameters]) -
parameters
- (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material and MeshStandardMaterial) can be passed in here. -
MeshPhysicalMaterial.fromMap([Map<
String, dynamic> ? parameters])
Properties
- alphaMap ↔ Texture?
-
getter/setter pairinherited
- alphaTest ↔ double
-
getter/setter pairinherited
- alphaToCoverage ↔ bool
-
getter/setter pairinherited
- aoMap ↔ Texture?
-
getter/setter pairinherited
- aoMapIntensity ↔ double?
-
getter/setter pairinherited
- attenuationColor ↔ Color?
-
getter/setter pairinherited
- attenuationDistance ↔ double?
-
getter/setter pairinherited
- blendDst ↔ int
-
getter/setter pairinherited
- blendDstAlpha ↔ int?
-
getter/setter pairinherited
- blendEquation ↔ int
-
getter/setter pairinherited
- blendEquationAlpha ↔ int?
-
getter/setter pairinherited
- blending ↔ int
-
getter/setter pairinherited
- blendSrc ↔ int
-
getter/setter pairinherited
- blendSrcAlpha ↔ int?
-
getter/setter pairinherited
- bumpMap ↔ Texture?
-
getter/setter pairinherited
- bumpScale ↔ double?
-
getter/setter pairinherited
- clearcoat ↔ double
-
getter/setter pairinherited
- clearcoatMap ↔ Texture?
-
getter/setter pairinherited
- clearcoatNormalMap ↔ Texture?
-
getter/setter pairinherited
- clearcoatNormalScale ↔ Vector2?
-
getter/setter pairinherited
- clearcoatRoughness ↔ double?
-
getter/setter pairinherited
- clearcoatRoughnessMap ↔ Texture?
-
getter/setter pairinherited
- clipIntersection ↔ bool
-
getter/setter pairinherited
- clipping ↔ bool?
-
getter/setter pairinherited
-
clippingPlanes
↔ List<
Plane> ? -
getter/setter pairinherited
- clipShadows ↔ bool
-
getter/setter pairinherited
- color ↔ Color
-
getter/setter pairinherited
- colorWrite ↔ bool
-
getter/setter pairinherited
- combine ↔ int?
-
getter/setter pairinherited
- customProgramCacheKey ↔ Function
-
In case onBeforeCompile is used, this callback can be used to identify
values of settings used in onBeforeCompile, so three.js can reuse a cached
shader or recompile the shader for this material as needed.
getter/setter pairinherited
- dashSize ↔ double?
-
getter/setter pairinherited
-
defaultAttributeValues
↔ Map<
String, dynamic> ? -
getter/setter pairinherited
-
defines
↔ Map<
String, dynamic> ? -
getter/setter pairinherited
- depthFunc ↔ int
-
getter/setter pairinherited
- depthPacking ↔ int?
-
getter/setter pairinherited
- depthTest ↔ bool
-
getter/setter pairinherited
- depthWrite ↔ bool
-
getter/setter pairinherited
- displacementBias ↔ double?
-
getter/setter pairinherited
- displacementMap ↔ Texture?
-
getter/setter pairinherited
- displacementScale ↔ double?
-
getter/setter pairinherited
- dithering ↔ bool
-
getter/setter pairinherited
- emissive ↔ Color?
-
getter/setter pairinherited
- emissiveIntensity ↔ double
-
getter/setter pairinherited
- emissiveMap ↔ Texture?
-
getter/setter pairinherited
- envMap ↔ Texture?
-
getter/setter pairinherited
- envMapIntensity ↔ double?
-
getter/setter pairinherited
-
extensions
↔ Map<
String, dynamic> ? -
getter/setter pairinherited
-
extra
↔ Map<
String, dynamic> -
getter/setter pairinherited
- flatShading ↔ bool
-
getter/setter pairinherited
- fog ↔ bool
-
getter/setter pairinherited
- fragmentShader ↔ String?
-
getter/setter pairinherited
- gapSize ↔ double?
-
getter/setter pairinherited
- glslVersion ↔ String?
-
getter/setter pairinherited
- gradientMap ↔ Texture?
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
getter/setter pairinherited
- index0AttributeName ↔ String?
-
getter/setter pairinherited
- instanced ↔ bool
-
getter/setter pairinherited
- ior ↔ double?
-
getter/setter pairinherited
- isMaterial ↔ bool
-
getter/setter pairinherited
- lightMap ↔ Texture?
-
getter/setter pairinherited
- lightMapIntensity ↔ double?
-
getter/setter pairinherited
- lights ↔ bool?
-
getter/setter pairinherited
- linecap ↔ String?
-
getter/setter pairinherited
- linejoin ↔ String?
-
getter/setter pairinherited
- linewidth ↔ double?
-
getter/setter pairinherited
- map ↔ Texture?
-
getter/setter pairinherited
- matcap ↔ Texture?
-
getter/setter pairinherited
- metalness ↔ double
-
getter/setter pairinherited
- metalnessMap ↔ Texture?
-
getter/setter pairinherited
- metalnessNode ↔ dynamic
-
getter/setter pairinherited
- name ↔ String
-
getter/setter pairinherited
- needsUpdate ← bool
-
no getterinherited
- normalMap ↔ Texture?
-
getter/setter pairinherited
- normalMapType ↔ int?
-
getter/setter pairinherited
- normalNode ↔ dynamic
-
getter/setter pairinherited
- normalScale ↔ Vector2?
-
getter/setter pairinherited
- onBeforeCompile ↔ Function?
-
An optional callback that is executed immediately before the shader
program is compiled. This function is called with the shader source code
as a parameter. Useful for the modification of built-in materials.
getter/setter pairinherited
- onBeforeRender ↔ Function?
-
getter/setter pairinherited
- opacity ↔ double
-
getter/setter pairinherited
- polygonOffset ↔ bool
-
getter/setter pairinherited
- polygonOffsetFactor ↔ double
-
getter/setter pairinherited
- polygonOffsetUnits ↔ double
-
getter/setter pairinherited
- precision ↔ String?
-
getter/setter pairinherited
- premultipliedAlpha ↔ bool
-
getter/setter pairinherited
- reflectivity ↔ double
-
getter/setter pairoverride
- refractionRatio ↔ double?
-
getter/setter pairinherited
- rotation ↔ double
-
getter/setter pairinherited
- roughness ↔ double
-
getter/setter pairinherited
- roughnessMap ↔ Texture?
-
getter/setter pairinherited
- roughnessNode ↔ dynamic
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ double?
-
getter/setter pairinherited
- shaderID ↔ String
-
getter/setter pairinherited
- shaderid ↔ String?
-
getter/setter pairinherited
- shadowSide ↔ int?
-
getter/setter pairinherited
- sheen ↔ double
-
getter/setter pairinherited
- sheenColor ↔ Color?
-
getter/setter pairinherited
- sheenColorMap ↔ Texture?
-
getter/setter pairinherited
- sheenRoughness ↔ double
-
getter/setter pairinherited
- sheenRoughnessMap ↔ Texture?
-
getter/setter pairinherited
- sheenTintMap ↔ Texture?
-
getter/setter pairinherited
- shininess ↔ double?
-
getter/setter pairinherited
- side ↔ int
-
getter/setter pairinherited
- size ↔ double?
-
getter/setter pairinherited
- sizeAttenuation ↔ bool
-
getter/setter pairinherited
- specular ↔ Color?
-
getter/setter pairinherited
- specularColor ↔ Color?
-
getter/setter pairinherited
- specularColorMap ↔ Texture?
-
getter/setter pairinherited
- specularIntensity ↔ double?
-
getter/setter pairinherited
- specularIntensityMap ↔ Texture?
-
getter/setter pairinherited
- specularMap ↔ Texture?
-
getter/setter pairinherited
- stencilFail ↔ int
-
getter/setter pairinherited
- stencilFunc ↔ int
-
getter/setter pairinherited
- stencilFuncMask ↔ int
-
getter/setter pairinherited
- stencilRef ↔ int
-
getter/setter pairinherited
- stencilWrite ↔ bool
-
getter/setter pairinherited
- stencilWriteMask ↔ int
-
getter/setter pairinherited
- stencilZFail ↔ int
-
getter/setter pairinherited
- stencilZPass ↔ int
-
getter/setter pairinherited
- thickness ↔ double?
-
getter/setter pairinherited
- thicknessMap ↔ Texture?
-
getter/setter pairinherited
- toneMapped ↔ bool
-
getter/setter pairinherited
- transmission ↔ double
-
getter/setter pairinherited
- transmissionMap ↔ Texture?
-
getter/setter pairinherited
- transparent ↔ bool
-
getter/setter pairinherited
- type ↔ String
-
getter/setter pairinherited
-
uniforms
↔ Map<
String, dynamic> -
getter/setter pairinherited
- uniformsNeedUpdate ↔ bool?
-
getter/setter pairinherited
-
userData
↔ Map<
String, dynamic> -
getter/setter pairinherited
- uuid ↔ String
-
getter/setter pairinherited
- version ↔ int
-
getter/setter pairinherited
- vertexColors ↔ bool
-
getter/setter pairinherited
- vertexShader ↔ String?
-
getter/setter pairinherited
- vertexTangents ↔ bool
-
getter/setter pairinherited
- visible ↔ bool
-
getter/setter pairinherited
- wireframe ↔ bool
-
getter/setter pairinherited
- wireframeLinecap ↔ String?
-
getter/setter pairinherited
- wireframeLinejoin ↔ String?
-
getter/setter pairinherited
- wireframeLinewidth ↔ double?
-
getter/setter pairinherited
Methods
-
addEventListener(
String type, Function listener) → void -
type
- The type of event to listen to.inherited -
clearListeners(
) → void -
Remove all Listeners.
inherited
-
clone(
) → MeshPhysicalMaterial -
Return a new material with the same parameters as this material.
override
-
copy(
Material source) → MeshPhysicalMaterial -
Copy the parameters from the passed material into this material.
override
-
dispatchEvent(
Event event) → void -
event
- The event that gets fired.inherited -
dispose(
) → void -
Frees the GPU-related resources allocated by this instance. Call this
method whenever this instance is no longer used in your app.
inherited
-
getProperty(
String propertyName) → Object? -
inherited
-
hasEventListener(
String type, Function listener) → bool -
type
- The type of event to listen to.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBuild(
dynamic shaderobject, dynamic renderer) → void -
inherited
-
removeEventListener(
String type, Function listener) → void -
type - The type of the listener that gets removed.
inherited
-
setProperty(
String propertyName, dynamic value) → void -
inherited
-
setValue(
MaterialProperty type, dynamic newValue) → void -
type
- the parameter to change.inherited -
setValueFromString(
String key, dynamic newValue) → void -
key
- String values of the parameter to change.inherited -
setValues(
Map< MaterialProperty, dynamic> ? values) → void -
values
- a container with parameters.inherited -
setValuesFromString(
Map< String, dynamic> ? values) → void -
inherited
-
toJson(
{Object3dMeta? meta}) → Map< String, dynamic> -
meta -- object containing metadata such as textures or images for the
material.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator []=(
String key, dynamic value) → void -
inherited