shop-components 0.1.10 → 0.1.11
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/dist/shop-components.mjs
CHANGED
|
@@ -5967,9 +5967,9 @@ IncidentLight directLight;
|
|
|
5967
5967
|
|
|
5968
5968
|
#endif
|
|
5969
5969
|
diffuseColor *= sampledDiffuseColor;
|
|
5970
|
-
#endif`,
|
|
5970
|
+
#endif`, A_ = `#ifdef USE_MAP
|
|
5971
5971
|
uniform sampler2D map;
|
|
5972
|
-
#endif`,
|
|
5972
|
+
#endif`, t_ = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
|
|
5973
5973
|
#if defined( USE_POINTS_UV )
|
|
5974
5974
|
vec2 uv = vUv;
|
|
5975
5975
|
#else
|
|
@@ -5981,7 +5981,7 @@ IncidentLight directLight;
|
|
|
5981
5981
|
#endif
|
|
5982
5982
|
#ifdef USE_ALPHAMAP
|
|
5983
5983
|
diffuseColor.a *= texture2D( alphaMap, uv ).g;
|
|
5984
|
-
#endif`,
|
|
5984
|
+
#endif`, e_ = `#if defined( USE_POINTS_UV )
|
|
5985
5985
|
varying vec2 vUv;
|
|
5986
5986
|
#else
|
|
5987
5987
|
#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
|
|
@@ -5993,19 +5993,19 @@ IncidentLight directLight;
|
|
|
5993
5993
|
#endif
|
|
5994
5994
|
#ifdef USE_ALPHAMAP
|
|
5995
5995
|
uniform sampler2D alphaMap;
|
|
5996
|
-
#endif`,
|
|
5996
|
+
#endif`, i_ = `float metalnessFactor = metalness;
|
|
5997
5997
|
#ifdef USE_METALNESSMAP
|
|
5998
5998
|
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
|
|
5999
5999
|
metalnessFactor *= texelMetalness.b;
|
|
6000
|
-
#endif`,
|
|
6000
|
+
#endif`, n_ = `#ifdef USE_METALNESSMAP
|
|
6001
6001
|
uniform sampler2D metalnessMap;
|
|
6002
|
-
#endif`,
|
|
6002
|
+
#endif`, s_ = `#ifdef USE_INSTANCING_MORPH
|
|
6003
6003
|
float morphTargetInfluences[MORPHTARGETS_COUNT];
|
|
6004
6004
|
float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
|
|
6005
6005
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
6006
6006
|
morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
|
|
6007
6007
|
}
|
|
6008
|
-
#endif`,
|
|
6008
|
+
#endif`, r_ = `#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
|
|
6009
6009
|
vColor *= morphTargetBaseInfluence;
|
|
6010
6010
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
6011
6011
|
#if defined( USE_COLOR_ALPHA )
|
|
@@ -6014,7 +6014,7 @@ IncidentLight directLight;
|
|
|
6014
6014
|
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
|
|
6015
6015
|
#endif
|
|
6016
6016
|
}
|
|
6017
|
-
#endif`,
|
|
6017
|
+
#endif`, o_ = `#ifdef USE_MORPHNORMALS
|
|
6018
6018
|
objectNormal *= morphTargetBaseInfluence;
|
|
6019
6019
|
#ifdef MORPHTARGETS_TEXTURE
|
|
6020
6020
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
@@ -6026,7 +6026,7 @@ IncidentLight directLight;
|
|
|
6026
6026
|
objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
|
|
6027
6027
|
objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
|
|
6028
6028
|
#endif
|
|
6029
|
-
#endif`,
|
|
6029
|
+
#endif`, a_ = `#ifdef USE_MORPHTARGETS
|
|
6030
6030
|
#ifndef USE_INSTANCING_MORPH
|
|
6031
6031
|
uniform float morphTargetBaseInfluence;
|
|
6032
6032
|
#endif
|
|
@@ -6050,7 +6050,7 @@ IncidentLight directLight;
|
|
|
6050
6050
|
uniform float morphTargetInfluences[ 4 ];
|
|
6051
6051
|
#endif
|
|
6052
6052
|
#endif
|
|
6053
|
-
#endif`,
|
|
6053
|
+
#endif`, l_ = `#ifdef USE_MORPHTARGETS
|
|
6054
6054
|
transformed *= morphTargetBaseInfluence;
|
|
6055
6055
|
#ifdef MORPHTARGETS_TEXTURE
|
|
6056
6056
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
@@ -6068,7 +6068,7 @@ IncidentLight directLight;
|
|
|
6068
6068
|
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
|
|
6069
6069
|
#endif
|
|
6070
6070
|
#endif
|
|
6071
|
-
#endif`,
|
|
6071
|
+
#endif`, c_ = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
|
|
6072
6072
|
#ifdef FLAT_SHADED
|
|
6073
6073
|
vec3 fdx = dFdx( vViewPosition );
|
|
6074
6074
|
vec3 fdy = dFdy( vViewPosition );
|
|
@@ -6109,7 +6109,7 @@ IncidentLight directLight;
|
|
|
6109
6109
|
tbn2[1] *= faceDirection;
|
|
6110
6110
|
#endif
|
|
6111
6111
|
#endif
|
|
6112
|
-
vec3 nonPerturbedNormal = normal;`,
|
|
6112
|
+
vec3 nonPerturbedNormal = normal;`, h_ = `#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
6113
6113
|
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
|
|
6114
6114
|
#ifdef FLIP_SIDED
|
|
6115
6115
|
normal = - normal;
|
|
@@ -6124,25 +6124,25 @@ vec3 nonPerturbedNormal = normal;`, h4 = `#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
6124
6124
|
normal = normalize( tbn * mapN );
|
|
6125
6125
|
#elif defined( USE_BUMPMAP )
|
|
6126
6126
|
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
|
|
6127
|
-
#endif`,
|
|
6127
|
+
#endif`, u_ = `#ifndef FLAT_SHADED
|
|
6128
6128
|
varying vec3 vNormal;
|
|
6129
6129
|
#ifdef USE_TANGENT
|
|
6130
6130
|
varying vec3 vTangent;
|
|
6131
6131
|
varying vec3 vBitangent;
|
|
6132
6132
|
#endif
|
|
6133
|
-
#endif`,
|
|
6133
|
+
#endif`, f_ = `#ifndef FLAT_SHADED
|
|
6134
6134
|
varying vec3 vNormal;
|
|
6135
6135
|
#ifdef USE_TANGENT
|
|
6136
6136
|
varying vec3 vTangent;
|
|
6137
6137
|
varying vec3 vBitangent;
|
|
6138
6138
|
#endif
|
|
6139
|
-
#endif`,
|
|
6139
|
+
#endif`, d_ = `#ifndef FLAT_SHADED
|
|
6140
6140
|
vNormal = normalize( transformedNormal );
|
|
6141
6141
|
#ifdef USE_TANGENT
|
|
6142
6142
|
vTangent = normalize( transformedTangent );
|
|
6143
6143
|
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
|
|
6144
6144
|
#endif
|
|
6145
|
-
#endif`,
|
|
6145
|
+
#endif`, p_ = `#ifdef USE_NORMALMAP
|
|
6146
6146
|
uniform sampler2D normalMap;
|
|
6147
6147
|
uniform vec2 normalScale;
|
|
6148
6148
|
#endif
|
|
@@ -6164,13 +6164,13 @@ vec3 nonPerturbedNormal = normal;`, h4 = `#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
6164
6164
|
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
|
|
6165
6165
|
return mat3( T * scale, B * scale, N );
|
|
6166
6166
|
}
|
|
6167
|
-
#endif`,
|
|
6167
|
+
#endif`, m_ = `#ifdef USE_CLEARCOAT
|
|
6168
6168
|
vec3 clearcoatNormal = nonPerturbedNormal;
|
|
6169
|
-
#endif`,
|
|
6169
|
+
#endif`, g_ = `#ifdef USE_CLEARCOAT_NORMALMAP
|
|
6170
6170
|
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
|
|
6171
6171
|
clearcoatMapN.xy *= clearcoatNormalScale;
|
|
6172
6172
|
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
|
|
6173
|
-
#endif`,
|
|
6173
|
+
#endif`, v_ = `#ifdef USE_CLEARCOATMAP
|
|
6174
6174
|
uniform sampler2D clearcoatMap;
|
|
6175
6175
|
#endif
|
|
6176
6176
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
@@ -6179,18 +6179,18 @@ vec3 nonPerturbedNormal = normal;`, h4 = `#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
6179
6179
|
#endif
|
|
6180
6180
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
6181
6181
|
uniform sampler2D clearcoatRoughnessMap;
|
|
6182
|
-
#endif`,
|
|
6182
|
+
#endif`, y_ = `#ifdef USE_IRIDESCENCEMAP
|
|
6183
6183
|
uniform sampler2D iridescenceMap;
|
|
6184
6184
|
#endif
|
|
6185
6185
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
6186
6186
|
uniform sampler2D iridescenceThicknessMap;
|
|
6187
|
-
#endif`,
|
|
6187
|
+
#endif`, w_ = `#ifdef OPAQUE
|
|
6188
6188
|
diffuseColor.a = 1.0;
|
|
6189
6189
|
#endif
|
|
6190
6190
|
#ifdef USE_TRANSMISSION
|
|
6191
6191
|
diffuseColor.a *= material.transmissionAlpha;
|
|
6192
6192
|
#endif
|
|
6193
|
-
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,
|
|
6193
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`, C_ = `vec3 packNormalToRGB( const in vec3 normal ) {
|
|
6194
6194
|
return normalize( normal ) * 0.5 + 0.5;
|
|
6195
6195
|
}
|
|
6196
6196
|
vec3 unpackRGBToNormal( const in vec3 rgb ) {
|
|
@@ -6231,9 +6231,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const
|
|
|
6231
6231
|
}
|
|
6232
6232
|
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
|
|
6233
6233
|
return ( near * far ) / ( ( far - near ) * depth - far );
|
|
6234
|
-
}`,
|
|
6234
|
+
}`, x_ = `#ifdef PREMULTIPLIED_ALPHA
|
|
6235
6235
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
6236
|
-
#endif`,
|
|
6236
|
+
#endif`, I_ = `vec4 mvPosition = vec4( transformed, 1.0 );
|
|
6237
6237
|
#ifdef USE_BATCHING
|
|
6238
6238
|
mvPosition = batchingMatrix * mvPosition;
|
|
6239
6239
|
#endif
|
|
@@ -6241,22 +6241,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
|
|
|
6241
6241
|
mvPosition = instanceMatrix * mvPosition;
|
|
6242
6242
|
#endif
|
|
6243
6243
|
mvPosition = modelViewMatrix * mvPosition;
|
|
6244
|
-
gl_Position = projectionMatrix * mvPosition;`,
|
|
6244
|
+
gl_Position = projectionMatrix * mvPosition;`, b_ = `#ifdef DITHERING
|
|
6245
6245
|
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
|
|
6246
|
-
#endif`,
|
|
6246
|
+
#endif`, M_ = `#ifdef DITHERING
|
|
6247
6247
|
vec3 dithering( vec3 color ) {
|
|
6248
6248
|
float grid_position = rand( gl_FragCoord.xy );
|
|
6249
6249
|
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
|
|
6250
6250
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
6251
6251
|
return color + dither_shift_RGB;
|
|
6252
6252
|
}
|
|
6253
|
-
#endif`,
|
|
6253
|
+
#endif`, S_ = `float roughnessFactor = roughness;
|
|
6254
6254
|
#ifdef USE_ROUGHNESSMAP
|
|
6255
6255
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
|
|
6256
6256
|
roughnessFactor *= texelRoughness.g;
|
|
6257
|
-
#endif`,
|
|
6257
|
+
#endif`, __ = `#ifdef USE_ROUGHNESSMAP
|
|
6258
6258
|
uniform sampler2D roughnessMap;
|
|
6259
|
-
#endif`,
|
|
6259
|
+
#endif`, P_ = `#if NUM_SPOT_LIGHT_COORDS > 0
|
|
6260
6260
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
6261
6261
|
#endif
|
|
6262
6262
|
#if NUM_SPOT_LIGHT_MAPS > 0
|
|
@@ -6439,7 +6439,7 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6439
6439
|
}
|
|
6440
6440
|
return shadow;
|
|
6441
6441
|
}
|
|
6442
|
-
#endif`,
|
|
6442
|
+
#endif`, T_ = `#if NUM_SPOT_LIGHT_COORDS > 0
|
|
6443
6443
|
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
|
|
6444
6444
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
6445
6445
|
#endif
|
|
@@ -6477,7 +6477,7 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6477
6477
|
};
|
|
6478
6478
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
|
|
6479
6479
|
#endif
|
|
6480
|
-
#endif`,
|
|
6480
|
+
#endif`, E_ = `#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
|
|
6481
6481
|
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
|
|
6482
6482
|
vec4 shadowWorldPosition;
|
|
6483
6483
|
#endif
|
|
@@ -6509,7 +6509,7 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6509
6509
|
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
|
|
6510
6510
|
}
|
|
6511
6511
|
#pragma unroll_loop_end
|
|
6512
|
-
#endif`,
|
|
6512
|
+
#endif`, D_ = `float getShadowMask() {
|
|
6513
6513
|
float shadow = 1.0;
|
|
6514
6514
|
#ifdef USE_SHADOWMAP
|
|
6515
6515
|
#if NUM_DIR_LIGHT_SHADOWS > 0
|
|
@@ -6541,12 +6541,12 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6541
6541
|
#endif
|
|
6542
6542
|
#endif
|
|
6543
6543
|
return shadow;
|
|
6544
|
-
}`,
|
|
6544
|
+
}`, L_ = `#ifdef USE_SKINNING
|
|
6545
6545
|
mat4 boneMatX = getBoneMatrix( skinIndex.x );
|
|
6546
6546
|
mat4 boneMatY = getBoneMatrix( skinIndex.y );
|
|
6547
6547
|
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
|
|
6548
6548
|
mat4 boneMatW = getBoneMatrix( skinIndex.w );
|
|
6549
|
-
#endif`,
|
|
6549
|
+
#endif`, q_ = `#ifdef USE_SKINNING
|
|
6550
6550
|
uniform mat4 bindMatrix;
|
|
6551
6551
|
uniform mat4 bindMatrixInverse;
|
|
6552
6552
|
uniform highp sampler2D boneTexture;
|
|
@@ -6561,7 +6561,7 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6561
6561
|
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
|
|
6562
6562
|
return mat4( v1, v2, v3, v4 );
|
|
6563
6563
|
}
|
|
6564
|
-
#endif`,
|
|
6564
|
+
#endif`, O_ = `#ifdef USE_SKINNING
|
|
6565
6565
|
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
|
|
6566
6566
|
vec4 skinned = vec4( 0.0 );
|
|
6567
6567
|
skinned += boneMatX * skinVertex * skinWeight.x;
|
|
@@ -6569,7 +6569,7 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6569
6569
|
skinned += boneMatZ * skinVertex * skinWeight.z;
|
|
6570
6570
|
skinned += boneMatW * skinVertex * skinWeight.w;
|
|
6571
6571
|
transformed = ( bindMatrixInverse * skinned ).xyz;
|
|
6572
|
-
#endif`,
|
|
6572
|
+
#endif`, N_ = `#ifdef USE_SKINNING
|
|
6573
6573
|
mat4 skinMatrix = mat4( 0.0 );
|
|
6574
6574
|
skinMatrix += skinWeight.x * boneMatX;
|
|
6575
6575
|
skinMatrix += skinWeight.y * boneMatY;
|
|
@@ -6580,17 +6580,17 @@ gl_Position = projectionMatrix * mvPosition;`, b4 = `#ifdef DITHERING
|
|
|
6580
6580
|
#ifdef USE_TANGENT
|
|
6581
6581
|
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
|
|
6582
6582
|
#endif
|
|
6583
|
-
#endif`,
|
|
6583
|
+
#endif`, z_ = `float specularStrength;
|
|
6584
6584
|
#ifdef USE_SPECULARMAP
|
|
6585
6585
|
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
|
|
6586
6586
|
specularStrength = texelSpecular.r;
|
|
6587
6587
|
#else
|
|
6588
6588
|
specularStrength = 1.0;
|
|
6589
|
-
#endif`,
|
|
6589
|
+
#endif`, B_ = `#ifdef USE_SPECULARMAP
|
|
6590
6590
|
uniform sampler2D specularMap;
|
|
6591
|
-
#endif`,
|
|
6591
|
+
#endif`, R_ = `#if defined( TONE_MAPPING )
|
|
6592
6592
|
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
|
|
6593
|
-
#endif`,
|
|
6593
|
+
#endif`, j_ = `#ifndef saturate
|
|
6594
6594
|
#define saturate( a ) clamp( a, 0.0, 1.0 )
|
|
6595
6595
|
#endif
|
|
6596
6596
|
uniform float toneMappingExposure;
|
|
@@ -6687,7 +6687,7 @@ vec3 NeutralToneMapping( vec3 color ) {
|
|
|
6687
6687
|
float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
|
|
6688
6688
|
return mix( color, vec3( newPeak ), g );
|
|
6689
6689
|
}
|
|
6690
|
-
vec3 CustomToneMapping( vec3 color ) { return color; }`,
|
|
6690
|
+
vec3 CustomToneMapping( vec3 color ) { return color; }`, K_ = `#ifdef USE_TRANSMISSION
|
|
6691
6691
|
material.transmission = transmission;
|
|
6692
6692
|
material.transmissionAlpha = 1.0;
|
|
6693
6693
|
material.thickness = thickness;
|
|
@@ -6708,7 +6708,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
6708
6708
|
material.attenuationColor, material.attenuationDistance );
|
|
6709
6709
|
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
|
|
6710
6710
|
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
|
|
6711
|
-
#endif`,
|
|
6711
|
+
#endif`, k_ = `#ifdef USE_TRANSMISSION
|
|
6712
6712
|
uniform float transmission;
|
|
6713
6713
|
uniform float thickness;
|
|
6714
6714
|
uniform float attenuationDistance;
|
|
@@ -6839,7 +6839,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
6839
6839
|
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
|
|
6840
6840
|
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
|
|
6841
6841
|
}
|
|
6842
|
-
#endif`,
|
|
6842
|
+
#endif`, G_ = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
6843
6843
|
varying vec2 vUv;
|
|
6844
6844
|
#endif
|
|
6845
6845
|
#ifdef USE_MAP
|
|
@@ -6909,7 +6909,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
6909
6909
|
#ifdef USE_THICKNESSMAP
|
|
6910
6910
|
uniform mat3 thicknessMapTransform;
|
|
6911
6911
|
varying vec2 vThicknessMapUv;
|
|
6912
|
-
#endif`,
|
|
6912
|
+
#endif`, F_ = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
6913
6913
|
varying vec2 vUv;
|
|
6914
6914
|
#endif
|
|
6915
6915
|
#ifdef USE_MAP
|
|
@@ -7003,7 +7003,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
7003
7003
|
#ifdef USE_THICKNESSMAP
|
|
7004
7004
|
uniform mat3 thicknessMapTransform;
|
|
7005
7005
|
varying vec2 vThicknessMapUv;
|
|
7006
|
-
#endif`,
|
|
7006
|
+
#endif`, Y_ = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
7007
7007
|
vUv = vec3( uv, 1 ).xy;
|
|
7008
7008
|
#endif
|
|
7009
7009
|
#ifdef USE_MAP
|
|
@@ -7074,7 +7074,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
7074
7074
|
#endif
|
|
7075
7075
|
#ifdef USE_THICKNESSMAP
|
|
7076
7076
|
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
|
|
7077
|
-
#endif`,
|
|
7077
|
+
#endif`, H_ = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
|
|
7078
7078
|
vec4 worldPosition = vec4( transformed, 1.0 );
|
|
7079
7079
|
#ifdef USE_BATCHING
|
|
7080
7080
|
worldPosition = batchingMatrix * worldPosition;
|
|
@@ -7084,12 +7084,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, K4 = `#ifdef USE_TRANSM
|
|
|
7084
7084
|
#endif
|
|
7085
7085
|
worldPosition = modelMatrix * worldPosition;
|
|
7086
7086
|
#endif`;
|
|
7087
|
-
const
|
|
7087
|
+
const W_ = `varying vec2 vUv;
|
|
7088
7088
|
uniform mat3 uvTransform;
|
|
7089
7089
|
void main() {
|
|
7090
7090
|
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
|
|
7091
7091
|
gl_Position = vec4( position.xy, 1.0, 1.0 );
|
|
7092
|
-
}`,
|
|
7092
|
+
}`, U_ = `uniform sampler2D t2D;
|
|
7093
7093
|
uniform float backgroundIntensity;
|
|
7094
7094
|
varying vec2 vUv;
|
|
7095
7095
|
void main() {
|
|
@@ -7101,14 +7101,14 @@ void main() {
|
|
|
7101
7101
|
gl_FragColor = texColor;
|
|
7102
7102
|
#include <tonemapping_fragment>
|
|
7103
7103
|
#include <colorspace_fragment>
|
|
7104
|
-
}`,
|
|
7104
|
+
}`, J_ = `varying vec3 vWorldDirection;
|
|
7105
7105
|
#include <common>
|
|
7106
7106
|
void main() {
|
|
7107
7107
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
7108
7108
|
#include <begin_vertex>
|
|
7109
7109
|
#include <project_vertex>
|
|
7110
7110
|
gl_Position.z = gl_Position.w;
|
|
7111
|
-
}`,
|
|
7111
|
+
}`, Z_ = `#ifdef ENVMAP_TYPE_CUBE
|
|
7112
7112
|
uniform samplerCube envMap;
|
|
7113
7113
|
#elif defined( ENVMAP_TYPE_CUBE_UV )
|
|
7114
7114
|
uniform sampler2D envMap;
|
|
@@ -7131,14 +7131,14 @@ void main() {
|
|
|
7131
7131
|
gl_FragColor = texColor;
|
|
7132
7132
|
#include <tonemapping_fragment>
|
|
7133
7133
|
#include <colorspace_fragment>
|
|
7134
|
-
}`,
|
|
7134
|
+
}`, X_ = `varying vec3 vWorldDirection;
|
|
7135
7135
|
#include <common>
|
|
7136
7136
|
void main() {
|
|
7137
7137
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
7138
7138
|
#include <begin_vertex>
|
|
7139
7139
|
#include <project_vertex>
|
|
7140
7140
|
gl_Position.z = gl_Position.w;
|
|
7141
|
-
}`,
|
|
7141
|
+
}`, Q_ = `uniform samplerCube tCube;
|
|
7142
7142
|
uniform float tFlip;
|
|
7143
7143
|
uniform float opacity;
|
|
7144
7144
|
varying vec3 vWorldDirection;
|
|
@@ -7148,7 +7148,7 @@ void main() {
|
|
|
7148
7148
|
gl_FragColor.a *= opacity;
|
|
7149
7149
|
#include <tonemapping_fragment>
|
|
7150
7150
|
#include <colorspace_fragment>
|
|
7151
|
-
}`,
|
|
7151
|
+
}`, V_ = `#include <common>
|
|
7152
7152
|
#include <batching_pars_vertex>
|
|
7153
7153
|
#include <uv_pars_vertex>
|
|
7154
7154
|
#include <displacementmap_pars_vertex>
|
|
@@ -7175,7 +7175,7 @@ void main() {
|
|
|
7175
7175
|
#include <logdepthbuf_vertex>
|
|
7176
7176
|
#include <clipping_planes_vertex>
|
|
7177
7177
|
vHighPrecisionZW = gl_Position.zw;
|
|
7178
|
-
}`, $
|
|
7178
|
+
}`, $_ = `#if DEPTH_PACKING == 3200
|
|
7179
7179
|
uniform float opacity;
|
|
7180
7180
|
#endif
|
|
7181
7181
|
#include <common>
|
|
@@ -7205,7 +7205,7 @@ void main() {
|
|
|
7205
7205
|
#elif DEPTH_PACKING == 3201
|
|
7206
7206
|
gl_FragColor = packDepthToRGBA( fragCoordZ );
|
|
7207
7207
|
#endif
|
|
7208
|
-
}`,
|
|
7208
|
+
}`, A4 = `#define DISTANCE
|
|
7209
7209
|
varying vec3 vWorldPosition;
|
|
7210
7210
|
#include <common>
|
|
7211
7211
|
#include <batching_pars_vertex>
|
|
@@ -7232,7 +7232,7 @@ void main() {
|
|
|
7232
7232
|
#include <worldpos_vertex>
|
|
7233
7233
|
#include <clipping_planes_vertex>
|
|
7234
7234
|
vWorldPosition = worldPosition.xyz;
|
|
7235
|
-
}`,
|
|
7235
|
+
}`, t4 = `#define DISTANCE
|
|
7236
7236
|
uniform vec3 referencePosition;
|
|
7237
7237
|
uniform float nearDistance;
|
|
7238
7238
|
uniform float farDistance;
|
|
@@ -7256,13 +7256,13 @@ void main () {
|
|
|
7256
7256
|
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
|
|
7257
7257
|
dist = saturate( dist );
|
|
7258
7258
|
gl_FragColor = packDepthToRGBA( dist );
|
|
7259
|
-
}`,
|
|
7259
|
+
}`, e4 = `varying vec3 vWorldDirection;
|
|
7260
7260
|
#include <common>
|
|
7261
7261
|
void main() {
|
|
7262
7262
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
7263
7263
|
#include <begin_vertex>
|
|
7264
7264
|
#include <project_vertex>
|
|
7265
|
-
}`,
|
|
7265
|
+
}`, i4 = `uniform sampler2D tEquirect;
|
|
7266
7266
|
varying vec3 vWorldDirection;
|
|
7267
7267
|
#include <common>
|
|
7268
7268
|
void main() {
|
|
@@ -7271,7 +7271,7 @@ void main() {
|
|
|
7271
7271
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
7272
7272
|
#include <tonemapping_fragment>
|
|
7273
7273
|
#include <colorspace_fragment>
|
|
7274
|
-
}`,
|
|
7274
|
+
}`, n4 = `uniform float scale;
|
|
7275
7275
|
attribute float lineDistance;
|
|
7276
7276
|
varying float vLineDistance;
|
|
7277
7277
|
#include <common>
|
|
@@ -7293,7 +7293,7 @@ void main() {
|
|
|
7293
7293
|
#include <logdepthbuf_vertex>
|
|
7294
7294
|
#include <clipping_planes_vertex>
|
|
7295
7295
|
#include <fog_vertex>
|
|
7296
|
-
}`,
|
|
7296
|
+
}`, s4 = `uniform vec3 diffuse;
|
|
7297
7297
|
uniform float opacity;
|
|
7298
7298
|
uniform float dashSize;
|
|
7299
7299
|
uniform float totalSize;
|
|
@@ -7321,7 +7321,7 @@ void main() {
|
|
|
7321
7321
|
#include <colorspace_fragment>
|
|
7322
7322
|
#include <fog_fragment>
|
|
7323
7323
|
#include <premultiplied_alpha_fragment>
|
|
7324
|
-
}`,
|
|
7324
|
+
}`, r4 = `#include <common>
|
|
7325
7325
|
#include <batching_pars_vertex>
|
|
7326
7326
|
#include <uv_pars_vertex>
|
|
7327
7327
|
#include <envmap_pars_vertex>
|
|
@@ -7353,7 +7353,7 @@ void main() {
|
|
|
7353
7353
|
#include <worldpos_vertex>
|
|
7354
7354
|
#include <envmap_vertex>
|
|
7355
7355
|
#include <fog_vertex>
|
|
7356
|
-
}`,
|
|
7356
|
+
}`, o4 = `uniform vec3 diffuse;
|
|
7357
7357
|
uniform float opacity;
|
|
7358
7358
|
#ifndef FLAT_SHADED
|
|
7359
7359
|
varying vec3 vNormal;
|
|
@@ -7401,7 +7401,7 @@ void main() {
|
|
|
7401
7401
|
#include <fog_fragment>
|
|
7402
7402
|
#include <premultiplied_alpha_fragment>
|
|
7403
7403
|
#include <dithering_fragment>
|
|
7404
|
-
}`,
|
|
7404
|
+
}`, a4 = `#define LAMBERT
|
|
7405
7405
|
varying vec3 vViewPosition;
|
|
7406
7406
|
#include <common>
|
|
7407
7407
|
#include <batching_pars_vertex>
|
|
@@ -7440,7 +7440,7 @@ void main() {
|
|
|
7440
7440
|
#include <envmap_vertex>
|
|
7441
7441
|
#include <shadowmap_vertex>
|
|
7442
7442
|
#include <fog_vertex>
|
|
7443
|
-
}`,
|
|
7443
|
+
}`, l4 = `#define LAMBERT
|
|
7444
7444
|
uniform vec3 diffuse;
|
|
7445
7445
|
uniform vec3 emissive;
|
|
7446
7446
|
uniform float opacity;
|
|
@@ -7497,7 +7497,7 @@ void main() {
|
|
|
7497
7497
|
#include <fog_fragment>
|
|
7498
7498
|
#include <premultiplied_alpha_fragment>
|
|
7499
7499
|
#include <dithering_fragment>
|
|
7500
|
-
}`,
|
|
7500
|
+
}`, c4 = `#define MATCAP
|
|
7501
7501
|
varying vec3 vViewPosition;
|
|
7502
7502
|
#include <common>
|
|
7503
7503
|
#include <batching_pars_vertex>
|
|
@@ -7531,7 +7531,7 @@ void main() {
|
|
|
7531
7531
|
#include <clipping_planes_vertex>
|
|
7532
7532
|
#include <fog_vertex>
|
|
7533
7533
|
vViewPosition = - mvPosition.xyz;
|
|
7534
|
-
}`,
|
|
7534
|
+
}`, h4 = `#define MATCAP
|
|
7535
7535
|
uniform vec3 diffuse;
|
|
7536
7536
|
uniform float opacity;
|
|
7537
7537
|
uniform sampler2D matcap;
|
|
@@ -7577,7 +7577,7 @@ void main() {
|
|
|
7577
7577
|
#include <fog_fragment>
|
|
7578
7578
|
#include <premultiplied_alpha_fragment>
|
|
7579
7579
|
#include <dithering_fragment>
|
|
7580
|
-
}`,
|
|
7580
|
+
}`, u4 = `#define NORMAL
|
|
7581
7581
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
7582
7582
|
varying vec3 vViewPosition;
|
|
7583
7583
|
#endif
|
|
@@ -7610,7 +7610,7 @@ void main() {
|
|
|
7610
7610
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
7611
7611
|
vViewPosition = - mvPosition.xyz;
|
|
7612
7612
|
#endif
|
|
7613
|
-
}`,
|
|
7613
|
+
}`, f4 = `#define NORMAL
|
|
7614
7614
|
uniform float opacity;
|
|
7615
7615
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
7616
7616
|
varying vec3 vViewPosition;
|
|
@@ -7632,7 +7632,7 @@ void main() {
|
|
|
7632
7632
|
#ifdef OPAQUE
|
|
7633
7633
|
gl_FragColor.a = 1.0;
|
|
7634
7634
|
#endif
|
|
7635
|
-
}`,
|
|
7635
|
+
}`, d4 = `#define PHONG
|
|
7636
7636
|
varying vec3 vViewPosition;
|
|
7637
7637
|
#include <common>
|
|
7638
7638
|
#include <batching_pars_vertex>
|
|
@@ -7671,7 +7671,7 @@ void main() {
|
|
|
7671
7671
|
#include <envmap_vertex>
|
|
7672
7672
|
#include <shadowmap_vertex>
|
|
7673
7673
|
#include <fog_vertex>
|
|
7674
|
-
}`,
|
|
7674
|
+
}`, p4 = `#define PHONG
|
|
7675
7675
|
uniform vec3 diffuse;
|
|
7676
7676
|
uniform vec3 emissive;
|
|
7677
7677
|
uniform vec3 specular;
|
|
@@ -7730,7 +7730,7 @@ void main() {
|
|
|
7730
7730
|
#include <fog_fragment>
|
|
7731
7731
|
#include <premultiplied_alpha_fragment>
|
|
7732
7732
|
#include <dithering_fragment>
|
|
7733
|
-
}`,
|
|
7733
|
+
}`, m4 = `#define STANDARD
|
|
7734
7734
|
varying vec3 vViewPosition;
|
|
7735
7735
|
#ifdef USE_TRANSMISSION
|
|
7736
7736
|
varying vec3 vWorldPosition;
|
|
@@ -7773,7 +7773,7 @@ void main() {
|
|
|
7773
7773
|
#ifdef USE_TRANSMISSION
|
|
7774
7774
|
vWorldPosition = worldPosition.xyz;
|
|
7775
7775
|
#endif
|
|
7776
|
-
}`,
|
|
7776
|
+
}`, g4 = `#define STANDARD
|
|
7777
7777
|
#ifdef PHYSICAL
|
|
7778
7778
|
#define IOR
|
|
7779
7779
|
#define USE_SPECULAR
|
|
@@ -7898,7 +7898,7 @@ void main() {
|
|
|
7898
7898
|
#include <fog_fragment>
|
|
7899
7899
|
#include <premultiplied_alpha_fragment>
|
|
7900
7900
|
#include <dithering_fragment>
|
|
7901
|
-
}`,
|
|
7901
|
+
}`, v4 = `#define TOON
|
|
7902
7902
|
varying vec3 vViewPosition;
|
|
7903
7903
|
#include <common>
|
|
7904
7904
|
#include <batching_pars_vertex>
|
|
@@ -7935,7 +7935,7 @@ void main() {
|
|
|
7935
7935
|
#include <worldpos_vertex>
|
|
7936
7936
|
#include <shadowmap_vertex>
|
|
7937
7937
|
#include <fog_vertex>
|
|
7938
|
-
}`,
|
|
7938
|
+
}`, y4 = `#define TOON
|
|
7939
7939
|
uniform vec3 diffuse;
|
|
7940
7940
|
uniform vec3 emissive;
|
|
7941
7941
|
uniform float opacity;
|
|
@@ -7988,7 +7988,7 @@ void main() {
|
|
|
7988
7988
|
#include <fog_fragment>
|
|
7989
7989
|
#include <premultiplied_alpha_fragment>
|
|
7990
7990
|
#include <dithering_fragment>
|
|
7991
|
-
}`,
|
|
7991
|
+
}`, w4 = `uniform float size;
|
|
7992
7992
|
uniform float scale;
|
|
7993
7993
|
#include <common>
|
|
7994
7994
|
#include <color_pars_vertex>
|
|
@@ -8019,7 +8019,7 @@ void main() {
|
|
|
8019
8019
|
#include <clipping_planes_vertex>
|
|
8020
8020
|
#include <worldpos_vertex>
|
|
8021
8021
|
#include <fog_vertex>
|
|
8022
|
-
}`,
|
|
8022
|
+
}`, C4 = `uniform vec3 diffuse;
|
|
8023
8023
|
uniform float opacity;
|
|
8024
8024
|
#include <common>
|
|
8025
8025
|
#include <color_pars_fragment>
|
|
@@ -8044,7 +8044,7 @@ void main() {
|
|
|
8044
8044
|
#include <colorspace_fragment>
|
|
8045
8045
|
#include <fog_fragment>
|
|
8046
8046
|
#include <premultiplied_alpha_fragment>
|
|
8047
|
-
}`,
|
|
8047
|
+
}`, x4 = `#include <common>
|
|
8048
8048
|
#include <batching_pars_vertex>
|
|
8049
8049
|
#include <fog_pars_vertex>
|
|
8050
8050
|
#include <morphtarget_pars_vertex>
|
|
@@ -8067,7 +8067,7 @@ void main() {
|
|
|
8067
8067
|
#include <worldpos_vertex>
|
|
8068
8068
|
#include <shadowmap_vertex>
|
|
8069
8069
|
#include <fog_vertex>
|
|
8070
|
-
}`,
|
|
8070
|
+
}`, I4 = `uniform vec3 color;
|
|
8071
8071
|
uniform float opacity;
|
|
8072
8072
|
#include <common>
|
|
8073
8073
|
#include <packing>
|
|
@@ -8083,7 +8083,7 @@ void main() {
|
|
|
8083
8083
|
#include <tonemapping_fragment>
|
|
8084
8084
|
#include <colorspace_fragment>
|
|
8085
8085
|
#include <fog_fragment>
|
|
8086
|
-
}`,
|
|
8086
|
+
}`, b4 = `uniform float rotation;
|
|
8087
8087
|
uniform vec2 center;
|
|
8088
8088
|
#include <common>
|
|
8089
8089
|
#include <uv_pars_vertex>
|
|
@@ -8109,7 +8109,7 @@ void main() {
|
|
|
8109
8109
|
#include <logdepthbuf_vertex>
|
|
8110
8110
|
#include <clipping_planes_vertex>
|
|
8111
8111
|
#include <fog_vertex>
|
|
8112
|
-
}`,
|
|
8112
|
+
}`, M4 = `uniform vec3 diffuse;
|
|
8113
8113
|
uniform float opacity;
|
|
8114
8114
|
#include <common>
|
|
8115
8115
|
#include <uv_pars_fragment>
|
|
@@ -8196,86 +8196,86 @@ void main() {
|
|
|
8196
8196
|
logdepthbuf_pars_vertex: Q3,
|
|
8197
8197
|
logdepthbuf_vertex: V3,
|
|
8198
8198
|
map_fragment: $3,
|
|
8199
|
-
map_pars_fragment:
|
|
8200
|
-
map_particle_fragment:
|
|
8201
|
-
map_particle_pars_fragment:
|
|
8202
|
-
metalnessmap_fragment:
|
|
8203
|
-
metalnessmap_pars_fragment:
|
|
8204
|
-
morphinstance_vertex:
|
|
8205
|
-
morphcolor_vertex:
|
|
8206
|
-
morphnormal_vertex:
|
|
8207
|
-
morphtarget_pars_vertex:
|
|
8208
|
-
morphtarget_vertex:
|
|
8209
|
-
normal_fragment_begin:
|
|
8210
|
-
normal_fragment_maps:
|
|
8211
|
-
normal_pars_fragment:
|
|
8212
|
-
normal_pars_vertex:
|
|
8213
|
-
normal_vertex:
|
|
8214
|
-
normalmap_pars_fragment:
|
|
8215
|
-
clearcoat_normal_fragment_begin:
|
|
8216
|
-
clearcoat_normal_fragment_maps:
|
|
8217
|
-
clearcoat_pars_fragment:
|
|
8218
|
-
iridescence_pars_fragment:
|
|
8219
|
-
opaque_fragment:
|
|
8220
|
-
packing:
|
|
8221
|
-
premultiplied_alpha_fragment:
|
|
8222
|
-
project_vertex:
|
|
8223
|
-
dithering_fragment:
|
|
8224
|
-
dithering_pars_fragment:
|
|
8225
|
-
roughnessmap_fragment:
|
|
8226
|
-
roughnessmap_pars_fragment:
|
|
8227
|
-
shadowmap_pars_fragment:
|
|
8228
|
-
shadowmap_pars_vertex:
|
|
8229
|
-
shadowmap_vertex:
|
|
8230
|
-
shadowmask_pars_fragment:
|
|
8231
|
-
skinbase_vertex:
|
|
8232
|
-
skinning_pars_vertex:
|
|
8233
|
-
skinning_vertex:
|
|
8234
|
-
skinnormal_vertex:
|
|
8235
|
-
specularmap_fragment:
|
|
8236
|
-
specularmap_pars_fragment:
|
|
8237
|
-
tonemapping_fragment:
|
|
8238
|
-
tonemapping_pars_fragment:
|
|
8239
|
-
transmission_fragment:
|
|
8240
|
-
transmission_pars_fragment:
|
|
8241
|
-
uv_pars_fragment:
|
|
8242
|
-
uv_pars_vertex:
|
|
8243
|
-
uv_vertex:
|
|
8244
|
-
worldpos_vertex:
|
|
8245
|
-
background_vert:
|
|
8246
|
-
background_frag:
|
|
8247
|
-
backgroundCube_vert:
|
|
8248
|
-
backgroundCube_frag:
|
|
8249
|
-
cube_vert:
|
|
8250
|
-
cube_frag:
|
|
8251
|
-
depth_vert:
|
|
8252
|
-
depth_frag: $
|
|
8253
|
-
distanceRGBA_vert:
|
|
8254
|
-
distanceRGBA_frag:
|
|
8255
|
-
equirect_vert:
|
|
8256
|
-
equirect_frag:
|
|
8257
|
-
linedashed_vert:
|
|
8258
|
-
linedashed_frag:
|
|
8259
|
-
meshbasic_vert:
|
|
8260
|
-
meshbasic_frag:
|
|
8261
|
-
meshlambert_vert:
|
|
8262
|
-
meshlambert_frag:
|
|
8263
|
-
meshmatcap_vert:
|
|
8264
|
-
meshmatcap_frag:
|
|
8265
|
-
meshnormal_vert:
|
|
8266
|
-
meshnormal_frag:
|
|
8267
|
-
meshphong_vert:
|
|
8268
|
-
meshphong_frag:
|
|
8269
|
-
meshphysical_vert:
|
|
8270
|
-
meshphysical_frag:
|
|
8271
|
-
meshtoon_vert:
|
|
8272
|
-
meshtoon_frag:
|
|
8273
|
-
points_vert:
|
|
8274
|
-
points_frag:
|
|
8275
|
-
shadow_vert:
|
|
8276
|
-
shadow_frag:
|
|
8277
|
-
sprite_vert:
|
|
8278
|
-
sprite_frag:
|
|
8199
|
+
map_pars_fragment: A_,
|
|
8200
|
+
map_particle_fragment: t_,
|
|
8201
|
+
map_particle_pars_fragment: e_,
|
|
8202
|
+
metalnessmap_fragment: i_,
|
|
8203
|
+
metalnessmap_pars_fragment: n_,
|
|
8204
|
+
morphinstance_vertex: s_,
|
|
8205
|
+
morphcolor_vertex: r_,
|
|
8206
|
+
morphnormal_vertex: o_,
|
|
8207
|
+
morphtarget_pars_vertex: a_,
|
|
8208
|
+
morphtarget_vertex: l_,
|
|
8209
|
+
normal_fragment_begin: c_,
|
|
8210
|
+
normal_fragment_maps: h_,
|
|
8211
|
+
normal_pars_fragment: u_,
|
|
8212
|
+
normal_pars_vertex: f_,
|
|
8213
|
+
normal_vertex: d_,
|
|
8214
|
+
normalmap_pars_fragment: p_,
|
|
8215
|
+
clearcoat_normal_fragment_begin: m_,
|
|
8216
|
+
clearcoat_normal_fragment_maps: g_,
|
|
8217
|
+
clearcoat_pars_fragment: v_,
|
|
8218
|
+
iridescence_pars_fragment: y_,
|
|
8219
|
+
opaque_fragment: w_,
|
|
8220
|
+
packing: C_,
|
|
8221
|
+
premultiplied_alpha_fragment: x_,
|
|
8222
|
+
project_vertex: I_,
|
|
8223
|
+
dithering_fragment: b_,
|
|
8224
|
+
dithering_pars_fragment: M_,
|
|
8225
|
+
roughnessmap_fragment: S_,
|
|
8226
|
+
roughnessmap_pars_fragment: __,
|
|
8227
|
+
shadowmap_pars_fragment: P_,
|
|
8228
|
+
shadowmap_pars_vertex: T_,
|
|
8229
|
+
shadowmap_vertex: E_,
|
|
8230
|
+
shadowmask_pars_fragment: D_,
|
|
8231
|
+
skinbase_vertex: L_,
|
|
8232
|
+
skinning_pars_vertex: q_,
|
|
8233
|
+
skinning_vertex: O_,
|
|
8234
|
+
skinnormal_vertex: N_,
|
|
8235
|
+
specularmap_fragment: z_,
|
|
8236
|
+
specularmap_pars_fragment: B_,
|
|
8237
|
+
tonemapping_fragment: R_,
|
|
8238
|
+
tonemapping_pars_fragment: j_,
|
|
8239
|
+
transmission_fragment: K_,
|
|
8240
|
+
transmission_pars_fragment: k_,
|
|
8241
|
+
uv_pars_fragment: G_,
|
|
8242
|
+
uv_pars_vertex: F_,
|
|
8243
|
+
uv_vertex: Y_,
|
|
8244
|
+
worldpos_vertex: H_,
|
|
8245
|
+
background_vert: W_,
|
|
8246
|
+
background_frag: U_,
|
|
8247
|
+
backgroundCube_vert: J_,
|
|
8248
|
+
backgroundCube_frag: Z_,
|
|
8249
|
+
cube_vert: X_,
|
|
8250
|
+
cube_frag: Q_,
|
|
8251
|
+
depth_vert: V_,
|
|
8252
|
+
depth_frag: $_,
|
|
8253
|
+
distanceRGBA_vert: A4,
|
|
8254
|
+
distanceRGBA_frag: t4,
|
|
8255
|
+
equirect_vert: e4,
|
|
8256
|
+
equirect_frag: i4,
|
|
8257
|
+
linedashed_vert: n4,
|
|
8258
|
+
linedashed_frag: s4,
|
|
8259
|
+
meshbasic_vert: r4,
|
|
8260
|
+
meshbasic_frag: o4,
|
|
8261
|
+
meshlambert_vert: a4,
|
|
8262
|
+
meshlambert_frag: l4,
|
|
8263
|
+
meshmatcap_vert: c4,
|
|
8264
|
+
meshmatcap_frag: h4,
|
|
8265
|
+
meshnormal_vert: u4,
|
|
8266
|
+
meshnormal_frag: f4,
|
|
8267
|
+
meshphong_vert: d4,
|
|
8268
|
+
meshphong_frag: p4,
|
|
8269
|
+
meshphysical_vert: m4,
|
|
8270
|
+
meshphysical_frag: g4,
|
|
8271
|
+
meshtoon_vert: v4,
|
|
8272
|
+
meshtoon_frag: y4,
|
|
8273
|
+
points_vert: w4,
|
|
8274
|
+
points_frag: C4,
|
|
8275
|
+
shadow_vert: x4,
|
|
8276
|
+
shadow_frag: I4,
|
|
8277
|
+
sprite_vert: b4,
|
|
8278
|
+
sprite_frag: M4
|
|
8279
8279
|
}, hA = {
|
|
8280
8280
|
common: {
|
|
8281
8281
|
diffuse: { value: /* @__PURE__ */ new SA(16777215) },
|
|
@@ -8711,8 +8711,8 @@ Hi.physical = {
|
|
|
8711
8711
|
vertexShader: UA.meshphysical_vert,
|
|
8712
8712
|
fragmentShader: UA.meshphysical_frag
|
|
8713
8713
|
};
|
|
8714
|
-
const Ec = { r: 0, b: 0, g: 0 }, Rs = /* @__PURE__ */ new $i(),
|
|
8715
|
-
function
|
|
8714
|
+
const Ec = { r: 0, b: 0, g: 0 }, Rs = /* @__PURE__ */ new $i(), S4 = /* @__PURE__ */ new gA();
|
|
8715
|
+
function _4(n, A, t, e, i, s, r) {
|
|
8716
8716
|
const o = new SA(0);
|
|
8717
8717
|
let a = s === !0 ? 0 : 1, c, u, l = null, h = 0, f = null;
|
|
8718
8718
|
function p(y) {
|
|
@@ -8746,7 +8746,7 @@ function _6(n, A, t, e, i, s, r) {
|
|
|
8746
8746
|
get: function() {
|
|
8747
8747
|
return this.uniforms.envMap.value;
|
|
8748
8748
|
}
|
|
8749
|
-
}), i.update(u)), Rs.copy(v.backgroundRotation), Rs.x *= -1, Rs.y *= -1, Rs.z *= -1, w.isCubeTexture && w.isRenderTargetTexture === !1 && (Rs.y *= -1, Rs.z *= -1), u.material.uniforms.envMap.value = w, u.material.uniforms.flipEnvMap.value = w.isCubeTexture && w.isRenderTargetTexture === !1 ? -1 : 1, u.material.uniforms.backgroundBlurriness.value = v.backgroundBlurriness, u.material.uniforms.backgroundIntensity.value = v.backgroundIntensity, u.material.uniforms.backgroundRotation.value.setFromMatrix4(
|
|
8749
|
+
}), i.update(u)), Rs.copy(v.backgroundRotation), Rs.x *= -1, Rs.y *= -1, Rs.z *= -1, w.isCubeTexture && w.isRenderTargetTexture === !1 && (Rs.y *= -1, Rs.z *= -1), u.material.uniforms.envMap.value = w, u.material.uniforms.flipEnvMap.value = w.isCubeTexture && w.isRenderTargetTexture === !1 ? -1 : 1, u.material.uniforms.backgroundBlurriness.value = v.backgroundBlurriness, u.material.uniforms.backgroundIntensity.value = v.backgroundIntensity, u.material.uniforms.backgroundRotation.value.setFromMatrix4(S4.makeRotationFromEuler(Rs)), u.material.toneMapped = pt.getTransfer(w.colorSpace) !== bt, (l !== w || h !== w.version || f !== n.toneMapping) && (u.material.needsUpdate = !0, l = w, h = w.version, f = n.toneMapping), u.layers.enableAll(), y.unshift(u, u.geometry, u.material, 0, 0, null)) : w && w.isTexture && (c === void 0 && (c = new qt(
|
|
8750
8750
|
new wa(2, 2),
|
|
8751
8751
|
new Wt({
|
|
8752
8752
|
name: "BackgroundMaterial",
|
|
@@ -8784,7 +8784,7 @@ function _6(n, A, t, e, i, s, r) {
|
|
|
8784
8784
|
addToRenderList: d
|
|
8785
8785
|
};
|
|
8786
8786
|
}
|
|
8787
|
-
function
|
|
8787
|
+
function P4(n, A) {
|
|
8788
8788
|
const t = n.getParameter(n.MAX_VERTEX_ATTRIBS), e = {}, i = h(null);
|
|
8789
8789
|
let s = i, r = !1;
|
|
8790
8790
|
function o(b, D, P, _, L) {
|
|
@@ -9001,7 +9001,7 @@ function P6(n, A) {
|
|
|
9001
9001
|
disableUnusedAttributes: y
|
|
9002
9002
|
};
|
|
9003
9003
|
}
|
|
9004
|
-
function
|
|
9004
|
+
function T4(n, A, t) {
|
|
9005
9005
|
let e;
|
|
9006
9006
|
function i(c) {
|
|
9007
9007
|
e = c;
|
|
@@ -9045,7 +9045,7 @@ function T6(n, A, t) {
|
|
|
9045
9045
|
}
|
|
9046
9046
|
this.setMode = i, this.render = s, this.renderInstances = r, this.renderMultiDraw = o, this.renderMultiDrawInstances = a;
|
|
9047
9047
|
}
|
|
9048
|
-
function
|
|
9048
|
+
function E4(n, A, t, e) {
|
|
9049
9049
|
let i;
|
|
9050
9050
|
function s() {
|
|
9051
9051
|
if (i !== void 0)
|
|
@@ -9098,7 +9098,7 @@ function E6(n, A, t, e) {
|
|
|
9098
9098
|
maxSamples: C
|
|
9099
9099
|
};
|
|
9100
9100
|
}
|
|
9101
|
-
function
|
|
9101
|
+
function D4(n) {
|
|
9102
9102
|
const A = this;
|
|
9103
9103
|
let t = null, e = 0, i = !1, s = !1;
|
|
9104
9104
|
const r = new Oe(), o = new XA(), a = { value: null, needsUpdate: !1 };
|
|
@@ -9144,7 +9144,7 @@ function D6(n) {
|
|
|
9144
9144
|
return A.numPlanes = g, A.numIntersection = 0, d;
|
|
9145
9145
|
}
|
|
9146
9146
|
}
|
|
9147
|
-
function
|
|
9147
|
+
function L4(n) {
|
|
9148
9148
|
let A = /* @__PURE__ */ new WeakMap();
|
|
9149
9149
|
function t(r, o) {
|
|
9150
9150
|
return o === na ? r.mapping = ea : o === tm && (r.mapping = ia), r;
|
|
@@ -9316,7 +9316,7 @@ class Xv {
|
|
|
9316
9316
|
if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== A || this._pingPongRenderTarget.height !== t) {
|
|
9317
9317
|
this._pingPongRenderTarget !== null && this._dispose(), this._pingPongRenderTarget = Qv(A, t, e);
|
|
9318
9318
|
const { _lodMax: s } = this;
|
|
9319
|
-
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } =
|
|
9319
|
+
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = q4(s)), this._blurMaterial = O4(s, A, t);
|
|
9320
9320
|
}
|
|
9321
9321
|
return i;
|
|
9322
9322
|
}
|
|
@@ -9411,7 +9411,7 @@ class Xv {
|
|
|
9411
9411
|
Dc(t, C, M, 3 * w, 2 * w), a.setRenderTarget(t), a.render(l, ld);
|
|
9412
9412
|
}
|
|
9413
9413
|
}
|
|
9414
|
-
function
|
|
9414
|
+
function q4(n) {
|
|
9415
9415
|
const A = [], t = [], e = [];
|
|
9416
9416
|
let i = n;
|
|
9417
9417
|
const s = n - zo + 1 + Uv.length;
|
|
@@ -9458,7 +9458,7 @@ function Qv(n, A, t) {
|
|
|
9458
9458
|
function Dc(n, A, t, e, i) {
|
|
9459
9459
|
n.viewport.set(A, t, e, i), n.scissor.set(A, t, e, i);
|
|
9460
9460
|
}
|
|
9461
|
-
function
|
|
9461
|
+
function O4(n, A, t) {
|
|
9462
9462
|
const e = new Float32Array(er), i = new E(0, 1, 0);
|
|
9463
9463
|
return new Wt({
|
|
9464
9464
|
name: "SphericalGaussianBlur",
|
|
@@ -9676,7 +9676,7 @@ function Wg() {
|
|
|
9676
9676
|
`
|
|
9677
9677
|
);
|
|
9678
9678
|
}
|
|
9679
|
-
function
|
|
9679
|
+
function N4(n) {
|
|
9680
9680
|
let A = /* @__PURE__ */ new WeakMap(), t = null;
|
|
9681
9681
|
function e(o) {
|
|
9682
9682
|
if (o && o.isTexture) {
|
|
@@ -9717,7 +9717,7 @@ function N6(n) {
|
|
|
9717
9717
|
dispose: r
|
|
9718
9718
|
};
|
|
9719
9719
|
}
|
|
9720
|
-
function
|
|
9720
|
+
function z4(n) {
|
|
9721
9721
|
const A = {};
|
|
9722
9722
|
function t(e) {
|
|
9723
9723
|
if (A[e] !== void 0)
|
|
@@ -9754,7 +9754,7 @@ function z6(n) {
|
|
|
9754
9754
|
}
|
|
9755
9755
|
};
|
|
9756
9756
|
}
|
|
9757
|
-
function
|
|
9757
|
+
function B4(n, A, t, e) {
|
|
9758
9758
|
const i = {}, s = /* @__PURE__ */ new WeakMap();
|
|
9759
9759
|
function r(l) {
|
|
9760
9760
|
const h = l.target;
|
|
@@ -9823,7 +9823,7 @@ function B6(n, A, t, e) {
|
|
|
9823
9823
|
getWireframeAttribute: u
|
|
9824
9824
|
};
|
|
9825
9825
|
}
|
|
9826
|
-
function
|
|
9826
|
+
function R4(n, A, t) {
|
|
9827
9827
|
let e;
|
|
9828
9828
|
function i(h) {
|
|
9829
9829
|
e = h;
|
|
@@ -9871,7 +9871,7 @@ function R6(n, A, t) {
|
|
|
9871
9871
|
}
|
|
9872
9872
|
this.setMode = i, this.setIndex = o, this.render = a, this.renderInstances = c, this.renderMultiDraw = u, this.renderMultiDrawInstances = l;
|
|
9873
9873
|
}
|
|
9874
|
-
function
|
|
9874
|
+
function j4(n) {
|
|
9875
9875
|
const A = {
|
|
9876
9876
|
geometries: 0,
|
|
9877
9877
|
textures: 0
|
|
@@ -9916,7 +9916,7 @@ function j6(n) {
|
|
|
9916
9916
|
update: e
|
|
9917
9917
|
};
|
|
9918
9918
|
}
|
|
9919
|
-
function
|
|
9919
|
+
function K4(n, A, t) {
|
|
9920
9920
|
const e = /* @__PURE__ */ new WeakMap(), i = new ut();
|
|
9921
9921
|
function s(r, o, a) {
|
|
9922
9922
|
const c = r.morphTargetInfluences, u = o.morphAttributes.position || o.morphAttributes.normal || o.morphAttributes.color, l = u !== void 0 ? u.length : 0;
|
|
@@ -9962,7 +9962,7 @@ function K6(n, A, t) {
|
|
|
9962
9962
|
update: s
|
|
9963
9963
|
};
|
|
9964
9964
|
}
|
|
9965
|
-
function
|
|
9965
|
+
function k4(n, A, t, e) {
|
|
9966
9966
|
let i = /* @__PURE__ */ new WeakMap();
|
|
9967
9967
|
function s(a) {
|
|
9968
9968
|
const c = e.render.frame, u = a.geometry, l = A.get(a, u);
|
|
@@ -10033,11 +10033,11 @@ function cf(n, A) {
|
|
|
10033
10033
|
t[e] = n.allocateTextureUnit();
|
|
10034
10034
|
return t;
|
|
10035
10035
|
}
|
|
10036
|
-
function
|
|
10036
|
+
function G4(n, A) {
|
|
10037
10037
|
const t = this.cache;
|
|
10038
10038
|
t[0] !== A && (n.uniform1f(this.addr, A), t[0] = A);
|
|
10039
10039
|
}
|
|
10040
|
-
function
|
|
10040
|
+
function F4(n, A) {
|
|
10041
10041
|
const t = this.cache;
|
|
10042
10042
|
if (A.x !== void 0)
|
|
10043
10043
|
(t[0] !== A.x || t[1] !== A.y) && (n.uniform2f(this.addr, A.x, A.y), t[0] = A.x, t[1] = A.y);
|
|
@@ -10047,7 +10047,7 @@ function F6(n, A) {
|
|
|
10047
10047
|
n.uniform2fv(this.addr, A), ne(t, A);
|
|
10048
10048
|
}
|
|
10049
10049
|
}
|
|
10050
|
-
function
|
|
10050
|
+
function Y4(n, A) {
|
|
10051
10051
|
const t = this.cache;
|
|
10052
10052
|
if (A.x !== void 0)
|
|
10053
10053
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z) && (n.uniform3f(this.addr, A.x, A.y, A.z), t[0] = A.x, t[1] = A.y, t[2] = A.z);
|
|
@@ -10059,7 +10059,7 @@ function Y6(n, A) {
|
|
|
10059
10059
|
n.uniform3fv(this.addr, A), ne(t, A);
|
|
10060
10060
|
}
|
|
10061
10061
|
}
|
|
10062
|
-
function
|
|
10062
|
+
function H4(n, A) {
|
|
10063
10063
|
const t = this.cache;
|
|
10064
10064
|
if (A.x !== void 0)
|
|
10065
10065
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z || t[3] !== A.w) && (n.uniform4f(this.addr, A.x, A.y, A.z, A.w), t[0] = A.x, t[1] = A.y, t[2] = A.z, t[3] = A.w);
|
|
@@ -10069,7 +10069,7 @@ function H6(n, A) {
|
|
|
10069
10069
|
n.uniform4fv(this.addr, A), ne(t, A);
|
|
10070
10070
|
}
|
|
10071
10071
|
}
|
|
10072
|
-
function
|
|
10072
|
+
function W4(n, A) {
|
|
10073
10073
|
const t = this.cache, e = A.elements;
|
|
10074
10074
|
if (e === void 0) {
|
|
10075
10075
|
if (ie(t, A))
|
|
@@ -10081,7 +10081,7 @@ function W6(n, A) {
|
|
|
10081
10081
|
ny.set(e), n.uniformMatrix2fv(this.addr, !1, ny), ne(t, e);
|
|
10082
10082
|
}
|
|
10083
10083
|
}
|
|
10084
|
-
function
|
|
10084
|
+
function U4(n, A) {
|
|
10085
10085
|
const t = this.cache, e = A.elements;
|
|
10086
10086
|
if (e === void 0) {
|
|
10087
10087
|
if (ie(t, A))
|
|
@@ -10093,7 +10093,7 @@ function U6(n, A) {
|
|
|
10093
10093
|
iy.set(e), n.uniformMatrix3fv(this.addr, !1, iy), ne(t, e);
|
|
10094
10094
|
}
|
|
10095
10095
|
}
|
|
10096
|
-
function
|
|
10096
|
+
function J4(n, A) {
|
|
10097
10097
|
const t = this.cache, e = A.elements;
|
|
10098
10098
|
if (e === void 0) {
|
|
10099
10099
|
if (ie(t, A))
|
|
@@ -10105,11 +10105,11 @@ function J6(n, A) {
|
|
|
10105
10105
|
ey.set(e), n.uniformMatrix4fv(this.addr, !1, ey), ne(t, e);
|
|
10106
10106
|
}
|
|
10107
10107
|
}
|
|
10108
|
-
function
|
|
10108
|
+
function Z4(n, A) {
|
|
10109
10109
|
const t = this.cache;
|
|
10110
10110
|
t[0] !== A && (n.uniform1i(this.addr, A), t[0] = A);
|
|
10111
10111
|
}
|
|
10112
|
-
function
|
|
10112
|
+
function X4(n, A) {
|
|
10113
10113
|
const t = this.cache;
|
|
10114
10114
|
if (A.x !== void 0)
|
|
10115
10115
|
(t[0] !== A.x || t[1] !== A.y) && (n.uniform2i(this.addr, A.x, A.y), t[0] = A.x, t[1] = A.y);
|
|
@@ -10119,7 +10119,7 @@ function X6(n, A) {
|
|
|
10119
10119
|
n.uniform2iv(this.addr, A), ne(t, A);
|
|
10120
10120
|
}
|
|
10121
10121
|
}
|
|
10122
|
-
function
|
|
10122
|
+
function Q4(n, A) {
|
|
10123
10123
|
const t = this.cache;
|
|
10124
10124
|
if (A.x !== void 0)
|
|
10125
10125
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z) && (n.uniform3i(this.addr, A.x, A.y, A.z), t[0] = A.x, t[1] = A.y, t[2] = A.z);
|
|
@@ -10129,7 +10129,7 @@ function Q6(n, A) {
|
|
|
10129
10129
|
n.uniform3iv(this.addr, A), ne(t, A);
|
|
10130
10130
|
}
|
|
10131
10131
|
}
|
|
10132
|
-
function
|
|
10132
|
+
function V4(n, A) {
|
|
10133
10133
|
const t = this.cache;
|
|
10134
10134
|
if (A.x !== void 0)
|
|
10135
10135
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z || t[3] !== A.w) && (n.uniform4i(this.addr, A.x, A.y, A.z, A.w), t[0] = A.x, t[1] = A.y, t[2] = A.z, t[3] = A.w);
|
|
@@ -10139,11 +10139,11 @@ function V6(n, A) {
|
|
|
10139
10139
|
n.uniform4iv(this.addr, A), ne(t, A);
|
|
10140
10140
|
}
|
|
10141
10141
|
}
|
|
10142
|
-
function $
|
|
10142
|
+
function $4(n, A) {
|
|
10143
10143
|
const t = this.cache;
|
|
10144
10144
|
t[0] !== A && (n.uniform1ui(this.addr, A), t[0] = A);
|
|
10145
10145
|
}
|
|
10146
|
-
function
|
|
10146
|
+
function A6(n, A) {
|
|
10147
10147
|
const t = this.cache;
|
|
10148
10148
|
if (A.x !== void 0)
|
|
10149
10149
|
(t[0] !== A.x || t[1] !== A.y) && (n.uniform2ui(this.addr, A.x, A.y), t[0] = A.x, t[1] = A.y);
|
|
@@ -10153,7 +10153,7 @@ function A_(n, A) {
|
|
|
10153
10153
|
n.uniform2uiv(this.addr, A), ne(t, A);
|
|
10154
10154
|
}
|
|
10155
10155
|
}
|
|
10156
|
-
function
|
|
10156
|
+
function t6(n, A) {
|
|
10157
10157
|
const t = this.cache;
|
|
10158
10158
|
if (A.x !== void 0)
|
|
10159
10159
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z) && (n.uniform3ui(this.addr, A.x, A.y, A.z), t[0] = A.x, t[1] = A.y, t[2] = A.z);
|
|
@@ -10163,7 +10163,7 @@ function t_(n, A) {
|
|
|
10163
10163
|
n.uniform3uiv(this.addr, A), ne(t, A);
|
|
10164
10164
|
}
|
|
10165
10165
|
}
|
|
10166
|
-
function
|
|
10166
|
+
function e6(n, A) {
|
|
10167
10167
|
const t = this.cache;
|
|
10168
10168
|
if (A.x !== void 0)
|
|
10169
10169
|
(t[0] !== A.x || t[1] !== A.y || t[2] !== A.z || t[3] !== A.w) && (n.uniform4ui(this.addr, A.x, A.y, A.z, A.w), t[0] = A.x, t[1] = A.y, t[2] = A.z, t[3] = A.w);
|
|
@@ -10173,226 +10173,226 @@ function e_(n, A) {
|
|
|
10173
10173
|
n.uniform4uiv(this.addr, A), ne(t, A);
|
|
10174
10174
|
}
|
|
10175
10175
|
}
|
|
10176
|
-
function
|
|
10176
|
+
function i6(n, A, t) {
|
|
10177
10177
|
const e = this.cache, i = t.allocateTextureUnit();
|
|
10178
10178
|
e[0] !== i && (n.uniform1i(this.addr, i), e[0] = i);
|
|
10179
10179
|
const s = this.type === n.SAMPLER_2D_SHADOW ? U1 : W1;
|
|
10180
10180
|
t.setTexture2D(A || s, i);
|
|
10181
10181
|
}
|
|
10182
|
-
function
|
|
10182
|
+
function n6(n, A, t) {
|
|
10183
10183
|
const e = this.cache, i = t.allocateTextureUnit();
|
|
10184
10184
|
e[0] !== i && (n.uniform1i(this.addr, i), e[0] = i), t.setTexture3D(A || Z1, i);
|
|
10185
10185
|
}
|
|
10186
|
-
function
|
|
10186
|
+
function s6(n, A, t) {
|
|
10187
10187
|
const e = this.cache, i = t.allocateTextureUnit();
|
|
10188
10188
|
e[0] !== i && (n.uniform1i(this.addr, i), e[0] = i), t.setTextureCube(A || X1, i);
|
|
10189
10189
|
}
|
|
10190
|
-
function
|
|
10190
|
+
function r6(n, A, t) {
|
|
10191
10191
|
const e = this.cache, i = t.allocateTextureUnit();
|
|
10192
10192
|
e[0] !== i && (n.uniform1i(this.addr, i), e[0] = i), t.setTexture2DArray(A || J1, i);
|
|
10193
10193
|
}
|
|
10194
|
-
function
|
|
10194
|
+
function o6(n) {
|
|
10195
10195
|
switch (n) {
|
|
10196
10196
|
case 5126:
|
|
10197
|
-
return
|
|
10197
|
+
return G4;
|
|
10198
10198
|
case 35664:
|
|
10199
|
-
return
|
|
10199
|
+
return F4;
|
|
10200
10200
|
case 35665:
|
|
10201
|
-
return
|
|
10201
|
+
return Y4;
|
|
10202
10202
|
case 35666:
|
|
10203
|
-
return
|
|
10203
|
+
return H4;
|
|
10204
10204
|
case 35674:
|
|
10205
|
-
return
|
|
10205
|
+
return W4;
|
|
10206
10206
|
case 35675:
|
|
10207
|
-
return
|
|
10207
|
+
return U4;
|
|
10208
10208
|
case 35676:
|
|
10209
|
-
return
|
|
10209
|
+
return J4;
|
|
10210
10210
|
case 5124:
|
|
10211
10211
|
case 35670:
|
|
10212
|
-
return
|
|
10212
|
+
return Z4;
|
|
10213
10213
|
case 35667:
|
|
10214
10214
|
case 35671:
|
|
10215
|
-
return
|
|
10215
|
+
return X4;
|
|
10216
10216
|
case 35668:
|
|
10217
10217
|
case 35672:
|
|
10218
|
-
return
|
|
10218
|
+
return Q4;
|
|
10219
10219
|
case 35669:
|
|
10220
10220
|
case 35673:
|
|
10221
|
-
return
|
|
10221
|
+
return V4;
|
|
10222
10222
|
case 5125:
|
|
10223
|
-
return $
|
|
10223
|
+
return $4;
|
|
10224
10224
|
case 36294:
|
|
10225
|
-
return
|
|
10225
|
+
return A6;
|
|
10226
10226
|
case 36295:
|
|
10227
|
-
return
|
|
10227
|
+
return t6;
|
|
10228
10228
|
case 36296:
|
|
10229
|
-
return
|
|
10229
|
+
return e6;
|
|
10230
10230
|
case 35678:
|
|
10231
10231
|
case 36198:
|
|
10232
10232
|
case 36298:
|
|
10233
10233
|
case 36306:
|
|
10234
10234
|
case 35682:
|
|
10235
|
-
return
|
|
10235
|
+
return i6;
|
|
10236
10236
|
case 35679:
|
|
10237
10237
|
case 36299:
|
|
10238
10238
|
case 36307:
|
|
10239
|
-
return
|
|
10239
|
+
return n6;
|
|
10240
10240
|
case 35680:
|
|
10241
10241
|
case 36300:
|
|
10242
10242
|
case 36308:
|
|
10243
10243
|
case 36293:
|
|
10244
|
-
return
|
|
10244
|
+
return s6;
|
|
10245
10245
|
case 36289:
|
|
10246
10246
|
case 36303:
|
|
10247
10247
|
case 36311:
|
|
10248
10248
|
case 36292:
|
|
10249
|
-
return
|
|
10249
|
+
return r6;
|
|
10250
10250
|
}
|
|
10251
10251
|
}
|
|
10252
|
-
function
|
|
10252
|
+
function a6(n, A) {
|
|
10253
10253
|
n.uniform1fv(this.addr, A);
|
|
10254
10254
|
}
|
|
10255
|
-
function
|
|
10255
|
+
function l6(n, A) {
|
|
10256
10256
|
const t = Ca(A, this.size, 2);
|
|
10257
10257
|
n.uniform2fv(this.addr, t);
|
|
10258
10258
|
}
|
|
10259
|
-
function
|
|
10259
|
+
function c6(n, A) {
|
|
10260
10260
|
const t = Ca(A, this.size, 3);
|
|
10261
10261
|
n.uniform3fv(this.addr, t);
|
|
10262
10262
|
}
|
|
10263
|
-
function
|
|
10263
|
+
function h6(n, A) {
|
|
10264
10264
|
const t = Ca(A, this.size, 4);
|
|
10265
10265
|
n.uniform4fv(this.addr, t);
|
|
10266
10266
|
}
|
|
10267
|
-
function
|
|
10267
|
+
function u6(n, A) {
|
|
10268
10268
|
const t = Ca(A, this.size, 4);
|
|
10269
10269
|
n.uniformMatrix2fv(this.addr, !1, t);
|
|
10270
10270
|
}
|
|
10271
|
-
function
|
|
10271
|
+
function f6(n, A) {
|
|
10272
10272
|
const t = Ca(A, this.size, 9);
|
|
10273
10273
|
n.uniformMatrix3fv(this.addr, !1, t);
|
|
10274
10274
|
}
|
|
10275
|
-
function
|
|
10275
|
+
function d6(n, A) {
|
|
10276
10276
|
const t = Ca(A, this.size, 16);
|
|
10277
10277
|
n.uniformMatrix4fv(this.addr, !1, t);
|
|
10278
10278
|
}
|
|
10279
|
-
function
|
|
10279
|
+
function p6(n, A) {
|
|
10280
10280
|
n.uniform1iv(this.addr, A);
|
|
10281
10281
|
}
|
|
10282
|
-
function
|
|
10282
|
+
function m6(n, A) {
|
|
10283
10283
|
n.uniform2iv(this.addr, A);
|
|
10284
10284
|
}
|
|
10285
|
-
function
|
|
10285
|
+
function g6(n, A) {
|
|
10286
10286
|
n.uniform3iv(this.addr, A);
|
|
10287
10287
|
}
|
|
10288
|
-
function
|
|
10288
|
+
function v6(n, A) {
|
|
10289
10289
|
n.uniform4iv(this.addr, A);
|
|
10290
10290
|
}
|
|
10291
|
-
function
|
|
10291
|
+
function y6(n, A) {
|
|
10292
10292
|
n.uniform1uiv(this.addr, A);
|
|
10293
10293
|
}
|
|
10294
|
-
function
|
|
10294
|
+
function w6(n, A) {
|
|
10295
10295
|
n.uniform2uiv(this.addr, A);
|
|
10296
10296
|
}
|
|
10297
|
-
function
|
|
10297
|
+
function C6(n, A) {
|
|
10298
10298
|
n.uniform3uiv(this.addr, A);
|
|
10299
10299
|
}
|
|
10300
|
-
function
|
|
10300
|
+
function x6(n, A) {
|
|
10301
10301
|
n.uniform4uiv(this.addr, A);
|
|
10302
10302
|
}
|
|
10303
|
-
function
|
|
10303
|
+
function I6(n, A, t) {
|
|
10304
10304
|
const e = this.cache, i = A.length, s = cf(t, i);
|
|
10305
10305
|
ie(e, s) || (n.uniform1iv(this.addr, s), ne(e, s));
|
|
10306
10306
|
for (let r = 0; r !== i; ++r)
|
|
10307
10307
|
t.setTexture2D(A[r] || W1, s[r]);
|
|
10308
10308
|
}
|
|
10309
|
-
function
|
|
10309
|
+
function b6(n, A, t) {
|
|
10310
10310
|
const e = this.cache, i = A.length, s = cf(t, i);
|
|
10311
10311
|
ie(e, s) || (n.uniform1iv(this.addr, s), ne(e, s));
|
|
10312
10312
|
for (let r = 0; r !== i; ++r)
|
|
10313
10313
|
t.setTexture3D(A[r] || Z1, s[r]);
|
|
10314
10314
|
}
|
|
10315
|
-
function
|
|
10315
|
+
function M6(n, A, t) {
|
|
10316
10316
|
const e = this.cache, i = A.length, s = cf(t, i);
|
|
10317
10317
|
ie(e, s) || (n.uniform1iv(this.addr, s), ne(e, s));
|
|
10318
10318
|
for (let r = 0; r !== i; ++r)
|
|
10319
10319
|
t.setTextureCube(A[r] || X1, s[r]);
|
|
10320
10320
|
}
|
|
10321
|
-
function
|
|
10321
|
+
function S6(n, A, t) {
|
|
10322
10322
|
const e = this.cache, i = A.length, s = cf(t, i);
|
|
10323
10323
|
ie(e, s) || (n.uniform1iv(this.addr, s), ne(e, s));
|
|
10324
10324
|
for (let r = 0; r !== i; ++r)
|
|
10325
10325
|
t.setTexture2DArray(A[r] || J1, s[r]);
|
|
10326
10326
|
}
|
|
10327
|
-
function
|
|
10327
|
+
function _6(n) {
|
|
10328
10328
|
switch (n) {
|
|
10329
10329
|
case 5126:
|
|
10330
|
-
return
|
|
10330
|
+
return a6;
|
|
10331
10331
|
case 35664:
|
|
10332
|
-
return
|
|
10332
|
+
return l6;
|
|
10333
10333
|
case 35665:
|
|
10334
|
-
return
|
|
10334
|
+
return c6;
|
|
10335
10335
|
case 35666:
|
|
10336
|
-
return
|
|
10336
|
+
return h6;
|
|
10337
10337
|
case 35674:
|
|
10338
|
-
return
|
|
10338
|
+
return u6;
|
|
10339
10339
|
case 35675:
|
|
10340
|
-
return
|
|
10340
|
+
return f6;
|
|
10341
10341
|
case 35676:
|
|
10342
|
-
return
|
|
10342
|
+
return d6;
|
|
10343
10343
|
case 5124:
|
|
10344
10344
|
case 35670:
|
|
10345
|
-
return
|
|
10345
|
+
return p6;
|
|
10346
10346
|
case 35667:
|
|
10347
10347
|
case 35671:
|
|
10348
|
-
return
|
|
10348
|
+
return m6;
|
|
10349
10349
|
case 35668:
|
|
10350
10350
|
case 35672:
|
|
10351
|
-
return
|
|
10351
|
+
return g6;
|
|
10352
10352
|
case 35669:
|
|
10353
10353
|
case 35673:
|
|
10354
|
-
return
|
|
10354
|
+
return v6;
|
|
10355
10355
|
case 5125:
|
|
10356
|
-
return
|
|
10356
|
+
return y6;
|
|
10357
10357
|
case 36294:
|
|
10358
|
-
return
|
|
10358
|
+
return w6;
|
|
10359
10359
|
case 36295:
|
|
10360
|
-
return
|
|
10360
|
+
return C6;
|
|
10361
10361
|
case 36296:
|
|
10362
|
-
return
|
|
10362
|
+
return x6;
|
|
10363
10363
|
case 35678:
|
|
10364
10364
|
case 36198:
|
|
10365
10365
|
case 36298:
|
|
10366
10366
|
case 36306:
|
|
10367
10367
|
case 35682:
|
|
10368
|
-
return
|
|
10368
|
+
return I6;
|
|
10369
10369
|
case 35679:
|
|
10370
10370
|
case 36299:
|
|
10371
10371
|
case 36307:
|
|
10372
|
-
return
|
|
10372
|
+
return b6;
|
|
10373
10373
|
case 35680:
|
|
10374
10374
|
case 36300:
|
|
10375
10375
|
case 36308:
|
|
10376
10376
|
case 36293:
|
|
10377
|
-
return
|
|
10377
|
+
return M6;
|
|
10378
10378
|
case 36289:
|
|
10379
10379
|
case 36303:
|
|
10380
10380
|
case 36311:
|
|
10381
10381
|
case 36292:
|
|
10382
|
-
return
|
|
10382
|
+
return S6;
|
|
10383
10383
|
}
|
|
10384
10384
|
}
|
|
10385
|
-
class
|
|
10385
|
+
class P6 {
|
|
10386
10386
|
constructor(A, t, e) {
|
|
10387
|
-
this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.setValue =
|
|
10387
|
+
this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.setValue = o6(t.type);
|
|
10388
10388
|
}
|
|
10389
10389
|
}
|
|
10390
|
-
class
|
|
10390
|
+
class T6 {
|
|
10391
10391
|
constructor(A, t, e) {
|
|
10392
|
-
this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.size = t.size, this.setValue =
|
|
10392
|
+
this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.size = t.size, this.setValue = _6(t.type);
|
|
10393
10393
|
}
|
|
10394
10394
|
}
|
|
10395
|
-
class
|
|
10395
|
+
class E6 {
|
|
10396
10396
|
constructor(A) {
|
|
10397
10397
|
this.id = A, this.seq = [], this.map = {};
|
|
10398
10398
|
}
|
|
@@ -10408,18 +10408,18 @@ const dd = /(\w+)(\])?(\[|\.)?/g;
|
|
|
10408
10408
|
function sy(n, A) {
|
|
10409
10409
|
n.seq.push(A), n.map[A.id] = A;
|
|
10410
10410
|
}
|
|
10411
|
-
function
|
|
10411
|
+
function D6(n, A, t) {
|
|
10412
10412
|
const e = n.name, i = e.length;
|
|
10413
10413
|
for (dd.lastIndex = 0; ; ) {
|
|
10414
10414
|
const s = dd.exec(e), r = dd.lastIndex;
|
|
10415
10415
|
let o = s[1];
|
|
10416
10416
|
const a = s[2] === "]", c = s[3];
|
|
10417
10417
|
if (a && (o = o | 0), c === void 0 || c === "[" && r + 2 === i) {
|
|
10418
|
-
sy(t, c === void 0 ? new
|
|
10418
|
+
sy(t, c === void 0 ? new P6(o, n, A) : new T6(o, n, A));
|
|
10419
10419
|
break;
|
|
10420
10420
|
} else {
|
|
10421
10421
|
let l = t.map[o];
|
|
10422
|
-
l === void 0 && (l = new
|
|
10422
|
+
l === void 0 && (l = new E6(o), sy(t, l)), t = l;
|
|
10423
10423
|
}
|
|
10424
10424
|
}
|
|
10425
10425
|
}
|
|
@@ -10429,7 +10429,7 @@ class su {
|
|
|
10429
10429
|
const e = A.getProgramParameter(t, A.ACTIVE_UNIFORMS);
|
|
10430
10430
|
for (let i = 0; i < e; ++i) {
|
|
10431
10431
|
const s = A.getActiveUniform(t, i), r = A.getUniformLocation(t, s.name);
|
|
10432
|
-
|
|
10432
|
+
D6(s, r, this);
|
|
10433
10433
|
}
|
|
10434
10434
|
}
|
|
10435
10435
|
setValue(A, t, e, i) {
|
|
@@ -10459,9 +10459,9 @@ function ry(n, A, t) {
|
|
|
10459
10459
|
const e = n.createShader(A);
|
|
10460
10460
|
return n.shaderSource(e, t), n.compileShader(e), e;
|
|
10461
10461
|
}
|
|
10462
|
-
const
|
|
10463
|
-
let
|
|
10464
|
-
function
|
|
10462
|
+
const L6 = 37297;
|
|
10463
|
+
let q6 = 0;
|
|
10464
|
+
function O6(n, A) {
|
|
10465
10465
|
const t = n.split(`
|
|
10466
10466
|
`), e = [], i = Math.max(A - 6, 0), s = Math.min(A + 6, t.length);
|
|
10467
10467
|
for (let r = i; r < s; r++) {
|
|
@@ -10471,7 +10471,7 @@ function O_(n, A) {
|
|
|
10471
10471
|
return e.join(`
|
|
10472
10472
|
`);
|
|
10473
10473
|
}
|
|
10474
|
-
function
|
|
10474
|
+
function N6(n) {
|
|
10475
10475
|
const A = pt.getPrimaries(pt.workingColorSpace), t = pt.getPrimaries(n);
|
|
10476
10476
|
let e;
|
|
10477
10477
|
switch (A === t ? e = "" : A === bu && t === Iu ? e = "LinearDisplayP3ToLinearSRGB" : A === Iu && t === bu && (e = "LinearSRGBToLinearDisplayP3"), n) {
|
|
@@ -10496,15 +10496,15 @@ function oy(n, A, t) {
|
|
|
10496
10496
|
|
|
10497
10497
|
` + i + `
|
|
10498
10498
|
|
|
10499
|
-
` +
|
|
10499
|
+
` + O6(n.getShaderSource(A), r);
|
|
10500
10500
|
} else
|
|
10501
10501
|
return i;
|
|
10502
10502
|
}
|
|
10503
|
-
function
|
|
10504
|
-
const t =
|
|
10503
|
+
function z6(n, A) {
|
|
10504
|
+
const t = N6(A);
|
|
10505
10505
|
return `vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`;
|
|
10506
10506
|
}
|
|
10507
|
-
function
|
|
10507
|
+
function B6(n, A) {
|
|
10508
10508
|
let t;
|
|
10509
10509
|
switch (A) {
|
|
10510
10510
|
case I1:
|
|
@@ -10533,14 +10533,14 @@ function B_(n, A) {
|
|
|
10533
10533
|
}
|
|
10534
10534
|
return "vec3 " + n + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
|
|
10535
10535
|
}
|
|
10536
|
-
function
|
|
10536
|
+
function R6(n) {
|
|
10537
10537
|
return [
|
|
10538
10538
|
n.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "",
|
|
10539
10539
|
n.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""
|
|
10540
10540
|
].filter(al).join(`
|
|
10541
10541
|
`);
|
|
10542
10542
|
}
|
|
10543
|
-
function
|
|
10543
|
+
function j6(n) {
|
|
10544
10544
|
const A = [];
|
|
10545
10545
|
for (const t in n) {
|
|
10546
10546
|
const e = n[t];
|
|
@@ -10549,7 +10549,7 @@ function j_(n) {
|
|
|
10549
10549
|
return A.join(`
|
|
10550
10550
|
`);
|
|
10551
10551
|
}
|
|
10552
|
-
function
|
|
10552
|
+
function K6(n, A) {
|
|
10553
10553
|
const t = {}, e = n.getProgramParameter(A, n.ACTIVE_ATTRIBUTES);
|
|
10554
10554
|
for (let i = 0; i < e; i++) {
|
|
10555
10555
|
const s = n.getActiveAttrib(A, i), r = s.name;
|
|
@@ -10572,15 +10572,15 @@ function ay(n, A) {
|
|
|
10572
10572
|
function ly(n, A) {
|
|
10573
10573
|
return n.replace(/NUM_CLIPPING_PLANES/g, A.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, A.numClippingPlanes - A.numClipIntersection);
|
|
10574
10574
|
}
|
|
10575
|
-
const
|
|
10575
|
+
const k6 = /^[ \t]*#include +<([\w\d./]+)>/gm;
|
|
10576
10576
|
function sm(n) {
|
|
10577
|
-
return n.replace(
|
|
10577
|
+
return n.replace(k6, F6);
|
|
10578
10578
|
}
|
|
10579
|
-
const
|
|
10580
|
-
function
|
|
10579
|
+
const G6 = /* @__PURE__ */ new Map();
|
|
10580
|
+
function F6(n, A) {
|
|
10581
10581
|
let t = UA[A];
|
|
10582
10582
|
if (t === void 0) {
|
|
10583
|
-
const e =
|
|
10583
|
+
const e = G6.get(A);
|
|
10584
10584
|
if (e !== void 0)
|
|
10585
10585
|
t = UA[e], console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', A, e);
|
|
10586
10586
|
else
|
|
@@ -10588,11 +10588,11 @@ function F_(n, A) {
|
|
|
10588
10588
|
}
|
|
10589
10589
|
return sm(t);
|
|
10590
10590
|
}
|
|
10591
|
-
const
|
|
10591
|
+
const Y6 = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
|
|
10592
10592
|
function cy(n) {
|
|
10593
|
-
return n.replace(
|
|
10593
|
+
return n.replace(Y6, H6);
|
|
10594
10594
|
}
|
|
10595
|
-
function
|
|
10595
|
+
function H6(n, A, t, e) {
|
|
10596
10596
|
let i = "";
|
|
10597
10597
|
for (let s = parseInt(A); s < parseInt(t); s++)
|
|
10598
10598
|
i += e.replace(/\[\s*i\s*\]/g, "[ " + s + " ]").replace(/UNROLLED_LOOP_INDEX/g, s);
|
|
@@ -10622,11 +10622,11 @@ function hy(n) {
|
|
|
10622
10622
|
#define MEDIUM_PRECISION` : n.precision === "lowp" && (A += `
|
|
10623
10623
|
#define LOW_PRECISION`), A;
|
|
10624
10624
|
}
|
|
10625
|
-
function
|
|
10625
|
+
function W6(n) {
|
|
10626
10626
|
let A = "SHADOWMAP_TYPE_BASIC";
|
|
10627
10627
|
return n.shadowMapType === C1 ? A = "SHADOWMAP_TYPE_PCF" : n.shadowMapType === aM ? A = "SHADOWMAP_TYPE_PCF_SOFT" : n.shadowMapType === vn && (A = "SHADOWMAP_TYPE_VSM"), A;
|
|
10628
10628
|
}
|
|
10629
|
-
function
|
|
10629
|
+
function U6(n) {
|
|
10630
10630
|
let A = "ENVMAP_TYPE_CUBE";
|
|
10631
10631
|
if (n.envMap)
|
|
10632
10632
|
switch (n.envMapMode) {
|
|
@@ -10640,7 +10640,7 @@ function U_(n) {
|
|
|
10640
10640
|
}
|
|
10641
10641
|
return A;
|
|
10642
10642
|
}
|
|
10643
|
-
function
|
|
10643
|
+
function J6(n) {
|
|
10644
10644
|
let A = "ENVMAP_MODE_REFLECTION";
|
|
10645
10645
|
if (n.envMap)
|
|
10646
10646
|
switch (n.envMapMode) {
|
|
@@ -10650,7 +10650,7 @@ function J_(n) {
|
|
|
10650
10650
|
}
|
|
10651
10651
|
return A;
|
|
10652
10652
|
}
|
|
10653
|
-
function
|
|
10653
|
+
function Z6(n) {
|
|
10654
10654
|
let A = "ENVMAP_BLENDING_NONE";
|
|
10655
10655
|
if (n.envMap)
|
|
10656
10656
|
switch (n.combine) {
|
|
@@ -10666,17 +10666,17 @@ function Z_(n) {
|
|
|
10666
10666
|
}
|
|
10667
10667
|
return A;
|
|
10668
10668
|
}
|
|
10669
|
-
function
|
|
10669
|
+
function X6(n) {
|
|
10670
10670
|
const A = n.envMapCubeUVHeight;
|
|
10671
10671
|
if (A === null)
|
|
10672
10672
|
return null;
|
|
10673
10673
|
const t = Math.log2(A) - 2, e = 1 / A;
|
|
10674
10674
|
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, t), 7 * 16)), texelHeight: e, maxMip: t };
|
|
10675
10675
|
}
|
|
10676
|
-
function
|
|
10676
|
+
function Q6(n, A, t, e) {
|
|
10677
10677
|
const i = n.getContext(), s = t.defines;
|
|
10678
10678
|
let r = t.vertexShader, o = t.fragmentShader;
|
|
10679
|
-
const a =
|
|
10679
|
+
const a = W6(t), c = U6(t), u = J6(t), l = Z6(t), h = X6(t), f = R6(t), p = j6(s), g = i.createProgram();
|
|
10680
10680
|
let d, m, y = t.glslVersion ? "#version " + t.glslVersion + `
|
|
10681
10681
|
` : "";
|
|
10682
10682
|
t.isRawShaderMaterial ? (d = [
|
|
@@ -10913,12 +10913,12 @@ function Q_(n, A, t, e) {
|
|
|
10913
10913
|
t.toneMapping !== Dn ? "#define TONE_MAPPING" : "",
|
|
10914
10914
|
t.toneMapping !== Dn ? UA.tonemapping_pars_fragment : "",
|
|
10915
10915
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
10916
|
-
t.toneMapping !== Dn ?
|
|
10916
|
+
t.toneMapping !== Dn ? B6("toneMapping", t.toneMapping) : "",
|
|
10917
10917
|
t.dithering ? "#define DITHERING" : "",
|
|
10918
10918
|
t.opaque ? "#define OPAQUE" : "",
|
|
10919
10919
|
UA.colorspace_pars_fragment,
|
|
10920
10920
|
// this code is required here because it is used by the various encoding/decoding function defined below
|
|
10921
|
-
|
|
10921
|
+
z6("linearToOutputTexel", t.outputColorSpace),
|
|
10922
10922
|
t.useDepthPacking ? "#define DEPTH_PACKING " + t.depthPacking : "",
|
|
10923
10923
|
`
|
|
10924
10924
|
`
|
|
@@ -10985,7 +10985,7 @@ Program Info Log: ` + P + `
|
|
|
10985
10985
|
}
|
|
10986
10986
|
});
|
|
10987
10987
|
}
|
|
10988
|
-
i.deleteShader(C), i.deleteShader(M), S = new su(i, g), x =
|
|
10988
|
+
i.deleteShader(C), i.deleteShader(M), S = new su(i, g), x = K6(i, g);
|
|
10989
10989
|
}
|
|
10990
10990
|
let S;
|
|
10991
10991
|
this.getUniforms = function() {
|
|
@@ -10997,13 +10997,13 @@ Program Info Log: ` + P + `
|
|
|
10997
10997
|
};
|
|
10998
10998
|
let b = t.rendererExtensionParallelShaderCompile === !1;
|
|
10999
10999
|
return this.isReady = function() {
|
|
11000
|
-
return b === !1 && (b = i.getProgramParameter(g,
|
|
11000
|
+
return b === !1 && (b = i.getProgramParameter(g, L6)), b;
|
|
11001
11001
|
}, this.destroy = function() {
|
|
11002
11002
|
e.releaseStatesOfProgram(this), i.deleteProgram(g), this.program = void 0;
|
|
11003
|
-
}, this.type = t.shaderType, this.name = t.shaderName, this.id =
|
|
11003
|
+
}, this.type = t.shaderType, this.name = t.shaderName, this.id = q6++, this.cacheKey = A, this.usedTimes = 1, this.program = g, this.vertexShader = C, this.fragmentShader = M, this;
|
|
11004
11004
|
}
|
|
11005
|
-
let
|
|
11006
|
-
class $
|
|
11005
|
+
let V6 = 0;
|
|
11006
|
+
class $6 {
|
|
11007
11007
|
constructor() {
|
|
11008
11008
|
this.shaderCache = /* @__PURE__ */ new Map(), this.materialCache = /* @__PURE__ */ new Map();
|
|
11009
11009
|
}
|
|
@@ -11039,11 +11039,11 @@ class $_ {
|
|
|
11039
11039
|
}
|
|
11040
11040
|
class AP {
|
|
11041
11041
|
constructor(A) {
|
|
11042
|
-
this.id =
|
|
11042
|
+
this.id = V6++, this.code = A, this.usedTimes = 0;
|
|
11043
11043
|
}
|
|
11044
11044
|
}
|
|
11045
11045
|
function tP(n, A, t, e, i, s, r) {
|
|
11046
|
-
const o = new Yg(), a = new $
|
|
11046
|
+
const o = new Yg(), a = new $6(), c = /* @__PURE__ */ new Set(), u = [], l = i.logarithmicDepthBuffer, h = i.vertexTextures;
|
|
11047
11047
|
let f = i.precision;
|
|
11048
11048
|
const p = {
|
|
11049
11049
|
MeshDepthMaterial: "depth",
|
|
@@ -11244,7 +11244,7 @@ function tP(n, A, t, e, i, s, r) {
|
|
|
11244
11244
|
break;
|
|
11245
11245
|
}
|
|
11246
11246
|
}
|
|
11247
|
-
return D === void 0 && (D = new
|
|
11247
|
+
return D === void 0 && (D = new Q6(n, b, x, s), u.push(D)), D;
|
|
11248
11248
|
}
|
|
11249
11249
|
function M(x) {
|
|
11250
11250
|
if (--x.usedTimes === 0) {
|
|
@@ -13400,7 +13400,7 @@ class V1 {
|
|
|
13400
13400
|
}
|
|
13401
13401
|
let mA, RA, bA, jA, kA, At, wt, z, q, X, AA, iA, nA, qA, dA, fA, YA, cA, DA, at, zA, CA, JA, tt;
|
|
13402
13402
|
function xt() {
|
|
13403
|
-
mA = new
|
|
13403
|
+
mA = new z4(K), mA.init(), CA = new gP(K, mA), RA = new E4(K, mA, A, CA), bA = new pP(K), jA = new j4(K), kA = new eP(), At = new mP(K, mA, bA, kA, RA, CA, jA), wt = new L4(v), z = new N4(v), q = new WS(K), JA = new P4(K, q), X = new B4(K, q, jA, JA), AA = new k4(K, X, q, jA), DA = new K4(K, RA, At), fA = new D4(kA), iA = new tP(v, wt, z, mA, RA, JA, fA), nA = new MP(v, kA), qA = new nP(), dA = new cP(mA), cA = new _4(v, wt, z, bA, AA, h, a), YA = new dP(v, AA, RA), tt = new SP(K, jA, RA, bA), at = new T4(K, mA, jA), zA = new R4(K, mA, jA), jA.programs = iA.programs, v.capabilities = RA, v.extensions = mA, v.properties = kA, v.renderLists = qA, v.shadowMap = YA, v.state = bA, v.info = jA;
|
|
13404
13404
|
}
|
|
13405
13405
|
xt();
|
|
13406
13406
|
const VA = new IP(v, K);
|
|
@@ -58191,7 +58191,7 @@ class qR extends yt {
|
|
|
58191
58191
|
A && (A.change(t), this._app && this._app.usePathTracing && (this._app.sampleCount = 0, this._app.pathTracer.reset(), this._app.pathTracer.updateMaterials()));
|
|
58192
58192
|
}
|
|
58193
58193
|
changeLogo(A, t) {
|
|
58194
|
-
A.change(t
|
|
58194
|
+
A.change(t), this._app && this._app.usePathTracing && (this._app.usePathTracing = !1, setTimeout(() => {
|
|
58195
58195
|
var e;
|
|
58196
58196
|
(e = this._app) == null || e.generateBVH().then();
|
|
58197
58197
|
}, 10));
|
|
@@ -60565,7 +60565,7 @@ class Qj {
|
|
|
60565
60565
|
const Vj = new Qj(), xk = new QL(u7);
|
|
60566
60566
|
class m1 {
|
|
60567
60567
|
constructor(A) {
|
|
60568
|
-
this._props = A, this.name = "", this.
|
|
60568
|
+
this._props = A, this.name = "", this._defaults = { ...A }, this.target = A.target, this.reset();
|
|
60569
60569
|
}
|
|
60570
60570
|
get imageSize() {
|
|
60571
60571
|
return this._props.imageSize;
|
|
@@ -60573,21 +60573,21 @@ class m1 {
|
|
|
60573
60573
|
get size() {
|
|
60574
60574
|
return this._props.size;
|
|
60575
60575
|
}
|
|
60576
|
-
change(A
|
|
60577
|
-
var
|
|
60578
|
-
this.
|
|
60579
|
-
const
|
|
60580
|
-
|
|
60581
|
-
|
|
60582
|
-
},
|
|
60583
|
-
const
|
|
60584
|
-
|
|
60585
|
-
var
|
|
60586
|
-
(
|
|
60587
|
-
}) : ((
|
|
60576
|
+
change(A) {
|
|
60577
|
+
var s;
|
|
60578
|
+
this.imageUrl = A;
|
|
60579
|
+
const t = new Image(), e = new ue(t);
|
|
60580
|
+
e.colorSpace = Lt, t.onload = () => {
|
|
60581
|
+
e.flipY = !1, e.needsUpdate = !0;
|
|
60582
|
+
}, t.src = A;
|
|
60583
|
+
const i = this._props.target;
|
|
60584
|
+
i.material && (Array.isArray(i.material) ? i.material.forEach((r) => {
|
|
60585
|
+
var o;
|
|
60586
|
+
(o = r.map) == null || o.dispose(), r.map = e;
|
|
60587
|
+
}) : ((s = i.material.map) == null || s.dispose(), i.material.map = e));
|
|
60588
60588
|
}
|
|
60589
60589
|
reset() {
|
|
60590
|
-
this._props = this._defaults, this.name = this._props.name, this.imageUrl = this._props.imageUrl, this.change(this.imageUrl || ""
|
|
60590
|
+
this._props = this._defaults, this.name = this._props.name, this.imageUrl = this._props.imageUrl, this.target = this._props.target, this.change(this.imageUrl || "");
|
|
60591
60591
|
}
|
|
60592
60592
|
}
|
|
60593
60593
|
class g1 {
|
|
@@ -62264,61 +62264,82 @@ let vr = class extends Is {
|
|
|
62264
62264
|
}, this.logoSize = {
|
|
62265
62265
|
width: 0,
|
|
62266
62266
|
height: 0
|
|
62267
|
-
}, this.texture = new ue(this.app.view), this._timer = 0, this._sprite = new Mr(), this.
|
|
62268
|
-
|
|
62267
|
+
}, this._imageUrl = "", this._canvasScale = 1, this.texture = new ue(this.app.view), this._timer = 0, this._sprite = new Mr(), this.getConfigs = () => {
|
|
62268
|
+
const { screenWidth: n, screenHeight: A } = this.viewport;
|
|
62269
|
+
return {
|
|
62270
|
+
canvasWidth: n,
|
|
62271
|
+
canvasHeight: A,
|
|
62272
|
+
scale: this.viewport.scale.x,
|
|
62273
|
+
x: this.viewport.position.x,
|
|
62274
|
+
y: this.viewport.position.y,
|
|
62275
|
+
url: this._imageUrl
|
|
62276
|
+
};
|
|
62277
|
+
}, this._onChanged = async () => {
|
|
62269
62278
|
if (!this.imageSize.width || !this.imageSize.height || !this.app.view.toDataURL)
|
|
62270
62279
|
return;
|
|
62271
|
-
const
|
|
62272
|
-
if (this._timer && clearTimeout(this._timer),
|
|
62273
|
-
const
|
|
62274
|
-
|
|
62275
|
-
let
|
|
62276
|
-
for (let
|
|
62277
|
-
for (let
|
|
62278
|
-
const
|
|
62279
|
-
|
|
62280
|
+
const n = this.app.view.toDataURL("image/png", 0.75), A = this.app.renderer.gl, { screenWidth: t, screenHeight: e } = this.viewport;
|
|
62281
|
+
if (this._timer && clearTimeout(this._timer), A) {
|
|
62282
|
+
const i = this.app.renderer.width, s = this.app.renderer.height, r = new Uint8Array(i * s * 4);
|
|
62283
|
+
A.readPixels(0, 0, i, s, A.RGBA, A.UNSIGNED_BYTE, r);
|
|
62284
|
+
let o = i, a = 0, c = s, u = 0;
|
|
62285
|
+
for (let d = 0; d < s; d++)
|
|
62286
|
+
for (let m = 0; m < i; m++) {
|
|
62287
|
+
const y = (d * i + m) * 4;
|
|
62288
|
+
r[y + 3] > 0 && (o = Math.min(o, m), a = Math.max(a, m), c = Math.min(c, d), u = Math.max(u, d));
|
|
62280
62289
|
}
|
|
62281
|
-
const
|
|
62282
|
-
x:
|
|
62283
|
-
y:
|
|
62284
|
-
width:
|
|
62285
|
-
height:
|
|
62290
|
+
const l = this.app.renderer.view.getBoundingClientRect(), h = {
|
|
62291
|
+
x: o,
|
|
62292
|
+
y: c,
|
|
62293
|
+
width: a - o + 1,
|
|
62294
|
+
height: u - c + 1
|
|
62286
62295
|
};
|
|
62287
|
-
(
|
|
62288
|
-
const p =
|
|
62289
|
-
if (
|
|
62290
|
-
|
|
62291
|
-
|
|
62292
|
-
|
|
62293
|
-
|
|
62294
|
-
|
|
62295
|
-
width: f.width * (h.width / this.app.renderer.width),
|
|
62296
|
-
height: f.height * (h.height / this.app.renderer.height)
|
|
62296
|
+
(o > a || c > u) && console.log("没有非透明区域"), this.axiosX && (this.axiosX.style.display = "none"), this.axiosY && (this.axiosY.style.display = "none");
|
|
62297
|
+
const f = 2, p = t / 2, g = e / 2;
|
|
62298
|
+
if (l) {
|
|
62299
|
+
const d = {
|
|
62300
|
+
x: h.x * (l.width / this.app.renderer.width),
|
|
62301
|
+
y: (this.app.renderer.height - h.y - h.height) * (l.height / this.app.renderer.height),
|
|
62302
|
+
width: h.width * (l.width / this.app.renderer.width),
|
|
62303
|
+
height: h.height * (l.height / this.app.renderer.height)
|
|
62297
62304
|
};
|
|
62298
|
-
this._domBoundingRect =
|
|
62299
|
-
|
|
62305
|
+
this._domBoundingRect = d, this.boundRect && (this.boundRect.style.left = `${d.x}px`, this.boundRect.style.top = `${d.y}px`, this.boundRect.style.width = `${d.width}px`, this.boundRect.style.height = `${d.height}px`);
|
|
62306
|
+
const m = d.x + d.width / 2, y = d.y + d.height / 2, v = p - m, w = g - y;
|
|
62307
|
+
Math.abs(v) < f && (this.viewport.position.x += v, this.axiosY && (this.axiosY.style.display = "block")), Math.abs(w) < f && (this.viewport.position.y += w, this.axiosX && (this.axiosX.style.display = "block"));
|
|
62308
|
+
} else
|
|
62309
|
+
Math.abs(this.viewport.position.x - p) < f && (this.viewport.position.x = p, this.axiosY && (this.axiosY.style.display = "block")), Math.abs(this.viewport.position.y - g) < f && (this.viewport.position.y = g, this.axiosX && (this.axiosX.style.display = "block"));
|
|
62310
|
+
this._timer = window.setTimeout(() => {
|
|
62311
|
+
this.axiosX && (this.axiosX.style.display = "none"), this.axiosY && (this.axiosY.style.display = "none");
|
|
62312
|
+
}, 600);
|
|
62300
62313
|
}
|
|
62301
62314
|
this.dispatchEvent(new CustomEvent("image-change", {
|
|
62302
|
-
detail: { image:
|
|
62315
|
+
detail: { image: n },
|
|
62303
62316
|
bubbles: !0,
|
|
62304
62317
|
// 让事件冒泡
|
|
62305
62318
|
composed: !0
|
|
62306
62319
|
// 允许事件穿越 Shadow DOM 边界
|
|
62307
62320
|
}));
|
|
62308
|
-
}
|
|
62309
|
-
|
|
62321
|
+
}, this._wheelEvent = (n) => {
|
|
62322
|
+
n.preventDefault();
|
|
62323
|
+
}, this.updateConfigs = async ({
|
|
62324
|
+
canvasWidth: n,
|
|
62325
|
+
x: A,
|
|
62326
|
+
y: t,
|
|
62327
|
+
scale: e,
|
|
62328
|
+
url: i
|
|
62329
|
+
}) => {
|
|
62330
|
+
const { screenWidth: s } = this.viewport;
|
|
62331
|
+
this._canvasScale = s / n, await this.add(i, this.logoSize), this.viewport.scale.set(e * this._canvasScale), this.viewport.position.set(A * this._canvasScale, t * this._canvasScale);
|
|
62332
|
+
}, this.app.stage.addChild(this.viewport), this.viewport.drag({}).pinch().wheel().decelerate({
|
|
62310
62333
|
friction: 0,
|
|
62311
62334
|
bounce: 1
|
|
62312
|
-
}).on("zoomed-end",
|
|
62313
|
-
A.preventDefault();
|
|
62314
|
-
}, { passive: !1 });
|
|
62335
|
+
}).on("zoomed-end", this._onChanged).on("moved-end", this._onChanged), this.app.view.addEventListener("wheel", this._wheelEvent, { passive: !1 });
|
|
62315
62336
|
}
|
|
62316
62337
|
get canvas() {
|
|
62317
62338
|
return this.app.view;
|
|
62318
62339
|
}
|
|
62319
62340
|
get imageScale() {
|
|
62320
|
-
const { screenWidth: n, screenHeight: A } = this.viewport, t = this.viewport.scale.x, e = this._sprite.width * t / 2, i = this._sprite.height * t / 2, s =
|
|
62321
|
-
return { x:
|
|
62341
|
+
const { screenWidth: n, screenHeight: A } = this.viewport, t = this.viewport.scale.x, e = this._sprite.width * t / 2, i = this._sprite.height * t / 2, s = this._domBoundingRect.width / e * (e / n), r = this._domBoundingRect.height / i * (i / A);
|
|
62342
|
+
return { x: s, y: r };
|
|
62322
62343
|
}
|
|
62323
62344
|
get imageRealSize() {
|
|
62324
62345
|
const { x: n, y: A } = this.imageScale;
|
|
@@ -62333,12 +62354,12 @@ let vr = class extends Is {
|
|
|
62333
62354
|
var A;
|
|
62334
62355
|
super.firstUpdated(n), this.container && ((A = this.container) == null || A.append(this.app.view), this.app.resizeTo = this.container, this.viewport.addChild(this._sprite));
|
|
62335
62356
|
}
|
|
62336
|
-
async add(n, A
|
|
62337
|
-
this.
|
|
62357
|
+
async add(n, A) {
|
|
62358
|
+
this._imageUrl = n, this.logoSize = A, this._sprite.texture = await xA.fromURL(n), this.imageSize.width = this._sprite.texture.width, this.imageSize.height = this._sprite.texture.height, this.fit();
|
|
62338
62359
|
}
|
|
62339
62360
|
fit() {
|
|
62340
62361
|
this.viewport.scale.set(1, 1), this._sprite.anchor.set(0.5, 0.5), this.viewport.moveCenter(this._sprite.position.x, this._sprite.position.y);
|
|
62341
|
-
const n = this.viewport.screenWidth, A = this.viewport.screenHeight, t = this._sprite.width / n, e = this._sprite.height / A, i = Math.
|
|
62362
|
+
const n = this.viewport.screenWidth, A = this.viewport.screenHeight, t = this._sprite.width / n, e = this._sprite.height / A, i = Math.max(t, e);
|
|
62342
62363
|
this.viewport.scale.set(1 / i, 1 / i);
|
|
62343
62364
|
}
|
|
62344
62365
|
disconnectedCallback() {
|
|
@@ -62346,7 +62367,7 @@ let vr = class extends Is {
|
|
|
62346
62367
|
children: !0,
|
|
62347
62368
|
texture: !0,
|
|
62348
62369
|
baseTexture: !0
|
|
62349
|
-
}), this.viewport.off("zoomed"), this.viewport.off("moved"), this.viewport.off("moved-end"), this.app.destroy(!0);
|
|
62370
|
+
}), this.viewport.off("zoomed"), this.viewport.off("moved"), this.viewport.off("moved-end"), this.app.view.removeEventListener("wheel", this._wheelEvent), this.app.destroy(!0);
|
|
62350
62371
|
}
|
|
62351
62372
|
render() {
|
|
62352
62373
|
return N0`
|
|
@@ -62384,6 +62405,7 @@ vr.styles = Pf`
|
|
|
62384
62405
|
}
|
|
62385
62406
|
|
|
62386
62407
|
.cross {
|
|
62408
|
+
pointer-events: none;
|
|
62387
62409
|
z-index: 10;
|
|
62388
62410
|
position: absolute;
|
|
62389
62411
|
left: 50%;
|