@plastic-software/three 0.175.6 → 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.6",
3
+ "version": "0.175.9",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -64,30 +64,34 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
64
64
 
65
65
  #ifdef USE_CLEARCOAT_NORMALMAP
66
66
 
67
- #ifdef USE_TANGENT
67
+ #if !defined( USE_CLEARCOAT_NORMALMAP_TRIPLANAR )
68
68
 
69
- mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
69
+ #ifdef USE_TANGENT
70
70
 
71
- #elif defined( USE_CLEARCOAT_NORMALMAP_CYLINDRICAL )
71
+ mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
72
72
 
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);
73
+ #elif defined( USE_CLEARCOAT_NORMALMAP_CYLINDRICAL )
76
74
 
77
- #elif defined( USE_CLEARCOAT_NORMALMAP_UV )
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);
78
78
 
79
- mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
79
+ #elif defined( USE_CLEARCOAT_NORMALMAP_UV )
80
80
 
81
- #else
81
+ mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
82
82
 
83
- mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vUv );
83
+ #else
84
84
 
85
- #endif
85
+ mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vUv );
86
86
 
87
- #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;
88
93
 
89
- tbn2[0] *= faceDirection;
90
- tbn2[1] *= faceDirection;
94
+ #endif
91
95
 
92
96
  #endif
93
97