Capítulo 60 de 859
This node material can be used to render lines with a size larger than one by representing them as instanced meshes.
NoBlending since transparency is not supported, yet.Constructor
| Signature |
|---|
new Line2NodeMaterial( parameters : Object ) |
Properties
| Property | Description |
|---|---|
.alphaToCoverage : boolean | Whether alpha to coverage should be used or not. |
.blending : number | Blending is set to NoBlending since transparency is not supported, yet. |
.dashOffset : number | The dash offset. |
.dashScaleNode : Node.<float> | Defines the dash scale. |
.dashSizeNode : Node.<float> | Defines the dash size. |
.dashed : boolean | Whether the lines should be dashed or not. |
.gapSizeNode : Node.<float> | Defines the gap size. |
.isLine2NodeMaterial : boolean (readonly) | This flag can be used for type testing. |
.lineColorNode : Node.<vec3> | Defines the lines color. |
.offsetNode : Node.<float> | Defines the offset. |
.vertexColors : boolean | Whether vertex colors should be used or not. |
.worldUnits : boolean | Whether the lines should sized in world units or not. When set to false the unit is pixel. |
Methods
| Method | Description |
|---|---|
.setupDiffuseColor( builder : NodeBuilder ) | Setups the diffuse color of the line material in the fragment stage. Overrides the base setup to incorporate line/dash rendering and blending. |
.setupModelViewProjection( builder : NodeBuilder ) : Node.<vec4> | Setups the position in clip space for the vertex stage of the fat line. Overrides the default model-view-projection to return the expanded fat line vertex coordinates. |