[name]
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.
Constructor
[name]( [page:Object parameters] )
Properties
.[page:Integer id]
Unique number of this material instance.
.[page:String name]
Material name. Default is an empty string.
.[page:Number opacity]
Opacity. Default is *1*.
.[page:Boolean transparent]
Defines whether this material is transparent. This has an effect on rendering, as transparent objects need an special treatment, and are rendered after the opaque (i.e. non transparent) objects. For a working example of this behaviour, check the [page:WebGLRenderer WebGLRenderer] code.
Default is *false*.
.[page:Blending blending]
Which blending to use when displaying objects with this material. Default is [page:NormalBlending].
.[page:Integer blendSrc]
Blending source. It's one of the blending mode constants defined in [page:Three Three.js]. Default is *SrcAlphaFactor*.
.[page:Integer blendDst]
Blending destination. It's one of the blending mode constants defined in [page:Three Three.js]. Default is *OneMinusSrcAlphaFactor*.
.[page:Integer blendEquation]
Blending equation to use when applying blending. It's one of the constants defined in [page:Three Three.js]. Default is *AddEquation*.
.[page:Boolean depthTest]
Whether to have depth test enabled when rendering this material. Default is *true*.
.[page:Boolean depthWrite]
Whether rendering this material has any effect on the depth buffer. Default is *true*.
When drawing 2D overlays it can be useful to disable the depth writing in order to layer several things together without creating z-index artifacts.
.[page:Boolean polygonOffset]
Whether to use polygon offset. Default is *false*. This corresponds to the *POLYGON_OFFSET_FILL* WebGL feature.
.[page:Integer polygonOffsetFactor]
Sets the polygon offset factor. Default is *0*.
.[page:Integer polygonOffsetUnits]
Sets the polygon offset units. Default is *0*.
.[page:Number alphaTest]
Sets the alpha value to be used when running an alpha test. Default is *0*.
.[page:Boolean overdraw]
Enables/disables overdraw. If enabled, polygons are drawn slightly bigger in order to fix antialiasing gaps when using the [page:CanvasRenderer]. Default is *false*.
.[page:Boolean visible]
Define whether this material is visible. Default is *true*.
.[page:Boolean doubleSided]
Defines whether this both sides of faces will be visible. Default is *false*.
The normals in each face will be used in order to determine which side is visible; positive normals are the front face and thus visible, whereas negative normals correspond to the back faces and are normally not rendered, which can cause a 'disappearing' effect if an object is rotated and its backfaces are looking at the camera.
.[page:Boolean flipSided]
Defines if the object's faces are flipsided. If enabled, faces with negative normals will be visible (which is the opposite of the default behaviour). Default is *false*.
.[page:Boolean needsUpdate]
Specifies that the material needs to be updated, WebGL wise. Set it to true if you made changes that need to be reflected in WebGL.
This property is automatically set to *true* when instancing a new material.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]