This class should simplify the node access to material properties.
It internal uses reference nodes to make sure changes to material
properties are automatically reflected to predefined TSL objects
like e.g. materialColor.
Constructor
new MaterialNode(scope)| Parameter | Type | Default Value |
|---|---|---|
| scope | string | — |
Constructs a new material node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| scope | string | — | |
| Method | Type | |
|---|---|---|
| getCache | (property: string, type: string) => MaterialReferenceNode | |
| getFloat | (property: string) => MaterialReferenceNode<…> | |
| getColor | (property: string) => MaterialReferenceNode<…> | |
| getTexture | (property: string) => MaterialReferenceNode | |
| setup | (builder: NodeBuilder) => Node | |
Extends
NodeTSL object that represents alpha test of the current material.
Type
Node<float>TSL object that represents the diffuse color of the current material.
The value is composed via color * map.
Type
Node<vec3>TSL object that represents the shininess of the current material.
Type
Node<float>TSL object that represents the emissive color of the current material.
The value is composed via emissive * emissiveIntensity * emissiveMap.
Type
Node<vec3>TSL object that represents the opacity of the current material.
The value is composed via opacity * alphaMap.
Type
Node<float>TSL object that represents the specular of the current material.
Type
Node<vec3>TSL object that represents the specular intensity of the current material.
The value is composed via specularIntensity * specularMap.a.
Type
Node<float>TSL object that represents the specular color of the current material.
The value is composed via specularColor * specularMap.rgb.
Type
Node<vec3>TSL object that represents the specular strength of the current material.
The value is composed via specularMap.r.
Type
Node<float>TSL object that represents the reflectivity of the current material.
Type
Node<float>TSL object that represents the roughness of the current material.
The value is composed via roughness * roughnessMap.g.
Type
Node<float>TSL object that represents the metalness of the current material.
The value is composed via metalness * metalnessMap.b.
Type
Node<float>TSL object that represents the normal of the current material.
The value will be either normalMap * normalScale, bumpMap * bumpScale or normalView.
Type
Node<vec3>TSL object that represents the clearcoat of the current material.
The value is composed via clearcoat * clearcoatMap.r
Type
Node<float>TSL object that represents the clearcoat roughness of the current material.
The value is composed via clearcoatRoughness * clearcoatRoughnessMap.r.
Type
Node<float>TSL object that represents the clearcoat normal of the current material.
The value will be either clearcoatNormalMap or normalView.
Type
Node<vec3>TSL object that represents the rotation of the current sprite material.
Type
Node<float>TSL object that represents the sheen color of the current material.
The value is composed via sheen * sheenColor * sheenColorMap.
Type
Node<vec3>TSL object that represents the sheen roughness of the current material.
The value is composed via sheenRoughness * sheenRoughnessMap.a.
Type
Node<float>TSL object that represents the anisotropy of the current material.
Type
Node<vec2>TSL object that represents the iridescence of the current material.
Type
Node<float>TSL object that represents the iridescence IOR of the current material.
Type
Node<float>TSL object that represents the iridescence thickness of the current material.
Type
Node<float>TSL object that represents the transmission of the current material.
The value is composed via transmission * transmissionMap.r.
Type
Node<float>TSL object that represents the thickness of the current material.
The value is composed via thickness * thicknessMap.g.
Type
Node<float>TSL object that represents the IOR of the current material.
Type
Node<float>TSL object that represents the attenuation distance of the current material.
Type
Node<float>TSL object that represents the attenuation color of the current material.
Type
Node<vec3>TSL object that represents the scale of the current dashed line material.
Type
Node<float>TSL object that represents the dash size of the current dashed line material.
Type
Node<float>TSL object that represents the gap size of the current dashed line material.
Type
Node<float>TSL object that represents the line width of the current line material.
Type
Node<float>TSL object that represents the dash offset of the current line material.
Type
Node<float>TSL object that represents the point size of the current points material.
Type
Node<float>TSL object that represents the dispersion of the current material.
Type
Node<float>TSL object that represents the light map of the current material.
The value is composed via lightMapIntensity * lightMap.rgb.
Type
Node<vec3>TSL object that represents the ambient occlusion map of the current material.
The value is composed via aoMap.r - 1 * aoMapIntensity + 1.
Type
Node<float>TSL object that represents the anisotropy vector of the current material.
Type
Node<vec2>