Passer au contenu principal

Material

ecs.Material

Description

The Material component defines the material properties for an entity.

Functions

See component schema.

Schema

PropertyTypeDescription
rNumberRed channel value of the material [0...255]
gNumberGreen channel value of the material [0...255]
bNumberBlue channel value of the material [0...255]
textureSrcStringThe color map source, modulated by color (if set)
roughnessNumberHow rough the material appears [0...1]
roughnessMapStringGreen channel of this texture map resource the roughness, multiplied by the roughness number.
metalnessNumberHow metallic the material appears [0...1]
metalnessMapStringBlue channel of this texture resource affects how metal the material appears.
normalScaleNumberHow much the normal map (if set) affects the material [0...1]
normalMapStringNormal map source of the texture.
opacityNumberOverall alpha/transparency of the material [0...1]
opacityMapStringAlpha/transparency mapped via a texture resource.
emissiveIntensityNumberOverall intensity of the emissive map [0...1]
emissiveMapStringEmissiveness mapped as a texture resource. Modulated by emissive color and intensity.
emissiveRNumberRed channel emissive color of the material [0...255]
emissiveGNumberGreen channel emissive color of the material [0...255]
emissiveBNumberBlue channel emissive color of the material [0...255]
sideStringWhich sides of faces will be rendered. Choose from front, back, or double.
blendingStringBlending to use when displaying objects with this material. Choose from no, normal, additive, subtractive, and multiply.
repeatXNumberHow many times a texture is repeated across a material on the X axis.
repeatYNumberHow many times a texture is repeated across a material on the Y axis.
offsetXNumberHow much a texture is offset across a material on the X axis.
offsetYNumberHow much a texture is offset across a material on the Y axis.
depthTestBooleanWhether to test depth when rendering this material (true by default)
depthWriteBooleanWhether rendering this material impacts the depth buffer (true by default)
wireframeBooleanRender geometry as wireframe.