Material
ecs.Material
Description
The Material component defines the material properties for an entity.
Functions
See component schema.
Schema
Property | Type | Description |
---|---|---|
r | Number | Red channel value of the material [0...255] |
g | Number | Green channel value of the material [0...255] |
b | Number | Blue channel value of the material [0...255] |
textureSrc | String | The color map source, modulated by color (if set) |
roughness | Number | How rough the material appears [0...1] |
roughnessMap | String | Green channel of this texture map resource the roughness, multiplied by the roughness number. |
metalness | Number | How metallic the material appears [0...1] |
metalnessMap | String | Blue channel of this texture resource affects how metal the material appears. |
normalScale | Number | How much the normal map (if set) affects the material [0...1] |
normalMap | String | Normal map source of the texture. |
opacity | Number | Overall alpha/transparency of the material [0...1] |
opacityMap | String | Alpha/transparency mapped via a texture resource. |
emissiveIntensity | Number | Overall intensity of the emissive map [0...1] |
emissiveMap | String | Emissiveness mapped as a texture resource. Modulated by emissive color and intensity. |
emissiveR | Number | Red channel emissive color of the material [0...255] |
emissiveG | Number | Green channel emissive color of the material [0...255] |
emissiveB | Number | Blue channel emissive color of the material [0...255] |
side | String | Which sides of faces will be rendered. Choose from front , back , or double . |
blending | String | Blending to use when displaying objects with this material. Choose from no , normal , additive , subtractive , and multiply . |
repeatX | Number | How many times a texture is repeated across a material on the X axis. |
repeatY | Number | How many times a texture is repeated across a material on the Y axis. |
offsetX | Number | How much a texture is offset across a material on the X axis. |
offsetY | Number | How much a texture is offset across a material on the Y axis. |
depthTest | Boolean | Whether to test depth when rendering this material (true by default) |
depthWrite | Boolean | Whether rendering this material impacts the depth buffer (true by default) |
wireframe | Boolean | Render geometry as wireframe. |