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
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createBindGroup()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUBindGroupDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the bind group.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The bind group layout the bind group conforms to.
19
+ *
20
+ * @type {?GPUBindGroupLayout}
21
+ * @default null
22
+ */
23
+ this.layout = null;
24
+
25
+ /**
26
+ * The bind group entries.
27
+ *
28
+ * @type {Array<Object>}
29
+ */
30
+ this.entries = [];
31
+
32
+ }
33
+
34
+ /**
35
+ * Resets the descriptor to its default state. The internal `entries` array
36
+ * is emptied without releasing its backing storage.
37
+ */
38
+ reset() {
39
+
40
+ this.label = '';
41
+ this.layout = null;
42
+ this.entries.length = 0;
43
+
44
+ }
45
+
46
+ }
47
+
48
+ export default GPUBindGroupDescriptor;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createBuffer()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUBufferDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the buffer.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The size of the buffer in bytes.
19
+ *
20
+ * @type {number}
21
+ * @default 0
22
+ */
23
+ this.size = 0;
24
+
25
+ /**
26
+ * The allowed usages for the buffer.
27
+ *
28
+ * @type {number}
29
+ * @default 0
30
+ */
31
+ this.usage = 0;
32
+
33
+ /**
34
+ * Whether the buffer is in the mapped state at creation.
35
+ *
36
+ * @type {boolean}
37
+ * @default false
38
+ */
39
+ this.mappedAtCreation = false;
40
+
41
+ }
42
+
43
+ /**
44
+ * Resets the descriptor to its default state.
45
+ */
46
+ reset() {
47
+
48
+ this.label = '';
49
+ this.size = 0;
50
+ this.usage = 0;
51
+ this.mappedAtCreation = false;
52
+
53
+ }
54
+
55
+ }
56
+
57
+ export default GPUBufferDescriptor;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createCommandEncoder()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUCommandEncoderDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the command encoder.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ }
18
+
19
+ /**
20
+ * Resets the descriptor to its default state.
21
+ */
22
+ reset() {
23
+
24
+ this.label = '';
25
+
26
+ }
27
+
28
+ }
29
+
30
+ export default GPUCommandEncoderDescriptor;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Reusable descriptor for `GPUCommandEncoder.beginComputePass()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUComputePassDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the compute pass.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * Defines which timestamp values are written and where.
19
+ *
20
+ * @type {Object|undefined}
21
+ */
22
+ this.timestampWrites = undefined;
23
+
24
+ }
25
+
26
+ /**
27
+ * Resets the descriptor to its default state.
28
+ */
29
+ reset() {
30
+
31
+ this.label = '';
32
+ this.timestampWrites = undefined;
33
+
34
+ }
35
+
36
+ }
37
+
38
+ export default GPUComputePassDescriptor;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createComputePipeline()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUComputePipelineDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the compute pipeline.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The pipeline layout the pipeline conforms to, or `'auto'`.
19
+ *
20
+ * @type {?GPUPipelineLayout|string}
21
+ * @default null
22
+ */
23
+ this.layout = null;
24
+
25
+ /**
26
+ * The programmable compute stage.
27
+ *
28
+ * @type {?Object}
29
+ * @default null
30
+ */
31
+ this.compute = null;
32
+
33
+ }
34
+
35
+ /**
36
+ * Resets the descriptor to its default state.
37
+ */
38
+ reset() {
39
+
40
+ this.label = '';
41
+ this.layout = null;
42
+ this.compute = null;
43
+
44
+ }
45
+
46
+ }
47
+
48
+ export default GPUComputePipelineDescriptor;
@@ -0,0 +1,47 @@
1
+ import GPUTexelCopyTextureInfo from './GPUTexelCopyTextureInfo.js';
2
+
3
+ /**
4
+ * Reusable descriptor for `GPUCopyExternalImageDestInfo`, the destination
5
+ * argument to `GPUQueue.copyExternalImageToTexture()`.
6
+ *
7
+ * @private
8
+ * @augments GPUTexelCopyTextureInfo
9
+ */
10
+ class GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
11
+
12
+ constructor() {
13
+
14
+ super();
15
+
16
+ /**
17
+ * The predefined color space the destination texture is interpreted in.
18
+ *
19
+ * @type {string}
20
+ * @default 'srgb'
21
+ */
22
+ this.colorSpace = 'srgb';
23
+
24
+ /**
25
+ * Whether the destination texture has premultiplied alpha.
26
+ *
27
+ * @type {boolean}
28
+ * @default false
29
+ */
30
+ this.premultipliedAlpha = false;
31
+
32
+ }
33
+
34
+ /**
35
+ * Resets the descriptor to its default state.
36
+ */
37
+ reset() {
38
+
39
+ super.reset();
40
+ this.colorSpace = 'srgb';
41
+ this.premultipliedAlpha = false;
42
+
43
+ }
44
+
45
+ }
46
+
47
+ export default GPUCopyExternalImageDestInfo;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Reusable descriptor for `GPUCopyExternalImageSourceInfo`, the source argument
3
+ * to `GPUQueue.copyExternalImageToTexture()`.
4
+ *
5
+ * @private
6
+ */
7
+ class GPUCopyExternalImageSourceInfo {
8
+
9
+ constructor() {
10
+
11
+ /**
12
+ * The image-like source.
13
+ *
14
+ * @type {?(ImageBitmap|ImageData|HTMLImageElement|HTMLVideoElement|VideoFrame|HTMLCanvasElement|OffscreenCanvas)}
15
+ * @default null
16
+ */
17
+ this.source = null;
18
+
19
+ /**
20
+ * The origin offset within the source.
21
+ *
22
+ * @type {{x: number, y: number}}
23
+ */
24
+ this.origin = { x: 0, y: 0 };
25
+
26
+ /**
27
+ * Whether the source is flipped vertically before copying.
28
+ *
29
+ * @type {boolean}
30
+ * @default false
31
+ */
32
+ this.flipY = false;
33
+
34
+ }
35
+
36
+ /**
37
+ * Resets the descriptor to its default state.
38
+ */
39
+ reset() {
40
+
41
+ this.source = null;
42
+ this.origin.x = 0;
43
+ this.origin.y = 0;
44
+ this.flipY = false;
45
+
46
+ }
47
+
48
+ }
49
+
50
+ export default GPUCopyExternalImageSourceInfo;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Reusable descriptor for `GPUExtent3D` in its dictionary form, used by
3
+ * `GPUQueue.writeTexture()`, `GPUQueue.copyExternalImageToTexture()` and
4
+ * the various `GPUCommandEncoder` copy methods.
5
+ *
6
+ * @private
7
+ */
8
+ class GPUExtent3D {
9
+
10
+ constructor() {
11
+
12
+ /**
13
+ * The width of the extent.
14
+ *
15
+ * @type {number}
16
+ * @default 0
17
+ */
18
+ this.width = 0;
19
+
20
+ /**
21
+ * The height of the extent.
22
+ *
23
+ * @type {number}
24
+ * @default 1
25
+ */
26
+ this.height = 1;
27
+
28
+ /**
29
+ * The depth (for 3D textures) or number of array layers.
30
+ *
31
+ * @type {number}
32
+ * @default 1
33
+ */
34
+ this.depthOrArrayLayers = 1;
35
+
36
+ }
37
+
38
+ /**
39
+ * Resets the descriptor to its default state.
40
+ */
41
+ reset() {
42
+
43
+ this.width = 0;
44
+ this.height = 1;
45
+ this.depthOrArrayLayers = 1;
46
+
47
+ }
48
+
49
+ }
50
+
51
+ export default GPUExtent3D;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createPipelineLayout()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUPipelineLayoutDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the pipeline layout.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The set of bind group layouts the pipeline layout describes.
19
+ *
20
+ * @type {?Array<?GPUBindGroupLayout>}
21
+ * @default null
22
+ */
23
+ this.bindGroupLayouts = null;
24
+
25
+ }
26
+
27
+ /**
28
+ * Resets the descriptor to its default state.
29
+ */
30
+ reset() {
31
+
32
+ this.label = '';
33
+ this.bindGroupLayouts = null;
34
+
35
+ }
36
+
37
+ }
38
+
39
+ export default GPUPipelineLayoutDescriptor;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createQuerySet()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPUQuerySetDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the query set.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The type of queries managed by the set.
19
+ *
20
+ * @type {string|undefined}
21
+ */
22
+ this.type = undefined;
23
+
24
+ /**
25
+ * The number of queries managed by the set.
26
+ *
27
+ * @type {number}
28
+ * @default 0
29
+ */
30
+ this.count = 0;
31
+
32
+ }
33
+
34
+ /**
35
+ * Resets the descriptor to its default state.
36
+ */
37
+ reset() {
38
+
39
+ this.label = '';
40
+ this.type = undefined;
41
+ this.count = 0;
42
+
43
+ }
44
+
45
+ }
46
+
47
+ export default GPUQuerySetDescriptor;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Reusable descriptor for `GPUDevice.createRenderBundleEncoder()`.
3
+ *
4
+ * @private
5
+ */
6
+ class GPURenderBundleEncoderDescriptor {
7
+
8
+ constructor() {
9
+
10
+ /**
11
+ * The label of the render bundle encoder.
12
+ *
13
+ * @type {string}
14
+ */
15
+ this.label = '';
16
+
17
+ /**
18
+ * The formats of the color attachments the bundle is compatible with.
19
+ *
20
+ * @type {?Array<?string>}
21
+ * @default null
22
+ */
23
+ this.colorFormats = null;
24
+
25
+ /**
26
+ * The format of the depth/stencil attachment the bundle is compatible with.
27
+ *
28
+ * @type {string|undefined}
29
+ */
30
+ this.depthStencilFormat = undefined;
31
+
32
+ /**
33
+ * The number of samples per pixel the bundle is compatible with.
34
+ *
35
+ * @type {number}
36
+ * @default 1
37
+ */
38
+ this.sampleCount = 1;
39
+
40
+ /**
41
+ * Whether the depth attachment is read-only.
42
+ *
43
+ * @type {boolean}
44
+ * @default false
45
+ */
46
+ this.depthReadOnly = false;
47
+
48
+ /**
49
+ * Whether the stencil attachment is read-only.
50
+ *
51
+ * @type {boolean}
52
+ * @default false
53
+ */
54
+ this.stencilReadOnly = false;
55
+
56
+ }
57
+
58
+ /**
59
+ * Resets the descriptor to its default state.
60
+ */
61
+ reset() {
62
+
63
+ this.label = '';
64
+ this.colorFormats = null;
65
+ this.depthStencilFormat = undefined;
66
+ this.sampleCount = 1;
67
+ this.depthReadOnly = false;
68
+ this.stencilReadOnly = false;
69
+
70
+ }
71
+
72
+ }
73
+
74
+ export default GPURenderBundleEncoderDescriptor;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Reusable descriptor for `GPURenderPassColorAttachment`, the type of each
3
+ * entry in `GPURenderPassDescriptor.colorAttachments`.
4
+ *
5
+ * @private
6
+ */
7
+ class GPURenderPassColorAttachment {
8
+
9
+ constructor() {
10
+
11
+ /**
12
+ * The texture view the pass renders into.
13
+ *
14
+ * @type {?GPUTextureView}
15
+ * @default null
16
+ */
17
+ this.view = null;
18
+
19
+ /**
20
+ * The depth slice the pass renders into.
21
+ *
22
+ * @type {number|undefined}
23
+ */
24
+ this.depthSlice = undefined;
25
+
26
+ /**
27
+ * The texture view that receives the resolved output of multisampled rendering.
28
+ *
29
+ * @type {?GPUTextureView|undefined}
30
+ */
31
+ this.resolveTarget = undefined;
32
+
33
+ /**
34
+ * The clear value used when `loadOp` is `'clear'`.
35
+ *
36
+ * @type {Object|undefined}
37
+ */
38
+ this.clearValue = undefined;
39
+
40
+ /**
41
+ * The load operation performed at the start of the pass.
42
+ *
43
+ * @type {string|undefined}
44
+ */
45
+ this.loadOp = undefined;
46
+
47
+ /**
48
+ * The store operation performed at the end of the pass.
49
+ *
50
+ * @type {string|undefined}
51
+ */
52
+ this.storeOp = undefined;
53
+
54
+ }
55
+
56
+ /**
57
+ * Resets the descriptor to its default state.
58
+ */
59
+ reset() {
60
+
61
+ this.view = null;
62
+ this.depthSlice = undefined;
63
+ this.resolveTarget = undefined;
64
+ this.clearValue = undefined;
65
+ this.loadOp = undefined;
66
+ this.storeOp = undefined;
67
+
68
+ }
69
+
70
+ }
71
+
72
+ export default GPURenderPassColorAttachment;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Reusable descriptor for `GPURenderPassDepthStencilAttachment`, the
3
+ * `depthStencilAttachment` field of `GPURenderPassDescriptor`.
4
+ *
5
+ * @private
6
+ */
7
+ class GPURenderPassDepthStencilAttachment {
8
+
9
+ constructor() {
10
+
11
+ /**
12
+ * The depth/stencil texture view the pass renders into.
13
+ *
14
+ * @type {?GPUTextureView}
15
+ * @default null
16
+ */
17
+ this.view = null;
18
+
19
+ /**
20
+ * The load operation applied to the depth aspect at the start of the pass.
21
+ *
22
+ * @type {string|undefined}
23
+ */
24
+ this.depthLoadOp = undefined;
25
+
26
+ /**
27
+ * The store operation applied to the depth aspect at the end of the pass.
28
+ *
29
+ * @type {string|undefined}
30
+ */
31
+ this.depthStoreOp = undefined;
32
+
33
+ /**
34
+ * The clear value used when `depthLoadOp` is `'clear'`.
35
+ *
36
+ * @type {number|undefined}
37
+ */
38
+ this.depthClearValue = undefined;
39
+
40
+ /**
41
+ * Whether the depth aspect is read-only.
42
+ *
43
+ * @type {boolean}
44
+ * @default false
45
+ */
46
+ this.depthReadOnly = false;
47
+
48
+ /**
49
+ * The load operation applied to the stencil aspect at the start of the pass.
50
+ *
51
+ * @type {string|undefined}
52
+ */
53
+ this.stencilLoadOp = undefined;
54
+
55
+ /**
56
+ * The store operation applied to the stencil aspect at the end of the pass.
57
+ *
58
+ * @type {string|undefined}
59
+ */
60
+ this.stencilStoreOp = undefined;
61
+
62
+ /**
63
+ * The clear value used when `stencilLoadOp` is `'clear'`.
64
+ *
65
+ * @type {number}
66
+ * @default 0
67
+ */
68
+ this.stencilClearValue = 0;
69
+
70
+ /**
71
+ * Whether the stencil aspect is read-only.
72
+ *
73
+ * @type {boolean}
74
+ * @default false
75
+ */
76
+ this.stencilReadOnly = false;
77
+
78
+ }
79
+
80
+ /**
81
+ * Resets the descriptor to its default state.
82
+ */
83
+ reset() {
84
+
85
+ this.view = null;
86
+ this.depthLoadOp = undefined;
87
+ this.depthStoreOp = undefined;
88
+ this.depthClearValue = undefined;
89
+ this.depthReadOnly = false;
90
+ this.stencilLoadOp = undefined;
91
+ this.stencilStoreOp = undefined;
92
+ this.stencilClearValue = 0;
93
+ this.stencilReadOnly = false;
94
+
95
+ }
96
+
97
+ }
98
+
99
+ export default GPURenderPassDepthStencilAttachment;