diff --git a/docs/components/material.md b/docs/components/material.md index 95baf580cb0..ec9dfe5c3c1 100644 --- a/docs/components/material.md +++ b/docs/components/material.md @@ -15,6 +15,7 @@ examples: src: https://glitch.com/edit/#!/aframe-displacement-offset-registershader?path=public/index.html --- +[amaterial]: ../primitives/a-material.md [fog]: ./fog.md [geometry]: ./geometry.md @@ -48,6 +49,18 @@ Here is an example of using an example custom material: material="shader: ocean; color: blue; wave-height: 10"> ``` +Here is an example of sharing one material instance across entities using a +[`` asset][amaterial]: + +```html + + + + + + +``` + ## Properties [flat]: #flat @@ -62,6 +75,7 @@ depending on the material type applied. | alphaTest | Alpha test threshold for transparency. | 0 | | depthTest | Whether depth testing is enabled when rendering the material. | true | | flatShading | Use `THREE.FlatShading` rather than `THREE.StandardShading`. | false | +| material | Selector to an [`` asset][amaterial] (e.g., `#wood`). When set, all other properties are ignored and the material is entirely defined by the asset. | None | | offset | Texture offset to be used. | {x: 0, y: 0} | | opacity | Extent of transparency. If the `transparent` property is not `true`, then the material will remain opaque and `opacity` will only affect color. | 1.0 | | premultipliedAlpha | Whether the material's RGB channels are premultiplied by its alpha channel. Automatically forced to `true` when `blending` is `multiply` or `subtractive`. | false | diff --git a/docs/core/asset-management-system.md b/docs/core/asset-management-system.md index 6ae7f1b6d90..09b5ae1562f 100644 --- a/docs/core/asset-management-system.md +++ b/docs/core/asset-management-system.md @@ -21,7 +21,8 @@ scenes don't try to fetch assets while rendering. We place assets within ``, and we place `` within ``. Assets include: -- `` - Miscellaneous assets such as 3D models and materials +- `` - Miscellaneous assets such as 3D models +- `` - Materials and their textures - `