Browse Source

Add vertexTangents to docs and typings.

Don McCurdy 6 years ago
parent
commit
0b3150de61
2 changed files with 13 additions and 0 deletions
  1. 7 0
      docs/api/en/materials/Material.html
  2. 6 0
      src/materials/Material.d.ts

+ 7 - 0
docs/api/en/materials/Material.html

@@ -261,6 +261,13 @@
 		Other options are [page:Materials THREE.VertexColors] and [page:Materials THREE.FaceColors].
 		</p>
 
+		<h3>[property:Boolean vertexTangents]</h3>
+		<p>
+		Defines whether precomputed vertex tangents, which must be provided in a vec4 "tangent" attribute,
+		are used. When disabled, tangents are derived automatically. Using precomputed tangents will give
+		more accurate normal map details in some cases, such as with mirrored UVs. Default is false.
+		</p>
+
 		<h3>[property:Boolean visible]</h3>
 		<p>
 		Defines whether this material is visible. Default is *true*.

+ 6 - 0
src/materials/Material.d.ts

@@ -44,6 +44,7 @@ export interface MaterialParameters {
   side?: Side;
   transparent?: boolean;
   vertexColors?: Colors;
+  vertexTangents?: boolean;
   visible?: boolean;
 }
 
@@ -234,6 +235,11 @@ export class Material extends EventDispatcher {
    */
   vertexColors: Colors;
 
+  /**
+   * Defines whether precomputed vertex tangents are used. Default is false.
+   */
+  vertexTangents: boolean;
+
   /**
    * Defines whether this material is visible. Default is true.
    */