super-three 0.177.0 → 0.179.0

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.
Files changed (211) hide show
  1. package/README.md +1 -1
  2. package/build/three.cjs +959 -231
  3. package/build/three.core.js +751 -170
  4. package/build/three.core.min.js +1 -1
  5. package/build/three.module.js +210 -64
  6. package/build/three.module.min.js +1 -1
  7. package/build/three.tsl.js +78 -29
  8. package/build/three.tsl.min.js +1 -1
  9. package/build/three.webgpu.js +3269 -1545
  10. package/build/three.webgpu.min.js +1 -1
  11. package/build/three.webgpu.nodes.js +3093 -1545
  12. package/build/three.webgpu.nodes.min.js +1 -1
  13. package/examples/jsm/Addons.js +1 -2
  14. package/examples/jsm/capabilities/WebGL.js +0 -27
  15. package/examples/jsm/capabilities/WebGPU.js +1 -1
  16. package/examples/jsm/controls/ArcballControls.js +1 -1
  17. package/examples/jsm/controls/TransformControls.js +61 -14
  18. package/examples/jsm/csm/CSMShadowNode.js +4 -4
  19. package/examples/jsm/environments/RoomEnvironment.js +8 -3
  20. package/examples/jsm/exporters/USDZExporter.js +676 -299
  21. package/examples/jsm/geometries/RoundedBoxGeometry.js +47 -8
  22. package/examples/jsm/interactive/HTMLMesh.js +5 -3
  23. package/examples/jsm/libs/meshopt_decoder.module.js +75 -58
  24. package/examples/jsm/lights/LightProbeGenerator.js +14 -3
  25. package/examples/jsm/loaders/ColladaLoader.js +1 -1
  26. package/examples/jsm/loaders/EXRLoader.js +210 -22
  27. package/examples/jsm/loaders/FBXLoader.js +2 -2
  28. package/examples/jsm/loaders/MaterialXLoader.js +212 -30
  29. package/examples/jsm/loaders/TTFLoader.js +13 -1
  30. package/examples/jsm/loaders/USDLoader.js +219 -0
  31. package/examples/jsm/loaders/USDZLoader.js +4 -892
  32. package/examples/jsm/loaders/usd/USDAParser.js +741 -0
  33. package/examples/jsm/loaders/usd/USDCParser.js +17 -0
  34. package/examples/jsm/objects/LensflareMesh.js +3 -3
  35. package/examples/jsm/objects/SkyMesh.js +2 -2
  36. package/examples/jsm/physics/RapierPhysics.js +95 -16
  37. package/examples/jsm/postprocessing/GTAOPass.js +10 -9
  38. package/examples/jsm/postprocessing/OutlinePass.js +17 -17
  39. package/examples/jsm/postprocessing/SSAOPass.js +10 -9
  40. package/examples/jsm/shaders/UnpackDepthRGBAShader.js +11 -2
  41. package/examples/jsm/transpiler/AST.js +381 -30
  42. package/examples/jsm/transpiler/GLSLDecoder.js +226 -86
  43. package/examples/jsm/transpiler/Linker.js +327 -0
  44. package/examples/jsm/transpiler/TSLEncoder.js +197 -92
  45. package/examples/jsm/transpiler/Transpiler.js +17 -1
  46. package/examples/jsm/transpiler/TranspilerUtils.js +29 -0
  47. package/examples/jsm/transpiler/WGSLEncoder.js +788 -0
  48. package/examples/jsm/tsl/display/BloomNode.js +8 -7
  49. package/examples/jsm/tsl/display/ChromaticAberrationNode.js +206 -0
  50. package/examples/jsm/tsl/display/GaussianBlurNode.js +8 -10
  51. package/examples/jsm/tsl/display/SSAAPassNode.js +2 -2
  52. package/examples/jsm/tsl/display/{TRAAPassNode.js → TRAANode.js} +181 -172
  53. package/examples/jsm/tsl/display/hashBlur.js +3 -3
  54. package/examples/jsm/tsl/lighting/TiledLightsNode.js +1 -1
  55. package/package.json +1 -1
  56. package/src/Three.Core.js +1 -0
  57. package/src/Three.TSL.js +77 -28
  58. package/src/Three.WebGPU.js +2 -0
  59. package/src/animation/KeyframeTrack.js +1 -1
  60. package/src/animation/tracks/BooleanKeyframeTrack.js +1 -1
  61. package/src/animation/tracks/StringKeyframeTrack.js +1 -1
  62. package/src/cameras/Camera.js +14 -0
  63. package/src/cameras/OrthographicCamera.js +1 -1
  64. package/src/cameras/PerspectiveCamera.js +1 -1
  65. package/src/constants.js +3 -3
  66. package/src/core/BufferAttribute.js +3 -3
  67. package/src/core/Clock.js +2 -8
  68. package/src/core/GLBufferAttribute.js +13 -1
  69. package/src/core/Object3D.js +1 -1
  70. package/{examples/jsm/misc → src/core}/Timer.js +4 -42
  71. package/src/extras/PMREMGenerator.js +11 -0
  72. package/src/extras/core/Path.js +22 -22
  73. package/src/helpers/CameraHelper.js +41 -11
  74. package/src/helpers/SkeletonHelper.js +35 -6
  75. package/src/lights/LightShadow.js +21 -8
  76. package/src/lights/PointLightShadow.js +1 -1
  77. package/src/loaders/FileLoader.js +27 -4
  78. package/src/loaders/ImageBitmapLoader.js +27 -4
  79. package/src/loaders/ImageLoader.js +55 -8
  80. package/src/loaders/Loader.js +14 -0
  81. package/src/loaders/LoadingManager.js +23 -0
  82. package/src/materials/MeshBasicMaterial.js +1 -1
  83. package/src/materials/nodes/Line2NodeMaterial.js +0 -8
  84. package/src/materials/nodes/MeshBasicNodeMaterial.js +4 -3
  85. package/src/materials/nodes/MeshMatcapNodeMaterial.js +1 -1
  86. package/src/materials/nodes/MeshNormalNodeMaterial.js +2 -2
  87. package/src/materials/nodes/MeshPhysicalNodeMaterial.js +2 -1
  88. package/src/materials/nodes/MeshSSSNodeMaterial.js +2 -2
  89. package/src/materials/nodes/NodeMaterial.js +28 -5
  90. package/src/materials/nodes/PointsNodeMaterial.js +5 -0
  91. package/src/materials/nodes/manager/NodeMaterialObserver.js +87 -2
  92. package/src/math/Frustum.js +25 -9
  93. package/src/math/FrustumArray.js +10 -5
  94. package/src/math/Line3.js +129 -2
  95. package/src/math/Matrix4.js +48 -27
  96. package/src/math/Quaternion.js +1 -1
  97. package/src/math/Spherical.js +2 -2
  98. package/src/nodes/Nodes.js +2 -3
  99. package/src/nodes/TSL.js +5 -3
  100. package/src/nodes/accessors/AccessorsUtils.js +7 -8
  101. package/src/nodes/accessors/Bitangent.js +31 -25
  102. package/src/nodes/accessors/Camera.js +12 -12
  103. package/src/nodes/accessors/Normal.js +95 -29
  104. package/src/nodes/accessors/Object3DNode.js +1 -1
  105. package/src/nodes/accessors/Position.js +7 -7
  106. package/src/nodes/accessors/ReferenceNode.js +18 -3
  107. package/src/nodes/accessors/ReflectVector.js +3 -3
  108. package/src/nodes/accessors/SceneNode.js +1 -1
  109. package/src/nodes/accessors/StorageTextureNode.js +1 -1
  110. package/src/nodes/accessors/Tangent.js +25 -17
  111. package/src/nodes/accessors/TangentUtils.js +46 -0
  112. package/src/nodes/accessors/TextureBicubic.js +21 -3
  113. package/src/nodes/accessors/TextureNode.js +12 -0
  114. package/src/nodes/accessors/UniformArrayNode.js +0 -16
  115. package/src/nodes/core/ArrayNode.js +12 -0
  116. package/src/nodes/core/AssignNode.js +3 -0
  117. package/src/nodes/core/CacheNode.js +0 -14
  118. package/src/nodes/core/ContextNode.js +20 -1
  119. package/src/nodes/core/Node.js +15 -3
  120. package/src/nodes/core/NodeBuilder.js +228 -92
  121. package/src/nodes/core/NodeUtils.js +4 -1
  122. package/src/nodes/core/StackNode.js +49 -29
  123. package/src/nodes/core/SubBuildNode.js +89 -0
  124. package/src/nodes/core/UniformNode.js +63 -5
  125. package/src/nodes/core/VarNode.js +91 -2
  126. package/src/nodes/core/VaryingNode.js +6 -4
  127. package/src/nodes/display/BlendModes.js +2 -2
  128. package/src/nodes/display/FrontFacingNode.js +34 -2
  129. package/src/nodes/display/NormalMapNode.js +19 -50
  130. package/src/nodes/display/PassNode.js +157 -9
  131. package/src/nodes/display/ScreenNode.js +0 -26
  132. package/src/nodes/display/ViewportTextureNode.js +67 -7
  133. package/src/nodes/functions/BSDF/BRDF_GGX.js +2 -6
  134. package/src/nodes/functions/BSDF/BRDF_Sheen.js +4 -4
  135. package/src/nodes/functions/PhongLightingModel.js +3 -3
  136. package/src/nodes/functions/PhysicalLightingModel.js +16 -16
  137. package/src/nodes/functions/material/getGeometryRoughness.js +2 -2
  138. package/src/nodes/gpgpu/AtomicFunctionNode.js +1 -1
  139. package/src/nodes/gpgpu/ComputeNode.js +67 -23
  140. package/src/nodes/gpgpu/WorkgroupInfoNode.js +28 -3
  141. package/src/nodes/lighting/EnvironmentNode.js +5 -5
  142. package/src/nodes/lighting/LightsNode.js +4 -4
  143. package/src/nodes/lighting/ProjectorLightNode.js +19 -6
  144. package/src/nodes/lighting/ShadowFilterNode.js +1 -1
  145. package/src/nodes/lighting/ShadowNode.js +2 -2
  146. package/src/nodes/materialx/MaterialXNodes.js +131 -2
  147. package/src/nodes/materialx/lib/mx_noise.js +165 -1
  148. package/src/nodes/math/ConditionalNode.js +1 -20
  149. package/src/nodes/math/MathNode.js +90 -55
  150. package/src/nodes/math/OperatorNode.js +22 -39
  151. package/src/nodes/tsl/TSLBase.js +1 -0
  152. package/src/nodes/tsl/TSLCore.js +114 -55
  153. package/src/nodes/utils/DebugNode.js +1 -1
  154. package/src/nodes/utils/EquirectUV.js +27 -0
  155. package/src/nodes/utils/EventNode.js +83 -0
  156. package/src/nodes/utils/LoopNode.js +0 -17
  157. package/src/nodes/utils/MatcapUV.js +22 -0
  158. package/src/nodes/utils/RTTNode.js +22 -5
  159. package/src/nodes/utils/ReflectorNode.js +11 -4
  160. package/src/nodes/utils/SampleNode.js +81 -0
  161. package/src/nodes/utils/TriplanarTextures.js +65 -0
  162. package/src/objects/BatchedMesh.js +4 -2
  163. package/src/renderers/WebGLRenderer.js +26 -24
  164. package/src/renderers/common/Background.js +2 -2
  165. package/src/renderers/common/Bindings.js +19 -18
  166. package/src/renderers/common/Color4.js +2 -2
  167. package/src/renderers/common/CubeRenderTarget.js +1 -1
  168. package/src/renderers/common/PostProcessing.js +60 -5
  169. package/src/renderers/common/RenderObject.js +68 -3
  170. package/src/renderers/common/Renderer.js +19 -16
  171. package/src/renderers/common/SampledTexture.js +3 -71
  172. package/src/renderers/common/Sampler.js +79 -0
  173. package/src/renderers/common/Storage3DTexture.js +100 -0
  174. package/src/renderers/common/StorageArrayTexture.js +84 -0
  175. package/src/renderers/common/StorageTexture.js +19 -0
  176. package/src/renderers/common/Textures.js +19 -3
  177. package/src/renderers/common/XRManager.js +31 -12
  178. package/src/renderers/common/XRRenderTarget.js +21 -4
  179. package/src/renderers/common/extras/PMREMGenerator.js +1 -1
  180. package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
  181. package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +20 -2
  182. package/src/renderers/shaders/ShaderLib/depth.glsl.js +11 -2
  183. package/src/renderers/webgl/WebGLAttributes.js +4 -0
  184. package/src/renderers/webgl/WebGLCapabilities.js +2 -2
  185. package/src/renderers/webgl/WebGLProgram.js +12 -6
  186. package/src/renderers/webgl/WebGLPrograms.js +6 -4
  187. package/src/renderers/webgl/WebGLShadowMap.js +11 -1
  188. package/src/renderers/webgl/WebGLState.js +4 -4
  189. package/src/renderers/webgl/WebGLTextures.js +19 -7
  190. package/src/renderers/webgl-fallback/WebGLBackend.js +103 -72
  191. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +3 -5
  192. package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +4 -0
  193. package/src/renderers/webgl-fallback/utils/WebGLState.js +4 -4
  194. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +2 -0
  195. package/src/renderers/webgpu/WebGPUBackend.js +63 -16
  196. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +64 -79
  197. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +6 -0
  198. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +45 -31
  199. package/src/renderers/webgpu/utils/WebGPUConstants.js +7 -1
  200. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +5 -5
  201. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +12 -65
  202. package/src/renderers/webgpu/utils/WebGPUUtils.js +2 -17
  203. package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
  204. package/src/renderers/webxr/WebXRManager.js +68 -6
  205. package/src/textures/ExternalTexture.js +45 -0
  206. package/src/textures/FramebufferTexture.js +2 -2
  207. package/src/textures/Source.js +11 -1
  208. package/src/textures/VideoTexture.js +30 -2
  209. package/src/nodes/utils/EquirectUVNode.js +0 -65
  210. package/src/nodes/utils/MatcapUVNode.js +0 -49
  211. package/src/nodes/utils/TriplanarTexturesNode.js +0 -148
@@ -3,7 +3,7 @@
3
3
  * Copyright 2010-2025 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
- const REVISION = '177';
6
+ const REVISION = '179';
7
7
 
8
8
  /**
9
9
  * Represents mouse buttons and interaction types in context of controls.
@@ -1617,8 +1617,8 @@ const InterpolationSamplingMode = {
1617
1617
  NORMAL: 'normal',
1618
1618
  CENTROID: 'centroid',
1619
1619
  SAMPLE: 'sample',
1620
- FLAT_FIRST: 'flat first',
1621
- FLAT_EITHER: 'flat either'
1620
+ FIRST: 'first',
1621
+ EITHER: 'either'
1622
1622
  };
1623
1623
 
1624
1624
  /**
@@ -3867,7 +3867,7 @@ class Quaternion {
3867
3867
 
3868
3868
  let r = vFrom.dot( vTo ) + 1;
3869
3869
 
3870
- if ( r < Number.EPSILON ) {
3870
+ if ( r < 1e-8 ) { // the epsilon value has been discussed in #31286
3871
3871
 
3872
3872
  // vFrom and vTo point in opposite directions
3873
3873
 
@@ -6280,38 +6280,6 @@ function probeAsync( gl, sync, interval ) {
6280
6280
 
6281
6281
  }
6282
6282
 
6283
- function toNormalizedProjectionMatrix( projectionMatrix ) {
6284
-
6285
- const m = projectionMatrix.elements;
6286
-
6287
- // Convert [-1, 1] to [0, 1] projection matrix
6288
- m[ 2 ] = 0.5 * m[ 2 ] + 0.5 * m[ 3 ];
6289
- m[ 6 ] = 0.5 * m[ 6 ] + 0.5 * m[ 7 ];
6290
- m[ 10 ] = 0.5 * m[ 10 ] + 0.5 * m[ 11 ];
6291
- m[ 14 ] = 0.5 * m[ 14 ] + 0.5 * m[ 15 ];
6292
-
6293
- }
6294
-
6295
- function toReversedProjectionMatrix( projectionMatrix ) {
6296
-
6297
- const m = projectionMatrix.elements;
6298
- const isPerspectiveMatrix = m[ 11 ] === -1;
6299
-
6300
- // Reverse [0, 1] projection matrix
6301
- if ( isPerspectiveMatrix ) {
6302
-
6303
- m[ 10 ] = - m[ 10 ] - 1;
6304
- m[ 14 ] = - m[ 14 ];
6305
-
6306
- } else {
6307
-
6308
- m[ 10 ] = - m[ 10 ];
6309
- m[ 14 ] = - m[ 14 ] + 1;
6310
-
6311
- }
6312
-
6313
- }
6314
-
6315
6283
  const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
6316
6284
  0.4123908, 0.3575843, 0.1804808,
6317
6285
  0.2126390, 0.7151687, 0.0721923,
@@ -6723,13 +6691,23 @@ class Source {
6723
6691
 
6724
6692
  }
6725
6693
 
6694
+ /**
6695
+ * Returns the dimensions of the source into the given target vector.
6696
+ *
6697
+ * @param {(Vector2|Vector3)} target - The target object the result is written into.
6698
+ * @return {(Vector2|Vector3)} The dimensions of the source.
6699
+ */
6726
6700
  getSize( target ) {
6727
6701
 
6728
6702
  const data = this.data;
6729
6703
 
6730
6704
  if ( data instanceof HTMLVideoElement ) {
6731
6705
 
6732
- target.set( data.videoWidth, data.videoHeight );
6706
+ target.set( data.videoWidth, data.videoHeight, 0 );
6707
+
6708
+ } else if ( data instanceof VideoFrame ) {
6709
+
6710
+ target.set( data.displayHeight, data.displayWidth, 0 );
6733
6711
 
6734
6712
  } else if ( data !== null ) {
6735
6713
 
@@ -12412,11 +12390,13 @@ class Matrix4 {
12412
12390
  * @param {number} near - The distance from the camera to the near plane.
12413
12391
  * @param {number} far - The distance from the camera to the far plane.
12414
12392
  * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system.
12393
+ * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
12415
12394
  * @return {Matrix4} A reference to this matrix.
12416
12395
  */
12417
- makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {
12396
+ makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
12418
12397
 
12419
12398
  const te = this.elements;
12399
+
12420
12400
  const x = 2 * near / ( right - left );
12421
12401
  const y = 2 * near / ( top - bottom );
12422
12402
 
@@ -12425,19 +12405,28 @@ class Matrix4 {
12425
12405
 
12426
12406
  let c, d;
12427
12407
 
12428
- if ( coordinateSystem === WebGLCoordinateSystem ) {
12408
+ if ( reversedDepth ) {
12429
12409
 
12430
- c = - ( far + near ) / ( far - near );
12431
- d = ( -2 * far * near ) / ( far - near );
12410
+ c = near / ( far - near );
12411
+ d = ( far * near ) / ( far - near );
12432
12412
 
12433
- } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
12413
+ } else {
12434
12414
 
12435
- c = - far / ( far - near );
12436
- d = ( - far * near ) / ( far - near );
12415
+ if ( coordinateSystem === WebGLCoordinateSystem ) {
12437
12416
 
12438
- } else {
12417
+ c = - ( far + near ) / ( far - near );
12418
+ d = ( -2 * far * near ) / ( far - near );
12419
+
12420
+ } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
12439
12421
 
12440
- throw new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem );
12422
+ c = - far / ( far - near );
12423
+ d = ( - far * near ) / ( far - near );
12424
+
12425
+ } else {
12426
+
12427
+ throw new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem );
12428
+
12429
+ }
12441
12430
 
12442
12431
  }
12443
12432
 
@@ -12461,39 +12450,49 @@ class Matrix4 {
12461
12450
  * @param {number} near - The distance from the camera to the near plane.
12462
12451
  * @param {number} far - The distance from the camera to the far plane.
12463
12452
  * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system.
12453
+ * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
12464
12454
  * @return {Matrix4} A reference to this matrix.
12465
12455
  */
12466
- makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {
12456
+ makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
12467
12457
 
12468
12458
  const te = this.elements;
12469
- const w = 1.0 / ( right - left );
12470
- const h = 1.0 / ( top - bottom );
12471
- const p = 1.0 / ( far - near );
12472
-
12473
- const x = ( right + left ) * w;
12474
- const y = ( top + bottom ) * h;
12475
12459
 
12476
- let z, zInv;
12460
+ const x = 2 / ( right - left );
12461
+ const y = 2 / ( top - bottom );
12477
12462
 
12478
- if ( coordinateSystem === WebGLCoordinateSystem ) {
12463
+ const a = - ( right + left ) / ( right - left );
12464
+ const b = - ( top + bottom ) / ( top - bottom );
12479
12465
 
12480
- z = ( far + near ) * p;
12481
- zInv = -2 * p;
12466
+ let c, d;
12482
12467
 
12483
- } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
12468
+ if ( reversedDepth ) {
12484
12469
 
12485
- z = near * p;
12486
- zInv = -1 * p;
12470
+ c = 1 / ( far - near );
12471
+ d = far / ( far - near );
12487
12472
 
12488
12473
  } else {
12489
12474
 
12490
- throw new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem );
12475
+ if ( coordinateSystem === WebGLCoordinateSystem ) {
12476
+
12477
+ c = -2 / ( far - near );
12478
+ d = - ( far + near ) / ( far - near );
12479
+
12480
+ } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
12481
+
12482
+ c = -1 / ( far - near );
12483
+ d = - near / ( far - near );
12484
+
12485
+ } else {
12486
+
12487
+ throw new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem );
12488
+
12489
+ }
12491
12490
 
12492
12491
  }
12493
12492
 
12494
- te[ 0 ] = 2 * w; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = - x;
12495
- te[ 1 ] = 0; te[ 5 ] = 2 * h; te[ 9 ] = 0; te[ 13 ] = - y;
12496
- te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = zInv; te[ 14 ] = - z;
12493
+ te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = a;
12494
+ te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = 0; te[ 13 ] = b;
12495
+ te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d;
12497
12496
  te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = 0; te[ 15 ] = 1;
12498
12497
 
12499
12498
  return this;
@@ -13188,7 +13187,7 @@ const _removedEvent = { type: 'removed' };
13188
13187
  const _childaddedEvent = { type: 'childadded', child: null };
13189
13188
 
13190
13189
  /**
13191
- * Fires when a new child object has been added.
13190
+ * Fires when a child object has been removed.
13192
13191
  *
13193
13192
  * @event Object3D#childremoved
13194
13193
  * @type {Object}
@@ -17287,7 +17286,7 @@ class MeshBasicMaterial extends Material {
17287
17286
  * @type {Color}
17288
17287
  * @default (1,1,1)
17289
17288
  */
17290
- this.color = new Color( 0xffffff ); // emissive
17289
+ this.color = new Color( 0xffffff ); // diffuse
17291
17290
 
17292
17291
  /**
17293
17292
  * The color map. May optionally include an alpha channel, typically combined
@@ -17784,7 +17783,7 @@ class BufferAttribute {
17784
17783
  /**
17785
17784
  * Applies to integer data only. Indicates how the underlying data in the buffer maps to
17786
17785
  * the values in the GLSL code. For instance, if `array` is an instance of `UInt16Array`,
17787
- * and `normalized` is `true`, the values `0 -+65535` in the array data will be mapped to
17786
+ * and `normalized` is `true`, the values `0 - +65535` in the array data will be mapped to
17788
17787
  * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted
17789
17788
  * to floats unmodified, i.e. `65535` becomes `65535.0f`.
17790
17789
  *
@@ -18537,8 +18536,8 @@ class Uint32BufferAttribute extends BufferAttribute {
18537
18536
  * Convenient class that can be used when creating a `Float16` buffer attribute with
18538
18537
  * a plain `Array` instance.
18539
18538
  *
18540
- * This class automatically converts to and from FP16 since `Float16Array` is not
18541
- * natively supported in JavaScript.
18539
+ * This class automatically converts to and from FP16 via `Uint16Array` since `Float16Array`
18540
+ * browser support is still problematic.
18542
18541
  *
18543
18542
  * @augments BufferAttribute
18544
18543
  */
@@ -21397,6 +21396,20 @@ class Camera extends Object3D {
21397
21396
  */
21398
21397
  this.coordinateSystem = WebGLCoordinateSystem;
21399
21398
 
21399
+ this._reversedDepth = false;
21400
+
21401
+ }
21402
+
21403
+ /**
21404
+ * The flag that indicates whether the camera uses a reversed depth buffer.
21405
+ *
21406
+ * @type {boolean}
21407
+ * @default false
21408
+ */
21409
+ get reversedDepth() {
21410
+
21411
+ return this._reversedDepth;
21412
+
21400
21413
  }
21401
21414
 
21402
21415
  copy( source, recursive ) {
@@ -21824,7 +21837,7 @@ class PerspectiveCamera extends Camera {
21824
21837
  const skew = this.filmOffset;
21825
21838
  if ( skew !== 0 ) left += near * skew / this.getFilmWidth();
21826
21839
 
21827
- this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem );
21840
+ this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem, this.reversedDepth );
21828
21841
 
21829
21842
  this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
21830
21843
 
@@ -26304,6 +26317,7 @@ class Plane {
26304
26317
  }
26305
26318
 
26306
26319
  const _sphere$3 = /*@__PURE__*/ new Sphere();
26320
+ const _defaultSpriteCenter = /*@__PURE__*/ new Vector2( 0.5, 0.5 );
26307
26321
  const _vector$6 = /*@__PURE__*/ new Vector3();
26308
26322
 
26309
26323
  /**
@@ -26387,9 +26401,10 @@ class Frustum {
26387
26401
  *
26388
26402
  * @param {Matrix4} m - The projection matrix.
26389
26403
  * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} coordinateSystem - The coordinate system.
26404
+ * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
26390
26405
  * @return {Frustum} A reference to this frustum.
26391
26406
  */
26392
- setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) {
26407
+ setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
26393
26408
 
26394
26409
  const planes = this.planes;
26395
26410
  const me = m.elements;
@@ -26402,19 +26417,29 @@ class Frustum {
26402
26417
  planes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();
26403
26418
  planes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();
26404
26419
  planes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();
26405
- planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();
26406
26420
 
26407
- if ( coordinateSystem === WebGLCoordinateSystem ) {
26421
+ if ( reversedDepth ) {
26408
26422
 
26409
- planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize();
26423
+ planes[ 4 ].setComponents( me2, me6, me10, me14 ).normalize(); // far
26424
+ planes[ 5 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); // near
26410
26425
 
26411
- } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
26426
+ } else {
26412
26427
 
26413
- planes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize();
26428
+ planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); // far
26414
26429
 
26415
- } else {
26430
+ if ( coordinateSystem === WebGLCoordinateSystem ) {
26431
+
26432
+ planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize(); // near
26416
26433
 
26417
- throw new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem );
26434
+ } else if ( coordinateSystem === WebGPUCoordinateSystem ) {
26435
+
26436
+ planes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize(); // near
26437
+
26438
+ } else {
26439
+
26440
+ throw new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem );
26441
+
26442
+ }
26418
26443
 
26419
26444
  }
26420
26445
 
@@ -26461,7 +26486,10 @@ class Frustum {
26461
26486
  intersectsSprite( sprite ) {
26462
26487
 
26463
26488
  _sphere$3.center.set( 0, 0, 0 );
26464
- _sphere$3.radius = 0.7071067811865476;
26489
+
26490
+ const offset = _defaultSpriteCenter.distanceTo( sprite.center );
26491
+
26492
+ _sphere$3.radius = 0.7071067811865476 + offset;
26465
26493
  _sphere$3.applyMatrix4( sprite.matrixWorld );
26466
26494
 
26467
26495
  return this.intersectsSphere( _sphere$3 );
@@ -26617,7 +26645,8 @@ class FrustumArray {
26617
26645
 
26618
26646
  _frustum$1.setFromProjectionMatrix(
26619
26647
  _projScreenMatrix$2,
26620
- this.coordinateSystem
26648
+ camera.coordinateSystem,
26649
+ camera.reversedDepth
26621
26650
  );
26622
26651
 
26623
26652
  if ( _frustum$1.intersectsObject( object ) ) {
@@ -26659,7 +26688,8 @@ class FrustumArray {
26659
26688
 
26660
26689
  _frustum$1.setFromProjectionMatrix(
26661
26690
  _projScreenMatrix$2,
26662
- this.coordinateSystem
26691
+ camera.coordinateSystem,
26692
+ camera.reversedDepth
26663
26693
  );
26664
26694
 
26665
26695
  if ( _frustum$1.intersectsSprite( sprite ) ) {
@@ -26701,7 +26731,8 @@ class FrustumArray {
26701
26731
 
26702
26732
  _frustum$1.setFromProjectionMatrix(
26703
26733
  _projScreenMatrix$2,
26704
- this.coordinateSystem
26734
+ camera.coordinateSystem,
26735
+ camera.reversedDepth
26705
26736
  );
26706
26737
 
26707
26738
  if ( _frustum$1.intersectsSphere( sphere ) ) {
@@ -26743,7 +26774,8 @@ class FrustumArray {
26743
26774
 
26744
26775
  _frustum$1.setFromProjectionMatrix(
26745
26776
  _projScreenMatrix$2,
26746
- this.coordinateSystem
26777
+ camera.coordinateSystem,
26778
+ camera.reversedDepth
26747
26779
  );
26748
26780
 
26749
26781
  if ( _frustum$1.intersectsBox( box ) ) {
@@ -26785,7 +26817,8 @@ class FrustumArray {
26785
26817
 
26786
26818
  _frustum$1.setFromProjectionMatrix(
26787
26819
  _projScreenMatrix$2,
26788
- this.coordinateSystem
26820
+ camera.coordinateSystem,
26821
+ camera.reversedDepth
26789
26822
  );
26790
26823
 
26791
26824
  if ( _frustum$1.containsPoint( point ) ) {
@@ -28052,7 +28085,7 @@ class BatchedMesh extends Mesh {
28052
28085
  const availableInstanceIds = this._availableInstanceIds;
28053
28086
  const instanceInfo = this._instanceInfo;
28054
28087
  availableInstanceIds.sort( ascIdSort );
28055
- while ( availableInstanceIds[ availableInstanceIds.length - 1 ] === instanceInfo.length ) {
28088
+ while ( availableInstanceIds[ availableInstanceIds.length - 1 ] === instanceInfo.length - 1 ) {
28056
28089
 
28057
28090
  instanceInfo.pop();
28058
28091
  availableInstanceIds.pop();
@@ -28330,9 +28363,11 @@ class BatchedMesh extends Mesh {
28330
28363
  _matrix$1
28331
28364
  .multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse )
28332
28365
  .multiply( this.matrixWorld );
28366
+
28333
28367
  _frustum.setFromProjectionMatrix(
28334
28368
  _matrix$1,
28335
- renderer.coordinateSystem
28369
+ camera.coordinateSystem,
28370
+ camera.reversedDepth
28336
28371
  );
28337
28372
 
28338
28373
  }
@@ -29351,6 +29386,9 @@ function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, inte
29351
29386
  * const texture = new THREE.VideoTexture( video );
29352
29387
  * ```
29353
29388
  *
29389
+ * Note: When using video textures with {@link WebGPURenderer}, {@link Texture#colorSpace} must be
29390
+ * set to THREE.SRGBColorSpace.
29391
+ *
29354
29392
  * Note: After the initial use of a texture, its dimensions, format, and type
29355
29393
  * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one.
29356
29394
  *
@@ -29394,18 +29432,28 @@ class VideoTexture extends Texture {
29394
29432
  */
29395
29433
  this.generateMipmaps = false;
29396
29434
 
29435
+ /**
29436
+ * The video frame request callback identifier, which is a positive integer.
29437
+ *
29438
+ * Value of 0 represents no scheduled rVFC.
29439
+ *
29440
+ * @private
29441
+ * @type {number}
29442
+ */
29443
+ this._requestVideoFrameCallbackId = 0;
29444
+
29397
29445
  const scope = this;
29398
29446
 
29399
29447
  function updateVideo() {
29400
29448
 
29401
29449
  scope.needsUpdate = true;
29402
- video.requestVideoFrameCallback( updateVideo );
29450
+ scope._requestVideoFrameCallbackId = video.requestVideoFrameCallback( updateVideo );
29403
29451
 
29404
29452
  }
29405
29453
 
29406
29454
  if ( 'requestVideoFrameCallback' in video ) {
29407
29455
 
29408
- video.requestVideoFrameCallback( updateVideo );
29456
+ this._requestVideoFrameCallbackId = video.requestVideoFrameCallback( updateVideo );
29409
29457
 
29410
29458
  }
29411
29459
 
@@ -29436,6 +29484,21 @@ class VideoTexture extends Texture {
29436
29484
 
29437
29485
  }
29438
29486
 
29487
+ /**
29488
+ * @override
29489
+ */
29490
+ dispose() {
29491
+
29492
+ if ( this._requestVideoFrameCallbackId !== 0 ) {
29493
+
29494
+ this.source.data.cancelVideoFrameCallback( this._requestVideoFrameCallbackId );
29495
+
29496
+ }
29497
+
29498
+ super.dispose();
29499
+
29500
+ }
29501
+
29439
29502
  }
29440
29503
 
29441
29504
  /**
@@ -29536,8 +29599,8 @@ class FramebufferTexture extends Texture {
29536
29599
  /**
29537
29600
  * Constructs a new framebuffer texture.
29538
29601
  *
29539
- * @param {number} width - The width of the texture.
29540
- * @param {number} height - The height of the texture.
29602
+ * @param {number} [width] - The width of the texture.
29603
+ * @param {number} [height] - The height of the texture.
29541
29604
  */
29542
29605
  constructor( width, height ) {
29543
29606
 
@@ -33894,11 +33957,11 @@ class Path extends CurvePath {
33894
33957
  * Adds an arc as an instance of {@link EllipseCurve} to the path, positioned relative
33895
33958
  * to the current point.
33896
33959
  *
33897
- * @param {number} aX - The x coordinate of the center of the arc offsetted from the previous curve.
33898
- * @param {number} aY - The y coordinate of the center of the arc offsetted from the previous curve.
33899
- * @param {number} aRadius - The radius of the arc.
33900
- * @param {number} aStartAngle - The start angle in radians.
33901
- * @param {number} aEndAngle - The end angle in radians.
33960
+ * @param {number} [aX=0] - The x coordinate of the center of the arc offsetted from the previous curve.
33961
+ * @param {number} [aY=0] - The y coordinate of the center of the arc offsetted from the previous curve.
33962
+ * @param {number} [aRadius=1] - The radius of the arc.
33963
+ * @param {number} [aStartAngle=0] - The start angle in radians.
33964
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
33902
33965
  * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not.
33903
33966
  * @return {Path} A reference to this path.
33904
33967
  */
@@ -33917,11 +33980,11 @@ class Path extends CurvePath {
33917
33980
  /**
33918
33981
  * Adds an absolutely positioned arc as an instance of {@link EllipseCurve} to the path.
33919
33982
  *
33920
- * @param {number} aX - The x coordinate of the center of the arc.
33921
- * @param {number} aY - The y coordinate of the center of the arc.
33922
- * @param {number} aRadius - The radius of the arc.
33923
- * @param {number} aStartAngle - The start angle in radians.
33924
- * @param {number} aEndAngle - The end angle in radians.
33983
+ * @param {number} [aX=0] - The x coordinate of the center of the arc.
33984
+ * @param {number} [aY=0] - The y coordinate of the center of the arc.
33985
+ * @param {number} [aRadius=1] - The radius of the arc.
33986
+ * @param {number} [aStartAngle=0] - The start angle in radians.
33987
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
33925
33988
  * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not.
33926
33989
  * @return {Path} A reference to this path.
33927
33990
  */
@@ -33937,12 +34000,12 @@ class Path extends CurvePath {
33937
34000
  * Adds an ellipse as an instance of {@link EllipseCurve} to the path, positioned relative
33938
34001
  * to the current point
33939
34002
  *
33940
- * @param {number} aX - The x coordinate of the center of the ellipse offsetted from the previous curve.
33941
- * @param {number} aY - The y coordinate of the center of the ellipse offsetted from the previous curve.
33942
- * @param {number} xRadius - The radius of the ellipse in the x axis.
33943
- * @param {number} yRadius - The radius of the ellipse in the y axis.
33944
- * @param {number} aStartAngle - The start angle in radians.
33945
- * @param {number} aEndAngle - The end angle in radians.
34003
+ * @param {number} [aX=0] - The x coordinate of the center of the ellipse offsetted from the previous curve.
34004
+ * @param {number} [aY=0] - The y coordinate of the center of the ellipse offsetted from the previous curve.
34005
+ * @param {number} [xRadius=1] - The radius of the ellipse in the x axis.
34006
+ * @param {number} [yRadius=1] - The radius of the ellipse in the y axis.
34007
+ * @param {number} [aStartAngle=0] - The start angle in radians.
34008
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
33946
34009
  * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not.
33947
34010
  * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.
33948
34011
  * @return {Path} A reference to this path.
@@ -33961,12 +34024,12 @@ class Path extends CurvePath {
33961
34024
  /**
33962
34025
  * Adds an absolutely positioned ellipse as an instance of {@link EllipseCurve} to the path.
33963
34026
  *
33964
- * @param {number} aX - The x coordinate of the absolute center of the ellipse.
33965
- * @param {number} aY - The y coordinate of the absolute center of the ellipse.
33966
- * @param {number} xRadius - The radius of the ellipse in the x axis.
33967
- * @param {number} yRadius - The radius of the ellipse in the y axis.
33968
- * @param {number} aStartAngle - The start angle in radians.
33969
- * @param {number} aEndAngle - The end angle in radians.
34027
+ * @param {number} [aX=0] - The x coordinate of the absolute center of the ellipse.
34028
+ * @param {number} [aY=0] - The y coordinate of the absolute center of the ellipse.
34029
+ * @param {number} [xRadius=1] - The radius of the ellipse in the x axis.
34030
+ * @param {number} [yRadius=1] - The radius of the ellipse in the y axis.
34031
+ * @param {number} [aStartAngle=0] - The start angle in radians.
34032
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
33970
34033
  * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not.
33971
34034
  * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.
33972
34035
  * @return {Path} A reference to this path.
@@ -41688,7 +41751,7 @@ class KeyframeTrack {
41688
41751
  *
41689
41752
  * @param {string} name - The keyframe track's name.
41690
41753
  * @param {Array<number>} times - A list of keyframe times.
41691
- * @param {Array<number>} values - A list of keyframe values.
41754
+ * @param {Array<number|string|boolean>} values - A list of keyframe values.
41692
41755
  * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
41693
41756
  */
41694
41757
  constructor( name, times, values, interpolation ) {
@@ -42276,7 +42339,7 @@ class BooleanKeyframeTrack extends KeyframeTrack {
42276
42339
  *
42277
42340
  * @param {string} name - The keyframe track's name.
42278
42341
  * @param {Array<number>} times - A list of keyframe times.
42279
- * @param {Array<number>} values - A list of keyframe values.
42342
+ * @param {Array<boolean>} values - A list of keyframe values.
42280
42343
  */
42281
42344
  constructor( name, times, values ) {
42282
42345
 
@@ -42479,7 +42542,7 @@ class StringKeyframeTrack extends KeyframeTrack {
42479
42542
  *
42480
42543
  * @param {string} name - The keyframe track's name.
42481
42544
  * @param {Array<number>} times - A list of keyframe times.
42482
- * @param {Array<number>} values - A list of keyframe values.
42545
+ * @param {Array<string>} values - A list of keyframe values.
42483
42546
  */
42484
42547
  constructor( name, times, values ) {
42485
42548
 
@@ -43302,6 +43365,13 @@ class LoadingManager {
43302
43365
  */
43303
43366
  this.onError = onError;
43304
43367
 
43368
+ /**
43369
+ * Used for aborting ongoing requests in loaders using this manager.
43370
+ *
43371
+ * @type {AbortController}
43372
+ */
43373
+ this.abortController = new AbortController();
43374
+
43305
43375
  /**
43306
43376
  * This should be called by any loader using the manager when the loader
43307
43377
  * starts loading an item.
@@ -43502,6 +43572,22 @@ class LoadingManager {
43502
43572
 
43503
43573
  };
43504
43574
 
43575
+ /**
43576
+ * Can be used to abort ongoing loading requests in loaders using this manager.
43577
+ * The abort only works if the loaders implement {@link Loader#abort} and `AbortSignal.any()`
43578
+ * is supported in the browser.
43579
+ *
43580
+ * @return {LoadingManager} A reference to this loading manager.
43581
+ */
43582
+ this.abort = function () {
43583
+
43584
+ this.abortController.abort();
43585
+ this.abortController = new AbortController();
43586
+
43587
+ return this;
43588
+
43589
+ };
43590
+
43505
43591
  }
43506
43592
 
43507
43593
  }
@@ -43581,6 +43667,7 @@ class Loader {
43581
43667
  * This method needs to be implemented by all concrete loaders. It holds the
43582
43668
  * logic for loading assets from the backend.
43583
43669
  *
43670
+ * @abstract
43584
43671
  * @param {string} url - The path/URL of the file to be loaded.
43585
43672
  * @param {Function} onLoad - Executed when the loading process has been finished.
43586
43673
  * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
@@ -43611,6 +43698,7 @@ class Loader {
43611
43698
  * This method needs to be implemented by all concrete loaders. It holds the
43612
43699
  * logic for parsing the asset into three.js entities.
43613
43700
  *
43701
+ * @abstract
43614
43702
  * @param {any} data - The data to parse.
43615
43703
  */
43616
43704
  parse( /* data */ ) {}
@@ -43685,6 +43773,18 @@ class Loader {
43685
43773
 
43686
43774
  }
43687
43775
 
43776
+ /**
43777
+ * This method can be implemented in loaders for aborting ongoing requests.
43778
+ *
43779
+ * @abstract
43780
+ * @return {Loader} A reference to this instance.
43781
+ */
43782
+ abort() {
43783
+
43784
+ return this;
43785
+
43786
+ }
43787
+
43688
43788
  }
43689
43789
 
43690
43790
  /**
@@ -43753,7 +43853,8 @@ class FileLoader extends Loader {
43753
43853
  super( manager );
43754
43854
 
43755
43855
  /**
43756
- * The expected mime type.
43856
+ * The expected mime type. Valid values can be found
43857
+ * [here]{@link hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype}
43757
43858
  *
43758
43859
  * @type {string}
43759
43860
  */
@@ -43767,6 +43868,14 @@ class FileLoader extends Loader {
43767
43868
  */
43768
43869
  this.responseType = '';
43769
43870
 
43871
+ /**
43872
+ * Used for aborting requests.
43873
+ *
43874
+ * @private
43875
+ * @type {AbortController}
43876
+ */
43877
+ this._abortController = new AbortController();
43878
+
43770
43879
  }
43771
43880
 
43772
43881
  /**
@@ -43786,7 +43895,7 @@ class FileLoader extends Loader {
43786
43895
 
43787
43896
  url = this.manager.resolveURL( url );
43788
43897
 
43789
- const cached = Cache.get( url );
43898
+ const cached = Cache.get( `file:${url}` );
43790
43899
 
43791
43900
  if ( cached !== undefined ) {
43792
43901
 
@@ -43833,7 +43942,7 @@ class FileLoader extends Loader {
43833
43942
  const req = new Request( url, {
43834
43943
  headers: new Headers( this.requestHeader ),
43835
43944
  credentials: this.withCredentials ? 'include' : 'same-origin',
43836
- // An abort controller could be added within a future PR
43945
+ signal: ( typeof AbortSignal.any === 'function' ) ? AbortSignal.any( [ this._abortController.signal, this.manager.abortController.signal ] ) : this._abortController.signal
43837
43946
  } );
43838
43947
 
43839
43948
  // record states ( avoid data race )
@@ -43975,7 +44084,7 @@ class FileLoader extends Loader {
43975
44084
 
43976
44085
  // Add to cache only on HTTP success, so that we do not cache
43977
44086
  // error response bodies as proper responses to requests.
43978
- Cache.add( url, data );
44087
+ Cache.add( `file:${url}`, data );
43979
44088
 
43980
44089
  const callbacks = loading[ url ];
43981
44090
  delete loading[ url ];
@@ -44050,6 +44159,20 @@ class FileLoader extends Loader {
44050
44159
 
44051
44160
  }
44052
44161
 
44162
+ /**
44163
+ * Aborts ongoing fetch requests.
44164
+ *
44165
+ * @return {FileLoader} A reference to this instance.
44166
+ */
44167
+ abort() {
44168
+
44169
+ this._abortController.abort();
44170
+ this._abortController = new AbortController();
44171
+
44172
+ return this;
44173
+
44174
+ }
44175
+
44053
44176
  }
44054
44177
 
44055
44178
  /**
@@ -44291,6 +44414,8 @@ class CompressedTextureLoader extends Loader {
44291
44414
 
44292
44415
  }
44293
44416
 
44417
+ const _loading = new WeakMap();
44418
+
44294
44419
  /**
44295
44420
  * A loader for loading images. The class loads images with the HTML `Image` API.
44296
44421
  *
@@ -44337,19 +44462,36 @@ class ImageLoader extends Loader {
44337
44462
 
44338
44463
  const scope = this;
44339
44464
 
44340
- const cached = Cache.get( url );
44465
+ const cached = Cache.get( `image:${url}` );
44341
44466
 
44342
44467
  if ( cached !== undefined ) {
44343
44468
 
44344
- scope.manager.itemStart( url );
44469
+ if ( cached.complete === true ) {
44345
44470
 
44346
- setTimeout( function () {
44471
+ scope.manager.itemStart( url );
44347
44472
 
44348
- if ( onLoad ) onLoad( cached );
44473
+ setTimeout( function () {
44349
44474
 
44350
- scope.manager.itemEnd( url );
44475
+ if ( onLoad ) onLoad( cached );
44351
44476
 
44352
- }, 0 );
44477
+ scope.manager.itemEnd( url );
44478
+
44479
+ }, 0 );
44480
+
44481
+ } else {
44482
+
44483
+ let arr = _loading.get( cached );
44484
+
44485
+ if ( arr === undefined ) {
44486
+
44487
+ arr = [];
44488
+ _loading.set( cached, arr );
44489
+
44490
+ }
44491
+
44492
+ arr.push( { onLoad, onError } );
44493
+
44494
+ }
44353
44495
 
44354
44496
  return cached;
44355
44497
 
@@ -44361,10 +44503,21 @@ class ImageLoader extends Loader {
44361
44503
 
44362
44504
  removeEventListeners();
44363
44505
 
44364
- Cache.add( url, this );
44365
-
44366
44506
  if ( onLoad ) onLoad( this );
44367
44507
 
44508
+ //
44509
+
44510
+ const callbacks = _loading.get( this ) || [];
44511
+
44512
+ for ( let i = 0; i < callbacks.length; i ++ ) {
44513
+
44514
+ const callback = callbacks[ i ];
44515
+ if ( callback.onLoad ) callback.onLoad( this );
44516
+
44517
+ }
44518
+
44519
+ _loading.delete( this );
44520
+
44368
44521
  scope.manager.itemEnd( url );
44369
44522
 
44370
44523
  }
@@ -44375,6 +44528,22 @@ class ImageLoader extends Loader {
44375
44528
 
44376
44529
  if ( onError ) onError( event );
44377
44530
 
44531
+ Cache.remove( `image:${url}` );
44532
+
44533
+ //
44534
+
44535
+ const callbacks = _loading.get( this ) || [];
44536
+
44537
+ for ( let i = 0; i < callbacks.length; i ++ ) {
44538
+
44539
+ const callback = callbacks[ i ];
44540
+ if ( callback.onError ) callback.onError( event );
44541
+
44542
+ }
44543
+
44544
+ _loading.delete( this );
44545
+
44546
+
44378
44547
  scope.manager.itemError( url );
44379
44548
  scope.manager.itemEnd( url );
44380
44549
 
@@ -44396,6 +44565,7 @@ class ImageLoader extends Loader {
44396
44565
 
44397
44566
  }
44398
44567
 
44568
+ Cache.add( `image:${url}`, image );
44399
44569
  scope.manager.itemStart( url );
44400
44570
 
44401
44571
  image.src = url;
@@ -45066,14 +45236,27 @@ class LightShadow {
45066
45236
  shadowCamera.updateMatrixWorld();
45067
45237
 
45068
45238
  _projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );
45069
- this._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );
45239
+ this._frustum.setFromProjectionMatrix( _projScreenMatrix$1, shadowCamera.coordinateSystem, shadowCamera.reversedDepth );
45070
45240
 
45071
- shadowMatrix.set(
45072
- 0.5, 0.0, 0.0, 0.5,
45073
- 0.0, 0.5, 0.0, 0.5,
45074
- 0.0, 0.0, 0.5, 0.5,
45075
- 0.0, 0.0, 0.0, 1.0
45076
- );
45241
+ if ( shadowCamera.reversedDepth ) {
45242
+
45243
+ shadowMatrix.set(
45244
+ 0.5, 0.0, 0.0, 0.5,
45245
+ 0.0, 0.5, 0.0, 0.5,
45246
+ 0.0, 0.0, 1.0, 0.0,
45247
+ 0.0, 0.0, 0.0, 1.0
45248
+ );
45249
+
45250
+ } else {
45251
+
45252
+ shadowMatrix.set(
45253
+ 0.5, 0.0, 0.0, 0.5,
45254
+ 0.0, 0.5, 0.0, 0.5,
45255
+ 0.0, 0.0, 0.5, 0.5,
45256
+ 0.0, 0.0, 0.0, 1.0
45257
+ );
45258
+
45259
+ }
45077
45260
 
45078
45261
  shadowMatrix.multiply( _projScreenMatrix$1 );
45079
45262
 
@@ -45530,7 +45713,7 @@ class PointLightShadow extends LightShadow {
45530
45713
  shadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );
45531
45714
 
45532
45715
  _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
45533
- this._frustum.setFromProjectionMatrix( _projScreenMatrix );
45716
+ this._frustum.setFromProjectionMatrix( _projScreenMatrix, camera.coordinateSystem, camera.reversedDepth );
45534
45717
 
45535
45718
  }
45536
45719
 
@@ -45864,7 +46047,7 @@ class OrthographicCamera extends Camera {
45864
46047
 
45865
46048
  }
45866
46049
 
45867
- this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem );
46050
+ this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem, this.reversedDepth );
45868
46051
 
45869
46052
  this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
45870
46053
 
@@ -48617,6 +48800,14 @@ class ImageBitmapLoader extends Loader {
48617
48800
  */
48618
48801
  this.options = { premultiplyAlpha: 'none' };
48619
48802
 
48803
+ /**
48804
+ * Used for aborting requests.
48805
+ *
48806
+ * @private
48807
+ * @type {AbortController}
48808
+ */
48809
+ this._abortController = new AbortController();
48810
+
48620
48811
  }
48621
48812
 
48622
48813
  /**
@@ -48653,7 +48844,7 @@ class ImageBitmapLoader extends Loader {
48653
48844
 
48654
48845
  const scope = this;
48655
48846
 
48656
- const cached = Cache.get( url );
48847
+ const cached = Cache.get( `image-bitmap:${url}` );
48657
48848
 
48658
48849
  if ( cached !== undefined ) {
48659
48850
 
@@ -48705,6 +48896,7 @@ class ImageBitmapLoader extends Loader {
48705
48896
  const fetchOptions = {};
48706
48897
  fetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';
48707
48898
  fetchOptions.headers = this.requestHeader;
48899
+ fetchOptions.signal = ( typeof AbortSignal.any === 'function' ) ? AbortSignal.any( [ this._abortController.signal, this.manager.abortController.signal ] ) : this._abortController.signal;
48708
48900
 
48709
48901
  const promise = fetch( url, fetchOptions ).then( function ( res ) {
48710
48902
 
@@ -48716,7 +48908,7 @@ class ImageBitmapLoader extends Loader {
48716
48908
 
48717
48909
  } ).then( function ( imageBitmap ) {
48718
48910
 
48719
- Cache.add( url, imageBitmap );
48911
+ Cache.add( `image-bitmap:${url}`, imageBitmap );
48720
48912
 
48721
48913
  if ( onLoad ) onLoad( imageBitmap );
48722
48914
 
@@ -48730,18 +48922,32 @@ class ImageBitmapLoader extends Loader {
48730
48922
 
48731
48923
  _errorMap.set( promise, e );
48732
48924
 
48733
- Cache.remove( url );
48925
+ Cache.remove( `image-bitmap:${url}` );
48734
48926
 
48735
48927
  scope.manager.itemError( url );
48736
48928
  scope.manager.itemEnd( url );
48737
48929
 
48738
48930
  } );
48739
48931
 
48740
- Cache.add( url, promise );
48932
+ Cache.add( `image-bitmap:${url}`, promise );
48741
48933
  scope.manager.itemStart( url );
48742
48934
 
48743
48935
  }
48744
48936
 
48937
+ /**
48938
+ * Aborts ongoing fetch requests.
48939
+ *
48940
+ * @return {ImageBitmapLoader} A reference to this instance.
48941
+ */
48942
+ abort() {
48943
+
48944
+ this._abortController.abort();
48945
+ this._abortController = new AbortController();
48946
+
48947
+ return this;
48948
+
48949
+ }
48950
+
48745
48951
  }
48746
48952
 
48747
48953
  let _context;
@@ -49129,7 +49335,7 @@ class Clock {
49129
49335
  */
49130
49336
  start() {
49131
49337
 
49132
- this.startTime = now();
49338
+ this.startTime = performance.now();
49133
49339
 
49134
49340
  this.oldTime = this.startTime;
49135
49341
  this.elapsedTime = 0;
@@ -49178,7 +49384,7 @@ class Clock {
49178
49384
 
49179
49385
  if ( this.running ) {
49180
49386
 
49181
- const newTime = now();
49387
+ const newTime = performance.now();
49182
49388
 
49183
49389
  diff = ( newTime - this.oldTime ) / 1000;
49184
49390
  this.oldTime = newTime;
@@ -49193,12 +49399,6 @@ class Clock {
49193
49399
 
49194
49400
  }
49195
49401
 
49196
- function now() {
49197
-
49198
- return performance.now();
49199
-
49200
- }
49201
-
49202
49402
  const _position$1 = /*@__PURE__*/ new Vector3();
49203
49403
  const _quaternion$1 = /*@__PURE__*/ new Quaternion();
49204
49404
  const _scale$1 = /*@__PURE__*/ new Vector3();
@@ -54234,8 +54434,9 @@ class GLBufferAttribute {
54234
54434
  * @param {number} itemSize - The item size.
54235
54435
  * @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter.
54236
54436
  * @param {number} count - The expected number of vertices in VBO.
54437
+ * @param {boolean} [normalized=false] - Whether the data are normalized or not.
54237
54438
  */
54238
- constructor( buffer, type, itemSize, elementSize, count ) {
54439
+ constructor( buffer, type, itemSize, elementSize, count, normalized = false ) {
54239
54440
 
54240
54441
  /**
54241
54442
  * This flag can be used for type testing.
@@ -54288,6 +54489,17 @@ class GLBufferAttribute {
54288
54489
  */
54289
54490
  this.count = count;
54290
54491
 
54492
+ /**
54493
+ * Applies to integer data only. Indicates how the underlying data in the buffer maps to
54494
+ * the values in the GLSL code. For instance, if `buffer` contains data of `gl.UNSIGNED_SHORT`,
54495
+ * and `normalized` is `true`, the values `0 - +65535` in the buffer data will be mapped to
54496
+ * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted
54497
+ * to floats unmodified, i.e. `65535` becomes `65535.0f`.
54498
+ *
54499
+ * @type {boolean}
54500
+ */
54501
+ this.normalized = normalized;
54502
+
54291
54503
  /**
54292
54504
  * A version number, incremented every time the `needsUpdate` is set to `true`.
54293
54505
  *
@@ -54627,6 +54839,189 @@ function intersect( object, raycaster, intersects, recursive ) {
54627
54839
 
54628
54840
  }
54629
54841
 
54842
+ /**
54843
+ * This class is an alternative to {@link Clock} with a different API design and behavior.
54844
+ * The goal is to avoid the conceptual flaws that became apparent in `Clock` over time.
54845
+ *
54846
+ * - `Timer` has an `update()` method that updates its internal state. That makes it possible to
54847
+ * call `getDelta()` and `getElapsed()` multiple times per simulation step without getting different values.
54848
+ * - The class can make use of the Page Visibility API to avoid large time delta values when the app
54849
+ * is inactive (e.g. tab switched or browser hidden).
54850
+ *
54851
+ * ```js
54852
+ * const timer = new Timer();
54853
+ * timer.connect( document ); // use Page Visibility API
54854
+ * ```
54855
+ */
54856
+ class Timer {
54857
+
54858
+ /**
54859
+ * Constructs a new timer.
54860
+ */
54861
+ constructor() {
54862
+
54863
+ this._previousTime = 0;
54864
+ this._currentTime = 0;
54865
+ this._startTime = performance.now();
54866
+
54867
+ this._delta = 0;
54868
+ this._elapsed = 0;
54869
+
54870
+ this._timescale = 1;
54871
+
54872
+ this._document = null;
54873
+ this._pageVisibilityHandler = null;
54874
+
54875
+ }
54876
+
54877
+ /**
54878
+ * Connect the timer to the given document.Calling this method is not mandatory to
54879
+ * use the timer but enables the usage of the Page Visibility API to avoid large time
54880
+ * delta values.
54881
+ *
54882
+ * @param {Document} document - The document.
54883
+ */
54884
+ connect( document ) {
54885
+
54886
+ this._document = document;
54887
+
54888
+ // use Page Visibility API to avoid large time delta values
54889
+
54890
+ if ( document.hidden !== undefined ) {
54891
+
54892
+ this._pageVisibilityHandler = handleVisibilityChange.bind( this );
54893
+
54894
+ document.addEventListener( 'visibilitychange', this._pageVisibilityHandler, false );
54895
+
54896
+ }
54897
+
54898
+ }
54899
+
54900
+ /**
54901
+ * Disconnects the timer from the DOM and also disables the usage of the Page Visibility API.
54902
+ */
54903
+ disconnect() {
54904
+
54905
+ if ( this._pageVisibilityHandler !== null ) {
54906
+
54907
+ this._document.removeEventListener( 'visibilitychange', this._pageVisibilityHandler );
54908
+ this._pageVisibilityHandler = null;
54909
+
54910
+ }
54911
+
54912
+ this._document = null;
54913
+
54914
+ }
54915
+
54916
+ /**
54917
+ * Returns the time delta in seconds.
54918
+ *
54919
+ * @return {number} The time delta in second.
54920
+ */
54921
+ getDelta() {
54922
+
54923
+ return this._delta / 1000;
54924
+
54925
+ }
54926
+
54927
+ /**
54928
+ * Returns the elapsed time in seconds.
54929
+ *
54930
+ * @return {number} The elapsed time in second.
54931
+ */
54932
+ getElapsed() {
54933
+
54934
+ return this._elapsed / 1000;
54935
+
54936
+ }
54937
+
54938
+ /**
54939
+ * Returns the timescale.
54940
+ *
54941
+ * @return {number} The timescale.
54942
+ */
54943
+ getTimescale() {
54944
+
54945
+ return this._timescale;
54946
+
54947
+ }
54948
+
54949
+ /**
54950
+ * Sets the given timescale which scale the time delta computation
54951
+ * in `update()`.
54952
+ *
54953
+ * @param {number} timescale - The timescale to set.
54954
+ * @return {Timer} A reference to this timer.
54955
+ */
54956
+ setTimescale( timescale ) {
54957
+
54958
+ this._timescale = timescale;
54959
+
54960
+ return this;
54961
+
54962
+ }
54963
+
54964
+ /**
54965
+ * Resets the time computation for the current simulation step.
54966
+ *
54967
+ * @return {Timer} A reference to this timer.
54968
+ */
54969
+ reset() {
54970
+
54971
+ this._currentTime = performance.now() - this._startTime;
54972
+
54973
+ return this;
54974
+
54975
+ }
54976
+
54977
+ /**
54978
+ * Can be used to free all internal resources. Usually called when
54979
+ * the timer instance isn't required anymore.
54980
+ */
54981
+ dispose() {
54982
+
54983
+ this.disconnect();
54984
+
54985
+ }
54986
+
54987
+ /**
54988
+ * Updates the internal state of the timer. This method should be called
54989
+ * once per simulation step and before you perform queries against the timer
54990
+ * (e.g. via `getDelta()`).
54991
+ *
54992
+ * @param {number} timestamp - The current time in milliseconds. Can be obtained
54993
+ * from the `requestAnimationFrame` callback argument. If not provided, the current
54994
+ * time will be determined with `performance.now`.
54995
+ * @return {Timer} A reference to this timer.
54996
+ */
54997
+ update( timestamp ) {
54998
+
54999
+ if ( this._pageVisibilityHandler !== null && this._document.hidden === true ) {
55000
+
55001
+ this._delta = 0;
55002
+
55003
+ } else {
55004
+
55005
+ this._previousTime = this._currentTime;
55006
+ this._currentTime = ( timestamp !== undefined ? timestamp : performance.now() ) - this._startTime;
55007
+
55008
+ this._delta = ( this._currentTime - this._previousTime ) * this._timescale;
55009
+ this._elapsed += this._delta; // _elapsed is the accumulation of all previous deltas
55010
+
55011
+ }
55012
+
55013
+ return this;
55014
+
55015
+ }
55016
+
55017
+ }
55018
+
55019
+ function handleVisibilityChange() {
55020
+
55021
+ if ( this._document.hidden === false ) this.reset();
55022
+
55023
+ }
55024
+
54630
55025
  /**
54631
55026
  * This class can be used to represent points in 3D space as
54632
55027
  * [Spherical coordinates]{@link https://en.wikipedia.org/wiki/Spherical_coordinate_system}.
@@ -54734,8 +55129,8 @@ class Spherical {
54734
55129
  * Sets the spherical components from the given Cartesian coordinates.
54735
55130
  *
54736
55131
  * @param {number} x - The x value.
54737
- * @param {number} y - The x value.
54738
- * @param {number} z - The x value.
55132
+ * @param {number} y - The y value.
55133
+ * @param {number} z - The z value.
54739
55134
  * @return {Spherical} A reference to this spherical.
54740
55135
  */
54741
55136
  setFromCartesianCoords( x, y, z ) {
@@ -55396,6 +55791,12 @@ class Box2 {
55396
55791
  const _startP = /*@__PURE__*/ new Vector3();
55397
55792
  const _startEnd = /*@__PURE__*/ new Vector3();
55398
55793
 
55794
+ const _d1 = /*@__PURE__*/ new Vector3();
55795
+ const _d2 = /*@__PURE__*/ new Vector3();
55796
+ const _r = /*@__PURE__*/ new Vector3();
55797
+ const _c1 = /*@__PURE__*/ new Vector3();
55798
+ const _c2 = /*@__PURE__*/ new Vector3();
55799
+
55399
55800
  /**
55400
55801
  * An analytical line segment in 3D space represented by a start and end point.
55401
55802
  */
@@ -55543,11 +55944,11 @@ class Line3 {
55543
55944
  }
55544
55945
 
55545
55946
  /**
55546
- * Returns the closets point on the line for a given point.
55947
+ * Returns the closest point on the line for a given point.
55547
55948
  *
55548
55949
  * @param {Vector3} point - The point to compute the closest point on the line for.
55549
55950
  * @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not.
55550
- * @param {Vector3} target - The target vector that is used to store the method's result.
55951
+ * @param {Vector3} target - The target vector that is used to store the method's result.
55551
55952
  * @return {Vector3} The closest point on the line.
55552
55953
  */
55553
55954
  closestPointToPoint( point, clampToLine, target ) {
@@ -55558,6 +55959,127 @@ class Line3 {
55558
55959
 
55559
55960
  }
55560
55961
 
55962
+ /**
55963
+ * Returns the closest squared distance between this line segment and the given one.
55964
+ *
55965
+ * @param {Line3} line - The line segment to compute the closest squared distance to.
55966
+ * @param {Vector3} [c1] - The closest point on this line segment.
55967
+ * @param {Vector3} [c2] - The closest point on the given line segment.
55968
+ * @return {number} The squared distance between this line segment and the given one.
55969
+ */
55970
+ distanceSqToLine3( line, c1 = _c1, c2 = _c2 ) {
55971
+
55972
+ // from Real-Time Collision Detection by Christer Ericson, chapter 5.1.9
55973
+
55974
+ // Computes closest points C1 and C2 of S1(s)=P1+s*(Q1-P1) and
55975
+ // S2(t)=P2+t*(Q2-P2), returning s and t. Function result is squared
55976
+ // distance between between S1(s) and S2(t)
55977
+
55978
+ const EPSILON = 1e-8 * 1e-8; // must be squared since we compare squared length
55979
+ let s, t;
55980
+
55981
+ const p1 = this.start;
55982
+ const p2 = line.start;
55983
+ const q1 = this.end;
55984
+ const q2 = line.end;
55985
+
55986
+ _d1.subVectors( q1, p1 ); // Direction vector of segment S1
55987
+ _d2.subVectors( q2, p2 ); // Direction vector of segment S2
55988
+ _r.subVectors( p1, p2 );
55989
+
55990
+ const a = _d1.dot( _d1 ); // Squared length of segment S1, always nonnegative
55991
+ const e = _d2.dot( _d2 ); // Squared length of segment S2, always nonnegative
55992
+ const f = _d2.dot( _r );
55993
+
55994
+ // Check if either or both segments degenerate into points
55995
+
55996
+ if ( a <= EPSILON && e <= EPSILON ) {
55997
+
55998
+ // Both segments degenerate into points
55999
+
56000
+ c1.copy( p1 );
56001
+ c2.copy( p2 );
56002
+
56003
+ c1.sub( c2 );
56004
+
56005
+ return c1.dot( c1 );
56006
+
56007
+ }
56008
+
56009
+ if ( a <= EPSILON ) {
56010
+
56011
+ // First segment degenerates into a point
56012
+
56013
+ s = 0;
56014
+ t = f / e; // s = 0 => t = (b*s + f) / e = f / e
56015
+ t = clamp( t, 0, 1 );
56016
+
56017
+
56018
+ } else {
56019
+
56020
+ const c = _d1.dot( _r );
56021
+
56022
+ if ( e <= EPSILON ) {
56023
+
56024
+ // Second segment degenerates into a point
56025
+
56026
+ t = 0;
56027
+ s = clamp( - c / a, 0, 1 ); // t = 0 => s = (b*t - c) / a = -c / a
56028
+
56029
+ } else {
56030
+
56031
+ // The general nondegenerate case starts here
56032
+
56033
+ const b = _d1.dot( _d2 );
56034
+ const denom = a * e - b * b; // Always nonnegative
56035
+
56036
+ // If segments not parallel, compute closest point on L1 to L2 and
56037
+ // clamp to segment S1. Else pick arbitrary s (here 0)
56038
+
56039
+ if ( denom !== 0 ) {
56040
+
56041
+ s = clamp( ( b * f - c * e ) / denom, 0, 1 );
56042
+
56043
+ } else {
56044
+
56045
+ s = 0;
56046
+
56047
+ }
56048
+
56049
+ // Compute point on L2 closest to S1(s) using
56050
+ // t = Dot((P1 + D1*s) - P2,D2) / Dot(D2,D2) = (b*s + f) / e
56051
+
56052
+ t = ( b * s + f ) / e;
56053
+
56054
+ // If t in [0,1] done. Else clamp t, recompute s for the new value
56055
+ // of t using s = Dot((P2 + D2*t) - P1,D1) / Dot(D1,D1)= (t*b - c) / a
56056
+ // and clamp s to [0, 1]
56057
+
56058
+ if ( t < 0 ) {
56059
+
56060
+ t = 0.;
56061
+ s = clamp( - c / a, 0, 1 );
56062
+
56063
+ } else if ( t > 1 ) {
56064
+
56065
+ t = 1;
56066
+ s = clamp( ( b - c ) / a, 0, 1 );
56067
+
56068
+ }
56069
+
56070
+ }
56071
+
56072
+ }
56073
+
56074
+ c1.copy( p1 ).add( _d1.multiplyScalar( s ) );
56075
+ c2.copy( p2 ).add( _d2.multiplyScalar( t ) );
56076
+
56077
+ c1.sub( c2 );
56078
+
56079
+ return c1.dot( c1 );
56080
+
56081
+ }
56082
+
55561
56083
  /**
55562
56084
  * Applies a 4x4 transformation matrix to this line segment.
55563
56085
  *
@@ -55757,7 +56279,7 @@ const _matrixWorldInv = /*@__PURE__*/ new Matrix4();
55757
56279
  class SkeletonHelper extends LineSegments {
55758
56280
 
55759
56281
  /**
55760
- * Constructs a new hemisphere light helper.
56282
+ * Constructs a new skeleton helper.
55761
56283
  *
55762
56284
  * @param {Object3D} object - Usually an instance of {@link SkinnedMesh}. However, any 3D object
55763
56285
  * can be used if it represents a hierarchy of bones (see {@link Bone}).
@@ -55771,9 +56293,6 @@ class SkeletonHelper extends LineSegments {
55771
56293
  const vertices = [];
55772
56294
  const colors = [];
55773
56295
 
55774
- const color1 = new Color( 0, 0, 1 );
55775
- const color2 = new Color( 0, 1, 0 );
55776
-
55777
56296
  for ( let i = 0; i < bones.length; i ++ ) {
55778
56297
 
55779
56298
  const bone = bones[ i ];
@@ -55782,8 +56301,8 @@ class SkeletonHelper extends LineSegments {
55782
56301
 
55783
56302
  vertices.push( 0, 0, 0 );
55784
56303
  vertices.push( 0, 0, 0 );
55785
- colors.push( color1.r, color1.g, color1.b );
55786
- colors.push( color2.r, color2.g, color2.b );
56304
+ colors.push( 0, 0, 0 );
56305
+ colors.push( 0, 0, 0 );
55787
56306
 
55788
56307
  }
55789
56308
 
@@ -55824,6 +56343,13 @@ class SkeletonHelper extends LineSegments {
55824
56343
  this.matrix = object.matrixWorld;
55825
56344
  this.matrixAutoUpdate = false;
55826
56345
 
56346
+ // colors
56347
+
56348
+ const color1 = new Color( 0x0000ff );
56349
+ const color2 = new Color( 0x00ff00 );
56350
+
56351
+ this.setColors( color1, color2 );
56352
+
55827
56353
  }
55828
56354
 
55829
56355
  updateMatrixWorld( force ) {
@@ -55861,6 +56387,31 @@ class SkeletonHelper extends LineSegments {
55861
56387
 
55862
56388
  }
55863
56389
 
56390
+ /**
56391
+ * Defines the colors of the helper.
56392
+ *
56393
+ * @param {Color} color1 - The first line color for each bone.
56394
+ * @param {Color} color2 - The second line color for each bone.
56395
+ * @return {SkeletonHelper} A reference to this helper.
56396
+ */
56397
+ setColors( color1, color2 ) {
56398
+
56399
+ const geometry = this.geometry;
56400
+ const colorAttribute = geometry.getAttribute( 'color' );
56401
+
56402
+ for ( let i = 0; i < colorAttribute.count; i += 2 ) {
56403
+
56404
+ colorAttribute.setXYZ( i, color1.r, color1.g, color1.b );
56405
+ colorAttribute.setXYZ( i + 1, color2.r, color2.g, color2.b );
56406
+
56407
+ }
56408
+
56409
+ colorAttribute.needsUpdate = true;
56410
+
56411
+ return this;
56412
+
56413
+ }
56414
+
55864
56415
  /**
55865
56416
  * Frees the GPU-related resources allocated by this instance. Call this
55866
56417
  * method whenever this instance is no longer used in your app.
@@ -56621,6 +57172,7 @@ class CameraHelper extends LineSegments {
56621
57172
  * @param {Color} up - The up line color.
56622
57173
  * @param {Color} target - The target line color.
56623
57174
  * @param {Color} cross - The cross line color.
57175
+ * @return {CameraHelper} A reference to this helper.
56624
57176
  */
56625
57177
  setColors( frustum, cone, up, target, cross ) {
56626
57178
 
@@ -56677,6 +57229,8 @@ class CameraHelper extends LineSegments {
56677
57229
 
56678
57230
  colorAttribute.needsUpdate = true;
56679
57231
 
57232
+ return this;
57233
+
56680
57234
  }
56681
57235
 
56682
57236
  /**
@@ -56689,17 +57243,44 @@ class CameraHelper extends LineSegments {
56689
57243
 
56690
57244
  const w = 1, h = 1;
56691
57245
 
57246
+ let nearZ, farZ;
57247
+
56692
57248
  // we need just camera projection matrix inverse
56693
57249
  // world matrix must be identity
56694
57250
 
56695
57251
  _camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );
56696
57252
 
56697
57253
  // Adjust z values based on coordinate system
56698
- const nearZ = this.camera.coordinateSystem === WebGLCoordinateSystem ? -1 : 0;
57254
+
57255
+ if ( this.camera.reversedDepth === true ) {
57256
+
57257
+ nearZ = 1;
57258
+ farZ = 0;
57259
+
57260
+ } else {
57261
+
57262
+ if ( this.camera.coordinateSystem === WebGLCoordinateSystem ) {
57263
+
57264
+ nearZ = -1;
57265
+ farZ = 1;
57266
+
57267
+ } else if ( this.camera.coordinateSystem === WebGPUCoordinateSystem ) {
57268
+
57269
+ nearZ = 0;
57270
+ farZ = 1;
57271
+
57272
+ } else {
57273
+
57274
+ throw new Error( 'THREE.CameraHelper.update(): Invalid coordinate system: ' + this.camera.coordinateSystem );
57275
+
57276
+ }
57277
+
57278
+ }
57279
+
56699
57280
 
56700
57281
  // center / target
56701
57282
  setPoint( 'c', pointMap, geometry, _camera, 0, 0, nearZ );
56702
- setPoint( 't', pointMap, geometry, _camera, 0, 0, 1 );
57283
+ setPoint( 't', pointMap, geometry, _camera, 0, 0, farZ );
56703
57284
 
56704
57285
  // near
56705
57286
 
@@ -56710,10 +57291,10 @@ class CameraHelper extends LineSegments {
56710
57291
 
56711
57292
  // far
56712
57293
 
56713
- setPoint( 'f1', pointMap, geometry, _camera, -1, -1, 1 );
56714
- setPoint( 'f2', pointMap, geometry, _camera, w, -1, 1 );
56715
- setPoint( 'f3', pointMap, geometry, _camera, -1, h, 1 );
56716
- setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );
57294
+ setPoint( 'f1', pointMap, geometry, _camera, -1, -1, farZ );
57295
+ setPoint( 'f2', pointMap, geometry, _camera, w, -1, farZ );
57296
+ setPoint( 'f3', pointMap, geometry, _camera, -1, h, farZ );
57297
+ setPoint( 'f4', pointMap, geometry, _camera, w, h, farZ );
56717
57298
 
56718
57299
  // up
56719
57300
 
@@ -56723,10 +57304,10 @@ class CameraHelper extends LineSegments {
56723
57304
 
56724
57305
  // cross
56725
57306
 
56726
- setPoint( 'cf1', pointMap, geometry, _camera, -1, 0, 1 );
56727
- setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );
56728
- setPoint( 'cf3', pointMap, geometry, _camera, 0, -1, 1 );
56729
- setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );
57307
+ setPoint( 'cf1', pointMap, geometry, _camera, -1, 0, farZ );
57308
+ setPoint( 'cf2', pointMap, geometry, _camera, w, 0, farZ );
57309
+ setPoint( 'cf3', pointMap, geometry, _camera, 0, -1, farZ );
57310
+ setPoint( 'cf4', pointMap, geometry, _camera, 0, h, farZ );
56730
57311
 
56731
57312
  setPoint( 'cn1', pointMap, geometry, _camera, -1, 0, nearZ );
56732
57313
  setPoint( 'cn2', pointMap, geometry, _camera, w, 0, nearZ );
@@ -58112,4 +58693,4 @@ if ( typeof window !== 'undefined' ) {
58112
58693
 
58113
58694
  }
58114
58695
 
58115
- export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TextureUtils, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, getByteLength, getUnlitUniformColorSpace, mergeUniforms, probeAsync, toNormalizedProjectionMatrix, toReversedProjectionMatrix, warnOnce };
58696
+ export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, getByteLength, getUnlitUniformColorSpace, mergeUniforms, probeAsync, warnOnce };