Material class
The material appearance of a primitive.
Constructors
- Material.new({required GltfRoot root, required String? name, required PBRMetallicRoughness? pbrMetallicRoughness, required NormalTextureInfo? normalTexture, required OcclusionTextureInfo? occlusionTexture, required TextureInfo? emissiveTexture, required Vector3 emissiveFactor, required AlphaMode alphaMode, required bool doubleSided})
-
Material.parse(GltfRoot root, Map<
String, Object?> map)
Properties
- alphaMode → AlphaMode
-
The material's alpha rendering mode enumeration specifying the
interpretation of the alpha value of the base color.
final
- doubleSided → bool
-
Specifies whether the material is double sided. When this value is false,
back-face culling is enabled.
When this value is true, back-face culling is disabled and double-sided
lighting is enabled.
The back-face MUST have its normals reversed before the lighting
equation is evaluated.
final
- emissiveFactor → Vector3
-
The factors for the emissive color of the material. This value defines
linear multipliers for the sampled texels of the emissive texture.
final
- emissiveTexture → TextureInfo?
-
The emissive texture. It controls the color and intensity of the light
being emitted by the material.
This texture contains RGB components encoded with the sRGB transfer
function.
If a fourth component (A) is present, it MUST be ignored.
When undefined, the texture MUST be sampled as having
1.0
in RGB components.final - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
final
- normalTexture → NormalTextureInfo?
-
The tangent space normal texture. The texture encodes RGB components with
linear transfer function.
Each texel represents the XYZ components of a normal vector in tangent
space.
The normal vectors use the convention +X is right and +Y is up. +Z points
toward the viewer.
If a fourth component (A) is present, it MUST be ignored.
When undefined, the material does not have a tangent space normal texture.
final
- occlusionTexture → OcclusionTextureInfo?
-
The occlusion texture. The occlusion values are linearly sampled from the
R channel.
Higher values indicate areas that receive full indirect lighting and lower
values indicate no indirect lighting.
If other channels are present (GBA), they MUST be ignored for
occlusion calculations.
When undefined, the material does not have an occlusion texture.
final
- pbrMetallicRoughness → PBRMetallicRoughness?
-
A set of parameter values that are used to define the metallic-roughness
material model from Physically Based Rendering (PBR) methodology.
When undefined, all the default values of
pbrMetallicRoughness
MUST apply.final - root → GltfRoot
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toFlameMaterial(
) → Material? -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited