@plastic-software/three 0.175.8 → 0.175.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plastic-software/three",
3
- "version": "0.175.8",
3
+ "version": "0.175.9",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -42,6 +42,10 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
42
42
  vec3 tangent = normalize(cross(normal, mat3(modelViewMatrix) * transpose(mat3(texture3DMatrix)) * vec3(0, 1, 0)));
43
43
  vec3 bitangent = cross(tangent, normal);
44
44
  mat3 tbn = mat3(tangent, bitangent, normal);
45
+
46
+ #elif defined( USE_CLEARCOAT_NORMALMAP_UV )
47
+
48
+ mat3 tbn = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
45
49
 
46
50
  #else
47
51
 
@@ -60,30 +64,34 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
60
64
 
61
65
  #ifdef USE_CLEARCOAT_NORMALMAP
62
66
 
63
- #ifdef USE_TANGENT
67
+ #if !defined( USE_CLEARCOAT_NORMALMAP_TRIPLANAR )
64
68
 
65
- mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
69
+ #ifdef USE_TANGENT
66
70
 
67
- #elif defined( USE_CLEARCOAT_NORMALMAP_UV )
71
+ mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
68
72
 
69
- mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
73
+ #elif defined( USE_CLEARCOAT_NORMALMAP_CYLINDRICAL )
70
74
 
71
- #elif defined( USE_CLEARCOAT_NORMALMAP_CYLINDRICAL ) || (defined( USE_ANISOTROPY ) && !defined( USE_UV1 ) || !defined( USE_UV2 ) && !defined( USE_UV3 ))
75
+ vec3 tangent2 = normalize(cross(normal, mat3(modelViewMatrix) * transpose(mat3(texture3DMatrix)) * vec3(0, 1, 0)));
76
+ vec3 bitangent2 = cross(tangent2, normal);
77
+ mat3 tbn2 = mat3(tangent2, bitangent2, normal);
72
78
 
73
- vec3 tangent2 = normalize(cross(normal, mat3(modelViewMatrix) * transpose(mat3(texture3DMatrix)) * vec3(0, 1, 0)));
74
- vec3 bitangent2 = cross(tangent2, normal);
75
- mat3 tbn2 = mat3(tangent2, bitangent2, normal);
79
+ #elif defined( USE_CLEARCOAT_NORMALMAP_UV )
76
80
 
77
- #else
81
+ mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
78
82
 
79
- mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vUv );
83
+ #else
80
84
 
81
- #endif
85
+ mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vUv );
82
86
 
83
- #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
87
+ #endif
88
+
89
+ #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
90
+
91
+ tbn2[0] *= faceDirection;
92
+ tbn2[1] *= faceDirection;
84
93
 
85
- tbn2[0] *= faceDirection;
86
- tbn2[1] *= faceDirection;
94
+ #endif
87
95
 
88
96
  #endif
89
97