super-three 0.184.0 → 0.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/build/three.cjs +1260 -927
  2. package/build/three.core.js +1104 -829
  3. package/build/three.core.min.js +1 -1
  4. package/build/three.module.js +156 -98
  5. package/build/three.module.min.js +1 -1
  6. package/build/three.tsl.js +11 -4
  7. package/build/three.tsl.min.js +1 -1
  8. package/build/three.webgpu.js +7538 -3367
  9. package/build/three.webgpu.min.js +1 -1
  10. package/build/three.webgpu.nodes.js +7538 -3366
  11. package/build/three.webgpu.nodes.min.js +1 -1
  12. package/examples/jsm/Addons.js +3 -0
  13. package/examples/jsm/controls/ArcballControls.js +6 -2
  14. package/examples/jsm/controls/FirstPersonControls.js +79 -42
  15. package/examples/jsm/controls/TransformControls.js +68 -15
  16. package/examples/jsm/csm/CSMFrustum.js +31 -6
  17. package/examples/jsm/csm/CSMShadowNode.js +4 -1
  18. package/examples/jsm/effects/AsciiEffect.js +14 -1
  19. package/examples/jsm/exporters/DRACOExporter.js +27 -6
  20. package/examples/jsm/exporters/GLTFExporter.js +114 -12
  21. package/examples/jsm/exporters/PLYExporter.js +286 -73
  22. package/examples/jsm/exporters/USDZExporter.js +347 -112
  23. package/examples/jsm/generators/CityGenerator.js +346 -0
  24. package/examples/jsm/generators/ForestGenerator.js +347 -0
  25. package/examples/jsm/generators/TerrainGenerator.js +504 -0
  26. package/examples/jsm/generators/TreeGenerator.js +377 -0
  27. package/examples/jsm/generators/city/SidewalkGenerator.js +253 -0
  28. package/examples/jsm/generators/city/SkyscraperGenerator.js +1357 -0
  29. package/examples/jsm/geometries/LoftGeometry.js +355 -0
  30. package/examples/jsm/helpers/LightProbeGridHelper.js +1 -1
  31. package/examples/jsm/helpers/LightProbeHelper.js +5 -4
  32. package/examples/jsm/helpers/ViewHelper.js +16 -6
  33. package/examples/jsm/inspector/Inspector.js +53 -15
  34. package/examples/jsm/inspector/RendererInspector.js +152 -36
  35. package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.js +1 -1
  36. package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.js +1 -1
  37. package/examples/jsm/inspector/tabs/Console.js +200 -18
  38. package/examples/jsm/inspector/tabs/Memory.js +8 -0
  39. package/examples/jsm/inspector/tabs/Parameters.js +64 -4
  40. package/examples/jsm/inspector/tabs/Performance.js +21 -6
  41. package/examples/jsm/inspector/tabs/Settings.js +51 -9
  42. package/examples/jsm/inspector/tabs/Timeline.js +178 -93
  43. package/examples/jsm/inspector/tabs/Viewer.js +628 -16
  44. package/examples/jsm/inspector/ui/Graph.js +162 -25
  45. package/examples/jsm/inspector/ui/Item.js +92 -13
  46. package/examples/jsm/inspector/ui/List.js +1 -1
  47. package/examples/jsm/inspector/ui/Profiler.js +90 -45
  48. package/examples/jsm/inspector/ui/Style.js +1788 -1401
  49. package/examples/jsm/inspector/ui/Tab.js +5 -3
  50. package/examples/jsm/inspector/ui/Values.js +71 -6
  51. package/examples/jsm/inspector/ui/utils.js +130 -10
  52. package/examples/jsm/libs/basis/README.md +0 -1
  53. package/examples/jsm/libs/demuxer_mp4.js +3 -3
  54. package/examples/jsm/libs/draco/README.md +0 -1
  55. package/examples/jsm/libs/meshopt_clusterizer.module.js +421 -0
  56. package/examples/jsm/libs/meshopt_simplifier.module.js +627 -0
  57. package/examples/jsm/libs/mikktspace.module.js +34 -9
  58. package/examples/jsm/lighting/ClusteredLighting.js +55 -0
  59. package/examples/jsm/lighting/LightProbeGrid.js +106 -76
  60. package/examples/jsm/lines/LineMaterial.js +38 -15
  61. package/examples/jsm/lines/LineSegments2.js +8 -0
  62. package/examples/jsm/lines/webgpu/LineSegments2.js +8 -0
  63. package/examples/jsm/loaders/3DMLoader.js +1 -1
  64. package/examples/jsm/loaders/DRACOLoader.js +46 -13
  65. package/examples/jsm/loaders/EXRLoader.js +27 -55
  66. package/examples/jsm/loaders/HDRLoader.js +6 -28
  67. package/examples/jsm/loaders/KTX2Loader.js +31 -12
  68. package/examples/jsm/loaders/LDrawLoader.js +8 -8
  69. package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
  70. package/examples/jsm/loaders/LUTCubeLoader.js +2 -2
  71. package/examples/jsm/loaders/LWOLoader.js +4 -0
  72. package/examples/jsm/loaders/LottieLoader.js +1 -1
  73. package/examples/jsm/loaders/MaterialXLoader.js +31 -9
  74. package/examples/jsm/loaders/NRRDLoader.js +3 -3
  75. package/examples/jsm/loaders/PCDLoader.js +7 -7
  76. package/examples/jsm/loaders/PLYLoader.js +218 -55
  77. package/examples/jsm/loaders/SVGLoader.js +547 -495
  78. package/examples/jsm/loaders/TTFLoader.js +1 -1
  79. package/examples/jsm/loaders/USDLoader.js +33 -9
  80. package/examples/jsm/loaders/VRMLLoader.js +1 -1
  81. package/examples/jsm/loaders/usd/USDAParser.js +93 -20
  82. package/examples/jsm/loaders/usd/USDCParser.js +1 -1
  83. package/examples/jsm/loaders/usd/USDComposer.js +52 -19
  84. package/examples/jsm/misc/TileCreasedNormalsPlugin.js +270 -0
  85. package/examples/jsm/misc/Volume.js +2 -2
  86. package/examples/jsm/objects/GroundedSkybox.js +1 -1
  87. package/examples/jsm/objects/Reflector.js +2 -3
  88. package/examples/jsm/objects/Water2Mesh.js +1 -1
  89. package/examples/jsm/physics/AmmoPhysics.js +15 -8
  90. package/examples/jsm/physics/RapierPhysics.js +27 -2
  91. package/examples/jsm/shaders/VolumeShader.js +31 -44
  92. package/examples/jsm/transpiler/GLSLDecoder.js +6 -6
  93. package/examples/jsm/transpiler/Linker.js +1 -1
  94. package/examples/jsm/tsl/display/BloomNode.js +59 -19
  95. package/examples/jsm/tsl/display/DepthOfFieldNode.js +2 -2
  96. package/examples/jsm/tsl/display/FXAANode.js +11 -12
  97. package/examples/jsm/tsl/display/GTAONode.js +34 -13
  98. package/examples/jsm/tsl/display/GodraysNode.js +1 -1
  99. package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +560 -0
  100. package/examples/jsm/tsl/display/PixelationPassNode.js +2 -2
  101. package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +912 -0
  102. package/examples/jsm/tsl/display/SSAAPassNode.js +13 -25
  103. package/examples/jsm/tsl/display/SSGINode.js +89 -39
  104. package/examples/jsm/tsl/display/SSRNode.js +829 -132
  105. package/examples/jsm/tsl/display/SSSNode.js +2 -2
  106. package/examples/jsm/tsl/display/TemporalReprojectNode.js +1023 -0
  107. package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +622 -0
  108. package/examples/jsm/tsl/lighting/DynamicLightsNode.js +1 -1
  109. package/examples/jsm/tsl/math/curlNoise.js +107 -0
  110. package/examples/jsm/tsl/shadows/TileShadowNode.js +1 -1
  111. package/examples/jsm/tsl/shadows/TileShadowNodeHelper.js +3 -3
  112. package/examples/jsm/tsl/utils/GroundedSkybox.js +62 -0
  113. package/examples/jsm/tsl/utils/RNoise.js +51 -0
  114. package/examples/jsm/tsl/utils/SpecularHelpers.js +325 -0
  115. package/examples/jsm/utils/BufferGeometryUtils.js +126 -59
  116. package/examples/jsm/utils/GeometryCompressionUtils.js +1 -1
  117. package/examples/jsm/utils/SceneOptimizer.js +1 -1
  118. package/examples/jsm/webxr/ARButton.js +1 -1
  119. package/examples/jsm/webxr/WebGLXRFallback.js +89 -0
  120. package/examples/jsm/webxr/XRControllerModelFactory.js +2 -2
  121. package/package.json +7 -7
  122. package/src/Three.TSL.js +10 -3
  123. package/src/Three.WebGPU.js +4 -0
  124. package/src/animation/AnimationAction.js +15 -11
  125. package/src/animation/AnimationClip.js +0 -139
  126. package/src/animation/KeyframeTrack.js +2 -2
  127. package/src/animation/PropertyBinding.js +2 -2
  128. package/src/cameras/Camera.js +2 -2
  129. package/src/cameras/StereoCamera.js +5 -2
  130. package/src/constants.js +1 -1
  131. package/src/core/BufferGeometry.js +29 -7
  132. package/src/core/Object3D.js +17 -7
  133. package/src/core/Raycaster.js +1 -1
  134. package/src/core/RenderTarget.js +15 -2
  135. package/src/extras/PMREMGenerator.js +6 -4
  136. package/src/extras/TextureUtils.js +1 -1
  137. package/src/extras/core/ShapePath.js +149 -160
  138. package/src/geometries/SphereGeometry.js +8 -3
  139. package/src/helpers/DirectionalLightHelper.js +2 -0
  140. package/src/helpers/HemisphereLightHelper.js +2 -0
  141. package/src/helpers/PointLightHelper.js +2 -0
  142. package/src/helpers/SpotLightHelper.js +1 -1
  143. package/src/loaders/DataTextureLoader.js +69 -38
  144. package/src/loaders/LoadingManager.js +5 -0
  145. package/src/loaders/MaterialLoader.js +36 -266
  146. package/src/loaders/ObjectLoader.js +3 -1
  147. package/src/materials/LineBasicMaterial.js +4 -0
  148. package/src/materials/Material.js +196 -1
  149. package/src/materials/MeshBasicMaterial.js +24 -0
  150. package/src/materials/MeshDepthMaterial.js +10 -0
  151. package/src/materials/MeshDistanceMaterial.js +10 -0
  152. package/src/materials/MeshLambertMaterial.js +40 -1
  153. package/src/materials/MeshMatcapMaterial.js +25 -1
  154. package/src/materials/MeshNormalMaterial.js +9 -1
  155. package/src/materials/MeshPhongMaterial.js +40 -1
  156. package/src/materials/MeshPhysicalMaterial.js +38 -0
  157. package/src/materials/MeshStandardMaterial.js +42 -1
  158. package/src/materials/MeshToonMaterial.js +34 -1
  159. package/src/materials/PointsMaterial.js +7 -0
  160. package/src/materials/ShaderMaterial.js +86 -0
  161. package/src/materials/SpriteMaterial.js +7 -0
  162. package/src/materials/nodes/Line2NodeMaterial.js +378 -322
  163. package/src/materials/nodes/MeshBasicNodeMaterial.js +2 -2
  164. package/src/materials/nodes/MeshNormalNodeMaterial.js +2 -2
  165. package/src/materials/nodes/MeshPhongNodeMaterial.js +0 -9
  166. package/src/materials/nodes/MeshPhysicalNodeMaterial.js +0 -30
  167. package/src/materials/nodes/MeshSSSNodeMaterial.js +0 -13
  168. package/src/materials/nodes/MeshStandardNodeMaterial.js +0 -11
  169. package/src/materials/nodes/NodeMaterial.js +115 -71
  170. package/src/materials/nodes/SpriteNodeMaterial.js +0 -10
  171. package/src/materials/nodes/manager/NodeMaterialObserver.js +49 -20
  172. package/src/math/Box3.js +5 -0
  173. package/src/math/FrustumArray.js +103 -133
  174. package/src/math/Interpolant.js +1 -1
  175. package/src/math/MathUtils.js +2 -2
  176. package/src/math/Matrix3.js +11 -0
  177. package/src/math/Matrix4.js +28 -3
  178. package/src/math/Vector2.js +2 -2
  179. package/src/math/Vector3.js +2 -2
  180. package/src/math/Vector4.js +2 -2
  181. package/src/math/interpolants/BezierInterpolant.js +4 -6
  182. package/src/nodes/Nodes.js +2 -5
  183. package/src/nodes/TSL.js +8 -6
  184. package/src/nodes/accessors/Arrays.js +4 -4
  185. package/src/nodes/accessors/Batch.js +108 -0
  186. package/src/nodes/accessors/Bitangent.js +2 -2
  187. package/src/nodes/accessors/BufferAttributeNode.js +13 -2
  188. package/src/nodes/accessors/Camera.js +7 -7
  189. package/src/nodes/accessors/ClippingNode.js +1 -1
  190. package/src/nodes/accessors/Instance.js +264 -0
  191. package/src/nodes/accessors/MaterialNode.js +18 -2
  192. package/src/nodes/accessors/MaterialProperties.js +4 -3
  193. package/src/nodes/accessors/{MorphNode.js → Morph.js} +99 -112
  194. package/src/nodes/accessors/Normal.js +13 -13
  195. package/src/nodes/accessors/Position.js +5 -1
  196. package/src/nodes/accessors/ReferenceNode.js +1 -0
  197. package/src/nodes/accessors/ReflectVector.js +3 -3
  198. package/src/nodes/accessors/SceneProperties.js +1 -1
  199. package/src/nodes/accessors/Skinning.js +263 -0
  200. package/src/nodes/accessors/StorageBufferNode.js +2 -2
  201. package/src/nodes/accessors/StorageTexture3DNode.js +100 -0
  202. package/src/nodes/accessors/StorageTextureNode.js +39 -7
  203. package/src/nodes/accessors/Tangent.js +4 -4
  204. package/src/nodes/accessors/TextureNode.js +60 -5
  205. package/src/nodes/code/FunctionNode.js +2 -16
  206. package/src/nodes/core/MRTNode.js +7 -2
  207. package/src/nodes/core/Node.js +39 -2
  208. package/src/nodes/core/NodeBuilder.js +201 -41
  209. package/src/nodes/core/NodeUtils.js +13 -13
  210. package/src/nodes/core/OutputStructNode.js +1 -1
  211. package/src/nodes/core/OverrideContextNode.js +153 -0
  212. package/src/nodes/core/PropertyNode.js +51 -5
  213. package/src/nodes/core/StackNode.js +56 -34
  214. package/src/nodes/core/StructNode.js +4 -6
  215. package/src/nodes/core/StructTypeNode.js +6 -6
  216. package/src/nodes/core/VarNode.js +8 -0
  217. package/src/nodes/core/VaryingNode.js +12 -2
  218. package/src/nodes/display/BlendModes.js +1 -41
  219. package/src/nodes/display/BumpMapNode.js +6 -1
  220. package/src/nodes/display/ColorAdjustment.js +10 -9
  221. package/src/nodes/display/FrontFacingNode.js +38 -9
  222. package/src/nodes/display/NormalMapNode.js +2 -2
  223. package/src/nodes/display/PassNode.js +35 -43
  224. package/src/nodes/display/PremultiplyAlphaFunctions.js +39 -0
  225. package/src/nodes/display/RenderOutputNode.js +12 -3
  226. package/src/nodes/functions/VolumetricLightingModel.js +40 -7
  227. package/src/nodes/gpgpu/WorkgroupInfoNode.js +1 -1
  228. package/src/nodes/lighting/EnvironmentNode.js +2 -2
  229. package/src/nodes/lighting/IESSpotLightNode.js +40 -2
  230. package/src/nodes/lighting/LightingContextNode.js +10 -2
  231. package/src/nodes/lighting/LightsNode.js +90 -37
  232. package/src/nodes/lighting/PointShadowNode.js +6 -1
  233. package/src/nodes/lighting/ShadowFilterNode.js +21 -52
  234. package/src/nodes/lighting/ShadowNode.js +34 -14
  235. package/src/nodes/materialx/lib/mx_noise.js +2 -2
  236. package/src/nodes/math/ConditionalNode.js +3 -3
  237. package/src/nodes/math/MathNode.js +39 -11
  238. package/src/nodes/math/OperatorNode.js +23 -23
  239. package/src/nodes/parsers/GLSLNodeFunction.js +1 -1
  240. package/src/nodes/pmrem/PMREMNode.js +33 -2
  241. package/src/nodes/tsl/TSLCore.js +63 -18
  242. package/src/nodes/utils/EquirectUV.js +30 -5
  243. package/src/nodes/utils/FunctionOverloadingNode.js +1 -1
  244. package/src/nodes/utils/Packing.js +35 -4
  245. package/src/nodes/utils/RTTNode.js +40 -24
  246. package/src/nodes/utils/ReflectorNode.js +1 -0
  247. package/src/nodes/utils/StorageArrayElementNode.js +1 -1
  248. package/src/objects/BatchedMesh.js +22 -14
  249. package/src/objects/InstancedMesh.js +0 -11
  250. package/src/objects/Skeleton.js +0 -9
  251. package/src/renderers/WebGLRenderer.js +19 -15
  252. package/src/renderers/common/Backend.js +49 -5
  253. package/src/renderers/common/Bindings.js +114 -45
  254. package/src/renderers/common/Buffer.js +9 -0
  255. package/src/renderers/common/ClippingContext.js +10 -2
  256. package/src/renderers/common/Info.js +63 -22
  257. package/src/renderers/common/Lighting.js +53 -5
  258. package/src/renderers/common/RenderList.js +41 -4
  259. package/src/renderers/common/RenderObject.js +73 -13
  260. package/src/renderers/common/Renderer.js +281 -108
  261. package/src/renderers/common/Sampler.js +16 -48
  262. package/src/renderers/common/Textures.js +32 -5
  263. package/src/renderers/common/TimestampQueryPool.js +1 -1
  264. package/src/renderers/common/UniformsGroup.js +31 -9
  265. package/src/renderers/common/XRManager.js +340 -22
  266. package/src/renderers/common/extras/PMREMGenerator.js +15 -38
  267. package/src/renderers/common/nodes/NodeBuilderState.js +9 -1
  268. package/src/renderers/common/nodes/NodeLibrary.js +4 -4
  269. package/src/renderers/common/nodes/NodeManager.js +63 -14
  270. package/src/renderers/common/nodes/NodeUniformBuffer.js +13 -0
  271. package/src/renderers/shaders/ShaderChunk/common.glsl.js +13 -4
  272. package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +0 -6
  273. package/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js +1 -1
  274. package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +2 -2
  275. package/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.js +1 -1
  276. package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +1 -1
  277. package/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.js +1 -1
  278. package/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.js +2 -2
  279. package/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.js +6 -0
  280. package/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.js +1 -1
  281. package/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js +1 -1
  282. package/src/renderers/shaders/ShaderLib/distance.glsl.js +1 -1
  283. package/src/renderers/webgl/WebGLOutput.js +2 -1
  284. package/src/renderers/webgl/WebGLProgram.js +5 -4
  285. package/src/renderers/webgl/WebGLPrograms.js +12 -5
  286. package/src/renderers/webgl/WebGLRenderLists.js +9 -1
  287. package/src/renderers/webgl/WebGLShaderCache.js +5 -11
  288. package/src/renderers/webgl/WebGLTextures.js +20 -7
  289. package/src/renderers/webgl/WebGLUniformsGroups.js +66 -38
  290. package/src/renderers/webgl-fallback/WebGLBackend.js +84 -25
  291. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +138 -8
  292. package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +1 -1
  293. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +52 -22
  294. package/src/renderers/webgl-fallback/utils/WebGLUtils.js +4 -2
  295. package/src/renderers/webgpu/WebGPUBackend.js +480 -169
  296. package/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.js +48 -0
  297. package/src/renderers/webgpu/descriptors/GPUBufferDescriptor.js +57 -0
  298. package/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.js +30 -0
  299. package/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.js +38 -0
  300. package/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.js +48 -0
  301. package/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.js +47 -0
  302. package/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.js +50 -0
  303. package/src/renderers/webgpu/descriptors/GPUExtent3D.js +51 -0
  304. package/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.js +39 -0
  305. package/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.js +47 -0
  306. package/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.js +74 -0
  307. package/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.js +72 -0
  308. package/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.js +99 -0
  309. package/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.js +72 -0
  310. package/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.js +49 -0
  311. package/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.js +130 -0
  312. package/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.js +119 -0
  313. package/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.js +46 -0
  314. package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.js +57 -0
  315. package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.js +48 -0
  316. package/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.js +61 -0
  317. package/src/renderers/webgpu/descriptors/GPUTextureDescriptor.js +99 -0
  318. package/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.js +108 -0
  319. package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +0 -1
  320. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +164 -7
  321. package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +1 -1
  322. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +98 -38
  323. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +72 -68
  324. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +164 -69
  325. package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +158 -95
  326. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +297 -141
  327. package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +33 -18
  328. package/src/renderers/webgpu/utils/WebGPUUtils.js +38 -3
  329. package/src/textures/DepthTexture.js +1 -1
  330. package/src/textures/ExternalTexture.js +0 -3
  331. package/examples/fonts/LICENSE +0 -13
  332. package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
  333. package/examples/fonts/MPLUSRounded1c/OFL.txt +0 -91
  334. package/examples/fonts/README.md +0 -11
  335. package/examples/fonts/droid/NOTICE +0 -190
  336. package/examples/fonts/droid/README.txt +0 -18
  337. package/examples/fonts/droid/droid_sans_bold.typeface.json +0 -1
  338. package/examples/fonts/droid/droid_sans_mono_regular.typeface.json +0 -1
  339. package/examples/fonts/droid/droid_sans_regular.typeface.json +0 -1
  340. package/examples/fonts/droid/droid_serif_bold.typeface.json +0 -1
  341. package/examples/fonts/droid/droid_serif_regular.typeface.json +0 -1
  342. package/examples/fonts/gentilis_bold.typeface.json +0 -1
  343. package/examples/fonts/gentilis_regular.typeface.json +0 -1
  344. package/examples/fonts/helvetiker_bold.typeface.json +0 -1
  345. package/examples/fonts/helvetiker_regular.typeface.json +0 -1
  346. package/examples/fonts/optimer_bold.typeface.json +0 -1
  347. package/examples/fonts/optimer_regular.typeface.json +0 -1
  348. package/examples/fonts/ttf/README.md +0 -9
  349. package/examples/fonts/ttf/kenpixel.ttf +0 -0
  350. package/examples/jsm/inspector/extensions/extensions.json +0 -6
  351. package/examples/jsm/libs/ammo.wasm.js +0 -822
  352. package/examples/jsm/libs/ammo.wasm.wasm +0 -0
  353. package/examples/jsm/libs/draco/draco_encoder.js +0 -33
  354. package/examples/jsm/libs/draco/gltf/draco_encoder.js +0 -33
  355. package/examples/jsm/libs/lottie_canvas.module.js +0 -14849
  356. package/examples/jsm/libs/opentype.module.js +0 -14506
  357. package/examples/jsm/libs/rhino3dm/rhino3dm.js +0 -21
  358. package/examples/jsm/libs/rhino3dm/rhino3dm.module.js +0 -16
  359. package/examples/jsm/libs/rhino3dm/rhino3dm.wasm +0 -0
  360. package/examples/jsm/lighting/TiledLighting.js +0 -42
  361. package/examples/jsm/tsl/display/AnamorphicNode.js +0 -293
  362. package/examples/jsm/tsl/lighting/TiledLightsNode.js +0 -442
  363. package/src/nodes/accessors/BatchNode.js +0 -163
  364. package/src/nodes/accessors/InstanceNode.js +0 -349
  365. package/src/nodes/accessors/InstancedMeshNode.js +0 -50
  366. package/src/nodes/accessors/SkinningNode.js +0 -328
@@ -39,13 +39,13 @@ function computeMikkTSpaceTangents( geometry, MikkTSpace, negateSign = true ) {
39
39
 
40
40
  if ( ! MikkTSpace || ! MikkTSpace.isReady ) {
41
41
 
42
- throw new Error( 'BufferGeometryUtils: Initialized MikkTSpace library required.' );
42
+ throw new Error( 'THREE.BufferGeometryUtils: Initialized MikkTSpace library required.' );
43
43
 
44
44
  }
45
45
 
46
46
  if ( ! geometry.hasAttribute( 'position' ) || ! geometry.hasAttribute( 'normal' ) || ! geometry.hasAttribute( 'uv' ) ) {
47
47
 
48
- throw new Error( 'BufferGeometryUtils: Tangents require "position", "normal", and "uv" attributes.' );
48
+ throw new Error( 'THREE.BufferGeometryUtils: Tangents require "position", "normal", and "uv" attributes.' );
49
49
 
50
50
  }
51
51
 
@@ -1314,105 +1314,172 @@ function mergeGroups( geometry ) {
1314
1314
  */
1315
1315
  function toCreasedNormals( geometry, creaseAngle = Math.PI / 3 /* 60 degrees */ ) {
1316
1316
 
1317
+ // BufferGeometry.toNonIndexed() warns if the geometry is non-indexed
1318
+ // and returns the original geometry
1319
+ const resultGeometry = geometry.index ? geometry.toNonIndexed() : geometry;
1320
+ const posAttr = resultGeometry.attributes.position;
1321
+ const vertexCount = posAttr.count;
1322
+
1323
+ let positions;
1324
+
1325
+ if ( posAttr.isBufferAttribute === true && posAttr.itemSize === 3 && posAttr.normalized === false ) {
1326
+
1327
+ positions = posAttr.array;
1328
+
1329
+ } else {
1330
+
1331
+ // flatten the position buffer so the math below operates on plain numbers
1332
+ positions = new Float64Array( vertexCount * 3 );
1333
+
1334
+ for ( let i = 0; i < vertexCount; i ++ ) {
1335
+
1336
+ positions[ 3 * i + 0 ] = posAttr.getX( i );
1337
+ positions[ 3 * i + 1 ] = posAttr.getY( i );
1338
+ positions[ 3 * i + 2 ] = posAttr.getZ( i );
1339
+
1340
+ }
1341
+
1342
+ }
1343
+
1317
1344
  const creaseDot = Math.cos( creaseAngle );
1318
1345
  const hashMultiplier = ( 1 + 1e-10 ) * 1e2;
1346
+ const faceCount = vertexCount / 3;
1347
+
1348
+ // compute the normal of each face
1349
+ const faceNormals = new Float64Array( faceCount * 3 );
1350
+ for ( let f = 0; f < faceCount; f ++ ) {
1351
+
1352
+ const f9 = 9 * f;
1353
+ const ax = positions[ f9 + 0 ], ay = positions[ f9 + 1 ], az = positions[ f9 + 2 ];
1354
+ const bx = positions[ f9 + 3 ], by = positions[ f9 + 4 ], bz = positions[ f9 + 5 ];
1355
+ const cx = positions[ f9 + 6 ], cy = positions[ f9 + 7 ], cz = positions[ f9 + 8 ];
1319
1356
 
1320
- // reusable vectors
1321
- const verts = [ new Vector3(), new Vector3(), new Vector3() ];
1322
- const tempVec1 = new Vector3();
1323
- const tempVec2 = new Vector3();
1324
- const tempNorm = new Vector3();
1325
- const tempNorm2 = new Vector3();
1357
+ const v1x = cx - bx, v1y = cy - by, v1z = cz - bz;
1358
+ const v2x = ax - bx, v2y = ay - by, v2z = az - bz;
1326
1359
 
1327
- // hashes a vector
1328
- function hashVertex( v ) {
1360
+ const nx = v1y * v2z - v1z * v2y;
1361
+ const ny = v1z * v2x - v1x * v2z;
1362
+ const nz = v1x * v2y - v1y * v2x;
1329
1363
 
1330
- const x = ~ ~ ( v.x * hashMultiplier );
1331
- const y = ~ ~ ( v.y * hashMultiplier );
1332
- const z = ~ ~ ( v.z * hashMultiplier );
1333
- return `${x},${y},${z}`;
1364
+ const invLength = 1 / ( Math.sqrt( nx * nx + ny * ny + nz * nz ) || 1 );
1365
+ faceNormals[ 3 * f + 0 ] = nx * invLength;
1366
+ faceNormals[ 3 * f + 1 ] = ny * invLength;
1367
+ faceNormals[ 3 * f + 2 ] = nz * invLength;
1334
1368
 
1335
1369
  }
1336
1370
 
1337
- // BufferGeometry.toNonIndexed() warns if the geometry is non-indexed
1338
- // and returns the original geometry
1339
- const resultGeometry = geometry.index ? geometry.toNonIndexed() : geometry;
1340
- const posAttr = resultGeometry.attributes.position;
1341
- const vertexMap = {};
1371
+ // assign an id to each vertex, sharing the id between vertices with the same
1372
+ // quantized position via an open-addressed hash table (slots hold id + 1, 0 means empty)
1373
+ const vertexIds = new Int32Array( vertexCount );
1374
+ const quantized = new Int32Array( vertexCount * 3 );
1342
1375
 
1343
- // find all the normals shared by commonly located vertices
1344
- for ( let i = 0, l = posAttr.count / 3; i < l; i ++ ) {
1376
+ let tableSize = 1;
1377
+ while ( tableSize < vertexCount * 2 ) tableSize <<= 1;
1378
+ const tableMask = tableSize - 1;
1379
+ const table = new Int32Array( tableSize );
1380
+
1381
+ let uniqueCount = 0;
1382
+ for ( let i = 0; i < vertexCount; i ++ ) {
1345
1383
 
1346
1384
  const i3 = 3 * i;
1347
- const a = verts[ 0 ].fromBufferAttribute( posAttr, i3 + 0 );
1348
- const b = verts[ 1 ].fromBufferAttribute( posAttr, i3 + 1 );
1349
- const c = verts[ 2 ].fromBufferAttribute( posAttr, i3 + 2 );
1385
+ const qx = ~ ~ ( positions[ i3 + 0 ] * hashMultiplier );
1386
+ const qy = ~ ~ ( positions[ i3 + 1 ] * hashMultiplier );
1387
+ const qz = ~ ~ ( positions[ i3 + 2 ] * hashMultiplier );
1350
1388
 
1351
- tempVec1.subVectors( c, b );
1352
- tempVec2.subVectors( a, b );
1389
+ let slot = ( Math.imul( qx, 73856093 ) ^ Math.imul( qy, 19349663 ) ^ Math.imul( qz, 83492791 ) ) & tableMask;
1353
1390
 
1354
- // add the normal to the map for all vertices
1355
- const normal = new Vector3().crossVectors( tempVec1, tempVec2 ).normalize();
1356
- for ( let n = 0; n < 3; n ++ ) {
1391
+ while ( true ) {
1392
+
1393
+ const id = table[ slot ];
1394
+
1395
+ if ( id === 0 ) {
1396
+
1397
+ const q3 = 3 * uniqueCount;
1398
+ quantized[ q3 + 0 ] = qx;
1399
+ quantized[ q3 + 1 ] = qy;
1400
+ quantized[ q3 + 2 ] = qz;
1401
+
1402
+ table[ slot ] = uniqueCount + 1;
1403
+ vertexIds[ i ] = uniqueCount ++;
1404
+ break;
1405
+
1406
+ }
1407
+
1408
+ const q3 = 3 * ( id - 1 );
1357
1409
 
1358
- const vert = verts[ n ];
1359
- const hash = hashVertex( vert );
1360
- if ( ! ( hash in vertexMap ) ) {
1410
+ if ( quantized[ q3 + 0 ] === qx && quantized[ q3 + 1 ] === qy && quantized[ q3 + 2 ] === qz ) {
1361
1411
 
1362
- vertexMap[ hash ] = [];
1412
+ vertexIds[ i ] = id - 1;
1413
+ break;
1363
1414
 
1364
1415
  }
1365
1416
 
1366
- vertexMap[ hash ].push( normal );
1417
+ slot = ( slot + 1 ) & tableMask;
1367
1418
 
1368
1419
  }
1369
1420
 
1370
1421
  }
1371
1422
 
1372
- // average normals from all vertices that share a common location if they are within the
1373
- // provided crease threshold
1374
- const normalArray = new Float32Array( posAttr.count * 3 );
1375
- const normAttr = new BufferAttribute( normalArray, 3, false );
1376
- for ( let i = 0, l = posAttr.count / 3; i < l; i ++ ) {
1423
+ // bucket the faces surrounding each unique vertex position
1424
+ const bucketOffsets = new Int32Array( uniqueCount + 1 );
1425
+ for ( let i = 0; i < vertexCount; i ++ ) bucketOffsets[ vertexIds[ i ] + 1 ] ++;
1426
+ for ( let i = 0; i < uniqueCount; i ++ ) bucketOffsets[ i + 1 ] += bucketOffsets[ i ];
1377
1427
 
1378
- // get the face normal for this vertex
1379
- const i3 = 3 * i;
1380
- const a = verts[ 0 ].fromBufferAttribute( posAttr, i3 + 0 );
1381
- const b = verts[ 1 ].fromBufferAttribute( posAttr, i3 + 1 );
1382
- const c = verts[ 2 ].fromBufferAttribute( posAttr, i3 + 2 );
1428
+ const bucketFaces = new Int32Array( vertexCount );
1429
+ const bucketCursors = bucketOffsets.slice( 0, uniqueCount );
1430
+ for ( let f = 0; f < faceCount; f ++ ) {
1431
+
1432
+ const f3 = 3 * f;
1433
+ bucketFaces[ bucketCursors[ vertexIds[ f3 + 0 ] ] ++ ] = f;
1434
+ bucketFaces[ bucketCursors[ vertexIds[ f3 + 1 ] ] ++ ] = f;
1435
+ bucketFaces[ bucketCursors[ vertexIds[ f3 + 2 ] ] ++ ] = f;
1383
1436
 
1384
- tempVec1.subVectors( c, b );
1385
- tempVec2.subVectors( a, b );
1437
+ }
1438
+
1439
+ // average the normals of the faces surrounding each vertex if they are within the
1440
+ // provided crease threshold
1441
+ const normalArray = new Float32Array( vertexCount * 3 );
1442
+ for ( let f = 0; f < faceCount; f ++ ) {
1386
1443
 
1387
- tempNorm.crossVectors( tempVec1, tempVec2 ).normalize();
1444
+ const f3 = 3 * f;
1445
+ const nx = faceNormals[ f3 + 0 ];
1446
+ const ny = faceNormals[ f3 + 1 ];
1447
+ const nz = faceNormals[ f3 + 2 ];
1388
1448
 
1389
- // average all normals that meet the threshold and set the normal value
1390
1449
  for ( let n = 0; n < 3; n ++ ) {
1391
1450
 
1392
- const vert = verts[ n ];
1393
- const hash = hashVertex( vert );
1394
- const otherNormals = vertexMap[ hash ];
1395
- tempNorm2.set( 0, 0, 0 );
1451
+ const i = f3 + n;
1452
+ const id = vertexIds[ i ];
1453
+
1454
+ let sumX = 0, sumY = 0, sumZ = 0;
1455
+
1456
+ for ( let k = bucketOffsets[ id ], end = bucketOffsets[ id + 1 ]; k < end; k ++ ) {
1396
1457
 
1397
- for ( let k = 0, lk = otherNormals.length; k < lk; k ++ ) {
1458
+ const o3 = 3 * bucketFaces[ k ];
1459
+ const ox = faceNormals[ o3 + 0 ];
1460
+ const oy = faceNormals[ o3 + 1 ];
1461
+ const oz = faceNormals[ o3 + 2 ];
1398
1462
 
1399
- const otherNorm = otherNormals[ k ];
1400
- if ( tempNorm.dot( otherNorm ) > creaseDot ) {
1463
+ if ( nx * ox + ny * oy + nz * oz > creaseDot ) {
1401
1464
 
1402
- tempNorm2.add( otherNorm );
1465
+ sumX += ox;
1466
+ sumY += oy;
1467
+ sumZ += oz;
1403
1468
 
1404
1469
  }
1405
1470
 
1406
1471
  }
1407
1472
 
1408
- tempNorm2.normalize();
1409
- normAttr.setXYZ( i3 + n, tempNorm2.x, tempNorm2.y, tempNorm2.z );
1473
+ const invLength = 1 / ( Math.sqrt( sumX * sumX + sumY * sumY + sumZ * sumZ ) || 1 );
1474
+ normalArray[ 3 * i + 0 ] = sumX * invLength;
1475
+ normalArray[ 3 * i + 1 ] = sumY * invLength;
1476
+ normalArray[ 3 * i + 2 ] = sumZ * invLength;
1410
1477
 
1411
1478
  }
1412
1479
 
1413
1480
  }
1414
1481
 
1415
- resultGeometry.setAttribute( 'normal', normAttr );
1482
+ resultGeometry.setAttribute( 'normal', new BufferAttribute( normalArray, 3, false ) );
1416
1483
  return resultGeometry;
1417
1484
 
1418
1485
  }
@@ -509,7 +509,7 @@ function quantizedEncodeUV( array, bytes ) {
509
509
 
510
510
  }
511
511
 
512
- decodeMat.scale(
512
+ decodeMat.makeScale(
513
513
  ( max[ 0 ] - min[ 0 ] ) / segments,
514
514
  ( max[ 1 ] - min[ 1 ] ) / segments
515
515
  );
@@ -442,7 +442,7 @@ class SceneOptimizer {
442
442
  */
443
443
  toInstancingMesh() {
444
444
 
445
- throw new Error( 'InstancedMesh optimization not implemented yet' );
445
+ throw new Error( 'THREE.SceneOptimizer: InstancedMesh optimization not implemented yet' );
446
446
 
447
447
  }
448
448
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A utility class for creating a button that allows to initiate
3
3
  * immersive AR sessions based on WebXR. The button can be created
4
- * with a factory method and then appended ot the website's DOM.
4
+ * with a factory method and then appended to the website's DOM.
5
5
  *
6
6
  * ```js
7
7
  * document.body.appendChild( ARButton.createButton( renderer ) );
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Sets up a construction-time WebGL fallback for WebGPU XR examples.
3
+ *
4
+ * @param {WebGPURenderer} renderer - The initial renderer.
5
+ * @param {Function} createFallbackRenderer - A function that returns a new renderer with a WebGL backend.
6
+ * @param {Function} onFallback - A function that installs the new renderer in the app.
7
+ */
8
+ function setupWebGLXRFallback( renderer, createFallbackRenderer, onFallback = () => {} ) {
9
+
10
+ let currentRenderer = renderer;
11
+ const patchedRenderers = new WeakSet();
12
+
13
+ function patchRenderer( renderer ) {
14
+
15
+ if ( patchedRenderers.has( renderer ) ) return;
16
+
17
+ patchedRenderers.add( renderer );
18
+
19
+ const setSession = renderer.xr.setSession.bind( renderer.xr );
20
+
21
+ renderer.xr.setSession = async function ( session ) {
22
+
23
+ if ( renderer !== currentRenderer ) {
24
+
25
+ return currentRenderer.xr.setSession( session );
26
+
27
+ }
28
+
29
+ if ( session !== null && renderer.backend.isWebGPUBackend === true && session.enabledFeatures.includes( 'webgpu' ) === false ) {
30
+
31
+ return switchToFallbackRenderer( session, renderer );
32
+
33
+ }
34
+
35
+ try {
36
+
37
+ return await setSession( session );
38
+
39
+ } catch ( error ) {
40
+
41
+ if ( session === null || renderer.backend.isWebGPUBackend !== true ) {
42
+
43
+ throw error;
44
+
45
+ }
46
+
47
+ return switchToFallbackRenderer( session, renderer );
48
+
49
+ }
50
+
51
+ };
52
+
53
+ }
54
+
55
+ async function switchToFallbackRenderer( session, renderer ) {
56
+
57
+ if ( renderer.initialized === false ) await renderer.init();
58
+
59
+ const fallbackRenderer = createFallbackRenderer( renderer );
60
+
61
+ if ( fallbackRenderer.backend.isWebGLBackend !== true ) {
62
+
63
+ throw new Error( 'THREE.WebGLXRFallback: createFallbackRenderer() must return a renderer with a WebGL backend.' );
64
+
65
+ }
66
+
67
+ const animationLoop = renderer.getAnimationLoop();
68
+
69
+ fallbackRenderer.xr.enabled = renderer.xr.enabled;
70
+ fallbackRenderer.xr.cameraAutoUpdate = renderer.xr.cameraAutoUpdate;
71
+ fallbackRenderer.xr.setFramebufferScaleFactor( renderer.xr.getFramebufferScaleFactor() );
72
+ fallbackRenderer.xr.setReferenceSpaceType( renderer.xr.getReferenceSpaceType() );
73
+
74
+ if ( animationLoop !== null ) await fallbackRenderer.setAnimationLoop( animationLoop );
75
+
76
+ await onFallback( fallbackRenderer, renderer );
77
+
78
+ currentRenderer = fallbackRenderer;
79
+ patchRenderer( fallbackRenderer );
80
+
81
+ return fallbackRenderer.xr.setSession( session );
82
+
83
+ }
84
+
85
+ patchRenderer( renderer );
86
+
87
+ }
88
+
89
+ export { setupWebGLXRFallback };
@@ -353,7 +353,7 @@ class XRControllerModelFactory {
353
353
 
354
354
  if ( ! this.gltfLoader ) {
355
355
 
356
- throw new Error( 'GLTFLoader not set.' );
356
+ throw new Error( 'THREE.XRControllerModelFactory: GLTFLoader not set.' );
357
357
 
358
358
  }
359
359
 
@@ -372,7 +372,7 @@ class XRControllerModelFactory {
372
372
  null,
373
373
  () => {
374
374
 
375
- throw new Error( `Asset ${controllerModel.motionController.assetUrl} missing or malformed.` );
375
+ throw new Error( `THREE.XRControllerModelFactory: Asset ${controllerModel.motionController.assetUrl} missing or malformed.` );
376
376
 
377
377
  } );
378
378
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-three",
3
- "version": "0.184.0",
3
+ "version": "0.185.0",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -28,7 +28,6 @@
28
28
  "files": [
29
29
  "build",
30
30
  "examples/jsm",
31
- "examples/fonts",
32
31
  "LICENSE",
33
32
  "package.json",
34
33
  "README.md",
@@ -60,8 +59,10 @@
60
59
  "lint-utils": "eslint utils",
61
60
  "lint": "npm run lint-core",
62
61
  "lint-fix": "npm run lint-core -- --fix && npm run lint-addons -- --fix && npm run lint-examples -- --fix && npm run lint-editor -- --fix && npm run lint-manual -- --fix && npm run lint-test -- --fix && npm run lint-utils -- --fix",
63
- "test-unit": "qunit test/unit/three.source.unit.js",
64
- "test-unit-addons": "qunit test/unit/three.addons.unit.js",
62
+ "test-unit": "node test/unit/puppeteer.unit.js --testPage=UnitTests.html --mode=headless",
63
+ "test-unit-headful": "node test/unit/puppeteer.unit.js --testPage=UnitTests.html --mode=headful",
64
+ "test-unit-addons": "node test/unit/puppeteer.unit.js --testPage=UnitTestsAddons.html --mode=headless",
65
+ "test-unit-addons-headful": "node test/unit/puppeteer.unit.js --testPage=UnitTestsAddons.html --mode=headful",
65
66
  "test-e2e": "node test/e2e/puppeteer.js",
66
67
  "test-e2e-cov": "node test/e2e/check-coverage.js",
67
68
  "test-e2e-webgpu": "node test/e2e/puppeteer.js --webgpu",
@@ -98,14 +99,13 @@
98
99
  "eslint-config-mdcs": "^5.0.0",
99
100
  "eslint-plugin-compat": "^7.0.0",
100
101
  "eslint-plugin-html": "^8.1.3",
101
- "eslint-plugin-jsdoc": "^62.0.0",
102
+ "eslint-plugin-jsdoc": "^63.0.0",
102
103
  "globals": "^17.0.0",
103
104
  "jpeg-js": "^0.4.4",
104
105
  "jsdoc": "^4.0.5",
105
106
  "magic-string": "^0.30.0",
106
107
  "pngjs": "^7.0.0",
107
- "puppeteer": "^24.40.0",
108
- "qunit": "^2.19.4",
108
+ "puppeteer": "^25.0.0",
109
109
  "rollup": "^4.6.0",
110
110
  "turndown": "^7.2.2"
111
111
  },
package/src/Three.TSL.js CHANGED
@@ -47,6 +47,7 @@ export const addNodeElement = TSL.addNodeElement;
47
47
  export const agxToneMapping = TSL.agxToneMapping;
48
48
  export const all = TSL.all;
49
49
  export const alphaT = TSL.alphaT;
50
+ export const ambientOcclusion = TSL.ambientOcclusion;
50
51
  export const and = TSL.and;
51
52
  export const anisotropy = TSL.anisotropy;
52
53
  export const anisotropyB = TSL.anisotropyB;
@@ -54,7 +55,6 @@ export const anisotropyT = TSL.anisotropyT;
54
55
  export const any = TSL.any;
55
56
  export const append = TSL.append;
56
57
  export const array = TSL.array;
57
- export const arrayBuffer = TSL.arrayBuffer;
58
58
  export const asin = TSL.asin;
59
59
  export const asinh = TSL.asinh;
60
60
  export const assign = TSL.assign;
@@ -177,6 +177,7 @@ export const dynamicBufferAttribute = TSL.dynamicBufferAttribute;
177
177
  export const element = TSL.element;
178
178
  export const emissive = TSL.emissive;
179
179
  export const equal = TSL.equal;
180
+ export const equirectDirection = TSL.equirectDirection;
180
181
  export const equirectUV = TSL.equirectUV;
181
182
  export const exp = TSL.exp;
182
183
  export const exp2 = TSL.exp2;
@@ -320,7 +321,6 @@ export const min = TSL.min;
320
321
  export const mix = TSL.mix;
321
322
  export const mixElement = TSL.mixElement;
322
323
  export const mod = TSL.mod;
323
- export const modInt = TSL.modInt;
324
324
  export const modelDirection = TSL.modelDirection;
325
325
  export const modelNormalMatrix = TSL.modelNormalMatrix;
326
326
  export const modelPosition = TSL.modelPosition;
@@ -378,6 +378,7 @@ export const mx_worley_noise_float = TSL.mx_worley_noise_float;
378
378
  export const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
379
379
  export const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
380
380
  export const negate = TSL.negate;
381
+ export const negateOnBackSide = TSL.negateOnBackSide;
381
382
  export const neutralToneMapping = TSL.neutralToneMapping;
382
383
  export const nodeArray = TSL.nodeArray;
383
384
  export const nodeImmutable = TSL.nodeImmutable;
@@ -419,9 +420,12 @@ export const oscTriangle = TSL.oscTriangle;
419
420
  export const output = TSL.output;
420
421
  export const outputStruct = TSL.outputStruct;
421
422
  export const overloadingFn = TSL.overloadingFn;
423
+ export const overrideNode = TSL.overrideNode;
424
+ export const overrideNodes = TSL.overrideNodes;
422
425
  export const packHalf2x16 = TSL.packHalf2x16;
423
426
  export const packSnorm2x16 = TSL.packSnorm2x16;
424
427
  export const packUnorm2x16 = TSL.packUnorm2x16;
428
+ export const packNormalToRGB = TSL.packNormalToRGB;
425
429
  export const parabola = TSL.parabola;
426
430
  export const parallaxDirection = TSL.parallaxDirection;
427
431
  export const parallaxUV = TSL.parallaxUV;
@@ -519,7 +523,7 @@ export const stepElement = TSL.stepElement;
519
523
  export const storage = TSL.storage;
520
524
  export const storageBarrier = TSL.storageBarrier;
521
525
  export const storageTexture = TSL.storageTexture;
522
- export const string = TSL.string;
526
+ export const storageTexture3D = TSL.storageTexture3D;
523
527
  export const struct = TSL.struct;
524
528
  export const sub = TSL.sub;
525
529
  export const subgroupAdd = TSL.subgroupAdd;
@@ -569,6 +573,8 @@ export const toneMappingExposure = TSL.toneMappingExposure;
569
573
  export const toonOutlinePass = TSL.toonOutlinePass;
570
574
  export const transformDirection = TSL.transformDirection;
571
575
  export const transformNormal = TSL.transformNormal;
576
+ export const transformNormalByInverseViewMatrix = TSL.transformNormalByInverseViewMatrix;
577
+ export const transformNormalByViewMatrix = TSL.transformNormalByViewMatrix;
572
578
  export const transformNormalToView = TSL.transformNormalToView;
573
579
  export const transformedClearcoatNormalView = TSL.transformedClearcoatNormalView;
574
580
  export const transformedNormalView = TSL.transformedNormalView;
@@ -590,6 +596,7 @@ export const uniformTexture = TSL.uniformTexture;
590
596
  export const unpackHalf2x16 = TSL.unpackHalf2x16;
591
597
  export const unpackSnorm2x16 = TSL.unpackSnorm2x16;
592
598
  export const unpackUnorm2x16 = TSL.unpackUnorm2x16;
599
+ export const unpackRGBToNormal = TSL.unpackRGBToNormal;
593
600
  export const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
594
601
  export const userData = TSL.userData;
595
602
  export const uv = TSL.uv;
@@ -4,6 +4,8 @@ export * from './materials/nodes/NodeMaterials.js';
4
4
  export { default as WebGPURenderer } from './renderers/webgpu/WebGPURenderer.js';
5
5
  export { default as WebGPUBackend } from './renderers/webgpu/WebGPUBackend.js';
6
6
  export { default as WebGLBackend } from './renderers/webgl-fallback/WebGLBackend.js';
7
+ export { default as Renderer } from './renderers/common/Renderer.js';
8
+ export { default as Backend } from './renderers/common/Backend.js';
7
9
  export { default as WebGLCapabilities } from './renderers/webgl-fallback/utils/WebGLCapabilities.js';
8
10
  export { default as Lighting } from './renderers/common/Lighting.js';
9
11
  export { default as BundleGroup } from './renderers/common/BundleGroup.js';
@@ -31,6 +33,8 @@ export { default as CanvasTarget } from './renderers/common/CanvasTarget.js';
31
33
  export { default as BlendMode } from './renderers/common/BlendMode.js';
32
34
  export { default as GLSLNodeBuilder } from './renderers/webgl-fallback/nodes/GLSLNodeBuilder.js';
33
35
  export { default as BasicNodeLibrary } from './renderers/webgpu/nodes/BasicNodeLibrary.js';
36
+ export { default as StandardNodeLibrary } from './renderers/webgpu/nodes/StandardNodeLibrary.js';
37
+ export { default as WGSLNodeBuilder } from './renderers/webgpu/nodes/WGSLNodeBuilder.js';
34
38
  export { ClippingGroup } from './objects/ClippingGroup.js';
35
39
  export * from './nodes/Nodes.js';
36
40
  import * as TSL from './nodes/TSL.js';
@@ -41,15 +41,6 @@ class AnimationAction {
41
41
 
42
42
  const interpolant = tracks[ i ].createInterpolant( null );
43
43
  interpolants[ i ] = interpolant;
44
-
45
- // preserve interpolant settings (like tangent data from BezierInterpolant)
46
-
47
- if ( interpolant.settings ) {
48
-
49
- Object.assign( interpolantSettings, interpolant.settings );
50
-
51
- }
52
-
53
44
  interpolant.settings = interpolantSettings;
54
45
 
55
46
  }
@@ -65,6 +56,7 @@ class AnimationAction {
65
56
  this._byClipCacheIndex = null; // for the memory manager
66
57
 
67
58
  this._timeScaleInterpolant = null;
59
+ this._restoreTimeScale = null;
68
60
  this._weightInterpolant = null;
69
61
 
70
62
  /**
@@ -352,6 +344,10 @@ class AnimationAction {
352
344
  startEndRatio = fadeOutDuration / fadeInDuration,
353
345
  endStartRatio = fadeInDuration / fadeOutDuration;
354
346
 
347
+
348
+ fadeOutAction._restoreTimeScale = fadeOutAction.timeScale;
349
+ this._restoreTimeScale = this.timeScale;
350
+
355
351
  fadeOutAction.warp( 1.0, startEndRatio, duration );
356
352
  this.warp( endStartRatio, 1.0, duration );
357
353
 
@@ -520,6 +516,8 @@ class AnimationAction {
520
516
 
521
517
  }
522
518
 
519
+ this._restoreTimeScale = null;
520
+
523
521
  return this;
524
522
 
525
523
  }
@@ -692,8 +690,6 @@ class AnimationAction {
692
690
 
693
691
  if ( time > interpolant.parameterPositions[ 1 ] ) {
694
692
 
695
- this.stopWarping();
696
-
697
693
  if ( timeScale === 0 ) {
698
694
 
699
695
  // motion has halted, pause
@@ -701,11 +697,19 @@ class AnimationAction {
701
697
 
702
698
  } else {
703
699
 
700
+ if ( this._restoreTimeScale !== null ) {
701
+
702
+ timeScale = this._restoreTimeScale;
703
+
704
+ }
705
+
704
706
  // warp done - apply final time scale
705
707
  this.timeScale = timeScale;
706
708
 
707
709
  }
708
710
 
711
+ this.stopWarping();
712
+
709
713
  }
710
714
 
711
715
  }