Material class
Abstract base class for materials.
Materials describe the appearance of page:Object objects
. They are
defined in a (mostly) renderer-independent way, so you don't have to
rewrite materials if you decide to use a different renderer.
The following properties and methods are inherited by all other material types (although they may have different defaults).
- Mixed-in types
- Implementers
Properties
- alphaMap ↔ Texture?
-
getter/setter pair
- alphaTest ↔ double
-
getter/setter pair
- alphaToCoverage ↔ bool
-
getter/setter pair
- aoMap ↔ Texture?
-
getter/setter pair
- aoMapIntensity ↔ double?
-
getter/setter pair
- attenuationColor ↔ Color?
-
getter/setter pair
- attenuationDistance ↔ double?
-
getter/setter pair
- blendDst ↔ int
-
getter/setter pair
- blendDstAlpha ↔ int?
-
getter/setter pair
- blendEquation ↔ int
-
getter/setter pair
- blendEquationAlpha ↔ int?
-
getter/setter pair
- blending ↔ int
-
getter/setter pair
- blendSrc ↔ int
-
getter/setter pair
- blendSrcAlpha ↔ int?
-
getter/setter pair
- bumpMap ↔ Texture?
-
getter/setter pair
- bumpScale ↔ double?
-
getter/setter pair
- clearcoat ↔ double
-
getter/setter pair
- clearcoatMap ↔ Texture?
-
getter/setter pair
- clearcoatNormalMap ↔ Texture?
-
getter/setter pair
- clearcoatNormalScale ↔ Vector2?
-
getter/setter pair
- clearcoatRoughness ↔ double?
-
getter/setter pair
- clearcoatRoughnessMap ↔ Texture?
-
getter/setter pair
- clipIntersection ↔ bool
-
getter/setter pair
- clipping ↔ bool?
-
getter/setter pair
-
clippingPlanes
↔ List<
Plane> ? -
getter/setter pair
- clipShadows ↔ bool
-
getter/setter pair
- color ↔ Color
-
getter/setter pair
- colorWrite ↔ bool
-
getter/setter pair
- combine ↔ int?
-
getter/setter pair
- 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 pair
- dashSize ↔ double?
-
getter/setter pair
-
defaultAttributeValues
↔ Map<
String, dynamic> ? -
getter/setter pair
-
defines
↔ Map<
String, dynamic> ? -
getter/setter pair
- depthFunc ↔ int
-
getter/setter pair
- depthPacking ↔ int?
-
getter/setter pair
- depthTest ↔ bool
-
getter/setter pair
- depthWrite ↔ bool
-
getter/setter pair
- displacementBias ↔ double?
-
getter/setter pair
- displacementMap ↔ Texture?
-
getter/setter pair
- displacementScale ↔ double?
-
getter/setter pair
- dithering ↔ bool
-
getter/setter pair
- emissive ↔ Color?
-
getter/setter pair
- emissiveIntensity ↔ double
-
getter/setter pair
- emissiveMap ↔ Texture?
-
getter/setter pair
- envMap ↔ Texture?
-
getter/setter pair
- envMapIntensity ↔ double?
-
getter/setter pair
-
extensions
↔ Map<
String, dynamic> ? -
getter/setter pair
-
extra
↔ Map<
String, dynamic> -
getter/setter pair
- flatShading ↔ bool
-
getter/setter pair
- fog ↔ bool
-
getter/setter pair
- fragmentShader ↔ String?
-
getter/setter pair
- gapSize ↔ double?
-
getter/setter pair
- glslVersion ↔ String?
-
getter/setter pair
- gradientMap ↔ Texture?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
getter/setter pair
- index0AttributeName ↔ String?
-
getter/setter pair
- instanced ↔ bool
-
getter/setter pair
- ior ↔ double?
-
getter/setter pair
- isMaterial ↔ bool
-
getter/setter pair
- lightMap ↔ Texture?
-
getter/setter pair
- lightMapIntensity ↔ double?
-
getter/setter pair
- lights ↔ bool?
-
getter/setter pair
- linecap ↔ String?
-
getter/setter pair
- linejoin ↔ String?
-
getter/setter pair
- linewidth ↔ double?
-
getter/setter pair
- map ↔ Texture?
-
getter/setter pair
- matcap ↔ Texture?
-
getter/setter pair
- metalness ↔ double
-
getter/setter pair
- metalnessMap ↔ Texture?
-
getter/setter pair
- metalnessNode ↔ dynamic
-
getter/setter pair
- name ↔ String
-
getter/setter pair
- needsUpdate ← bool
-
no getter
- normalMap ↔ Texture?
-
getter/setter pair
- normalMapType ↔ int?
-
getter/setter pair
- normalNode ↔ dynamic
-
getter/setter pair
- normalScale ↔ Vector2?
-
getter/setter pair
- 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 pair
- onBeforeRender ↔ Function?
-
getter/setter pair
- opacity ↔ double
-
getter/setter pair
- polygonOffset ↔ bool
-
getter/setter pair
- polygonOffsetFactor ↔ double
-
getter/setter pair
- polygonOffsetUnits ↔ double
-
getter/setter pair
- precision ↔ String?
-
getter/setter pair
- premultipliedAlpha ↔ bool
-
getter/setter pair
- reflectivity ↔ double?
-
getter/setter pair
- refractionRatio ↔ double?
-
getter/setter pair
- rotation ↔ double
-
getter/setter pair
- roughness ↔ double
-
getter/setter pair
- roughnessMap ↔ Texture?
-
getter/setter pair
- roughnessNode ↔ dynamic
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ double?
-
getter/setter pair
- shaderID ↔ String
-
getter/setter pair
- shaderid ↔ String?
-
getter/setter pair
- shadowSide ↔ int?
-
getter/setter pair
- sheen ↔ double
-
getter/setter pair
- sheenColor ↔ Color?
-
getter/setter pair
- sheenColorMap ↔ Texture?
-
getter/setter pair
- sheenRoughness ↔ double
-
getter/setter pair
- sheenRoughnessMap ↔ Texture?
-
getter/setter pair
- sheenTintMap ↔ Texture?
-
getter/setter pair
- shininess ↔ double?
-
getter/setter pair
- side ↔ int
-
getter/setter pair
- size ↔ double?
-
getter/setter pair
- sizeAttenuation ↔ bool
-
getter/setter pair
- specular ↔ Color?
-
getter/setter pair
- specularColor ↔ Color?
-
getter/setter pair
- specularColorMap ↔ Texture?
-
getter/setter pair
- specularIntensity ↔ double?
-
getter/setter pair
- specularIntensityMap ↔ Texture?
-
getter/setter pair
- specularMap ↔ Texture?
-
getter/setter pair
- stencilFail ↔ int
-
getter/setter pair
- stencilFunc ↔ int
-
getter/setter pair
- stencilFuncMask ↔ int
-
getter/setter pair
- stencilRef ↔ int
-
getter/setter pair
- stencilWrite ↔ bool
-
getter/setter pair
- stencilWriteMask ↔ int
-
getter/setter pair
- stencilZFail ↔ int
-
getter/setter pair
- stencilZPass ↔ int
-
getter/setter pair
- thickness ↔ double?
-
getter/setter pair
- thicknessMap ↔ Texture?
-
getter/setter pair
- toneMapped ↔ bool
-
getter/setter pair
- transmission ↔ double
-
getter/setter pair
- transmissionMap ↔ Texture?
-
getter/setter pair
- transparent ↔ bool
-
getter/setter pair
- type ↔ String
-
getter/setter pair
-
uniforms
↔ Map<
String, dynamic> -
getter/setter pair
- uniformsNeedUpdate ↔ bool?
-
getter/setter pair
-
userData
↔ Map<
String, dynamic> -
getter/setter pair
- uuid ↔ String
-
getter/setter pair
- version ↔ int
-
getter/setter pair
- vertexColors ↔ bool
-
getter/setter pair
- vertexShader ↔ String?
-
getter/setter pair
- vertexTangents ↔ bool
-
getter/setter pair
- visible ↔ bool
-
getter/setter pair
- wireframe ↔ bool
-
getter/setter pair
- wireframeLinecap ↔ String?
-
getter/setter pair
- wireframeLinejoin ↔ String?
-
getter/setter pair
- wireframeLinewidth ↔ double?
-
getter/setter pair
Methods
-
addEventListener(
String type, Function listener) → void -
type
- The type of event to listen to.inherited -
clearListeners(
) → void -
Remove all Listeners.
inherited
-
clone(
) → Material - Return a new material with the same parameters as this material.
-
copy(
Material source) → Material - Copy the parameters from the passed material into this material.
-
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.
-
getProperty(
String propertyName) → Object? -
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 -
removeEventListener(
String type, Function listener) → void -
type - The type of the listener that gets removed.
inherited
-
setProperty(
String propertyName, dynamic value) → void -
setValue(
MaterialProperty type, dynamic newValue) → void -
type
- the parameter to change. -
setValueFromString(
String key, dynamic newValue) → void -
key
- String values of the parameter to change. -
setValues(
Map< MaterialProperty, dynamic> ? values) → void -
values
- a container with parameters. -
setValuesFromString(
Map< String, dynamic> ? values) → void -
toJson(
{Object3dMeta? meta}) → Map< String, dynamic> - meta -- object containing metadata such as textures or images for the material.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator []=(
String key, dynamic value) → void