@plastic-software/three 0.179.0 → 0.181.1

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 (430) hide show
  1. package/build/three.cjs +1108 -591
  2. package/build/three.core.js +616 -345
  3. package/build/three.core.min.js +1 -1
  4. package/build/three.module.js +488 -250
  5. package/build/three.module.min.js +1 -1
  6. package/build/three.tsl.js +37 -6
  7. package/build/three.tsl.min.js +1 -1
  8. package/build/three.webgpu.js +6576 -2152
  9. package/build/three.webgpu.min.js +1 -1
  10. package/build/three.webgpu.nodes.js +6575 -2151
  11. package/build/three.webgpu.nodes.min.js +1 -1
  12. package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
  13. package/examples/fonts/MPLUSRounded1c/OFL.txt +91 -0
  14. package/examples/jsm/Addons.js +1 -1
  15. package/examples/jsm/animation/CCDIKSolver.js +1 -1
  16. package/examples/jsm/controls/ArcballControls.js +8 -8
  17. package/examples/jsm/controls/DragControls.js +7 -57
  18. package/examples/jsm/controls/FirstPersonControls.js +3 -3
  19. package/examples/jsm/controls/FlyControls.js +1 -1
  20. package/examples/jsm/controls/OrbitControls.js +2 -2
  21. package/examples/jsm/controls/PointerLockControls.js +2 -10
  22. package/examples/jsm/controls/TrackballControls.js +1 -1
  23. package/examples/jsm/controls/TransformControls.js +1 -1
  24. package/examples/jsm/effects/AsciiEffect.js +8 -8
  25. package/examples/jsm/exporters/DRACOExporter.js +2 -2
  26. package/examples/jsm/exporters/EXRExporter.js +1 -1
  27. package/examples/jsm/exporters/GLTFExporter.js +33 -25
  28. package/examples/jsm/exporters/KTX2Exporter.js +4 -2
  29. package/examples/jsm/exporters/PLYExporter.js +1 -1
  30. package/examples/jsm/exporters/USDZExporter.js +9 -2
  31. package/examples/jsm/geometries/DecalGeometry.js +2 -2
  32. package/examples/jsm/geometries/ParametricGeometry.js +1 -1
  33. package/examples/jsm/geometries/TeapotGeometry.js +2 -2
  34. package/examples/jsm/geometries/TextGeometry.js +3 -2
  35. package/examples/jsm/gpgpu/BitonicSort.js +715 -0
  36. package/examples/jsm/helpers/ViewHelper.js +43 -5
  37. package/examples/jsm/inspector/Inspector.js +427 -0
  38. package/examples/jsm/inspector/RendererInspector.js +415 -0
  39. package/examples/jsm/inspector/tabs/Console.js +204 -0
  40. package/examples/jsm/inspector/tabs/Parameters.js +332 -0
  41. package/examples/jsm/inspector/tabs/Performance.js +268 -0
  42. package/examples/jsm/inspector/tabs/Viewer.js +166 -0
  43. package/examples/jsm/inspector/ui/Graph.js +95 -0
  44. package/examples/jsm/inspector/ui/Item.js +170 -0
  45. package/examples/jsm/inspector/ui/List.js +75 -0
  46. package/examples/jsm/inspector/ui/Profiler.js +170 -0
  47. package/examples/jsm/inspector/ui/Style.js +654 -0
  48. package/examples/jsm/inspector/ui/Tab.js +46 -0
  49. package/examples/jsm/inspector/ui/Values.js +423 -0
  50. package/examples/jsm/inspector/ui/utils.js +56 -0
  51. package/examples/jsm/interactive/HTMLMesh.js +6 -10
  52. package/examples/jsm/interactive/InteractiveGroup.js +1 -1
  53. package/examples/jsm/interactive/SelectionBox.js +30 -0
  54. package/examples/jsm/libs/ktx-parse.module.js +1 -1
  55. package/examples/jsm/lights/RectAreaLightTexturesLib.js +1 -1
  56. package/examples/jsm/lines/Line2.js +3 -3
  57. package/examples/jsm/lines/LineGeometry.js +1 -1
  58. package/examples/jsm/lines/LineSegments2.js +2 -2
  59. package/examples/jsm/lines/Wireframe.js +2 -2
  60. package/examples/jsm/lines/WireframeGeometry2.js +1 -1
  61. package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
  62. package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
  63. package/examples/jsm/loaders/3MFLoader.js +1 -1
  64. package/examples/jsm/loaders/ColladaLoader.js +3 -3
  65. package/examples/jsm/loaders/DDSLoader.js +1 -1
  66. package/examples/jsm/loaders/DRACOLoader.js +73 -22
  67. package/examples/jsm/loaders/EXRLoader.js +5 -5
  68. package/examples/jsm/loaders/FBXLoader.js +2 -2
  69. package/examples/jsm/loaders/FontLoader.js +23 -5
  70. package/examples/jsm/loaders/GLTFLoader.js +14 -8
  71. package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
  72. package/examples/jsm/loaders/HDRLoader.js +486 -0
  73. package/examples/jsm/loaders/KTX2Loader.js +136 -49
  74. package/examples/jsm/loaders/KTXLoader.js +2 -2
  75. package/examples/jsm/loaders/LDrawLoader.js +1 -1
  76. package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
  77. package/examples/jsm/loaders/LUTCubeLoader.js +1 -1
  78. package/examples/jsm/loaders/LWOLoader.js +2 -2
  79. package/examples/jsm/loaders/MaterialXLoader.js +22 -5
  80. package/examples/jsm/loaders/OBJLoader.js +1 -1
  81. package/examples/jsm/loaders/PDBLoader.js +1 -1
  82. package/examples/jsm/loaders/RGBELoader.js +7 -473
  83. package/examples/jsm/loaders/SVGLoader.js +2 -2
  84. package/examples/jsm/loaders/TTFLoader.js +4 -4
  85. package/examples/jsm/loaders/UltraHDRLoader.js +2 -2
  86. package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
  87. package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
  88. package/examples/jsm/math/ColorSpaces.js +19 -1
  89. package/examples/jsm/math/ConvexHull.js +3 -3
  90. package/examples/jsm/math/ImprovedNoise.js +1 -1
  91. package/examples/jsm/math/Lut.js +2 -2
  92. package/examples/jsm/math/SimplexNoise.js +1 -1
  93. package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
  94. package/examples/jsm/misc/ProgressiveLightMap.js +9 -3
  95. package/examples/jsm/misc/ProgressiveLightMapGPU.js +7 -1
  96. package/examples/jsm/misc/TubePainter.js +383 -40
  97. package/examples/jsm/misc/Volume.js +1 -1
  98. package/examples/jsm/modifiers/SimplifyModifier.js +1 -1
  99. package/examples/jsm/objects/ReflectorForSSRPass.js +1 -0
  100. package/examples/jsm/objects/Sky.js +1 -1
  101. package/examples/jsm/objects/SkyMesh.js +1 -1
  102. package/examples/jsm/objects/Water.js +3 -3
  103. package/examples/jsm/objects/WaterMesh.js +6 -6
  104. package/examples/jsm/postprocessing/GlitchPass.js +2 -2
  105. package/examples/jsm/postprocessing/OutlinePass.js +1 -1
  106. package/examples/jsm/postprocessing/SSRPass.js +37 -8
  107. package/examples/jsm/postprocessing/UnrealBloomPass.js +8 -6
  108. package/examples/jsm/renderers/CSS2DRenderer.js +16 -5
  109. package/examples/jsm/renderers/CSS3DRenderer.js +7 -6
  110. package/examples/jsm/renderers/SVGRenderer.js +1 -1
  111. package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +1 -1
  112. package/examples/jsm/shaders/AfterimageShader.js +1 -1
  113. package/examples/jsm/shaders/BleachBypassShader.js +1 -1
  114. package/examples/jsm/shaders/BokehShader.js +1 -1
  115. package/examples/jsm/shaders/BokehShader2.js +1 -1
  116. package/examples/jsm/shaders/DotScreenShader.js +1 -1
  117. package/examples/jsm/shaders/FocusShader.js +1 -1
  118. package/examples/jsm/shaders/GTAOShader.js +2 -2
  119. package/examples/jsm/shaders/GodRaysShader.js +1 -1
  120. package/examples/jsm/shaders/KaleidoShader.js +1 -1
  121. package/examples/jsm/shaders/PoissonDenoiseShader.js +2 -2
  122. package/examples/jsm/shaders/SSRShader.js +1 -1
  123. package/examples/jsm/shaders/SepiaShader.js +1 -1
  124. package/examples/jsm/shaders/SubsurfaceScatteringShader.js +1 -1
  125. package/examples/jsm/shaders/TriangleBlurShader.js +1 -1
  126. package/examples/jsm/shaders/UnpackDepthRGBAShader.js +1 -1
  127. package/examples/jsm/shaders/VignetteShader.js +1 -1
  128. package/examples/jsm/transpiler/GLSLDecoder.js +22 -19
  129. package/examples/jsm/transpiler/TSLEncoder.js +9 -10
  130. package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
  131. package/examples/jsm/tsl/display/AfterImageNode.js +26 -24
  132. package/examples/jsm/tsl/display/AnamorphicNode.js +28 -4
  133. package/examples/jsm/tsl/display/BloomNode.js +7 -3
  134. package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
  135. package/examples/jsm/tsl/display/DenoiseNode.js +2 -0
  136. package/examples/jsm/tsl/display/DepthOfFieldNode.js +446 -90
  137. package/examples/jsm/tsl/display/GTAONode.js +53 -5
  138. package/examples/jsm/tsl/display/GaussianBlurNode.js +49 -35
  139. package/examples/jsm/tsl/display/OutlineNode.js +13 -2
  140. package/examples/jsm/tsl/display/SSGINode.js +654 -0
  141. package/examples/jsm/tsl/display/SSRNode.js +182 -65
  142. package/examples/jsm/tsl/display/SSSNode.js +488 -0
  143. package/examples/jsm/tsl/display/TRAANode.js +124 -7
  144. package/examples/jsm/tsl/display/boxBlur.js +65 -0
  145. package/examples/jsm/tsl/display/hashBlur.js +16 -18
  146. package/examples/jsm/tsl/lighting/TiledLightsNode.js +21 -1
  147. package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
  148. package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
  149. package/examples/jsm/webxr/OculusHandModel.js +1 -1
  150. package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
  151. package/examples/jsm/webxr/XRHandModelFactory.js +2 -6
  152. package/package.json +5 -10
  153. package/src/Three.Core.js +4 -2
  154. package/src/Three.TSL.js +36 -5
  155. package/src/Three.WebGPU.Nodes.js +2 -0
  156. package/src/Three.WebGPU.js +2 -0
  157. package/src/animation/AnimationClip.js +20 -4
  158. package/src/animation/AnimationMixer.js +3 -3
  159. package/src/animation/AnimationObjectGroup.js +2 -1
  160. package/src/animation/KeyframeTrack.js +7 -6
  161. package/src/animation/PropertyBinding.js +12 -11
  162. package/src/audio/Audio.js +10 -9
  163. package/src/audio/PositionalAudio.js +1 -1
  164. package/src/cameras/OrthographicCamera.js +1 -1
  165. package/src/cameras/PerspectiveCamera.js +1 -1
  166. package/src/cameras/StereoCamera.js +2 -2
  167. package/src/constants.js +11 -3
  168. package/src/core/BufferGeometry.js +10 -10
  169. package/src/core/EventDispatcher.js +1 -1
  170. package/src/core/InterleavedBuffer.js +1 -1
  171. package/src/core/InterleavedBufferAttribute.js +3 -2
  172. package/src/core/Object3D.js +3 -2
  173. package/src/core/Raycaster.js +2 -1
  174. package/src/core/RenderTarget.js +10 -1
  175. package/src/extras/Controls.js +5 -4
  176. package/src/extras/DataUtils.js +2 -1
  177. package/src/extras/Earcut.js +6 -0
  178. package/src/extras/ImageUtils.js +2 -2
  179. package/src/extras/PMREMGenerator.js +268 -55
  180. package/src/extras/TextureUtils.js +2 -1
  181. package/src/extras/core/Curve.js +2 -1
  182. package/src/extras/core/Interpolations.js +7 -1
  183. package/src/extras/core/ShapePath.js +4 -4
  184. package/src/extras/lib/earcut.js +8 -8
  185. package/src/geometries/BoxGeometry.js +1 -0
  186. package/src/geometries/CapsuleGeometry.js +1 -0
  187. package/src/geometries/CircleGeometry.js +1 -0
  188. package/src/geometries/ConeGeometry.js +1 -0
  189. package/src/geometries/CylinderGeometry.js +1 -0
  190. package/src/geometries/DodecahedronGeometry.js +1 -0
  191. package/src/geometries/ExtrudeGeometry.js +8 -6
  192. package/src/geometries/IcosahedronGeometry.js +1 -0
  193. package/src/geometries/LatheGeometry.js +1 -0
  194. package/src/geometries/OctahedronGeometry.js +1 -0
  195. package/src/geometries/PlaneGeometry.js +1 -0
  196. package/src/geometries/RingGeometry.js +1 -0
  197. package/src/geometries/ShapeGeometry.js +1 -0
  198. package/src/geometries/SphereGeometry.js +1 -0
  199. package/src/geometries/TetrahedronGeometry.js +1 -0
  200. package/src/geometries/TorusGeometry.js +1 -0
  201. package/src/geometries/TorusKnotGeometry.js +1 -0
  202. package/src/geometries/TubeGeometry.js +1 -0
  203. package/src/helpers/CameraHelper.js +1 -1
  204. package/src/lights/webgpu/ProjectorLight.js +1 -1
  205. package/src/loaders/AnimationLoader.js +2 -1
  206. package/src/loaders/AudioLoader.js +2 -1
  207. package/src/loaders/BufferGeometryLoader.js +2 -2
  208. package/src/loaders/Cache.js +2 -2
  209. package/src/loaders/DataTextureLoader.js +1 -1
  210. package/src/loaders/FileLoader.js +3 -2
  211. package/src/loaders/ImageBitmapLoader.js +5 -4
  212. package/src/loaders/ImageLoader.js +1 -1
  213. package/src/loaders/Loader.js +3 -3
  214. package/src/loaders/LoadingManager.js +25 -3
  215. package/src/loaders/MaterialLoader.js +3 -2
  216. package/src/loaders/ObjectLoader.js +13 -13
  217. package/src/loaders/TextureLoader.js +1 -1
  218. package/src/loaders/nodes/NodeLoader.js +3 -2
  219. package/src/materials/Material.js +16 -3
  220. package/src/materials/MeshBasicMaterial.js +1 -0
  221. package/src/materials/MeshDepthMaterial.js +1 -0
  222. package/src/materials/MeshDistanceMaterial.js +1 -1
  223. package/src/materials/MeshLambertMaterial.js +2 -1
  224. package/src/materials/MeshMatcapMaterial.js +22 -0
  225. package/src/materials/MeshNormalMaterial.js +1 -0
  226. package/src/materials/MeshPhongMaterial.js +2 -1
  227. package/src/materials/MeshPhysicalMaterial.js +2 -1
  228. package/src/materials/MeshStandardMaterial.js +8 -7
  229. package/src/materials/MeshToonMaterial.js +1 -0
  230. package/src/materials/PointsMaterial.js +1 -1
  231. package/src/materials/ShaderMaterial.js +2 -2
  232. package/src/materials/nodes/Line2NodeMaterial.js +2 -2
  233. package/src/materials/nodes/MeshSSSNodeMaterial.js +1 -1
  234. package/src/materials/nodes/NodeMaterial.js +62 -22
  235. package/src/materials/nodes/PointsNodeMaterial.js +81 -28
  236. package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
  237. package/src/materials/nodes/manager/NodeMaterialObserver.js +3 -2
  238. package/src/math/Color.js +6 -5
  239. package/src/math/ColorManagement.js +9 -3
  240. package/src/math/Cylindrical.js +1 -1
  241. package/src/math/Euler.js +2 -1
  242. package/src/math/MathUtils.js +13 -11
  243. package/src/math/Matrix2.js +1 -1
  244. package/src/math/Matrix3.js +2 -2
  245. package/src/math/Matrix4.js +7 -7
  246. package/src/math/Plane.js +1 -1
  247. package/src/math/Quaternion.js +68 -66
  248. package/src/math/Spherical.js +1 -1
  249. package/src/nodes/Nodes.js +4 -1
  250. package/src/nodes/TSL.js +4 -1
  251. package/src/nodes/accessors/BufferNode.js +1 -1
  252. package/src/nodes/accessors/Camera.js +133 -7
  253. package/src/nodes/accessors/ClippingNode.js +6 -5
  254. package/src/nodes/accessors/CubeTextureNode.js +5 -4
  255. package/src/nodes/accessors/InstanceNode.js +25 -5
  256. package/src/nodes/accessors/Lights.js +10 -0
  257. package/src/nodes/accessors/Normal.js +5 -4
  258. package/src/nodes/accessors/Object3DNode.js +1 -1
  259. package/src/nodes/accessors/Position.js +18 -2
  260. package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
  261. package/src/nodes/accessors/ReferenceNode.js +3 -2
  262. package/src/nodes/accessors/SceneNode.js +2 -1
  263. package/src/nodes/accessors/StorageBufferNode.js +2 -1
  264. package/src/nodes/accessors/StorageTextureNode.js +22 -0
  265. package/src/nodes/accessors/Texture3DNode.js +14 -1
  266. package/src/nodes/accessors/TextureNode.js +130 -44
  267. package/src/nodes/code/FunctionCallNode.js +24 -4
  268. package/src/nodes/code/FunctionNode.js +23 -0
  269. package/src/nodes/core/ArrayNode.js +1 -0
  270. package/src/nodes/core/AssignNode.js +4 -3
  271. package/src/nodes/core/AttributeNode.js +2 -1
  272. package/src/nodes/core/ContextNode.js +29 -10
  273. package/src/nodes/core/IndexNode.js +2 -2
  274. package/src/nodes/core/InputNode.js +2 -1
  275. package/src/nodes/core/InspectorNode.js +128 -0
  276. package/src/nodes/core/{CacheNode.js → IsolateNode.js} +40 -7
  277. package/src/nodes/core/Node.js +152 -31
  278. package/src/nodes/core/NodeBuilder.js +183 -35
  279. package/src/nodes/core/NodeFrame.js +21 -21
  280. package/src/nodes/core/NodeFunction.js +2 -1
  281. package/src/nodes/core/NodeParser.js +2 -1
  282. package/src/nodes/core/NodeUniform.js +1 -1
  283. package/src/nodes/core/NodeUtils.js +17 -91
  284. package/src/nodes/core/ParameterNode.js +31 -0
  285. package/src/nodes/core/PropertyNode.js +7 -0
  286. package/src/nodes/core/StackNode.js +43 -16
  287. package/src/nodes/core/StructNode.js +5 -5
  288. package/src/nodes/core/StructTypeNode.js +1 -0
  289. package/src/nodes/core/SubBuildNode.js +2 -2
  290. package/src/nodes/core/UniformNode.js +18 -10
  291. package/src/nodes/core/VarNode.js +70 -33
  292. package/src/nodes/core/VaryingNode.js +3 -2
  293. package/src/nodes/display/BlendModes.js +5 -4
  294. package/src/nodes/display/BumpMapNode.js +1 -1
  295. package/src/nodes/display/ColorAdjustment.js +1 -1
  296. package/src/nodes/display/FrontFacingNode.js +4 -8
  297. package/src/nodes/display/NormalMapNode.js +2 -1
  298. package/src/nodes/display/PassNode.js +52 -11
  299. package/src/nodes/display/RenderOutputNode.js +28 -2
  300. package/src/nodes/display/ScreenNode.js +44 -14
  301. package/src/nodes/display/ToneMappingNode.js +31 -4
  302. package/src/nodes/display/ToonOutlinePassNode.js +8 -0
  303. package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
  304. package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
  305. package/src/nodes/display/ViewportTextureNode.js +42 -12
  306. package/src/nodes/fog/Fog.js +3 -2
  307. package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +52 -0
  308. package/src/nodes/functions/BSDF/DFGApprox.js +60 -19
  309. package/src/nodes/functions/BasicLightingModel.js +2 -1
  310. package/src/nodes/functions/PhysicalLightingModel.js +3 -2
  311. package/src/nodes/functions/VolumetricLightingModel.js +5 -5
  312. package/src/nodes/geometry/RangeNode.js +40 -4
  313. package/src/nodes/gpgpu/ComputeBuiltinNode.js +2 -1
  314. package/src/nodes/gpgpu/ComputeNode.js +17 -5
  315. package/src/nodes/gpgpu/SubgroupFunctionNode.js +455 -0
  316. package/src/nodes/gpgpu/WorkgroupInfoNode.js +2 -1
  317. package/src/nodes/lighting/EnvironmentNode.js +6 -6
  318. package/src/nodes/lighting/LightsNode.js +3 -4
  319. package/src/nodes/lighting/PointShadowNode.js +6 -0
  320. package/src/nodes/lighting/ShadowFilterNode.js +2 -0
  321. package/src/nodes/lighting/ShadowNode.js +75 -8
  322. package/src/nodes/math/BitcastNode.js +156 -0
  323. package/src/nodes/math/ConditionalNode.js +24 -7
  324. package/src/nodes/math/MathNode.js +25 -19
  325. package/src/nodes/math/OperatorNode.js +7 -5
  326. package/src/nodes/pmrem/PMREMUtils.js +117 -2
  327. package/src/nodes/shapes/Shapes.js +1 -1
  328. package/src/nodes/tsl/TSLBase.js +5 -2
  329. package/src/nodes/tsl/TSLCore.js +460 -159
  330. package/src/nodes/utils/DebugNode.js +2 -1
  331. package/src/nodes/utils/EventNode.js +36 -0
  332. package/src/nodes/utils/FunctionOverloadingNode.js +37 -19
  333. package/src/nodes/utils/JoinNode.js +6 -3
  334. package/src/nodes/utils/LoopNode.js +20 -24
  335. package/src/nodes/utils/MemberNode.js +59 -7
  336. package/src/nodes/utils/PostProcessingUtils.js +28 -1
  337. package/src/nodes/utils/RTTNode.js +13 -3
  338. package/src/nodes/utils/ReflectorNode.js +58 -7
  339. package/src/nodes/utils/SampleNode.js +12 -2
  340. package/src/nodes/utils/SplitNode.js +11 -0
  341. package/src/nodes/utils/Timer.js +0 -47
  342. package/src/objects/BatchedMesh.js +2 -2
  343. package/src/objects/LOD.js +1 -1
  344. package/src/objects/Line.js +2 -1
  345. package/src/objects/LineSegments.js +2 -1
  346. package/src/objects/Skeleton.js +3 -2
  347. package/src/objects/SkinnedMesh.js +3 -1
  348. package/src/objects/Sprite.js +4 -3
  349. package/src/renderers/WebGLRenderer.js +48 -41
  350. package/src/renderers/common/Animation.js +13 -1
  351. package/src/renderers/common/Attributes.js +1 -1
  352. package/src/renderers/common/Backend.js +108 -27
  353. package/src/renderers/common/Background.js +2 -1
  354. package/src/renderers/common/Bindings.js +58 -2
  355. package/src/renderers/common/CanvasTarget.js +341 -0
  356. package/src/renderers/common/ChainMap.js +1 -1
  357. package/src/renderers/common/DataMap.js +1 -1
  358. package/src/renderers/common/Geometries.js +26 -0
  359. package/src/renderers/common/Info.js +4 -2
  360. package/src/renderers/common/InspectorBase.js +146 -0
  361. package/src/renderers/common/Pipelines.js +1 -1
  362. package/src/renderers/common/PostProcessing.js +6 -25
  363. package/src/renderers/common/QuadMesh.js +7 -1
  364. package/src/renderers/common/RenderContext.js +2 -2
  365. package/src/renderers/common/RenderList.js +7 -3
  366. package/src/renderers/common/RenderObject.js +16 -2
  367. package/src/renderers/common/RenderObjects.js +1 -1
  368. package/src/renderers/common/Renderer.js +473 -245
  369. package/src/renderers/common/RendererUtils.js +9 -0
  370. package/src/renderers/common/SampledTexture.js +9 -1
  371. package/src/renderers/common/Sampler.js +50 -12
  372. package/src/renderers/common/StorageTexture.js +9 -1
  373. package/src/renderers/common/Textures.js +121 -45
  374. package/src/renderers/common/TimestampQueryPool.js +65 -3
  375. package/src/renderers/common/UniformsGroup.js +2 -1
  376. package/src/renderers/common/XRManager.js +42 -22
  377. package/src/renderers/common/extras/PMREMGenerator.js +160 -65
  378. package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
  379. package/src/renderers/common/nodes/NodeLibrary.js +9 -7
  380. package/src/renderers/common/nodes/NodeSampler.js +13 -1
  381. package/src/renderers/common/nodes/Nodes.js +38 -16
  382. package/src/renderers/shaders/DFGLUTData.js +64 -0
  383. package/src/renderers/shaders/ShaderChunk/common.glsl.js +0 -12
  384. package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +1 -1
  385. package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +1 -1
  386. package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +52 -18
  387. package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
  388. package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
  389. package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
  390. package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
  391. package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +7 -15
  392. package/src/renderers/shaders/ShaderLib/depth.glsl.js +1 -1
  393. package/src/renderers/shaders/UniformsLib.js +1 -0
  394. package/src/renderers/shaders/UniformsUtils.js +25 -4
  395. package/src/renderers/webgl/WebGLCapabilities.js +2 -1
  396. package/src/renderers/webgl/WebGLExtensions.js +2 -25
  397. package/src/renderers/webgl/WebGLInfo.js +3 -1
  398. package/src/renderers/webgl/WebGLProgram.js +15 -14
  399. package/src/renderers/webgl/WebGLPrograms.js +2 -1
  400. package/src/renderers/webgl/WebGLShadowMap.js +3 -2
  401. package/src/renderers/webgl/WebGLState.js +15 -14
  402. package/src/renderers/webgl/WebGLTextures.js +19 -14
  403. package/src/renderers/webgl/WebGLUniformsGroups.js +5 -3
  404. package/src/renderers/webgl/WebGLUtils.js +3 -2
  405. package/src/renderers/webgl-fallback/WebGLBackend.js +199 -167
  406. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +181 -25
  407. package/src/renderers/webgl-fallback/utils/WebGLConstants.js +2 -3
  408. package/src/renderers/webgl-fallback/utils/WebGLState.js +7 -6
  409. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +169 -19
  410. package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +51 -22
  411. package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
  412. package/src/renderers/webgpu/WebGPUBackend.js +153 -123
  413. package/src/renderers/webgpu/WebGPURenderer.Nodes.js +2 -1
  414. package/src/renderers/webgpu/WebGPURenderer.js +3 -2
  415. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +142 -50
  416. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +2 -1
  417. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +5 -3
  418. package/src/renderers/webgpu/utils/WebGPUConstants.js +7 -2
  419. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +53 -34
  420. package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +6 -8
  421. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +260 -99
  422. package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +32 -9
  423. package/src/renderers/webgpu/utils/WebGPUUtils.js +22 -2
  424. package/src/renderers/webxr/WebXRManager.js +42 -26
  425. package/src/textures/ExternalTexture.js +15 -4
  426. package/src/textures/Source.js +3 -2
  427. package/src/textures/Texture.js +3 -2
  428. package/src/textures/VideoTexture.js +2 -3
  429. package/src/utils.js +67 -3
  430. package/examples/jsm/loaders/RGBMLoader.js +0 -1148
@@ -3,7 +3,7 @@
3
3
  * Copyright 2010-2025 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
- const REVISION = '179';
6
+ const REVISION = '181';
7
7
 
8
8
  /**
9
9
  * Represents mouse buttons and interaction types in context of controls.
@@ -729,6 +729,14 @@ const UnsignedInt248Type = 1020;
729
729
  */
730
730
  const UnsignedInt5999Type = 35902;
731
731
 
732
+ /**
733
+ * An unsigned int 10_11_11 (packed) data type for textures.
734
+ *
735
+ * @type {number}
736
+ * @constant
737
+ */
738
+ const UnsignedInt101111Type = 35899;
739
+
732
740
  /**
733
741
  * Discards the red, green and blue components and reads just the alpha component.
734
742
  *
@@ -1670,14 +1678,165 @@ const InterpolationSamplingMode = {
1670
1678
  * @property {string} NORMAL - Normal sampling mode.
1671
1679
  * @property {string} CENTROID - Centroid sampling mode.
1672
1680
  * @property {string} SAMPLE - Sample-specific sampling mode.
1673
- * @property {string} FLAT_FIRST - Flat interpolation using the first vertex.
1674
- * @property {string} FLAT_EITHER - Flat interpolation using either vertex.
1681
+ * @property {string} FIRST - Flat interpolation using the first vertex.
1682
+ * @property {string} EITHER - Flat interpolation using either vertex.
1675
1683
  */
1676
1684
 
1685
+ function arrayNeedsUint32( array ) {
1686
+
1687
+ // assumes larger values usually on last
1688
+
1689
+ for ( let i = array.length - 1; i >= 0; -- i ) {
1690
+
1691
+ if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565
1692
+
1693
+ }
1694
+
1695
+ return false;
1696
+
1697
+ }
1698
+
1699
+ const TYPED_ARRAYS = {
1700
+ Int8Array: Int8Array,
1701
+ Uint8Array: Uint8Array,
1702
+ Uint8ClampedArray: Uint8ClampedArray,
1703
+ Int16Array: Int16Array,
1704
+ Uint16Array: Uint16Array,
1705
+ Int32Array: Int32Array,
1706
+ Uint32Array: Uint32Array,
1707
+ Float32Array: Float32Array,
1708
+ Float64Array: Float64Array
1709
+ };
1710
+
1711
+ function getTypedArray( type, buffer ) {
1712
+
1713
+ return new TYPED_ARRAYS[ type ]( buffer );
1714
+
1715
+ }
1716
+
1717
+ function createElementNS( name ) {
1718
+
1719
+ return document.createElementNS( 'http://www.w3.org/1999/xhtml', name );
1720
+
1721
+ }
1722
+
1723
+ function createCanvasElement() {
1724
+
1725
+ const canvas = createElementNS( 'canvas' );
1726
+ canvas.style.display = 'block';
1727
+ return canvas;
1728
+
1729
+ }
1730
+
1731
+ const _cache = {};
1732
+
1733
+ let _setConsoleFunction = null;
1734
+
1735
+ function setConsoleFunction( fn ) {
1736
+
1737
+ _setConsoleFunction = fn;
1738
+
1739
+ }
1740
+
1741
+ function getConsoleFunction() {
1742
+
1743
+ return _setConsoleFunction;
1744
+
1745
+ }
1746
+
1747
+ function log( ...params ) {
1748
+
1749
+ const message = 'THREE.' + params.shift();
1750
+
1751
+ if ( _setConsoleFunction ) {
1752
+
1753
+ _setConsoleFunction( 'log', message, ...params );
1754
+
1755
+ } else {
1756
+
1757
+ console.log( message, ...params );
1758
+
1759
+ }
1760
+
1761
+ }
1762
+
1763
+ function warn( ...params ) {
1764
+
1765
+ const message = 'THREE.' + params.shift();
1766
+
1767
+ if ( _setConsoleFunction ) {
1768
+
1769
+ _setConsoleFunction( 'warn', message, ...params );
1770
+
1771
+ } else {
1772
+
1773
+ console.warn( message, ...params );
1774
+
1775
+ }
1776
+
1777
+ }
1778
+
1779
+ function error( ...params ) {
1780
+
1781
+ const message = 'THREE.' + params.shift();
1782
+
1783
+ if ( _setConsoleFunction ) {
1784
+
1785
+ _setConsoleFunction( 'error', message, ...params );
1786
+
1787
+ } else {
1788
+
1789
+ console.error( message, ...params );
1790
+
1791
+ }
1792
+
1793
+ }
1794
+
1795
+ function warnOnce( ...params ) {
1796
+
1797
+ const message = params.join( ' ' );
1798
+
1799
+ if ( message in _cache ) return;
1800
+
1801
+ _cache[ message ] = true;
1802
+
1803
+ warn( ...params );
1804
+
1805
+ }
1806
+
1807
+ function probeAsync( gl, sync, interval ) {
1808
+
1809
+ return new Promise( function ( resolve, reject ) {
1810
+
1811
+ function probe() {
1812
+
1813
+ switch ( gl.clientWaitSync( sync, gl.SYNC_FLUSH_COMMANDS_BIT, 0 ) ) {
1814
+
1815
+ case gl.WAIT_FAILED:
1816
+ reject();
1817
+ break;
1818
+
1819
+ case gl.TIMEOUT_EXPIRED:
1820
+ setTimeout( probe, interval );
1821
+ break;
1822
+
1823
+ default:
1824
+ resolve();
1825
+
1826
+ }
1827
+
1828
+ }
1829
+
1830
+ setTimeout( probe, interval );
1831
+
1832
+ } );
1833
+
1834
+ }
1835
+
1677
1836
  /**
1678
1837
  * This modules allows to dispatch event objects on custom JavaScript objects.
1679
1838
  *
1680
- * Main repository: [eventdispatcher.js]{@link https://github.com/mrdoob/eventdispatcher.js/}
1839
+ * Main repository: [eventdispatcher.js](https://github.com/mrdoob/eventdispatcher.js/)
1681
1840
  *
1682
1841
  * Code Example:
1683
1842
  * ```js
@@ -1812,7 +1971,7 @@ const DEG2RAD = Math.PI / 180;
1812
1971
  const RAD2DEG = 180 / Math.PI;
1813
1972
 
1814
1973
  /**
1815
- * Generate a [UUID]{@link https://en.wikipedia.org/wiki/Universally_unique_identifier}
1974
+ * Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)
1816
1975
  * (universally unique identifier).
1817
1976
  *
1818
1977
  * @return {string} The UUID.
@@ -1925,7 +2084,7 @@ function lerp( x, y, t ) {
1925
2084
  /**
1926
2085
  * Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta
1927
2086
  * time to maintain frame rate independent movement. For details, see
1928
- * [Frame rate independent damping using lerp]{@link http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/}.
2087
+ * [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/).
1929
2088
  *
1930
2089
  * @param {number} x - The current point.
1931
2090
  * @param {number} y - The target point.
@@ -1960,7 +2119,7 @@ function pingpong( x, length = 1 ) {
1960
2119
  * moved between `min` and `max`, but smoothed or slowed down the closer `x` is to
1961
2120
  * the `min` and `max`.
1962
2121
  *
1963
- * See [Smoothstep]{@link http://en.wikipedia.org/wiki/Smoothstep} for more details.
2122
+ * See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details.
1964
2123
  *
1965
2124
  * @param {number} x - The value to evaluate based on its position between min and max.
1966
2125
  * @param {number} min - The min value. Any x value below min will be `0`.
@@ -1979,7 +2138,7 @@ function smoothstep( x, min, max ) {
1979
2138
  }
1980
2139
 
1981
2140
  /**
1982
- * A [variation on smoothstep]{@link https://en.wikipedia.org/wiki/Smoothstep#Variations}
2141
+ * A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations)
1983
2142
  * that has zero 1st and 2nd order derivatives at x=0 and x=1.
1984
2143
  *
1985
2144
  * @param {number} x - The value to evaluate based on its position between min and max.
@@ -2119,7 +2278,7 @@ function floorPowerOfTwo( value ) {
2119
2278
  }
2120
2279
 
2121
2280
  /**
2122
- * Sets the given quaternion from the [Intrinsic Proper Euler Angles]{@link https://en.wikipedia.org/wiki/Euler_angles}
2281
+ * Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles)
2123
2282
  * defined by the given angles and order.
2124
2283
  *
2125
2284
  * Rotations are applied to the axes in the order specified by order:
@@ -2175,7 +2334,7 @@ function setQuaternionFromProperEuler( q, a, b, c, order ) {
2175
2334
  break;
2176
2335
 
2177
2336
  default:
2178
- console.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );
2337
+ warn( 'MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );
2179
2338
 
2180
2339
  }
2181
2340
 
@@ -2284,7 +2443,7 @@ const MathUtils = {
2284
2443
  DEG2RAD: DEG2RAD,
2285
2444
  RAD2DEG: RAD2DEG,
2286
2445
  /**
2287
- * Generate a [UUID]{@link https://en.wikipedia.org/wiki/Universally_unique_identifier}
2446
+ * Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)
2288
2447
  * (universally unique identifier).
2289
2448
  *
2290
2449
  * @static
@@ -2355,7 +2514,7 @@ const MathUtils = {
2355
2514
  /**
2356
2515
  * Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta
2357
2516
  * time to maintain frame rate independent movement. For details, see
2358
- * [Frame rate independent damping using lerp]{@link http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/}.
2517
+ * [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/).
2359
2518
  *
2360
2519
  * @static
2361
2520
  * @method
@@ -2382,7 +2541,7 @@ const MathUtils = {
2382
2541
  * moved between `min` and `max`, but smoothed or slowed down the closer `x` is to
2383
2542
  * the `min` and `max`.
2384
2543
  *
2385
- * See [Smoothstep]{@link http://en.wikipedia.org/wiki/Smoothstep} for more details.
2544
+ * See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details.
2386
2545
  *
2387
2546
  * @static
2388
2547
  * @method
@@ -2393,7 +2552,7 @@ const MathUtils = {
2393
2552
  */
2394
2553
  smoothstep: smoothstep,
2395
2554
  /**
2396
- * A [variation on smoothstep]{@link https://en.wikipedia.org/wiki/Smoothstep#Variations}
2555
+ * A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations)
2397
2556
  * that has zero 1st and 2nd order derivatives at x=0 and x=1.
2398
2557
  *
2399
2558
  * @static
@@ -2488,7 +2647,7 @@ const MathUtils = {
2488
2647
  */
2489
2648
  floorPowerOfTwo: floorPowerOfTwo,
2490
2649
  /**
2491
- * Sets the given quaternion from the [Intrinsic Proper Euler Angles]{@link https://en.wikipedia.org/wiki/Euler_angles}
2650
+ * Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles)
2492
2651
  * defined by the given angles and order.
2493
2652
  *
2494
2653
  * Rotations are applied to the axes in the order specified by order:
@@ -3433,7 +3592,7 @@ class Quaternion {
3433
3592
 
3434
3593
  /**
3435
3594
  * Interpolates between two quaternions via SLERP. This implementation assumes the
3436
- * quaternion data are managed in flat arrays.
3595
+ * quaternion data are managed in flat arrays.
3437
3596
  *
3438
3597
  * @param {Array<number>} dst - The destination array.
3439
3598
  * @param {number} dstOffset - An offset into the destination array.
@@ -3446,65 +3605,78 @@ class Quaternion {
3446
3605
  */
3447
3606
  static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {
3448
3607
 
3449
- // fuzz-free, array-based Quaternion SLERP operation
3450
-
3451
3608
  let x0 = src0[ srcOffset0 + 0 ],
3452
3609
  y0 = src0[ srcOffset0 + 1 ],
3453
3610
  z0 = src0[ srcOffset0 + 2 ],
3454
3611
  w0 = src0[ srcOffset0 + 3 ];
3455
3612
 
3456
- const x1 = src1[ srcOffset1 + 0 ],
3613
+ let x1 = src1[ srcOffset1 + 0 ],
3457
3614
  y1 = src1[ srcOffset1 + 1 ],
3458
3615
  z1 = src1[ srcOffset1 + 2 ],
3459
3616
  w1 = src1[ srcOffset1 + 3 ];
3460
3617
 
3461
- if ( t === 0 ) {
3618
+ if ( t <= 0 ) {
3462
3619
 
3463
3620
  dst[ dstOffset + 0 ] = x0;
3464
3621
  dst[ dstOffset + 1 ] = y0;
3465
3622
  dst[ dstOffset + 2 ] = z0;
3466
3623
  dst[ dstOffset + 3 ] = w0;
3624
+
3467
3625
  return;
3468
3626
 
3469
3627
  }
3470
3628
 
3471
- if ( t === 1 ) {
3629
+ if ( t >= 1 ) {
3472
3630
 
3473
3631
  dst[ dstOffset + 0 ] = x1;
3474
3632
  dst[ dstOffset + 1 ] = y1;
3475
3633
  dst[ dstOffset + 2 ] = z1;
3476
3634
  dst[ dstOffset + 3 ] = w1;
3635
+
3477
3636
  return;
3478
3637
 
3479
3638
  }
3480
3639
 
3481
3640
  if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {
3482
3641
 
3483
- let s = 1 - t;
3484
- const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
3485
- dir = ( cos >= 0 ? 1 : -1 ),
3486
- sqrSin = 1 - cos * cos;
3642
+ let dot = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1;
3487
3643
 
3488
- // Skip the Slerp for tiny steps to avoid numeric problems:
3489
- if ( sqrSin > Number.EPSILON ) {
3644
+ if ( dot < 0 ) {
3490
3645
 
3491
- const sin = Math.sqrt( sqrSin ),
3492
- len = Math.atan2( sin, cos * dir );
3646
+ x1 = - x1;
3647
+ y1 = - y1;
3648
+ z1 = - z1;
3649
+ w1 = - w1;
3493
3650
 
3494
- s = Math.sin( s * len ) / sin;
3495
- t = Math.sin( t * len ) / sin;
3651
+ dot = - dot;
3496
3652
 
3497
3653
  }
3498
3654
 
3499
- const tDir = t * dir;
3655
+ let s = 1 - t;
3656
+
3657
+ if ( dot < 0.9995 ) {
3658
+
3659
+ // slerp
3660
+
3661
+ const theta = Math.acos( dot );
3662
+ const sin = Math.sin( theta );
3663
+
3664
+ s = Math.sin( s * theta ) / sin;
3665
+ t = Math.sin( t * theta ) / sin;
3666
+
3667
+ x0 = x0 * s + x1 * t;
3668
+ y0 = y0 * s + y1 * t;
3669
+ z0 = z0 * s + z1 * t;
3670
+ w0 = w0 * s + w1 * t;
3500
3671
 
3501
- x0 = x0 * s + x1 * tDir;
3502
- y0 = y0 * s + y1 * tDir;
3503
- z0 = z0 * s + z1 * tDir;
3504
- w0 = w0 * s + w1 * tDir;
3672
+ } else {
3673
+
3674
+ // for small angles, lerp then normalize
3505
3675
 
3506
- // Normalize in case we just did a lerp:
3507
- if ( s === 1 - t ) {
3676
+ x0 = x0 * s + x1 * t;
3677
+ y0 = y0 * s + y1 * t;
3678
+ z0 = z0 * s + z1 * t;
3679
+ w0 = w0 * s + w1 * t;
3508
3680
 
3509
3681
  const f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );
3510
3682
 
@@ -3758,7 +3930,7 @@ class Quaternion {
3758
3930
  break;
3759
3931
 
3760
3932
  default:
3761
- console.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order );
3933
+ warn( 'Quaternion: .setFromEuler() encountered an unknown order: ' + order );
3762
3934
 
3763
3935
  }
3764
3936
 
@@ -4114,68 +4286,56 @@ class Quaternion {
4114
4286
  */
4115
4287
  slerp( qb, t ) {
4116
4288
 
4117
- if ( t === 0 ) return this;
4118
- if ( t === 1 ) return this.copy( qb );
4119
-
4120
- const x = this._x, y = this._y, z = this._z, w = this._w;
4289
+ if ( t <= 0 ) return this;
4121
4290
 
4122
- // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/
4291
+ if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()
4123
4292
 
4124
- let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;
4293
+ let x = qb._x, y = qb._y, z = qb._z, w = qb._w;
4125
4294
 
4126
- if ( cosHalfTheta < 0 ) {
4295
+ let dot = this.dot( qb );
4127
4296
 
4128
- this._w = - qb._w;
4129
- this._x = - qb._x;
4130
- this._y = - qb._y;
4131
- this._z = - qb._z;
4297
+ if ( dot < 0 ) {
4132
4298
 
4133
- cosHalfTheta = - cosHalfTheta;
4299
+ x = - x;
4300
+ y = - y;
4301
+ z = - z;
4302
+ w = - w;
4134
4303
 
4135
- } else {
4136
-
4137
- this.copy( qb );
4304
+ dot = - dot;
4138
4305
 
4139
4306
  }
4140
4307
 
4141
- if ( cosHalfTheta >= 1.0 ) {
4308
+ let s = 1 - t;
4142
4309
 
4143
- this._w = w;
4144
- this._x = x;
4145
- this._y = y;
4146
- this._z = z;
4310
+ if ( dot < 0.9995 ) {
4147
4311
 
4148
- return this;
4312
+ // slerp
4149
4313
 
4150
- }
4151
-
4152
- const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;
4314
+ const theta = Math.acos( dot );
4315
+ const sin = Math.sin( theta );
4153
4316
 
4154
- if ( sqrSinHalfTheta <= Number.EPSILON ) {
4317
+ s = Math.sin( s * theta ) / sin;
4318
+ t = Math.sin( t * theta ) / sin;
4155
4319
 
4156
- const s = 1 - t;
4157
- this._w = s * w + t * this._w;
4158
- this._x = s * x + t * this._x;
4159
- this._y = s * y + t * this._y;
4160
- this._z = s * z + t * this._z;
4320
+ this._x = this._x * s + x * t;
4321
+ this._y = this._y * s + y * t;
4322
+ this._z = this._z * s + z * t;
4323
+ this._w = this._w * s + w * t;
4161
4324
 
4162
- this.normalize(); // normalize calls _onChangeCallback()
4325
+ this._onChangeCallback();
4163
4326
 
4164
- return this;
4327
+ } else {
4165
4328
 
4166
- }
4329
+ // for small angles, lerp then normalize
4167
4330
 
4168
- const sinHalfTheta = Math.sqrt( sqrSinHalfTheta );
4169
- const halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );
4170
- const ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,
4171
- ratioB = Math.sin( t * halfTheta ) / sinHalfTheta;
4331
+ this._x = this._x * s + x * t;
4332
+ this._y = this._y * s + y * t;
4333
+ this._z = this._z * s + z * t;
4334
+ this._w = this._w * s + w * t;
4172
4335
 
4173
- this._w = ( w * ratioA + this._w * ratioB );
4174
- this._x = ( x * ratioA + this._x * ratioB );
4175
- this._y = ( y * ratioA + this._y * ratioB );
4176
- this._z = ( z * ratioA + this._z * ratioB );
4336
+ this.normalize(); // normalize calls _onChangeCallback()
4177
4337
 
4178
- this._onChangeCallback();
4338
+ }
4179
4339
 
4180
4340
  return this;
4181
4341
 
@@ -5590,7 +5750,7 @@ const _quaternion$4 = /*@__PURE__*/ new Quaternion();
5590
5750
  * A Note on Row-Major and Column-Major Ordering:
5591
5751
  *
5592
5752
  * The constructor and {@link Matrix3#set} method take arguments in
5593
- * [row-major]{@link https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order}
5753
+ * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
5594
5754
  * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order.
5595
5755
  * This means that calling:
5596
5756
  * ```js
@@ -5864,7 +6024,7 @@ class Matrix3 {
5864
6024
  }
5865
6025
 
5866
6026
  /**
5867
- * Inverts this matrix, using the [analytic method]{@link https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution}.
6027
+ * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution).
5868
6028
  * You can not invert with a determinant of zero. If you attempt this, the method produces
5869
6029
  * a zero matrix instead.
5870
6030
  *
@@ -6196,93 +6356,6 @@ class Matrix3 {
6196
6356
 
6197
6357
  const _m3 = /*@__PURE__*/ new Matrix3();
6198
6358
 
6199
- function arrayNeedsUint32( array ) {
6200
-
6201
- // assumes larger values usually on last
6202
-
6203
- for ( let i = array.length - 1; i >= 0; -- i ) {
6204
-
6205
- if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565
6206
-
6207
- }
6208
-
6209
- return false;
6210
-
6211
- }
6212
-
6213
- const TYPED_ARRAYS = {
6214
- Int8Array: Int8Array,
6215
- Uint8Array: Uint8Array,
6216
- Uint8ClampedArray: Uint8ClampedArray,
6217
- Int16Array: Int16Array,
6218
- Uint16Array: Uint16Array,
6219
- Int32Array: Int32Array,
6220
- Uint32Array: Uint32Array,
6221
- Float32Array: Float32Array,
6222
- Float64Array: Float64Array
6223
- };
6224
-
6225
- function getTypedArray( type, buffer ) {
6226
-
6227
- return new TYPED_ARRAYS[ type ]( buffer );
6228
-
6229
- }
6230
-
6231
- function createElementNS( name ) {
6232
-
6233
- return document.createElementNS( 'http://www.w3.org/1999/xhtml', name );
6234
-
6235
- }
6236
-
6237
- function createCanvasElement() {
6238
-
6239
- const canvas = createElementNS( 'canvas' );
6240
- canvas.style.display = 'block';
6241
- return canvas;
6242
-
6243
- }
6244
-
6245
- const _cache = {};
6246
-
6247
- function warnOnce( message ) {
6248
-
6249
- if ( message in _cache ) return;
6250
-
6251
- _cache[ message ] = true;
6252
-
6253
- console.warn( message );
6254
-
6255
- }
6256
-
6257
- function probeAsync( gl, sync, interval ) {
6258
-
6259
- return new Promise( function ( resolve, reject ) {
6260
-
6261
- function probe() {
6262
-
6263
- switch ( gl.clientWaitSync( sync, gl.SYNC_FLUSH_COMMANDS_BIT, 0 ) ) {
6264
-
6265
- case gl.WAIT_FAILED:
6266
- reject();
6267
- break;
6268
-
6269
- case gl.TIMEOUT_EXPIRED:
6270
- setTimeout( probe, interval );
6271
- break;
6272
-
6273
- default:
6274
- resolve();
6275
-
6276
- }
6277
-
6278
- }
6279
-
6280
- setTimeout( probe, interval );
6281
-
6282
- } );
6283
-
6284
- }
6285
-
6286
6359
  const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
6287
6360
  0.4123908, 0.3575843, 0.1804808,
6288
6361
  0.2126390, 0.7151687, 0.0721923,
@@ -6315,7 +6388,7 @@ function createColorManagement() {
6315
6388
  * - luminanceCoefficients: RGB luminance coefficients
6316
6389
  *
6317
6390
  * Optional:
6318
- * - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace }
6391
+ * - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace, toneMappingMode: 'extended' | 'standard' }
6319
6392
  * - workingColorSpaceConfig: { unpackColorSpace: ColorSpace }
6320
6393
  *
6321
6394
  * Reference:
@@ -6384,6 +6457,12 @@ function createColorManagement() {
6384
6457
 
6385
6458
  },
6386
6459
 
6460
+ getToneMappingMode: function ( colorSpace ) {
6461
+
6462
+ return this.spaces[ colorSpace ].outputColorSpaceConfig.toneMappingMode || 'standard';
6463
+
6464
+ },
6465
+
6387
6466
  getLuminanceCoefficients: function ( target, colorSpace = this.workingColorSpace ) {
6388
6467
 
6389
6468
  return target.fromArray( this.spaces[ colorSpace ].luminanceCoefficients );
@@ -6422,7 +6501,7 @@ function createColorManagement() {
6422
6501
 
6423
6502
  fromWorkingColorSpace: function ( color, targetColorSpace ) {
6424
6503
 
6425
- warnOnce( 'THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().' ); // @deprecated, r177
6504
+ warnOnce( 'ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().' ); // @deprecated, r177
6426
6505
 
6427
6506
  return ColorManagement.workingToColorSpace( color, targetColorSpace );
6428
6507
 
@@ -6430,7 +6509,7 @@ function createColorManagement() {
6430
6509
 
6431
6510
  toWorkingColorSpace: function ( color, sourceColorSpace ) {
6432
6511
 
6433
- warnOnce( 'THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().' ); // @deprecated, r177
6512
+ warnOnce( 'ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().' ); // @deprecated, r177
6434
6513
 
6435
6514
  return ColorManagement.colorSpaceToWorking( color, sourceColorSpace );
6436
6515
 
@@ -6613,7 +6692,7 @@ class ImageUtils {
6613
6692
 
6614
6693
  } else {
6615
6694
 
6616
- console.warn( 'THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' );
6695
+ warn( 'ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' );
6617
6696
  return image;
6618
6697
 
6619
6698
  }
@@ -6704,7 +6783,7 @@ class Source {
6704
6783
 
6705
6784
  const data = this.data;
6706
6785
 
6707
- if ( data instanceof HTMLVideoElement ) {
6786
+ if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( data instanceof HTMLVideoElement ) ) {
6708
6787
 
6709
6788
  target.set( data.videoWidth, data.videoHeight, 0 );
6710
6789
 
@@ -6838,7 +6917,7 @@ function serializeImage( image ) {
6838
6917
 
6839
6918
  } else {
6840
6919
 
6841
- console.warn( 'THREE.Texture: Unable to serialize Texture.' );
6920
+ warn( 'Texture: Unable to serialize Texture.' );
6842
6921
  return {};
6843
6922
 
6844
6923
  }
@@ -7352,7 +7431,7 @@ class Texture extends EventDispatcher {
7352
7431
 
7353
7432
  if ( newValue === undefined ) {
7354
7433
 
7355
- console.warn( `THREE.Texture.setValues(): parameter '${ key }' has value of undefined.` );
7434
+ warn( `Texture.setValues(): parameter '${ key }' has value of undefined.` );
7356
7435
  continue;
7357
7436
 
7358
7437
  }
@@ -7361,7 +7440,7 @@ class Texture extends EventDispatcher {
7361
7440
 
7362
7441
  if ( currentValue === undefined ) {
7363
7442
 
7364
- console.warn( `THREE.Texture.setValues(): property '${ key }' does not exist.` );
7443
+ warn( `Texture.setValues(): property '${ key }' does not exist.` );
7365
7444
  continue;
7366
7445
 
7367
7446
  }
@@ -8978,7 +9057,16 @@ class RenderTarget extends EventDispatcher {
8978
9057
  this.textures[ i ].image.width = width;
8979
9058
  this.textures[ i ].image.height = height;
8980
9059
  this.textures[ i ].image.depth = depth;
8981
- this.textures[ i ].isArrayTexture = this.textures[ i ].image.depth > 1;
9060
+
9061
+ if ( this.textures[ i ].isData3DTexture !== true ) { // Fix for #31693
9062
+
9063
+ // TODO: Reconsider setting isArrayTexture flag here and in the ctor of Texture.
9064
+ // Maybe a method `isArrayTexture()` or just a getter could replace a flag since
9065
+ // both are evaluated on each call?
9066
+
9067
+ this.textures[ i ].isArrayTexture = this.textures[ i ].image.depth > 1;
9068
+
9069
+ }
8982
9070
 
8983
9071
  }
8984
9072
 
@@ -11295,7 +11383,7 @@ class Ray {
11295
11383
  * Represents a 4x4 matrix.
11296
11384
  *
11297
11385
  * The most common use of a 4x4 matrix in 3D computer graphics is as a transformation matrix.
11298
- * For an introduction to transformation matrices as used in WebGL, check out [this tutorial]{@link https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices}
11386
+ * For an introduction to transformation matrices as used in WebGL, check out [this tutorial](https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices)
11299
11387
  *
11300
11388
  * This allows a 3D vector representing a point in 3D space to undergo
11301
11389
  * transformations such as translation, rotation, shear, scale, reflection,
@@ -11305,7 +11393,7 @@ class Ray {
11305
11393
  * A Note on Row-Major and Column-Major Ordering:
11306
11394
  *
11307
11395
  * The constructor and {@link Matrix3#set} method take arguments in
11308
- * [row-major]{@link https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order}
11396
+ * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
11309
11397
  * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order.
11310
11398
  * This means that calling:
11311
11399
  * ```js
@@ -11599,7 +11687,7 @@ class Matrix4 {
11599
11687
  * Sets the rotation component (the upper left 3x3 matrix) of this matrix to
11600
11688
  * the rotation specified by the given Euler angles. The rest of
11601
11689
  * the matrix is set to the identity. Depending on the {@link Euler#order},
11602
- * there are six possible outcomes. See [this page]{@link https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix}
11690
+ * there are six possible outcomes. See [this page](https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix)
11603
11691
  * for a complete list.
11604
11692
  *
11605
11693
  * @param {Euler} euler - The Euler angles.
@@ -11729,7 +11817,7 @@ class Matrix4 {
11729
11817
 
11730
11818
  /**
11731
11819
  * Sets the rotation component of this matrix to the rotation specified by
11732
- * the given Quaternion as outlined [here]{@link https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion}
11820
+ * the given Quaternion as outlined [here](https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion)
11733
11821
  * The rest of the matrix is set to the identity.
11734
11822
  *
11735
11823
  * @param {Quaternion} q - The Quaternion.
@@ -11891,7 +11979,7 @@ class Matrix4 {
11891
11979
  /**
11892
11980
  * Computes and returns the determinant of this matrix.
11893
11981
  *
11894
- * Based on the method outlined [here]{@link http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.html}.
11982
+ * Based on the method outlined [here](http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.html).
11895
11983
  *
11896
11984
  * @return {number} The determinant.
11897
11985
  */
@@ -11998,7 +12086,7 @@ class Matrix4 {
11998
12086
  }
11999
12087
 
12000
12088
  /**
12001
- * Inverts this matrix, using the [analytic method]{@link https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution}.
12089
+ * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution).
12002
12090
  * You can not invert with a determinant of zero. If you attempt this, the method produces
12003
12091
  * a zero matrix instead.
12004
12092
  *
@@ -12201,7 +12289,7 @@ class Matrix4 {
12201
12289
  * the given angle.
12202
12290
  *
12203
12291
  * This is a somewhat controversial but mathematically sound alternative to
12204
- * rotating via Quaternions. See the discussion [here]{@link https://www.gamedev.net/articles/programming/math-and-physics/do-we-really-need-quaternions-r1199}.
12292
+ * rotating via Quaternions. See the discussion [here](https://www.gamedev.net/articles/programming/math-and-physics/do-we-really-need-quaternions-r1199).
12205
12293
  *
12206
12294
  * @param {Vector3} axis - The normalized rotation axis.
12207
12295
  * @param {number} angle - The rotation in radians.
@@ -12890,7 +12978,7 @@ class Euler {
12890
12978
 
12891
12979
  default:
12892
12980
 
12893
- console.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );
12981
+ warn( 'Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );
12894
12982
 
12895
12983
  }
12896
12984
 
@@ -13876,7 +13964,7 @@ class Object3D extends EventDispatcher {
13876
13964
 
13877
13965
  if ( object === this ) {
13878
13966
 
13879
- console.error( 'THREE.Object3D.add: object can\'t be added as a child of itself.', object );
13967
+ error( 'Object3D.add: object can\'t be added as a child of itself.', object );
13880
13968
  return this;
13881
13969
 
13882
13970
  }
@@ -13895,7 +13983,7 @@ class Object3D extends EventDispatcher {
13895
13983
 
13896
13984
  } else {
13897
13985
 
13898
- console.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object );
13986
+ error( 'Object3D.add: object not an instance of THREE.Object3D.', object );
13899
13987
 
13900
13988
  }
13901
13989
 
@@ -15566,7 +15654,7 @@ class Color {
15566
15654
  /**
15567
15655
  * Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`,
15568
15656
  * `rgb(100%, 0%, 0%)`, `hsl(0, 100%, 50%)`, `#ff0000`, `#f00`, or `red` ( or
15569
- * any [X11 color name]{@link https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart} -
15657
+ * any [X11 color name](https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart) -
15570
15658
  * all 140 color names are supported).
15571
15659
  *
15572
15660
  * @param {string} style - Color as a CSS-style string.
@@ -15581,7 +15669,7 @@ class Color {
15581
15669
 
15582
15670
  if ( parseFloat( string ) < 1 ) {
15583
15671
 
15584
- console.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' );
15672
+ warn( 'Color: Alpha component of ' + style + ' will be ignored.' );
15585
15673
 
15586
15674
  }
15587
15675
 
@@ -15657,7 +15745,7 @@ class Color {
15657
15745
 
15658
15746
  default:
15659
15747
 
15660
- console.warn( 'THREE.Color: Unknown color model ' + style );
15748
+ warn( 'Color: Unknown color model ' + style );
15661
15749
 
15662
15750
  }
15663
15751
 
@@ -15685,7 +15773,7 @@ class Color {
15685
15773
 
15686
15774
  } else {
15687
15775
 
15688
- console.warn( 'THREE.Color: Invalid hex color ' + style );
15776
+ warn( 'Color: Invalid hex color ' + style );
15689
15777
 
15690
15778
  }
15691
15779
 
@@ -15725,7 +15813,7 @@ class Color {
15725
15813
  } else {
15726
15814
 
15727
15815
  // unknown color
15728
- console.warn( 'THREE.Color: Unknown color ' + style );
15816
+ warn( 'Color: Unknown color ' + style );
15729
15817
 
15730
15818
  }
15731
15819
 
@@ -16773,7 +16861,7 @@ class Material extends EventDispatcher {
16773
16861
  *
16774
16862
  * This method can only be used when rendering with {@link WebGLRenderer}. The
16775
16863
  * recommended approach when customizing materials is to use `WebGPURenderer` with the new
16776
- * Node Material system and [TSL]{@link https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language}.
16864
+ * Node Material system and [TSL](https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language).
16777
16865
  *
16778
16866
  * @param {{vertexShader:string,fragmentShader:string,uniforms:Object}} shaderobject - The object holds the uniforms and the vertex and fragment shader source.
16779
16867
  * @param {WebGLRenderer} renderer - A reference to the renderer.
@@ -16812,7 +16900,7 @@ class Material extends EventDispatcher {
16812
16900
 
16813
16901
  if ( newValue === undefined ) {
16814
16902
 
16815
- console.warn( `THREE.Material: parameter '${ key }' has value of undefined.` );
16903
+ warn( `Material: parameter '${ key }' has value of undefined.` );
16816
16904
  continue;
16817
16905
 
16818
16906
  }
@@ -16821,7 +16909,7 @@ class Material extends EventDispatcher {
16821
16909
 
16822
16910
  if ( currentValue === undefined ) {
16823
16911
 
16824
- console.warn( `THREE.Material: '${ key }' is not a property of THREE.${ this.type }.` );
16912
+ warn( `Material: '${ key }' is not a property of THREE.${ this.type }.` );
16825
16913
  continue;
16826
16914
 
16827
16915
  }
@@ -16915,6 +17003,18 @@ class Material extends EventDispatcher {
16915
17003
 
16916
17004
  }
16917
17005
 
17006
+ if ( this.sheenColorMap && this.sheenColorMap.isTexture ) {
17007
+
17008
+ data.sheenColorMap = this.sheenColorMap.toJSON( meta ).uuid;
17009
+
17010
+ }
17011
+
17012
+ if ( this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture ) {
17013
+
17014
+ data.sheenRoughnessMap = this.sheenRoughnessMap.toJSON( meta ).uuid;
17015
+
17016
+ }
17017
+
16918
17018
  if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
16919
17019
 
16920
17020
  if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;
@@ -17256,6 +17356,7 @@ class Material extends EventDispatcher {
17256
17356
  * This material is not affected by lights.
17257
17357
  *
17258
17358
  * @augments Material
17359
+ * @demo scenes/material-browser.html#MeshBasicMaterial
17259
17360
  */
17260
17361
  class MeshBasicMaterial extends Material {
17261
17362
 
@@ -17641,7 +17742,7 @@ function _generateTables() {
17641
17742
  */
17642
17743
  function toHalfFloat( val ) {
17643
17744
 
17644
- if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );
17745
+ if ( Math.abs( val ) > 65504 ) warn( 'DataUtils.toHalfFloat(): Value out of range.' );
17645
17746
 
17646
17747
  val = clamp( val, -65504, 65504 );
17647
17748
 
@@ -18872,7 +18973,7 @@ class BufferGeometry extends EventDispatcher {
18872
18973
  /**
18873
18974
  * Bounding box for the geometry which can be calculated with `computeBoundingBox()`.
18874
18975
  *
18875
- * @type {Box3}
18976
+ * @type {?Box3}
18876
18977
  * @default null
18877
18978
  */
18878
18979
  this.boundingBox = null;
@@ -18880,7 +18981,7 @@ class BufferGeometry extends EventDispatcher {
18880
18981
  /**
18881
18982
  * Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`.
18882
18983
  *
18883
- * @type {Sphere}
18984
+ * @type {?Sphere}
18884
18985
  * @default null
18885
18986
  */
18886
18987
  this.boundingSphere = null;
@@ -19312,7 +19413,7 @@ class BufferGeometry extends EventDispatcher {
19312
19413
 
19313
19414
  if ( points.length > positionAttribute.count ) {
19314
19415
 
19315
- console.warn( 'THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.' );
19416
+ warn( 'BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.' );
19316
19417
 
19317
19418
  }
19318
19419
 
@@ -19342,7 +19443,7 @@ class BufferGeometry extends EventDispatcher {
19342
19443
 
19343
19444
  if ( position && position.isGLBufferAttribute ) {
19344
19445
 
19345
- console.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.', this );
19446
+ error( 'BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.', this );
19346
19447
 
19347
19448
  this.boundingBox.set(
19348
19449
  new Vector3( - Infinity, - Infinity, - Infinity ),
@@ -19393,7 +19494,7 @@ class BufferGeometry extends EventDispatcher {
19393
19494
 
19394
19495
  if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {
19395
19496
 
19396
- console.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this );
19497
+ error( 'BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this );
19397
19498
 
19398
19499
  }
19399
19500
 
@@ -19417,7 +19518,7 @@ class BufferGeometry extends EventDispatcher {
19417
19518
 
19418
19519
  if ( position && position.isGLBufferAttribute ) {
19419
19520
 
19420
- console.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.', this );
19521
+ error( 'BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.', this );
19421
19522
 
19422
19523
  this.boundingSphere.set( new Vector3(), Infinity );
19423
19524
 
@@ -19508,7 +19609,7 @@ class BufferGeometry extends EventDispatcher {
19508
19609
 
19509
19610
  if ( isNaN( this.boundingSphere.radius ) ) {
19510
19611
 
19511
- console.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this );
19612
+ error( 'BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this );
19512
19613
 
19513
19614
  }
19514
19615
 
@@ -19536,7 +19637,7 @@ class BufferGeometry extends EventDispatcher {
19536
19637
  attributes.normal === undefined ||
19537
19638
  attributes.uv === undefined ) {
19538
19639
 
19539
- console.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );
19640
+ error( 'BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );
19540
19641
  return;
19541
19642
 
19542
19643
  }
@@ -19846,7 +19947,7 @@ class BufferGeometry extends EventDispatcher {
19846
19947
 
19847
19948
  if ( this.index === null ) {
19848
19949
 
19849
- console.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );
19950
+ warn( 'BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );
19850
19951
  return this;
19851
19952
 
19852
19953
  }
@@ -20656,6 +20757,7 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
20656
20757
  * ```
20657
20758
  *
20658
20759
  * @augments BufferGeometry
20760
+ * @demo scenes/geometry-browser.html#BoxGeometry
20659
20761
  */
20660
20762
  class BoxGeometry extends BufferGeometry {
20661
20763
 
@@ -20856,8 +20958,20 @@ class BoxGeometry extends BufferGeometry {
20856
20958
 
20857
20959
  }
20858
20960
 
20859
- // Uniform Utilities
20961
+ /**
20962
+ * Provides utility functions for managing uniforms.
20963
+ *
20964
+ * @module UniformsUtils
20965
+ */
20860
20966
 
20967
+ /**
20968
+ * Clones the given uniform definitions by performing a deep-copy. That means
20969
+ * if the value of a uniform refers to an object like a Vector3 or Texture,
20970
+ * the cloned uniform will refer to a new object reference.
20971
+ *
20972
+ * @param {Object} src - An object representing uniform definitions.
20973
+ * @return {Object} The cloned uniforms.
20974
+ */
20861
20975
  function cloneUniforms( src ) {
20862
20976
 
20863
20977
  const dst = {};
@@ -20877,7 +20991,7 @@ function cloneUniforms( src ) {
20877
20991
 
20878
20992
  if ( property.isRenderTargetTexture ) {
20879
20993
 
20880
- console.warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' );
20994
+ warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' );
20881
20995
  dst[ u ][ p ] = null;
20882
20996
 
20883
20997
  } else {
@@ -20904,6 +21018,14 @@ function cloneUniforms( src ) {
20904
21018
 
20905
21019
  }
20906
21020
 
21021
+ /**
21022
+ * Merges the given uniform definitions into a single object. Since the
21023
+ * method internally uses cloneUniforms(), it performs a deep-copy when
21024
+ * producing the merged uniform definitions.
21025
+ *
21026
+ * @param {Array} uniforms - An array of objects containing uniform definitions.
21027
+ * @return {Object} The merged uniforms.
21028
+ */
20907
21029
  function mergeUniforms( uniforms ) {
20908
21030
 
20909
21031
  const merged = {};
@@ -20981,7 +21103,7 @@ var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0
20981
21103
  * - You can use the directive `#pragma unroll_loop_start` and `#pragma unroll_loop_end`
20982
21104
  * in order to unroll a `for` loop in GLSL by the shader preprocessor. The directive has
20983
21105
  * to be placed right above the loop. The loop formatting has to correspond to a defined standard.
20984
- * - The loop has to be [normalized]{@link https://en.wikipedia.org/wiki/Normalized_loop}.
21106
+ * - The loop has to be [normalized](https://en.wikipedia.org/wiki/Normalized_loop).
20985
21107
  * - The loop variable has to be *i*.
20986
21108
  * - The value `UNROLLED_LOOP_INDEX` will be replaced with the explicitly
20987
21109
  * value of *i* for the given iteration and can be used in preprocessor
@@ -21187,7 +21309,7 @@ class ShaderMaterial extends Material {
21187
21309
  };
21188
21310
 
21189
21311
  /**
21190
- * If set, this calls [gl.bindAttribLocation]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation}
21312
+ * If set, this calls [gl.bindAttribLocation](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation)
21191
21313
  * to bind a generic vertex index to an attribute variable.
21192
21314
  *
21193
21315
  * @type {string|undefined}
@@ -21474,7 +21596,7 @@ const _minTarget = /*@__PURE__*/ new Vector2();
21474
21596
  const _maxTarget = /*@__PURE__*/ new Vector2();
21475
21597
 
21476
21598
  /**
21477
- * Camera that uses [perspective projection]{@link https://en.wikipedia.org/wiki/Perspective_(graphical)}.
21599
+ * Camera that uses [perspective projection](https://en.wikipedia.org/wiki/Perspective_(graphical)).
21478
21600
  *
21479
21601
  * This projection mode is designed to mimic the way the human eye sees. It
21480
21602
  * is the most common projection mode used for rendering a 3D scene.
@@ -23157,7 +23279,7 @@ class Scene extends Object3D {
23157
23279
  * "Interleaved" means that multiple attributes, possibly of different types,
23158
23280
  * (e.g., position, normal, uv, color) are packed into a single array buffer.
23159
23281
  *
23160
- * An introduction into interleaved arrays can be found here: [Interleaved array basics]{@link https://blog.tojicode.com/2011/05/interleaved-array-basics.html}
23282
+ * An introduction into interleaved arrays can be found here: [Interleaved array basics](https://blog.tojicode.com/2011/05/interleaved-array-basics.html)
23161
23283
  */
23162
23284
  class InterleavedBuffer {
23163
23285
 
@@ -23877,7 +23999,7 @@ class InterleavedBufferAttribute {
23877
23999
 
23878
24000
  if ( data === undefined ) {
23879
24001
 
23880
- console.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' );
24002
+ log( 'InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' );
23881
24003
 
23882
24004
  const array = [];
23883
24005
 
@@ -23927,7 +24049,7 @@ class InterleavedBufferAttribute {
23927
24049
 
23928
24050
  if ( data === undefined ) {
23929
24051
 
23930
- console.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' );
24052
+ log( 'InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' );
23931
24053
 
23932
24054
  const array = [];
23933
24055
 
@@ -24154,7 +24276,7 @@ class Sprite extends Object3D {
24154
24276
  /**
24155
24277
  * Constructs a new sprite.
24156
24278
  *
24157
- * @param {SpriteMaterial} [material] - The sprite material.
24279
+ * @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material.
24158
24280
  */
24159
24281
  constructor( material = new SpriteMaterial() ) {
24160
24282
 
@@ -24200,7 +24322,7 @@ class Sprite extends Object3D {
24200
24322
  /**
24201
24323
  * The sprite material.
24202
24324
  *
24203
- * @type {SpriteMaterial}
24325
+ * @type {(SpriteMaterial|SpriteNodeMaterial)}
24204
24326
  */
24205
24327
  this.material = material;
24206
24328
 
@@ -24235,7 +24357,7 @@ class Sprite extends Object3D {
24235
24357
 
24236
24358
  if ( raycaster.camera === null ) {
24237
24359
 
24238
- console.error( 'THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' );
24360
+ error( 'Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' );
24239
24361
 
24240
24362
  }
24241
24363
 
@@ -24529,7 +24651,7 @@ class LOD extends Object3D {
24529
24651
  * the given distance.
24530
24652
  *
24531
24653
  * @param {number} distance - The LOD distance.
24532
- * @return {Object3D|null} The found 3D object. `null` if no 3D object has been found.
24654
+ * @return {?Object3D} The found 3D object. `null` if no 3D object has been found.
24533
24655
  */
24534
24656
  getObjectForDistance( distance ) {
24535
24657
 
@@ -24696,6 +24818,7 @@ const _ray$2 = /*@__PURE__*/ new Ray();
24696
24818
  * or {@link FBXLoader } import respective models.
24697
24819
  *
24698
24820
  * @augments Mesh
24821
+ * @demo scenes/bones-browser.html
24699
24822
  */
24700
24823
  class SkinnedMesh extends Mesh {
24701
24824
 
@@ -24963,7 +25086,7 @@ class SkinnedMesh extends Mesh {
24963
25086
 
24964
25087
  } else {
24965
25088
 
24966
- console.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );
25089
+ warn( 'SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );
24967
25090
 
24968
25091
  }
24969
25092
 
@@ -25232,7 +25355,7 @@ class Skeleton {
25232
25355
 
25233
25356
  if ( bones.length !== boneInverses.length ) {
25234
25357
 
25235
- console.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' );
25358
+ warn( 'Skeleton: Number of inverse bone matrices does not match amount of bones.' );
25236
25359
 
25237
25360
  this.boneInverses = [];
25238
25361
 
@@ -25450,7 +25573,7 @@ class Skeleton {
25450
25573
 
25451
25574
  if ( bone === undefined ) {
25452
25575
 
25453
- console.warn( 'THREE.Skeleton: No bone found with UUID:', uuid );
25576
+ warn( 'Skeleton: No bone found with UUID:', uuid );
25454
25577
  bone = new Bone();
25455
25578
 
25456
25579
  }
@@ -25962,7 +26085,7 @@ const _normalMatrix = /*@__PURE__*/ new Matrix3();
25962
26085
 
25963
26086
  /**
25964
26087
  * A two dimensional surface that extends infinitely in 3D space, represented
25965
- * in [Hessian normal form]{@link http://mathworld.wolfram.com/HessianNormalForm.html}
26088
+ * in [Hessian normal form](http://mathworld.wolfram.com/HessianNormalForm.html)
25966
26089
  * by a unit length normal vector and a constant.
25967
26090
  */
25968
26091
  class Plane {
@@ -27808,7 +27931,7 @@ class BatchedMesh extends Mesh {
27808
27931
  *
27809
27932
  * @param {number} geometryId - The ID of the geometry to return the bounding box for.
27810
27933
  * @param {Box3} target - The target object that is used to store the method's result.
27811
- * @return {Box3|null} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID.
27934
+ * @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID.
27812
27935
  */
27813
27936
  getBoundingBoxAt( geometryId, target ) {
27814
27937
 
@@ -27853,7 +27976,7 @@ class BatchedMesh extends Mesh {
27853
27976
  *
27854
27977
  * @param {number} geometryId - The ID of the geometry to return the bounding sphere for.
27855
27978
  * @param {Sphere} target - The target object that is used to store the method's result.
27856
- * @return {Sphere|null} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID.
27979
+ * @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID.
27857
27980
  */
27858
27981
  getBoundingSphereAt( geometryId, target ) {
27859
27982
 
@@ -28741,7 +28864,7 @@ class Line extends Object3D {
28741
28864
 
28742
28865
  } else {
28743
28866
 
28744
- console.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
28867
+ warn( 'Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
28745
28868
 
28746
28869
  }
28747
28870
 
@@ -28982,7 +29105,7 @@ class LineSegments extends Line {
28982
29105
 
28983
29106
  } else {
28984
29107
 
28985
- console.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
29108
+ warn( 'LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
28986
29109
 
28987
29110
  }
28988
29111
 
@@ -29113,7 +29236,7 @@ class PointsMaterial extends Material {
29113
29236
  /**
29114
29237
  * Defines the size of the points in pixels.
29115
29238
  *
29116
- * Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete}.
29239
+ * Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete).
29117
29240
  *
29118
29241
  * @type {number}
29119
29242
  * @default 1
@@ -29487,15 +29610,14 @@ class VideoTexture extends Texture {
29487
29610
 
29488
29611
  }
29489
29612
 
29490
- /**
29491
- * @override
29492
- */
29493
29613
  dispose() {
29494
29614
 
29495
29615
  if ( this._requestVideoFrameCallbackId !== 0 ) {
29496
29616
 
29497
29617
  this.source.data.cancelVideoFrameCallback( this._requestVideoFrameCallbackId );
29498
29618
 
29619
+ this._requestVideoFrameCallbackId = 0;
29620
+
29499
29621
  }
29500
29622
 
29501
29623
  super.dispose();
@@ -30007,6 +30129,59 @@ class DepthTexture extends Texture {
30007
30129
 
30008
30130
  }
30009
30131
 
30132
+ /**
30133
+ * Represents a texture created externally with the same renderer context.
30134
+ *
30135
+ * This may be a texture from a protected media stream, device camera feed,
30136
+ * or other data feeds like a depth sensor.
30137
+ *
30138
+ * Note that this class is only supported in {@link WebGLRenderer}, and in
30139
+ * the {@link WebGPURenderer} WebGPU backend.
30140
+ *
30141
+ * @augments Texture
30142
+ */
30143
+ class ExternalTexture extends Texture {
30144
+
30145
+ /**
30146
+ * Creates a new raw texture.
30147
+ *
30148
+ * @param {?(WebGLTexture|GPUTexture)} [sourceTexture=null] - The external texture.
30149
+ */
30150
+ constructor( sourceTexture = null ) {
30151
+
30152
+ super();
30153
+
30154
+ /**
30155
+ * The external source texture.
30156
+ *
30157
+ * @type {?(WebGLTexture|GPUTexture)}
30158
+ * @default null
30159
+ */
30160
+ this.sourceTexture = sourceTexture;
30161
+
30162
+ /**
30163
+ * This flag can be used for type testing.
30164
+ *
30165
+ * @type {boolean}
30166
+ * @readonly
30167
+ * @default true
30168
+ */
30169
+ this.isExternalTexture = true;
30170
+
30171
+ }
30172
+
30173
+ copy( source ) {
30174
+
30175
+ super.copy( source );
30176
+
30177
+ this.sourceTexture = source.sourceTexture;
30178
+
30179
+ return this;
30180
+
30181
+ }
30182
+
30183
+ }
30184
+
30010
30185
  /**
30011
30186
  * A geometry class for representing a capsule.
30012
30187
  *
@@ -30018,6 +30193,7 @@ class DepthTexture extends Texture {
30018
30193
  * ```
30019
30194
  *
30020
30195
  * @augments BufferGeometry
30196
+ * @demo scenes/geometry-browser.html#CapsuleGeometry
30021
30197
  */
30022
30198
  class CapsuleGeometry extends BufferGeometry {
30023
30199
 
@@ -30235,6 +30411,7 @@ class CapsuleGeometry extends BufferGeometry {
30235
30411
  * ```
30236
30412
  *
30237
30413
  * @augments BufferGeometry
30414
+ * @demo scenes/geometry-browser.html#CircleGeometry
30238
30415
  */
30239
30416
  class CircleGeometry extends BufferGeometry {
30240
30417
 
@@ -30364,6 +30541,7 @@ class CircleGeometry extends BufferGeometry {
30364
30541
  * ```
30365
30542
  *
30366
30543
  * @augments BufferGeometry
30544
+ * @demo scenes/geometry-browser.html#CylinderGeometry
30367
30545
  */
30368
30546
  class CylinderGeometry extends BufferGeometry {
30369
30547
 
@@ -30689,6 +30867,7 @@ class CylinderGeometry extends BufferGeometry {
30689
30867
  * ```
30690
30868
  *
30691
30869
  * @augments CylinderGeometry
30870
+ * @demo scenes/geometry-browser.html#ConeGeometry
30692
30871
  */
30693
30872
  class ConeGeometry extends CylinderGeometry {
30694
30873
 
@@ -31097,6 +31276,7 @@ class PolyhedronGeometry extends BufferGeometry {
31097
31276
  * ```
31098
31277
  *
31099
31278
  * @augments PolyhedronGeometry
31279
+ * @demo scenes/geometry-browser.html#DodecahedronGeometry
31100
31280
  */
31101
31281
  class DodecahedronGeometry extends PolyhedronGeometry {
31102
31282
 
@@ -31416,7 +31596,7 @@ class Curve {
31416
31596
  */
31417
31597
  getPoint( /* t, optionalTarget */ ) {
31418
31598
 
31419
- console.warn( 'THREE.Curve: .getPoint() not implemented.' );
31599
+ warn( 'Curve: .getPoint() not implemented.' );
31420
31600
 
31421
31601
  }
31422
31602
 
@@ -32474,7 +32654,13 @@ class CatmullRomCurve3 extends Curve {
32474
32654
 
32475
32655
  }
32476
32656
 
32477
- // Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
32657
+ /**
32658
+ * Interpolations contains spline and Bézier functions internally used by concrete curve classes.
32659
+ *
32660
+ * Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
32661
+ *
32662
+ * @module Interpolations
32663
+ */
32478
32664
 
32479
32665
  /**
32480
32666
  * Computes a point on a Catmull-Rom spline.
@@ -34256,8 +34442,8 @@ class Shape extends Path {
34256
34442
  }
34257
34443
 
34258
34444
  /* eslint-disable */
34259
- // copy of mapbox/earcut version 3.0.1
34260
- // https://github.com/mapbox/earcut/tree/v3.0.1
34445
+ // copy of mapbox/earcut version 3.0.2
34446
+ // https://github.com/mapbox/earcut/tree/v3.0.2
34261
34447
 
34262
34448
  function earcut(data, holeIndices, dim = 2) {
34263
34449
 
@@ -34274,10 +34460,10 @@ function earcut(data, holeIndices, dim = 2) {
34274
34460
 
34275
34461
  // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
34276
34462
  if (data.length > 80 * dim) {
34277
- minX = Infinity;
34278
- minY = Infinity;
34279
- let maxX = -Infinity;
34280
- let maxY = -Infinity;
34463
+ minX = data[0];
34464
+ minY = data[1];
34465
+ let maxX = minX;
34466
+ let maxY = minY;
34281
34467
 
34282
34468
  for (let i = dim; i < outerLen; i += dim) {
34283
34469
  const x = data[i];
@@ -34553,7 +34739,7 @@ function compareXYSlope(a, b) {
34553
34739
  return result;
34554
34740
  }
34555
34741
 
34556
- // find a bridge between vertices that connects hole with an outer ring and and link it
34742
+ // find a bridge between vertices that connects hole with an outer ring and link it
34557
34743
  function eliminateHole(hole, outerNode) {
34558
34744
  const bridge = findHoleBridge(hole, outerNode);
34559
34745
  if (!bridge) {
@@ -34744,7 +34930,7 @@ function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
34744
34930
 
34745
34931
  // check if a diagonal between two polygon nodes is valid (lies in polygon interior)
34746
34932
  function isValidDiagonal(a, b) {
34747
- return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
34933
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // doesn't intersect other edges
34748
34934
  (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
34749
34935
  (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
34750
34936
  equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
@@ -34891,6 +35077,12 @@ function signedArea(data, start, end, dim) {
34891
35077
  return sum;
34892
35078
  }
34893
35079
 
35080
+ /**
35081
+ * An implementation of the earcut polygon triangulation algorithm.
35082
+ * The code is a port of [mapbox/earcut](https://github.com/mapbox/earcut).
35083
+ *
35084
+ * @see https://github.com/mapbox/earcut
35085
+ */
34894
35086
  class Earcut {
34895
35087
 
34896
35088
  /**
@@ -35041,6 +35233,7 @@ function addContour( vertices, contour ) {
35041
35233
  * ```
35042
35234
  *
35043
35235
  * @augments BufferGeometry
35236
+ * @demo scenes/geometry-browser.html#ExtrudeGeometry
35044
35237
  */
35045
35238
  class ExtrudeGeometry extends BufferGeometry {
35046
35239
 
@@ -35129,7 +35322,7 @@ class ExtrudeGeometry extends BufferGeometry {
35129
35322
 
35130
35323
  splineTube = extrudePath.computeFrenetFrames( steps, false );
35131
35324
 
35132
- // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
35325
+ // log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
35133
35326
 
35134
35327
  binormal = new Vector3();
35135
35328
  normal = new Vector3();
@@ -35234,7 +35427,7 @@ class ExtrudeGeometry extends BufferGeometry {
35234
35427
 
35235
35428
  function scalePt2( pt, vec, size ) {
35236
35429
 
35237
- if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );
35430
+ if ( ! vec ) error( 'ExtrudeGeometry: vec does not exist' );
35238
35431
 
35239
35432
  return pt.clone().addScaledVector( vec, size );
35240
35433
 
@@ -35349,14 +35542,14 @@ class ExtrudeGeometry extends BufferGeometry {
35349
35542
 
35350
35543
  if ( direction_eq ) {
35351
35544
 
35352
- // console.log("Warning: lines are a straight sequence");
35545
+ // log("Warning: lines are a straight sequence");
35353
35546
  v_trans_x = - v_prev_y;
35354
35547
  v_trans_y = v_prev_x;
35355
35548
  shrink_by = Math.sqrt( v_prev_lensq );
35356
35549
 
35357
35550
  } else {
35358
35551
 
35359
- // console.log("Warning: lines are a straight spike");
35552
+ // log("Warning: lines are a straight spike");
35360
35553
  v_trans_x = v_prev_x;
35361
35554
  v_trans_y = v_prev_y;
35362
35555
  shrink_by = Math.sqrt( v_prev_lensq / 2 );
@@ -35378,7 +35571,7 @@ class ExtrudeGeometry extends BufferGeometry {
35378
35571
  if ( k === il ) k = 0;
35379
35572
 
35380
35573
  // (j)---(i)---(k)
35381
- // console.log('i,j,k', i, j , k)
35574
+ // log('i,j,k', i, j , k)
35382
35575
 
35383
35576
  contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );
35384
35577
 
@@ -35675,7 +35868,7 @@ class ExtrudeGeometry extends BufferGeometry {
35675
35868
  let k = i - 1;
35676
35869
  if ( k < 0 ) k = contour.length - 1;
35677
35870
 
35678
- //console.log('b', i,j, i-1, k,vertices.length);
35871
+ //log('b', i,j, i-1, k,vertices.length);
35679
35872
 
35680
35873
  for ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {
35681
35874
 
@@ -35915,6 +36108,7 @@ function toJSON$1( shapes, options, data ) {
35915
36108
  * ```
35916
36109
  *
35917
36110
  * @augments PolyhedronGeometry
36111
+ * @demo scenes/geometry-browser.html#IcosahedronGeometry
35918
36112
  */
35919
36113
  class IcosahedronGeometry extends PolyhedronGeometry {
35920
36114
 
@@ -35989,6 +36183,7 @@ class IcosahedronGeometry extends PolyhedronGeometry {
35989
36183
  * ```
35990
36184
  *
35991
36185
  * @augments BufferGeometry
36186
+ * @demo scenes/geometry-browser.html#LatheGeometry
35992
36187
  */
35993
36188
  class LatheGeometry extends BufferGeometry {
35994
36189
 
@@ -36206,6 +36401,7 @@ class LatheGeometry extends BufferGeometry {
36206
36401
  * ```
36207
36402
  *
36208
36403
  * @augments PolyhedronGeometry
36404
+ * @demo scenes/geometry-browser.html#OctahedronGeometry
36209
36405
  */
36210
36406
  class OctahedronGeometry extends PolyhedronGeometry {
36211
36407
 
@@ -36272,6 +36468,7 @@ class OctahedronGeometry extends PolyhedronGeometry {
36272
36468
  * ```
36273
36469
  *
36274
36470
  * @augments BufferGeometry
36471
+ * @demo scenes/geometry-browser.html#PlaneGeometry
36275
36472
  */
36276
36473
  class PlaneGeometry extends BufferGeometry {
36277
36474
 
@@ -36400,6 +36597,7 @@ class PlaneGeometry extends BufferGeometry {
36400
36597
  * ```
36401
36598
  *
36402
36599
  * @augments BufferGeometry
36600
+ * @demo scenes/geometry-browser.html#RingGeometry
36403
36601
  */
36404
36602
  class RingGeometry extends BufferGeometry {
36405
36603
 
@@ -36561,6 +36759,7 @@ class RingGeometry extends BufferGeometry {
36561
36759
  * ```
36562
36760
  *
36563
36761
  * @augments BufferGeometry
36762
+ * @demo scenes/geometry-browser.html#ShapeGeometry
36564
36763
  */
36565
36764
  class ShapeGeometry extends BufferGeometry {
36566
36765
 
@@ -36782,6 +36981,7 @@ function toJSON( shapes, data ) {
36782
36981
  * ```
36783
36982
  *
36784
36983
  * @augments BufferGeometry
36984
+ * @demo scenes/geometry-browser.html#SphereGeometry
36785
36985
  */
36786
36986
  class SphereGeometry extends BufferGeometry {
36787
36987
 
@@ -36951,6 +37151,7 @@ class SphereGeometry extends BufferGeometry {
36951
37151
  * ```
36952
37152
  *
36953
37153
  * @augments PolyhedronGeometry
37154
+ * @demo scenes/geometry-browser.html#TetrahedronGeometry
36954
37155
  */
36955
37156
  class TetrahedronGeometry extends PolyhedronGeometry {
36956
37157
 
@@ -37014,6 +37215,7 @@ class TetrahedronGeometry extends PolyhedronGeometry {
37014
37215
  * ```
37015
37216
  *
37016
37217
  * @augments BufferGeometry
37218
+ * @demo scenes/geometry-browser.html#TorusGeometry
37017
37219
  */
37018
37220
  class TorusGeometry extends BufferGeometry {
37019
37221
 
@@ -37166,6 +37368,7 @@ class TorusGeometry extends BufferGeometry {
37166
37368
  * ```
37167
37369
  *
37168
37370
  * @augments BufferGeometry
37371
+ * @demo scenes/geometry-browser.html#TorusKnotGeometry
37169
37372
  */
37170
37373
  class TorusKnotGeometry extends BufferGeometry {
37171
37374
 
@@ -37378,6 +37581,7 @@ class TorusKnotGeometry extends BufferGeometry {
37378
37581
  * ```
37379
37582
  *
37380
37583
  * @augments BufferGeometry
37584
+ * @demo scenes/geometry-browser.html#TubeGeometry
37381
37585
  */
37382
37586
  class TubeGeometry extends BufferGeometry {
37383
37587
 
@@ -37925,9 +38129,9 @@ class RawShaderMaterial extends ShaderMaterial {
37925
38129
  * A standard physically based material, using Metallic-Roughness workflow.
37926
38130
  *
37927
38131
  * Physically based rendering (PBR) has recently become the standard in many
37928
- * 3D applications, such as [Unity]{@link https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/},
37929
- * [Unreal]{@link https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/} and
37930
- * [3D Studio Max]{@link http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017}.
38132
+ * 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/),
38133
+ * [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and
38134
+ * [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017).
37931
38135
  *
37932
38136
  * This approach differs from older approaches in that instead of using
37933
38137
  * approximations for the way in which light interacts with a surface, a
@@ -37943,16 +38147,17 @@ class RawShaderMaterial extends ShaderMaterial {
37943
38147
  * Note that for best results you should always specify an environment map when using this material.
37944
38148
  *
37945
38149
  * For a non-technical introduction to the concept of PBR and how to set up a
37946
- * PBR material, check out these articles by the people at [marmoset]{@link https://www.marmoset.co}:
38150
+ * PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co):
37947
38151
  *
37948
- * - [Basic Theory of Physically Based Rendering]{@link https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/}
37949
- * - [Physically Based Rendering and You Can Too]{@link https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/}
38152
+ * - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/)
38153
+ * - [Physically Based Rendering and You Can Too](https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/)
37950
38154
  *
37951
38155
  * Technical details of the approach used in three.js (and most other PBR systems) can be found is this
37952
- * [paper from Disney]{@link https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf}
38156
+ * [paper from Disney](https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf)
37953
38157
  * (pdf), by Brent Burley.
37954
38158
  *
37955
38159
  * @augments Material
38160
+ * @demo scenes/material-browser.html#MeshStandardMaterial
37956
38161
  */
37957
38162
  class MeshStandardMaterial extends Material {
37958
38163
 
@@ -38362,6 +38567,7 @@ class MeshStandardMaterial extends Material {
38362
38567
  * best results, always specify an environment map when using this material.
38363
38568
  *
38364
38569
  * @augments MeshStandardMaterial
38570
+ * @demo scenes/material-browser.html#MeshPhysicalMaterial
38365
38571
  */
38366
38572
  class MeshPhysicalMaterial extends MeshStandardMaterial {
38367
38573
 
@@ -38658,7 +38864,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
38658
38864
  }
38659
38865
 
38660
38866
  /**
38661
- * The anisotropy strength.
38867
+ * The anisotropy strength, from `0.0` to `1.0`.
38662
38868
  *
38663
38869
  * @type {number}
38664
38870
  * @default 0
@@ -38870,7 +39076,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
38870
39076
  /**
38871
39077
  * A material for shiny surfaces with specular highlights.
38872
39078
  *
38873
- * The material uses a non-physically based [Blinn-Phong]{@link https://en.wikipedia.org/wiki/Blinn-Phong_shading_model}
39079
+ * The material uses a non-physically based [Blinn-Phong](https://en.wikipedia.org/wiki/Blinn-Phong_shading_model)
38874
39080
  * model for calculating reflectance. Unlike the Lambertian model used in the
38875
39081
  * {@link MeshLambertMaterial} this can simulate shiny surfaces with specular
38876
39082
  * highlights (such as varnished wood). `MeshPhongMaterial` uses per-fragment shading.
@@ -38880,6 +39086,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
38880
39086
  * some graphical accuracy.
38881
39087
  *
38882
39088
  * @augments Material
39089
+ * @demo scenes/material-browser.html#MeshPhongMaterial
38883
39090
  */
38884
39091
  class MeshPhongMaterial extends Material {
38885
39092
 
@@ -39275,6 +39482,7 @@ class MeshPhongMaterial extends Material {
39275
39482
  * A material implementing toon shading.
39276
39483
  *
39277
39484
  * @augments Material
39485
+ * @demo scenes/material-browser.html#MeshToonMaterial
39278
39486
  */
39279
39487
  class MeshToonMaterial extends Material {
39280
39488
 
@@ -39589,6 +39797,7 @@ class MeshToonMaterial extends Material {
39589
39797
  * A material that maps the normal vectors to RGB colors.
39590
39798
  *
39591
39799
  * @augments Material
39800
+ * @demo scenes/material-browser.html#MeshNormalMaterial
39592
39801
  */
39593
39802
  class MeshNormalMaterial extends Material {
39594
39803
 
@@ -39757,7 +39966,7 @@ class MeshNormalMaterial extends Material {
39757
39966
  /**
39758
39967
  * A material for non-shiny surfaces, without specular highlights.
39759
39968
  *
39760
- * The material uses a non-physically based [Lambertian]{@link https://en.wikipedia.org/wiki/Lambertian_reflectance}
39969
+ * The material uses a non-physically based [Lambertian](https://en.wikipedia.org/wiki/Lambertian_reflectance)
39761
39970
  * model for calculating reflectance. This can simulate some surfaces (such
39762
39971
  * as untreated wood or stone) well, but cannot simulate shiny surfaces with
39763
39972
  * specular highlights (such as varnished wood). `MeshLambertMaterial` uses per-fragment
@@ -39769,6 +39978,7 @@ class MeshNormalMaterial extends Material {
39769
39978
  * {@link MeshPhysicalMaterial}, at the cost of some graphical accuracy.
39770
39979
  *
39771
39980
  * @augments Material
39981
+ * @demo scenes/material-browser.html#MeshLambertMaterial
39772
39982
  */
39773
39983
  class MeshLambertMaterial extends Material {
39774
39984
 
@@ -40144,6 +40354,7 @@ class MeshLambertMaterial extends Material {
40144
40354
  * near and far plane. White is nearest, black is farthest.
40145
40355
  *
40146
40356
  * @augments Material
40357
+ * @demo scenes/material-browser.html#MeshDepthMaterial
40147
40358
  */
40148
40359
  class MeshDepthMaterial extends Material {
40149
40360
 
@@ -40289,7 +40500,7 @@ class MeshDepthMaterial extends Material {
40289
40500
  * Can also be used to customize the shadow casting of an object by assigning
40290
40501
  * an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}.
40291
40502
  * The following examples demonstrates this approach in order to ensure
40292
- * transparent parts of objects do no cast shadows.
40503
+ * transparent parts of objects do not cast shadows.
40293
40504
  *
40294
40505
  * @augments Material
40295
40506
  */
@@ -40408,6 +40619,7 @@ class MeshDistanceMaterial extends Material {
40408
40619
  * shadows.
40409
40620
  *
40410
40621
  * @augments Material
40622
+ * @demo scenes/material-browser.html#MeshMatcapMaterial
40411
40623
  */
40412
40624
  class MeshMatcapMaterial extends Material {
40413
40625
 
@@ -40559,6 +40771,24 @@ class MeshMatcapMaterial extends Material {
40559
40771
  */
40560
40772
  this.alphaMap = null;
40561
40773
 
40774
+ /**
40775
+ * Renders the geometry as a wireframe.
40776
+ *
40777
+ * @type {boolean}
40778
+ * @default false
40779
+ */
40780
+ this.wireframe = false;
40781
+
40782
+ /**
40783
+ * Controls the thickness of the wireframe.
40784
+ *
40785
+ * Can only be used with {@link SVGRenderer}.
40786
+ *
40787
+ * @type {number}
40788
+ * @default 1
40789
+ */
40790
+ this.wireframeLinewidth = 1;
40791
+
40562
40792
  /**
40563
40793
  * Whether the material is rendered with flat shading or not.
40564
40794
  *
@@ -40605,6 +40835,9 @@ class MeshMatcapMaterial extends Material {
40605
40835
 
40606
40836
  this.alphaMap = source.alphaMap;
40607
40837
 
40838
+ this.wireframe = source.wireframe;
40839
+ this.wireframeLinewidth = source.wireframeLinewidth;
40840
+
40608
40841
  this.flatShading = source.flatShading;
40609
40842
 
40610
40843
  this.fog = source.fog;
@@ -41925,7 +42158,7 @@ class KeyframeTrack {
41925
42158
 
41926
42159
  }
41927
42160
 
41928
- console.warn( 'THREE.KeyframeTrack:', message );
42161
+ warn( 'KeyframeTrack:', message );
41929
42162
  return this;
41930
42163
 
41931
42164
  }
@@ -42085,7 +42318,7 @@ class KeyframeTrack {
42085
42318
  const valueSize = this.getValueSize();
42086
42319
  if ( valueSize - Math.floor( valueSize ) !== 0 ) {
42087
42320
 
42088
- console.error( 'THREE.KeyframeTrack: Invalid value size in track.', this );
42321
+ error( 'KeyframeTrack: Invalid value size in track.', this );
42089
42322
  valid = false;
42090
42323
 
42091
42324
  }
@@ -42097,7 +42330,7 @@ class KeyframeTrack {
42097
42330
 
42098
42331
  if ( nKeys === 0 ) {
42099
42332
 
42100
- console.error( 'THREE.KeyframeTrack: Track is empty.', this );
42333
+ error( 'KeyframeTrack: Track is empty.', this );
42101
42334
  valid = false;
42102
42335
 
42103
42336
  }
@@ -42110,7 +42343,7 @@ class KeyframeTrack {
42110
42343
 
42111
42344
  if ( typeof currTime === 'number' && isNaN( currTime ) ) {
42112
42345
 
42113
- console.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime );
42346
+ error( 'KeyframeTrack: Time is not a valid number.', this, i, currTime );
42114
42347
  valid = false;
42115
42348
  break;
42116
42349
 
@@ -42118,7 +42351,7 @@ class KeyframeTrack {
42118
42351
 
42119
42352
  if ( prevTime !== null && prevTime > currTime ) {
42120
42353
 
42121
- console.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );
42354
+ error( 'KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );
42122
42355
  valid = false;
42123
42356
  break;
42124
42357
 
@@ -42138,7 +42371,7 @@ class KeyframeTrack {
42138
42371
 
42139
42372
  if ( isNaN( value ) ) {
42140
42373
 
42141
- console.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value );
42374
+ error( 'KeyframeTrack: Value is not a valid number.', this, i, value );
42142
42375
  valid = false;
42143
42376
  break;
42144
42377
 
@@ -42670,6 +42903,14 @@ class AnimationClip {
42670
42903
  */
42671
42904
  this.uuid = generateUUID();
42672
42905
 
42906
+ /**
42907
+ * An object that can be used to store custom data about the animation clip.
42908
+ * It should not hold references to functions as these will not be cloned.
42909
+ *
42910
+ * @type {Object}
42911
+ */
42912
+ this.userData = {};
42913
+
42673
42914
  // this means it should figure out its duration by scanning the tracks
42674
42915
  if ( this.duration < 0 ) {
42675
42916
 
@@ -42701,6 +42942,8 @@ class AnimationClip {
42701
42942
  const clip = new this( json.name, json.duration, tracks, json.blendMode );
42702
42943
  clip.uuid = json.uuid;
42703
42944
 
42945
+ clip.userData = JSON.parse( json.userData || '{}' );
42946
+
42704
42947
  return clip;
42705
42948
 
42706
42949
  }
@@ -42723,7 +42966,8 @@ class AnimationClip {
42723
42966
  'duration': clip.duration,
42724
42967
  'tracks': tracks,
42725
42968
  'uuid': clip.uuid,
42726
- 'blendMode': clip.blendMode
42969
+ 'blendMode': clip.blendMode,
42970
+ 'userData': JSON.stringify( clip.userData ),
42727
42971
 
42728
42972
  };
42729
42973
 
@@ -42897,11 +43141,11 @@ class AnimationClip {
42897
43141
  */
42898
43142
  static parseAnimation( animation, bones ) {
42899
43143
 
42900
- console.warn( 'THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185' );
43144
+ warn( 'AnimationClip: parseAnimation() is deprecated and will be removed with r185' );
42901
43145
 
42902
43146
  if ( ! animation ) {
42903
43147
 
42904
- console.error( 'THREE.AnimationClip: No animation in JSONLoader data.' );
43148
+ error( 'AnimationClip: No animation in JSONLoader data.' );
42905
43149
  return null;
42906
43150
 
42907
43151
  }
@@ -43118,7 +43362,11 @@ class AnimationClip {
43118
43362
 
43119
43363
  }
43120
43364
 
43121
- return new this.constructor( this.name, this.duration, tracks, this.blendMode );
43365
+ const clip = new this.constructor( this.name, this.duration, tracks, this.blendMode );
43366
+
43367
+ clip.userData = JSON.parse( JSON.stringify( this.userData ) );
43368
+
43369
+ return clip;
43122
43370
 
43123
43371
  }
43124
43372
 
@@ -43249,7 +43497,7 @@ const Cache = {
43249
43497
 
43250
43498
  if ( this.enabled === false ) return;
43251
43499
 
43252
- // console.log( 'THREE.Cache', 'Adding key:', key );
43500
+ // log( 'Cache', 'Adding key:', key );
43253
43501
 
43254
43502
  this.files[ key ] = file;
43255
43503
 
@@ -43266,7 +43514,7 @@ const Cache = {
43266
43514
 
43267
43515
  if ( this.enabled === false ) return;
43268
43516
 
43269
- // console.log( 'THREE.Cache', 'Checking key:', key );
43517
+ // log( 'Cache', 'Checking key:', key );
43270
43518
 
43271
43519
  return this.files[ key ];
43272
43520
 
@@ -43371,9 +43619,10 @@ class LoadingManager {
43371
43619
  /**
43372
43620
  * Used for aborting ongoing requests in loaders using this manager.
43373
43621
  *
43374
- * @type {AbortController}
43622
+ * @private
43623
+ * @type {AbortController | null}
43375
43624
  */
43376
- this.abortController = new AbortController();
43625
+ this._abortController = null;
43377
43626
 
43378
43627
  /**
43379
43628
  * This should be called by any loader using the manager when the loader
@@ -43584,8 +43833,9 @@ class LoadingManager {
43584
43833
  */
43585
43834
  this.abort = function () {
43586
43835
 
43836
+
43587
43837
  this.abortController.abort();
43588
- this.abortController = new AbortController();
43838
+ this._abortController = null;
43589
43839
 
43590
43840
  return this;
43591
43841
 
@@ -43593,6 +43843,26 @@ class LoadingManager {
43593
43843
 
43594
43844
  }
43595
43845
 
43846
+ // TODO: Revert this back to a single member variable once this issue has been fixed
43847
+ // https://github.com/cloudflare/workerd/issues/3657
43848
+
43849
+ /**
43850
+ * Used for aborting ongoing requests in loaders using this manager.
43851
+ *
43852
+ * @type {AbortController}
43853
+ */
43854
+ get abortController() {
43855
+
43856
+ if ( ! this._abortController ) {
43857
+
43858
+ this._abortController = new AbortController();
43859
+
43860
+ }
43861
+
43862
+ return this._abortController;
43863
+
43864
+ }
43865
+
43596
43866
  }
43597
43867
 
43598
43868
  /**
@@ -43657,7 +43927,7 @@ class Loader {
43657
43927
  this.resourcePath = '';
43658
43928
 
43659
43929
  /**
43660
- * The [request header]{@link https://developer.mozilla.org/en-US/docs/Glossary/Request_header}
43930
+ * The [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header)
43661
43931
  * used in HTTP request.
43662
43932
  *
43663
43933
  * @type {Object<string, any>}
@@ -43722,7 +43992,7 @@ class Loader {
43722
43992
 
43723
43993
  /**
43724
43994
  * Whether the XMLHttpRequest uses credentials such as cookies, authorization
43725
- * headers or TLS client certificates, see [XMLHttpRequest.withCredentials]{@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials}.
43995
+ * headers or TLS client certificates, see [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials).
43726
43996
  *
43727
43997
  * Note: This setting has no effect if you are loading files locally or from the same domain.
43728
43998
  *
@@ -43765,7 +44035,7 @@ class Loader {
43765
44035
  /**
43766
44036
  * Sets the given request header.
43767
44037
  *
43768
- * @param {Object} requestHeader - A [request header]{@link https://developer.mozilla.org/en-US/docs/Glossary/Request_header}
44038
+ * @param {Object} requestHeader - A [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header)
43769
44039
  * for configuring the HTTP request.
43770
44040
  * @return {Loader} A reference to this instance.
43771
44041
  */
@@ -43857,7 +44127,7 @@ class FileLoader extends Loader {
43857
44127
 
43858
44128
  /**
43859
44129
  * The expected mime type. Valid values can be found
43860
- * [here]{@link hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype}
44130
+ * [here](hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype)
43861
44131
  *
43862
44132
  * @type {string}
43863
44133
  */
@@ -43963,7 +44233,7 @@ class FileLoader extends Loader {
43963
44233
 
43964
44234
  if ( response.status === 0 ) {
43965
44235
 
43966
- console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );
44236
+ warn( 'FileLoader: HTTP Status 0 received.' );
43967
44237
 
43968
44238
  }
43969
44239
 
@@ -44233,7 +44503,7 @@ class AnimationLoader extends Loader {
44233
44503
 
44234
44504
  } else {
44235
44505
 
44236
- console.error( e );
44506
+ error( e );
44237
44507
 
44238
44508
  }
44239
44509
 
@@ -44428,7 +44698,7 @@ const _loading = new WeakMap();
44428
44698
  * ```
44429
44699
  * Please note that `ImageLoader` has dropped support for progress
44430
44700
  * events in `r84`. For an `ImageLoader` that supports progress events, see
44431
- * [this thread]{@link https://github.com/mrdoob/three.js/issues/10439#issuecomment-275785639}.
44701
+ * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-275785639).
44432
44702
  *
44433
44703
  * @augments Loader
44434
44704
  */
@@ -44737,7 +45007,7 @@ class DataTextureLoader extends Loader {
44737
45007
 
44738
45008
  } else {
44739
45009
 
44740
- console.error( error );
45010
+ error( error );
44741
45011
  return;
44742
45012
 
44743
45013
  }
@@ -44832,7 +45102,7 @@ class DataTextureLoader extends Loader {
44832
45102
  * ```
44833
45103
  * Please note that `TextureLoader` has dropped support for progress
44834
45104
  * events in `r84`. For a `TextureLoader` that supports progress events, see
44835
- * [this thread]{@link https://github.com/mrdoob/three.js/issues/10439#issuecomment-293260145}.
45105
+ * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-293260145).
44836
45106
  *
44837
45107
  * @augments Loader
44838
45108
  */
@@ -45835,7 +46105,7 @@ class PointLight extends Light {
45835
46105
  }
45836
46106
 
45837
46107
  /**
45838
- * Camera that uses [orthographic projection]{@link https://en.wikipedia.org/wiki/Orthographic_projection}.
46108
+ * Camera that uses [orthographic projection](https://en.wikipedia.org/wiki/Orthographic_projection).
45839
46109
  *
45840
46110
  * In this projection mode, an object's size in the rendered image stays
45841
46111
  * constant regardless of its distance from the camera. This can be useful
@@ -46835,7 +47105,7 @@ class MaterialLoader extends Loader {
46835
47105
 
46836
47106
  } else {
46837
47107
 
46838
- console.error( e );
47108
+ error( e );
46839
47109
 
46840
47110
  }
46841
47111
 
@@ -46861,7 +47131,7 @@ class MaterialLoader extends Loader {
46861
47131
 
46862
47132
  if ( textures[ name ] === undefined ) {
46863
47133
 
46864
- console.warn( 'THREE.MaterialLoader: Undefined texture', name );
47134
+ warn( 'MaterialLoader: Undefined texture', name );
46865
47135
 
46866
47136
  }
46867
47137
 
@@ -47353,7 +47623,7 @@ class BufferGeometryLoader extends Loader {
47353
47623
 
47354
47624
  } else {
47355
47625
 
47356
- console.error( e );
47626
+ error( e );
47357
47627
 
47358
47628
  }
47359
47629
 
@@ -47526,7 +47796,7 @@ class BufferGeometryLoader extends Loader {
47526
47796
  }
47527
47797
 
47528
47798
  /**
47529
- * A loader for loading a JSON resource in the [JSON Object/Scene format]{@link https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4}.
47799
+ * A loader for loading a JSON resource in the [JSON Object/Scene format](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4).
47530
47800
  * The files are internally loaded via {@link FileLoader}.
47531
47801
  *
47532
47802
  * ```js
@@ -47585,7 +47855,7 @@ class ObjectLoader extends Loader {
47585
47855
 
47586
47856
  if ( onError !== undefined ) onError( error );
47587
47857
 
47588
- console.error( 'THREE:ObjectLoader: Can\'t parse ' + url + '.', error.message );
47858
+ error( 'ObjectLoader: Can\'t parse ' + url + '.', error.message );
47589
47859
 
47590
47860
  return;
47591
47861
 
@@ -47597,7 +47867,7 @@ class ObjectLoader extends Loader {
47597
47867
 
47598
47868
  if ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\'t load ' + url ) );
47599
47869
 
47600
- console.error( 'THREE.ObjectLoader: Can\'t load ' + url );
47870
+ error( 'ObjectLoader: Can\'t load ' + url );
47601
47871
  return;
47602
47872
 
47603
47873
  }
@@ -47807,7 +48077,7 @@ class ObjectLoader extends Loader {
47807
48077
 
47808
48078
  } else {
47809
48079
 
47810
- console.warn( `THREE.ObjectLoader: Unsupported geometry type "${ data.type }"` );
48080
+ warn( `ObjectLoader: Unsupported geometry type "${ data.type }"` );
47811
48081
 
47812
48082
  }
47813
48083
 
@@ -48098,7 +48368,7 @@ class ObjectLoader extends Loader {
48098
48368
 
48099
48369
  if ( typeof value === 'number' ) return value;
48100
48370
 
48101
- console.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value );
48371
+ warn( 'ObjectLoader.parseTexture: Constant should be in numeric form.', value );
48102
48372
 
48103
48373
  return type[ value ];
48104
48374
 
@@ -48114,13 +48384,13 @@ class ObjectLoader extends Loader {
48114
48384
 
48115
48385
  if ( data.image === undefined ) {
48116
48386
 
48117
- console.warn( 'THREE.ObjectLoader: No "image" specified for', data.uuid );
48387
+ warn( 'ObjectLoader: No "image" specified for', data.uuid );
48118
48388
 
48119
48389
  }
48120
48390
 
48121
48391
  if ( images[ data.image ] === undefined ) {
48122
48392
 
48123
- console.warn( 'THREE.ObjectLoader: Undefined image', data.image );
48393
+ warn( 'ObjectLoader: Undefined image', data.image );
48124
48394
 
48125
48395
  }
48126
48396
 
@@ -48208,7 +48478,7 @@ class ObjectLoader extends Loader {
48208
48478
 
48209
48479
  if ( geometries[ name ] === undefined ) {
48210
48480
 
48211
- console.warn( 'THREE.ObjectLoader: Undefined geometry', name );
48481
+ warn( 'ObjectLoader: Undefined geometry', name );
48212
48482
 
48213
48483
  }
48214
48484
 
@@ -48230,7 +48500,7 @@ class ObjectLoader extends Loader {
48230
48500
 
48231
48501
  if ( materials[ uuid ] === undefined ) {
48232
48502
 
48233
- console.warn( 'THREE.ObjectLoader: Undefined material', uuid );
48503
+ warn( 'ObjectLoader: Undefined material', uuid );
48234
48504
 
48235
48505
  }
48236
48506
 
@@ -48244,7 +48514,7 @@ class ObjectLoader extends Loader {
48244
48514
 
48245
48515
  if ( materials[ name ] === undefined ) {
48246
48516
 
48247
- console.warn( 'THREE.ObjectLoader: Undefined material', name );
48517
+ warn( 'ObjectLoader: Undefined material', name );
48248
48518
 
48249
48519
  }
48250
48520
 
@@ -48256,7 +48526,7 @@ class ObjectLoader extends Loader {
48256
48526
 
48257
48527
  if ( textures[ uuid ] === undefined ) {
48258
48528
 
48259
- console.warn( 'THREE.ObjectLoader: Undefined texture', uuid );
48529
+ warn( 'ObjectLoader: Undefined texture', uuid );
48260
48530
 
48261
48531
  }
48262
48532
 
@@ -48657,7 +48927,7 @@ class ObjectLoader extends Loader {
48657
48927
 
48658
48928
  if ( skeleton === undefined ) {
48659
48929
 
48660
- console.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton );
48930
+ warn( 'ObjectLoader: No skeleton found with UUID:', child.skeleton );
48661
48931
 
48662
48932
  } else {
48663
48933
 
@@ -48728,7 +48998,7 @@ const TEXTURE_FILTER = {
48728
48998
  const _errorMap = new WeakMap();
48729
48999
 
48730
49000
  /**
48731
- * A loader for loading images as an [ImageBitmap]{@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap}.
49001
+ * A loader for loading images as an [ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap).
48732
49002
  * An `ImageBitmap` provides an asynchronous and resource efficient pathway to prepare
48733
49003
  * textures for rendering.
48734
49004
  *
@@ -48772,13 +49042,13 @@ class ImageBitmapLoader extends Loader {
48772
49042
 
48773
49043
  if ( typeof createImageBitmap === 'undefined' ) {
48774
49044
 
48775
- console.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );
49045
+ warn( 'ImageBitmapLoader: createImageBitmap() not supported.' );
48776
49046
 
48777
49047
  }
48778
49048
 
48779
49049
  if ( typeof fetch === 'undefined' ) {
48780
49050
 
48781
- console.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' );
49051
+ warn( 'ImageBitmapLoader: fetch() not supported.' );
48782
49052
 
48783
49053
  }
48784
49054
 
@@ -48802,7 +49072,7 @@ class ImageBitmapLoader extends Loader {
48802
49072
 
48803
49073
  /**
48804
49074
  * Sets the given loader options. The structure of the object must match the `options` parameter of
48805
- * [createImageBitmap]{@link https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap}.
49075
+ * [createImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap).
48806
49076
  *
48807
49077
  * @param {Object} options - The loader options to set.
48808
49078
  * @return {ImageBitmapLoader} A reference to this image bitmap loader.
@@ -49058,7 +49328,7 @@ class AudioLoader extends Loader {
49058
49328
 
49059
49329
  } else {
49060
49330
 
49061
- console.error( e );
49331
+ error( e );
49062
49332
 
49063
49333
  }
49064
49334
 
@@ -49077,8 +49347,8 @@ const _projectionMatrix = /*@__PURE__*/ new Matrix4();
49077
49347
  /**
49078
49348
  * A special type of camera that uses two perspective cameras with
49079
49349
  * stereoscopic projection. Can be used for rendering stereo effects
49080
- * like [3D Anaglyph]{@link https://en.wikipedia.org/wiki/Anaglyph_3D} or
49081
- * [Parallax Barrier]{@link https://en.wikipedia.org/wiki/parallax_barrier}.
49350
+ * like [3D Anaglyph](https://en.wikipedia.org/wiki/Anaglyph_3D) or
49351
+ * [Parallax Barrier](https://en.wikipedia.org/wiki/parallax_barrier).
49082
49352
  */
49083
49353
  class StereoCamera {
49084
49354
 
@@ -49601,7 +49871,7 @@ class AudioListener extends Object3D {
49601
49871
  /**
49602
49872
  * Represents a non-positional ( global ) audio object.
49603
49873
  *
49604
- * This and related audio modules make use of the [Web Audio API]{@link https://www.w3.org/TR/webaudio-1.1/}.
49874
+ * This and related audio modules make use of the [Web Audio API](https://www.w3.org/TR/webaudio-1.1/).
49605
49875
  *
49606
49876
  * ```js
49607
49877
  * // create an AudioListener and add it to the camera
@@ -49912,14 +50182,14 @@ class Audio extends Object3D {
49912
50182
 
49913
50183
  if ( this.isPlaying === true ) {
49914
50184
 
49915
- console.warn( 'THREE.Audio: Audio is already playing.' );
50185
+ warn( 'Audio: Audio is already playing.' );
49916
50186
  return;
49917
50187
 
49918
50188
  }
49919
50189
 
49920
50190
  if ( this.hasPlaybackControl === false ) {
49921
50191
 
49922
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50192
+ warn( 'Audio: this Audio has no playback control.' );
49923
50193
  return;
49924
50194
 
49925
50195
  }
@@ -49956,7 +50226,7 @@ class Audio extends Object3D {
49956
50226
 
49957
50227
  if ( this.hasPlaybackControl === false ) {
49958
50228
 
49959
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50229
+ warn( 'Audio: this Audio has no playback control.' );
49960
50230
  return;
49961
50231
 
49962
50232
  }
@@ -49998,7 +50268,7 @@ class Audio extends Object3D {
49998
50268
 
49999
50269
  if ( this.hasPlaybackControl === false ) {
50000
50270
 
50001
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50271
+ warn( 'Audio: this Audio has no playback control.' );
50002
50272
  return;
50003
50273
 
50004
50274
  }
@@ -50191,7 +50461,7 @@ class Audio extends Object3D {
50191
50461
 
50192
50462
  if ( this.hasPlaybackControl === false ) {
50193
50463
 
50194
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50464
+ warn( 'Audio: this Audio has no playback control.' );
50195
50465
  return;
50196
50466
 
50197
50467
  }
@@ -50240,7 +50510,7 @@ class Audio extends Object3D {
50240
50510
 
50241
50511
  if ( this.hasPlaybackControl === false ) {
50242
50512
 
50243
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50513
+ warn( 'Audio: this Audio has no playback control.' );
50244
50514
  return false;
50245
50515
 
50246
50516
  }
@@ -50261,7 +50531,7 @@ class Audio extends Object3D {
50261
50531
 
50262
50532
  if ( this.hasPlaybackControl === false ) {
50263
50533
 
50264
- console.warn( 'THREE.Audio: this Audio has no playback control.' );
50534
+ warn( 'Audio: this Audio has no playback control.' );
50265
50535
  return;
50266
50536
 
50267
50537
  }
@@ -50339,7 +50609,7 @@ class Audio extends Object3D {
50339
50609
 
50340
50610
  if ( source.sourceType !== 'buffer' ) {
50341
50611
 
50342
- console.warn( 'THREE.Audio: Audio source type cannot be copied.' );
50612
+ warn( 'Audio: Audio source type cannot be copied.' );
50343
50613
 
50344
50614
  return this;
50345
50615
 
@@ -50524,7 +50794,7 @@ class PositionalAudio extends Audio {
50524
50794
  * Defines which algorithm to use to reduce the volume of the audio source
50525
50795
  * as it moves away from the listener.
50526
50796
  *
50527
- * Read [the spec]{@link https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype}
50797
+ * Read [the spec](https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype)
50528
50798
  * for more details.
50529
50799
  *
50530
50800
  * @param {('linear'|'inverse'|'exponential')} value - The distance model to set.
@@ -51606,7 +51876,7 @@ class PropertyBinding {
51606
51876
  // ensure there is a value node
51607
51877
  if ( ! targetObject ) {
51608
51878
 
51609
- console.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' );
51879
+ warn( 'PropertyBinding: No target node found for track: ' + this.path + '.' );
51610
51880
  return;
51611
51881
 
51612
51882
  }
@@ -51622,14 +51892,14 @@ class PropertyBinding {
51622
51892
 
51623
51893
  if ( ! targetObject.material ) {
51624
51894
 
51625
- console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );
51895
+ error( 'PropertyBinding: Can not bind to material as node does not have a material.', this );
51626
51896
  return;
51627
51897
 
51628
51898
  }
51629
51899
 
51630
51900
  if ( ! targetObject.material.materials ) {
51631
51901
 
51632
- console.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );
51902
+ error( 'PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );
51633
51903
  return;
51634
51904
 
51635
51905
  }
@@ -51642,7 +51912,7 @@ class PropertyBinding {
51642
51912
 
51643
51913
  if ( ! targetObject.skeleton ) {
51644
51914
 
51645
- console.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );
51915
+ error( 'PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );
51646
51916
  return;
51647
51917
 
51648
51918
  }
@@ -51677,14 +51947,14 @@ class PropertyBinding {
51677
51947
 
51678
51948
  if ( ! targetObject.material ) {
51679
51949
 
51680
- console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );
51950
+ error( 'PropertyBinding: Can not bind to material as node does not have a material.', this );
51681
51951
  return;
51682
51952
 
51683
51953
  }
51684
51954
 
51685
51955
  if ( ! targetObject.material.map ) {
51686
51956
 
51687
- console.error( 'THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.', this );
51957
+ error( 'PropertyBinding: Can not bind to material.map as node.material does not have a map.', this );
51688
51958
  return;
51689
51959
 
51690
51960
  }
@@ -51696,7 +51966,7 @@ class PropertyBinding {
51696
51966
 
51697
51967
  if ( targetObject[ objectName ] === undefined ) {
51698
51968
 
51699
- console.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this );
51969
+ error( 'PropertyBinding: Can not bind to objectName of node undefined.', this );
51700
51970
  return;
51701
51971
 
51702
51972
  }
@@ -51710,7 +51980,7 @@ class PropertyBinding {
51710
51980
 
51711
51981
  if ( targetObject[ objectIndex ] === undefined ) {
51712
51982
 
51713
- console.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );
51983
+ error( 'PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );
51714
51984
  return;
51715
51985
 
51716
51986
  }
@@ -51728,7 +51998,7 @@ class PropertyBinding {
51728
51998
 
51729
51999
  const nodeName = parsedPath.nodeName;
51730
52000
 
51731
- console.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName +
52001
+ error( 'PropertyBinding: Trying to update property for track: ' + nodeName +
51732
52002
  '.' + propertyName + ' but it wasn\'t found.', targetObject );
51733
52003
  return;
51734
52004
 
@@ -51763,14 +52033,14 @@ class PropertyBinding {
51763
52033
  // support resolving morphTarget names into indices.
51764
52034
  if ( ! targetObject.geometry ) {
51765
52035
 
51766
- console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );
52036
+ error( 'PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );
51767
52037
  return;
51768
52038
 
51769
52039
  }
51770
52040
 
51771
52041
  if ( ! targetObject.geometry.morphAttributes ) {
51772
52042
 
51773
- console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );
52043
+ error( 'PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );
51774
52044
  return;
51775
52045
 
51776
52046
  }
@@ -52062,7 +52332,7 @@ class AnimationObjectGroup {
52062
52332
 
52063
52333
  } else if ( objects[ index ] !== knownObject ) {
52064
52334
 
52065
- console.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' +
52335
+ error( 'AnimationObjectGroup: Different objects with the same UUID ' +
52066
52336
  'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );
52067
52337
 
52068
52338
  } // else the object is already where we want it to be
@@ -53857,7 +54127,7 @@ class AnimationMixer extends EventDispatcher {
53857
54127
  /**
53858
54128
  * Deactivates all previously scheduled actions on this mixer.
53859
54129
  *
53860
- * @return {AnimationMixer} A reference to thi animation mixer.
54130
+ * @return {AnimationMixer} A reference to this animation mixer.
53861
54131
  */
53862
54132
  stopAllAction() {
53863
54133
 
@@ -53881,7 +54151,7 @@ class AnimationMixer extends EventDispatcher {
53881
54151
  * time from {@link Clock} or {@link Timer}.
53882
54152
  *
53883
54153
  * @param {number} deltaTime - The delta time in seconds.
53884
- * @return {AnimationMixer} A reference to thi animation mixer.
54154
+ * @return {AnimationMixer} A reference to this animation mixer.
53885
54155
  */
53886
54156
  update( deltaTime ) {
53887
54157
 
@@ -53927,7 +54197,7 @@ class AnimationMixer extends EventDispatcher {
53927
54197
  * input parameter will be scaled by {@link AnimationMixer#timeScale}
53928
54198
  *
53929
54199
  * @param {number} time - The time to set in seconds.
53930
- * @return {AnimationMixer} A reference to thi animation mixer.
54200
+ * @return {AnimationMixer} A reference to this animation mixer.
53931
54201
  */
53932
54202
  setTime( time ) {
53933
54203
 
@@ -54702,7 +54972,7 @@ class Raycaster {
54702
54972
 
54703
54973
  } else {
54704
54974
 
54705
- console.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );
54975
+ error( 'Raycaster: Unsupported camera type: ' + camera.type );
54706
54976
 
54707
54977
  }
54708
54978
 
@@ -55014,7 +55284,7 @@ function handleVisibilityChange() {
55014
55284
 
55015
55285
  /**
55016
55286
  * This class can be used to represent points in 3D space as
55017
- * [Spherical coordinates]{@link https://en.wikipedia.org/wiki/Spherical_coordinate_system}.
55287
+ * [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system).
55018
55288
  */
55019
55289
  class Spherical {
55020
55290
 
@@ -55158,7 +55428,7 @@ class Spherical {
55158
55428
 
55159
55429
  /**
55160
55430
  * This class can be used to represent points in 3D space as
55161
- * [Cylindrical coordinates]{@link https://en.wikipedia.org/wiki/Cylindrical_coordinate_system}.
55431
+ * [Cylindrical coordinates](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system).
55162
55432
  */
55163
55433
  class Cylindrical {
55164
55434
 
@@ -55281,7 +55551,7 @@ class Cylindrical {
55281
55551
  * A Note on Row-Major and Column-Major Ordering:
55282
55552
  *
55283
55553
  * The constructor and {@link Matrix2#set} method take arguments in
55284
- * [row-major]{@link https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order}
55554
+ * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
55285
55555
  * order, while internally they are stored in the {@link Matrix2#elements} array in column-major order.
55286
55556
  * This means that calling:
55287
55557
  * ```js
@@ -57017,7 +57287,7 @@ const _camera = /*@__PURE__*/ new Camera();
57017
57287
  * This helps with visualizing what a camera contains in its frustum. It
57018
57288
  * visualizes the frustum of a camera using a line segments.
57019
57289
  *
57020
- * Based on frustum visualization in [lightgl.js shadowmap example]{@link https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html}.
57290
+ * Based on frustum visualization in [lightgl.js shadowmap example](https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html).
57021
57291
  *
57022
57292
  * `CameraHelper` must be a child of the scene.
57023
57293
  *
@@ -58129,7 +58399,7 @@ class ShapePath {
58129
58399
  let holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );
58130
58400
  holesFirst = isCCW ? ! holesFirst : holesFirst;
58131
58401
 
58132
- // console.log("Holes first", holesFirst);
58402
+ // log("Holes first", holesFirst);
58133
58403
 
58134
58404
  const betterShapeHoles = [];
58135
58405
  const newShapes = [];
@@ -58157,13 +58427,13 @@ class ShapePath {
58157
58427
  if ( holesFirst ) mainIdx ++;
58158
58428
  newShapeHoles[ mainIdx ] = [];
58159
58429
 
58160
- //console.log('cw', i);
58430
+ //log('cw', i);
58161
58431
 
58162
58432
  } else {
58163
58433
 
58164
58434
  newShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );
58165
58435
 
58166
- //console.log('ccw', i);
58436
+ //log('ccw', i);
58167
58437
 
58168
58438
  }
58169
58439
 
@@ -58248,7 +58518,7 @@ class ShapePath {
58248
58518
 
58249
58519
  }
58250
58520
 
58251
- //console.log("shape", shapes);
58521
+ //log("shape", shapes);
58252
58522
 
58253
58523
  return shapes;
58254
58524
 
@@ -58268,7 +58538,7 @@ class Controls extends EventDispatcher {
58268
58538
  * Constructs a new controls instance.
58269
58539
  *
58270
58540
  * @param {Object3D} object - The object that is managed by the controls.
58271
- * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
58541
+ * @param {?HTMLElement} domElement - The HTML element used for event listeners.
58272
58542
  */
58273
58543
  constructor( object, domElement = null ) {
58274
58544
 
@@ -58284,7 +58554,7 @@ class Controls extends EventDispatcher {
58284
58554
  /**
58285
58555
  * The HTML element used for event listeners.
58286
58556
  *
58287
- * @type {?HTMLDOMElement}
58557
+ * @type {?HTMLElement}
58288
58558
  * @default null
58289
58559
  */
58290
58560
  this.domElement = domElement;
@@ -58334,13 +58604,13 @@ class Controls extends EventDispatcher {
58334
58604
  * Connects the controls to the DOM. This method has so called "side effects" since
58335
58605
  * it adds the module's event listeners to the DOM.
58336
58606
  *
58337
- * @param {HTMLDOMElement} element - The DOM element to connect to.
58607
+ * @param {HTMLElement} element - The DOM element to connect to.
58338
58608
  */
58339
58609
  connect( element ) {
58340
58610
 
58341
58611
  if ( element === undefined ) {
58342
58612
 
58343
- console.warn( 'THREE.Controls: connect() now requires an element.' ); // @deprecated, the warning can be removed with r185
58613
+ warn( 'Controls: connect() now requires an element.' ); // @deprecated, the warning can be removed with r185
58344
58614
  return;
58345
58615
 
58346
58616
  }
@@ -58587,6 +58857,7 @@ function getTextureTypeByteLength( type ) {
58587
58857
  case FloatType:
58588
58858
  return { byteLength: 4, components: 1 };
58589
58859
  case UnsignedInt5999Type:
58860
+ case UnsignedInt101111Type:
58590
58861
  return { byteLength: 4, components: 3 };
58591
58862
 
58592
58863
  }
@@ -58673,7 +58944,7 @@ if ( typeof window !== 'undefined' ) {
58673
58944
 
58674
58945
  if ( window.__THREE__ ) {
58675
58946
 
58676
- console.warn( 'WARNING: Multiple instances of Three.js being imported.' );
58947
+ warn( 'WARNING: Multiple instances of Three.js being imported.' );
58677
58948
 
58678
58949
  } else {
58679
58950
 
@@ -58683,4 +58954,4 @@ if ( typeof window !== 'undefined' ) {
58683
58954
 
58684
58955
  }
58685
58956
 
58686
- 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, CylindricalMapping, 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, TriPlanarMapping, 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 };
58957
+ 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, CylindricalMapping, 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, ExternalTexture, 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, TriPlanarMapping, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, 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, error, getByteLength, getConsoleFunction, getUnlitUniformColorSpace, log, mergeUniforms, probeAsync, setConsoleFunction, warn, warnOnce };