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.
@@ -5967,9 +5967,9 @@ IncidentLight directLight;
5967
5967
 
5968
5968
  #endif
5969
5969
  diffuseColor *= sampledDiffuseColor;
5970
- #endif`, A4 = `#ifdef USE_MAP
5970
+ #endif`, A_ = `#ifdef USE_MAP
5971
5971
  uniform sampler2D map;
5972
- #endif`, t4 = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
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`, e4 = `#if defined( USE_POINTS_UV )
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`, i4 = `float metalnessFactor = metalness;
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`, n4 = `#ifdef USE_METALNESSMAP
6000
+ #endif`, n_ = `#ifdef USE_METALNESSMAP
6001
6001
  uniform sampler2D metalnessMap;
6002
- #endif`, s4 = `#ifdef USE_INSTANCING_MORPH
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`, r4 = `#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
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`, o4 = `#ifdef USE_MORPHNORMALS
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`, a4 = `#ifdef USE_MORPHTARGETS
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`, l4 = `#ifdef USE_MORPHTARGETS
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`, c4 = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
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;`, h4 = `#ifdef USE_NORMALMAP_OBJECTSPACE
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`, u4 = `#ifndef FLAT_SHADED
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`, f4 = `#ifndef FLAT_SHADED
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`, d4 = `#ifndef FLAT_SHADED
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`, p4 = `#ifdef USE_NORMALMAP
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`, m4 = `#ifdef USE_CLEARCOAT
6167
+ #endif`, m_ = `#ifdef USE_CLEARCOAT
6168
6168
  vec3 clearcoatNormal = nonPerturbedNormal;
6169
- #endif`, g4 = `#ifdef USE_CLEARCOAT_NORMALMAP
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`, v4 = `#ifdef USE_CLEARCOATMAP
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`, y4 = `#ifdef USE_IRIDESCENCEMAP
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`, w4 = `#ifdef OPAQUE
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 );`, C4 = `vec3 packNormalToRGB( const in vec3 normal ) {
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
- }`, x4 = `#ifdef PREMULTIPLIED_ALPHA
6234
+ }`, x_ = `#ifdef PREMULTIPLIED_ALPHA
6235
6235
  gl_FragColor.rgb *= gl_FragColor.a;
6236
- #endif`, I4 = `vec4 mvPosition = vec4( transformed, 1.0 );
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;`, b4 = `#ifdef DITHERING
6244
+ gl_Position = projectionMatrix * mvPosition;`, b_ = `#ifdef DITHERING
6245
6245
  gl_FragColor.rgb = dithering( gl_FragColor.rgb );
6246
- #endif`, M4 = `#ifdef DITHERING
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`, S4 = `float roughnessFactor = roughness;
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`, _4 = `#ifdef USE_ROUGHNESSMAP
6257
+ #endif`, __ = `#ifdef USE_ROUGHNESSMAP
6258
6258
  uniform sampler2D roughnessMap;
6259
- #endif`, P4 = `#if NUM_SPOT_LIGHT_COORDS > 0
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`, T4 = `#if NUM_SPOT_LIGHT_COORDS > 0
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`, E4 = `#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
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`, D4 = `float getShadowMask() {
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
- }`, L4 = `#ifdef USE_SKINNING
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`, q4 = `#ifdef USE_SKINNING
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`, O4 = `#ifdef USE_SKINNING
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`, N4 = `#ifdef USE_SKINNING
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`, z4 = `float specularStrength;
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`, B4 = `#ifdef USE_SPECULARMAP
6589
+ #endif`, B_ = `#ifdef USE_SPECULARMAP
6590
6590
  uniform sampler2D specularMap;
6591
- #endif`, R4 = `#if defined( TONE_MAPPING )
6591
+ #endif`, R_ = `#if defined( TONE_MAPPING )
6592
6592
  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
6593
- #endif`, j4 = `#ifndef saturate
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; }`, K4 = `#ifdef USE_TRANSMISSION
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`, k4 = `#ifdef USE_TRANSMISSION
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`, G4 = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
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`, F4 = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
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`, Y4 = `#if defined( USE_UV ) || defined( USE_ANISOTROPY )
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`, H4 = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
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 W4 = `varying vec2 vUv;
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
- }`, U4 = `uniform sampler2D t2D;
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
- }`, J4 = `varying vec3 vWorldDirection;
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
- }`, Z4 = `#ifdef ENVMAP_TYPE_CUBE
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
- }`, X4 = `varying vec3 vWorldDirection;
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
- }`, Q4 = `uniform samplerCube tCube;
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
- }`, V4 = `#include <common>
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
- }`, $4 = `#if DEPTH_PACKING == 3200
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
- }`, A6 = `#define DISTANCE
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
- }`, t6 = `#define DISTANCE
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
- }`, e6 = `varying vec3 vWorldDirection;
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
- }`, i6 = `uniform sampler2D tEquirect;
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
- }`, n6 = `uniform float scale;
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
- }`, s6 = `uniform vec3 diffuse;
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
- }`, r6 = `#include <common>
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
- }`, o6 = `uniform vec3 diffuse;
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
- }`, a6 = `#define LAMBERT
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
- }`, l6 = `#define LAMBERT
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
- }`, c6 = `#define MATCAP
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
- }`, h6 = `#define MATCAP
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
- }`, u6 = `#define NORMAL
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
- }`, f6 = `#define NORMAL
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
- }`, d6 = `#define PHONG
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
- }`, p6 = `#define PHONG
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
- }`, m6 = `#define STANDARD
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
- }`, g6 = `#define STANDARD
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
- }`, v6 = `#define TOON
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
- }`, y6 = `#define TOON
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
- }`, w6 = `uniform float size;
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
- }`, C6 = `uniform vec3 diffuse;
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
- }`, x6 = `#include <common>
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
- }`, I6 = `uniform vec3 color;
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
- }`, b6 = `uniform float rotation;
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
- }`, M6 = `uniform vec3 diffuse;
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: A4,
8200
- map_particle_fragment: t4,
8201
- map_particle_pars_fragment: e4,
8202
- metalnessmap_fragment: i4,
8203
- metalnessmap_pars_fragment: n4,
8204
- morphinstance_vertex: s4,
8205
- morphcolor_vertex: r4,
8206
- morphnormal_vertex: o4,
8207
- morphtarget_pars_vertex: a4,
8208
- morphtarget_vertex: l4,
8209
- normal_fragment_begin: c4,
8210
- normal_fragment_maps: h4,
8211
- normal_pars_fragment: u4,
8212
- normal_pars_vertex: f4,
8213
- normal_vertex: d4,
8214
- normalmap_pars_fragment: p4,
8215
- clearcoat_normal_fragment_begin: m4,
8216
- clearcoat_normal_fragment_maps: g4,
8217
- clearcoat_pars_fragment: v4,
8218
- iridescence_pars_fragment: y4,
8219
- opaque_fragment: w4,
8220
- packing: C4,
8221
- premultiplied_alpha_fragment: x4,
8222
- project_vertex: I4,
8223
- dithering_fragment: b4,
8224
- dithering_pars_fragment: M4,
8225
- roughnessmap_fragment: S4,
8226
- roughnessmap_pars_fragment: _4,
8227
- shadowmap_pars_fragment: P4,
8228
- shadowmap_pars_vertex: T4,
8229
- shadowmap_vertex: E4,
8230
- shadowmask_pars_fragment: D4,
8231
- skinbase_vertex: L4,
8232
- skinning_pars_vertex: q4,
8233
- skinning_vertex: O4,
8234
- skinnormal_vertex: N4,
8235
- specularmap_fragment: z4,
8236
- specularmap_pars_fragment: B4,
8237
- tonemapping_fragment: R4,
8238
- tonemapping_pars_fragment: j4,
8239
- transmission_fragment: K4,
8240
- transmission_pars_fragment: k4,
8241
- uv_pars_fragment: G4,
8242
- uv_pars_vertex: F4,
8243
- uv_vertex: Y4,
8244
- worldpos_vertex: H4,
8245
- background_vert: W4,
8246
- background_frag: U4,
8247
- backgroundCube_vert: J4,
8248
- backgroundCube_frag: Z4,
8249
- cube_vert: X4,
8250
- cube_frag: Q4,
8251
- depth_vert: V4,
8252
- depth_frag: $4,
8253
- distanceRGBA_vert: A6,
8254
- distanceRGBA_frag: t6,
8255
- equirect_vert: e6,
8256
- equirect_frag: i6,
8257
- linedashed_vert: n6,
8258
- linedashed_frag: s6,
8259
- meshbasic_vert: r6,
8260
- meshbasic_frag: o6,
8261
- meshlambert_vert: a6,
8262
- meshlambert_frag: l6,
8263
- meshmatcap_vert: c6,
8264
- meshmatcap_frag: h6,
8265
- meshnormal_vert: u6,
8266
- meshnormal_frag: f6,
8267
- meshphong_vert: d6,
8268
- meshphong_frag: p6,
8269
- meshphysical_vert: m6,
8270
- meshphysical_frag: g6,
8271
- meshtoon_vert: v6,
8272
- meshtoon_frag: y6,
8273
- points_vert: w6,
8274
- points_frag: C6,
8275
- shadow_vert: x6,
8276
- shadow_frag: I6,
8277
- sprite_vert: b6,
8278
- sprite_frag: M6
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(), S6 = /* @__PURE__ */ new gA();
8715
- function _6(n, A, t, e, i, s, r) {
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(S6.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(
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 P6(n, A) {
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 T6(n, A, t) {
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 E6(n, A, t, e) {
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 D6(n) {
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 L6(n) {
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 } = q6(s)), this._blurMaterial = O6(s, A, t);
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 q6(n) {
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 O6(n, A, t) {
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 N6(n) {
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 z6(n) {
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 B6(n, A, t, e) {
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 R6(n, A, t) {
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 j6(n) {
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 K6(n, A, t) {
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 k6(n, A, t, e) {
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 G6(n, A) {
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 F6(n, A) {
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 Y6(n, A) {
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 H6(n, A) {
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 W6(n, A) {
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 U6(n, A) {
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 J6(n, A) {
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 Z6(n, A) {
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 X6(n, A) {
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 Q6(n, A) {
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 V6(n, A) {
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 $6(n, A) {
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 A_(n, A) {
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 t_(n, A) {
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 e_(n, A) {
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 i_(n, A, t) {
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 n_(n, A, t) {
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 s_(n, A, t) {
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 r_(n, A, t) {
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 o_(n) {
10194
+ function o6(n) {
10195
10195
  switch (n) {
10196
10196
  case 5126:
10197
- return G6;
10197
+ return G4;
10198
10198
  case 35664:
10199
- return F6;
10199
+ return F4;
10200
10200
  case 35665:
10201
- return Y6;
10201
+ return Y4;
10202
10202
  case 35666:
10203
- return H6;
10203
+ return H4;
10204
10204
  case 35674:
10205
- return W6;
10205
+ return W4;
10206
10206
  case 35675:
10207
- return U6;
10207
+ return U4;
10208
10208
  case 35676:
10209
- return J6;
10209
+ return J4;
10210
10210
  case 5124:
10211
10211
  case 35670:
10212
- return Z6;
10212
+ return Z4;
10213
10213
  case 35667:
10214
10214
  case 35671:
10215
- return X6;
10215
+ return X4;
10216
10216
  case 35668:
10217
10217
  case 35672:
10218
- return Q6;
10218
+ return Q4;
10219
10219
  case 35669:
10220
10220
  case 35673:
10221
- return V6;
10221
+ return V4;
10222
10222
  case 5125:
10223
- return $6;
10223
+ return $4;
10224
10224
  case 36294:
10225
- return A_;
10225
+ return A6;
10226
10226
  case 36295:
10227
- return t_;
10227
+ return t6;
10228
10228
  case 36296:
10229
- return e_;
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 i_;
10235
+ return i6;
10236
10236
  case 35679:
10237
10237
  case 36299:
10238
10238
  case 36307:
10239
- return n_;
10239
+ return n6;
10240
10240
  case 35680:
10241
10241
  case 36300:
10242
10242
  case 36308:
10243
10243
  case 36293:
10244
- return s_;
10244
+ return s6;
10245
10245
  case 36289:
10246
10246
  case 36303:
10247
10247
  case 36311:
10248
10248
  case 36292:
10249
- return r_;
10249
+ return r6;
10250
10250
  }
10251
10251
  }
10252
- function a_(n, A) {
10252
+ function a6(n, A) {
10253
10253
  n.uniform1fv(this.addr, A);
10254
10254
  }
10255
- function l_(n, A) {
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 c_(n, A) {
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 h_(n, A) {
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 u_(n, A) {
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 f_(n, A) {
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 d_(n, A) {
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 p_(n, A) {
10279
+ function p6(n, A) {
10280
10280
  n.uniform1iv(this.addr, A);
10281
10281
  }
10282
- function m_(n, A) {
10282
+ function m6(n, A) {
10283
10283
  n.uniform2iv(this.addr, A);
10284
10284
  }
10285
- function g_(n, A) {
10285
+ function g6(n, A) {
10286
10286
  n.uniform3iv(this.addr, A);
10287
10287
  }
10288
- function v_(n, A) {
10288
+ function v6(n, A) {
10289
10289
  n.uniform4iv(this.addr, A);
10290
10290
  }
10291
- function y_(n, A) {
10291
+ function y6(n, A) {
10292
10292
  n.uniform1uiv(this.addr, A);
10293
10293
  }
10294
- function w_(n, A) {
10294
+ function w6(n, A) {
10295
10295
  n.uniform2uiv(this.addr, A);
10296
10296
  }
10297
- function C_(n, A) {
10297
+ function C6(n, A) {
10298
10298
  n.uniform3uiv(this.addr, A);
10299
10299
  }
10300
- function x_(n, A) {
10300
+ function x6(n, A) {
10301
10301
  n.uniform4uiv(this.addr, A);
10302
10302
  }
10303
- function I_(n, A, t) {
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 b_(n, A, t) {
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 M_(n, A, t) {
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 S_(n, A, t) {
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 __(n) {
10327
+ function _6(n) {
10328
10328
  switch (n) {
10329
10329
  case 5126:
10330
- return a_;
10330
+ return a6;
10331
10331
  case 35664:
10332
- return l_;
10332
+ return l6;
10333
10333
  case 35665:
10334
- return c_;
10334
+ return c6;
10335
10335
  case 35666:
10336
- return h_;
10336
+ return h6;
10337
10337
  case 35674:
10338
- return u_;
10338
+ return u6;
10339
10339
  case 35675:
10340
- return f_;
10340
+ return f6;
10341
10341
  case 35676:
10342
- return d_;
10342
+ return d6;
10343
10343
  case 5124:
10344
10344
  case 35670:
10345
- return p_;
10345
+ return p6;
10346
10346
  case 35667:
10347
10347
  case 35671:
10348
- return m_;
10348
+ return m6;
10349
10349
  case 35668:
10350
10350
  case 35672:
10351
- return g_;
10351
+ return g6;
10352
10352
  case 35669:
10353
10353
  case 35673:
10354
- return v_;
10354
+ return v6;
10355
10355
  case 5125:
10356
- return y_;
10356
+ return y6;
10357
10357
  case 36294:
10358
- return w_;
10358
+ return w6;
10359
10359
  case 36295:
10360
- return C_;
10360
+ return C6;
10361
10361
  case 36296:
10362
- return x_;
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 I_;
10368
+ return I6;
10369
10369
  case 35679:
10370
10370
  case 36299:
10371
10371
  case 36307:
10372
- return b_;
10372
+ return b6;
10373
10373
  case 35680:
10374
10374
  case 36300:
10375
10375
  case 36308:
10376
10376
  case 36293:
10377
- return M_;
10377
+ return M6;
10378
10378
  case 36289:
10379
10379
  case 36303:
10380
10380
  case 36311:
10381
10381
  case 36292:
10382
- return S_;
10382
+ return S6;
10383
10383
  }
10384
10384
  }
10385
- class P_ {
10385
+ class P6 {
10386
10386
  constructor(A, t, e) {
10387
- this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.setValue = o_(t.type);
10387
+ this.id = A, this.addr = e, this.cache = [], this.type = t.type, this.setValue = o6(t.type);
10388
10388
  }
10389
10389
  }
10390
- class T_ {
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 = __(t.type);
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 E_ {
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 D_(n, A, t) {
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 P_(o, n, A) : new T_(o, n, A));
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 E_(o), sy(t, l)), t = l;
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
- D_(s, r, this);
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 L_ = 37297;
10463
- let q_ = 0;
10464
- function O_(n, A) {
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 N_(n) {
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
- ` + O_(n.getShaderSource(A), r);
10499
+ ` + O6(n.getShaderSource(A), r);
10500
10500
  } else
10501
10501
  return i;
10502
10502
  }
10503
- function z_(n, A) {
10504
- const t = N_(A);
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 B_(n, A) {
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 R_(n) {
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 j_(n) {
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 K_(n, A) {
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 k_ = /^[ \t]*#include +<([\w\d./]+)>/gm;
10575
+ const k6 = /^[ \t]*#include +<([\w\d./]+)>/gm;
10576
10576
  function sm(n) {
10577
- return n.replace(k_, F_);
10577
+ return n.replace(k6, F6);
10578
10578
  }
10579
- const G_ = /* @__PURE__ */ new Map();
10580
- function F_(n, A) {
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 = G_.get(A);
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 Y_ = /#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;
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(Y_, H_);
10593
+ return n.replace(Y6, H6);
10594
10594
  }
10595
- function H_(n, A, t, e) {
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 W_(n) {
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 U_(n) {
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 J_(n) {
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 Z_(n) {
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 X_(n) {
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 Q_(n, A, t, e) {
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 = W_(t), c = U_(t), u = J_(t), l = Z_(t), h = X_(t), f = R_(t), p = j_(s), g = i.createProgram();
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 ? B_("toneMapping", t.toneMapping) : "",
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
- z_("linearToOutputTexel", t.outputColorSpace),
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 = K_(i, g);
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, L_)), b;
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 = q_++, this.cacheKey = A, this.usedTimes = 1, this.program = g, this.vertexShader = C, this.fragmentShader = M, this;
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 V_ = 0;
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 = V_++, this.code = A, this.usedTimes = 0;
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 $_(), c = /* @__PURE__ */ new Set(), u = [], l = i.logarithmicDepthBuffer, h = i.vertexTextures;
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 Q_(n, b, x, s), u.push(D)), D;
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 z6(K), mA.init(), CA = new gP(K, mA), RA = new E6(K, mA, A, CA), bA = new pP(K), jA = new j6(K), kA = new eP(), At = new mP(K, mA, bA, kA, RA, CA, jA), wt = new L6(v), z = new N6(v), q = new WS(K), JA = new P6(K, q), X = new B6(K, q, jA, JA), AA = new k6(K, X, q, jA), DA = new K6(K, RA, At), fA = new D6(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 _6(v, wt, z, bA, AA, h, a), YA = new dP(v, AA, RA), tt = new SP(K, jA, RA, bA), at = new T6(K, mA, jA), zA = new R6(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;
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, A.imageSize), this._app && this._app.usePathTracing && (this._app.usePathTracing = !1, setTimeout(() => {
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.name = A.name, this.imageUrl = A.imageUrl, this._defaults = A;
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, t) {
60577
- var r;
60578
- this._props.imageSize = t, this.imageUrl = A;
60579
- const e = new Image(), i = new ue(e);
60580
- i.colorSpace = Lt, e.onload = () => {
60581
- i.flipY = !1, i.needsUpdate = !0;
60582
- }, e.src = A;
60583
- const s = this._props.target;
60584
- s.material && (Array.isArray(s.material) ? s.material.forEach((o) => {
60585
- var a;
60586
- (a = o.map) == null || a.dispose(), o.map = i;
60587
- }) : ((r = s.material.map) == null || r.dispose(), s.material.map = i));
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 || "", this._props.imageSize);
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.app.stage.addChild(this.viewport);
62268
- const n = async () => {
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 A = this.app.view.toDataURL("image/png", 0.75), t = this.app.renderer.gl, { screenWidth: e, screenHeight: i } = this.viewport;
62272
- if (this._timer && clearTimeout(this._timer), t) {
62273
- const s = this.app.renderer.width, r = this.app.renderer.height, o = new Uint8Array(s * r * 4);
62274
- t.readPixels(0, 0, s, r, t.RGBA, t.UNSIGNED_BYTE, o);
62275
- let a = s, c = 0, u = r, l = 0;
62276
- for (let g = 0; g < r; g++)
62277
- for (let d = 0; d < s; d++) {
62278
- const m = (g * s + d) * 4;
62279
- o[m + 3] > 0 && (a = Math.min(a, d), c = Math.max(c, d), u = Math.min(u, g), l = Math.max(l, g));
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 h = this.app.renderer.view.getBoundingClientRect(), f = {
62282
- x: a,
62283
- y: u,
62284
- width: c - a + 1,
62285
- height: l - u + 1
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
- (a > c || u > l) && console.log("没有非透明区域"), this.axiosX && (this.axiosX.style.display = "none"), this.axiosY && (this.axiosY.style.display = "none");
62288
- const p = 3;
62289
- if (Math.abs(this.viewport.position.x - e / 2) < p && (this.viewport.position.x = 100, this.axiosY && (this.axiosY.style.display = "block")), Math.abs(this.viewport.position.y - i / 2) < p && (this.viewport.position.y = 100, this.axiosX && (this.axiosX.style.display = "block")), this._timer = window.setTimeout(() => {
62290
- this.axiosX && (this.axiosX.style.display = "none"), this.axiosY && (this.axiosY.style.display = "none");
62291
- }, 600), h) {
62292
- const g = {
62293
- x: f.x * (h.width / this.app.renderer.width),
62294
- y: (this.app.renderer.height - f.y - f.height) * (h.height / this.app.renderer.height),
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 = g, this.boundRect && (this.boundRect.style.left = `${g.x}px`, this.boundRect.style.top = `${g.y}px`, this.boundRect.style.width = `${g.width}px`, this.boundRect.style.height = `${g.height}px`);
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: A },
62315
+ detail: { image: n },
62303
62316
  bubbles: !0,
62304
62317
  // 让事件冒泡
62305
62318
  composed: !0
62306
62319
  // 允许事件穿越 Shadow DOM 边界
62307
62320
  }));
62308
- };
62309
- this.viewport.drag({}).pinch().wheel().decelerate({
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", n).on("moved-end", n), this.app.view.addEventListener("wheel", function(A) {
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 = e / n, r = this._domBoundingRect.width / e * s, o = this._domBoundingRect.height / i * s;
62321
- return { x: r, y: o };
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, t) {
62337
- this.imageSize = A, this.logoSize = t, this._sprite.texture = await xA.fromURL(n), this.fit();
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.min(t, e);
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%;