three-stdlib 2.22.9 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (630) hide show
  1. package/dist/animation/AnimationClipCreator.js +49 -50
  2. package/dist/animation/AnimationClipCreator.mjs +49 -50
  3. package/dist/animation/CCDIKSolver.d.ts +9 -4
  4. package/dist/animation/CCDIKSolver.js +193 -148
  5. package/dist/animation/CCDIKSolver.mjs +194 -149
  6. package/dist/animation/MMDAnimationHelper.js +613 -515
  7. package/dist/animation/MMDAnimationHelper.mjs +613 -515
  8. package/dist/animation/MMDPhysics.d.ts +6 -1
  9. package/dist/animation/MMDPhysics.js +728 -718
  10. package/dist/animation/MMDPhysics.mjs +729 -719
  11. package/dist/cameras/CinematicCamera.d.ts +2 -2
  12. package/dist/controls/ArcballControls.d.ts +1 -1
  13. package/dist/controls/ArcballControls.js +38 -44
  14. package/dist/controls/ArcballControls.mjs +39 -45
  15. package/dist/controls/DeviceOrientationControls.js +2 -1
  16. package/dist/controls/DeviceOrientationControls.mjs +2 -1
  17. package/dist/controls/FirstPersonControls.d.ts +1 -1
  18. package/dist/controls/FirstPersonControls.js +1 -1
  19. package/dist/controls/FirstPersonControls.mjs +1 -1
  20. package/dist/controls/PointerLockControls.js +2 -2
  21. package/dist/controls/PointerLockControls.mjs +2 -2
  22. package/dist/controls/TrackballControls.d.ts +2 -2
  23. package/dist/controls/TransformControls.d.ts +1 -1
  24. package/dist/controls/experimental/CameraControls.d.ts +1 -1
  25. package/dist/csm/CSM.js +4 -4
  26. package/dist/csm/CSM.mjs +4 -4
  27. package/dist/csm/CSMFrustum.js +1 -1
  28. package/dist/csm/CSMFrustum.mjs +1 -1
  29. package/dist/csm/CSMShader.js +14 -10
  30. package/dist/csm/CSMShader.mjs +14 -10
  31. package/dist/curves/CurveExtras.js +52 -62
  32. package/dist/curves/CurveExtras.mjs +53 -63
  33. package/dist/curves/NURBSUtils.d.ts +18 -20
  34. package/dist/curves/NURBSUtils.js +17 -17
  35. package/dist/curves/NURBSUtils.mjs +17 -17
  36. package/dist/deprecated/Geometry.js +26 -26
  37. package/dist/deprecated/Geometry.mjs +27 -27
  38. package/dist/effects/AnaglyphEffect.js +95 -114
  39. package/dist/effects/AnaglyphEffect.mjs +95 -114
  40. package/dist/effects/AsciiEffect.js +144 -162
  41. package/dist/effects/AsciiEffect.mjs +144 -162
  42. package/dist/effects/OutlineEffect.js +253 -276
  43. package/dist/effects/OutlineEffect.mjs +253 -276
  44. package/dist/effects/ParallaxBarrierEffect.js +61 -60
  45. package/dist/effects/ParallaxBarrierEffect.mjs +61 -60
  46. package/dist/effects/PeppersGhostEffect.js +84 -81
  47. package/dist/effects/PeppersGhostEffect.mjs +84 -81
  48. package/dist/effects/StereoEffect.js +31 -28
  49. package/dist/effects/StereoEffect.mjs +31 -28
  50. package/dist/environments/RoomEnvironment.d.ts +6 -5
  51. package/dist/exporters/GLTFExporter.d.ts +109 -441
  52. package/dist/exporters/GLTFExporter.js +915 -581
  53. package/dist/exporters/GLTFExporter.mjs +915 -581
  54. package/dist/geometries/ConvexGeometry.js +0 -3
  55. package/dist/geometries/ConvexGeometry.mjs +0 -3
  56. package/dist/geometries/LightningStrike.d.ts +3 -3
  57. package/dist/geometries/LightningStrike.js +80 -75
  58. package/dist/geometries/LightningStrike.mjs +80 -75
  59. package/dist/geometries/ParametricGeometries.js +75 -74
  60. package/dist/geometries/ParametricGeometries.mjs +75 -74
  61. package/dist/geometries/RoundedBoxGeometry.js +1 -1
  62. package/dist/geometries/RoundedBoxGeometry.mjs +1 -1
  63. package/dist/geometries/TextGeometry.d.ts +1 -1
  64. package/dist/helpers/RectAreaLightHelper.d.ts +4 -3
  65. package/dist/helpers/RectAreaLightHelper.js +2 -2
  66. package/dist/helpers/RectAreaLightHelper.mjs +2 -2
  67. package/dist/helpers/VertexNormalsHelper.d.ts +3 -0
  68. package/dist/helpers/VertexNormalsHelper.js +15 -22
  69. package/dist/helpers/VertexNormalsHelper.mjs +16 -23
  70. package/dist/helpers/VertexTangentsHelper.d.ts +3 -0
  71. package/dist/helpers/VertexTangentsHelper.js +12 -14
  72. package/dist/helpers/VertexTangentsHelper.mjs +12 -14
  73. package/dist/index.d.ts +1 -66
  74. package/dist/index.js +5 -370
  75. package/dist/index.mjs +9 -374
  76. package/dist/interactive/InteractiveGroup.js +1 -1
  77. package/dist/interactive/InteractiveGroup.mjs +1 -1
  78. package/dist/interactive/SelectionBox.js +122 -125
  79. package/dist/interactive/SelectionBox.mjs +122 -125
  80. package/dist/interactive/SelectionHelper.js +45 -48
  81. package/dist/interactive/SelectionHelper.mjs +45 -48
  82. package/dist/libs/MeshoptDecoder.d.ts +1 -1
  83. package/dist/libs/MotionControllers.d.ts +15 -14
  84. package/dist/libs/MotionControllers.js +10 -10
  85. package/dist/libs/MotionControllers.mjs +10 -10
  86. package/dist/lights/LightProbeGenerator.js +43 -43
  87. package/dist/lights/LightProbeGenerator.mjs +43 -43
  88. package/dist/lights/RectAreaLightUniformsLib.js +9 -5
  89. package/dist/lights/RectAreaLightUniformsLib.mjs +9 -5
  90. package/dist/lines/LineMaterial.js +271 -271
  91. package/dist/lines/LineMaterial.mjs +272 -272
  92. package/dist/lines/LineSegments2.js +12 -12
  93. package/dist/lines/LineSegments2.mjs +12 -12
  94. package/dist/lines/LineSegmentsGeometry.js +2 -2
  95. package/dist/lines/LineSegmentsGeometry.mjs +2 -2
  96. package/dist/lines/Wireframe.js +2 -2
  97. package/dist/lines/Wireframe.mjs +2 -2
  98. package/dist/loaders/3DMLoader.d.ts +2 -1
  99. package/dist/loaders/3MFLoader.d.ts +2 -1
  100. package/dist/loaders/AMFLoader.d.ts +2 -1
  101. package/dist/loaders/AssimpLoader.d.ts +20 -0
  102. package/dist/loaders/AssimpLoader.js +520 -482
  103. package/dist/loaders/AssimpLoader.mjs +520 -482
  104. package/dist/loaders/BVHLoader.d.ts +2 -1
  105. package/dist/loaders/BasisTextureLoader.d.ts +2 -1
  106. package/dist/loaders/BasisTextureLoader.js +23 -14
  107. package/dist/loaders/BasisTextureLoader.mjs +24 -15
  108. package/dist/loaders/ColladaLoader.d.ts +2 -1
  109. package/dist/loaders/DRACOLoader.d.ts +2 -1
  110. package/dist/loaders/FBXLoader.d.ts +2 -1
  111. package/dist/loaders/FBXLoader.js +2 -2
  112. package/dist/loaders/FBXLoader.mjs +2 -2
  113. package/dist/loaders/FontLoader.d.ts +4 -4
  114. package/dist/loaders/FontLoader.js +2 -1
  115. package/dist/loaders/FontLoader.mjs +2 -1
  116. package/dist/loaders/GCodeLoader.d.ts +2 -1
  117. package/dist/loaders/GLTFLoader.d.ts +11 -9
  118. package/dist/loaders/GLTFLoader.js +2 -2
  119. package/dist/loaders/GLTFLoader.mjs +2 -2
  120. package/dist/loaders/HDRCubeTextureLoader.d.ts +2 -1
  121. package/dist/loaders/KMZLoader.d.ts +2 -1
  122. package/dist/loaders/KTX2Loader.js +34 -15
  123. package/dist/loaders/KTX2Loader.mjs +35 -16
  124. package/dist/loaders/LDrawLoader.d.ts +2 -1
  125. package/dist/loaders/LDrawLoader.js +3 -3
  126. package/dist/loaders/LDrawLoader.mjs +3 -3
  127. package/dist/loaders/LUT3dlLoader.d.ts +3 -2
  128. package/dist/loaders/LUTCubeLoader.d.ts +3 -2
  129. package/dist/loaders/LWOLoader.d.ts +2 -1
  130. package/dist/loaders/LottieLoader.d.ts +2 -1
  131. package/dist/loaders/MD2Loader.d.ts +2 -1
  132. package/dist/loaders/MDDLoader.d.ts +2 -1
  133. package/dist/loaders/MMDLoader.d.ts +2 -1
  134. package/dist/loaders/MTLLoader.d.ts +2 -1
  135. package/dist/loaders/OBJLoader.d.ts +2 -1
  136. package/dist/loaders/OBJLoader.js +5 -5
  137. package/dist/loaders/OBJLoader.mjs +5 -5
  138. package/dist/loaders/PCDLoader.d.ts +2 -1
  139. package/dist/loaders/PDBLoader.d.ts +2 -1
  140. package/dist/loaders/PLYLoader.d.ts +2 -1
  141. package/dist/loaders/PRWMLoader.d.ts +2 -1
  142. package/dist/loaders/RGBMLoader.js +924 -918
  143. package/dist/loaders/RGBMLoader.mjs +924 -918
  144. package/dist/loaders/STLLoader.d.ts +2 -1
  145. package/dist/loaders/SVGLoader.d.ts +2 -1
  146. package/dist/loaders/TDSLoader.d.ts +2 -1
  147. package/dist/loaders/TTFLoader.d.ts +2 -1
  148. package/dist/loaders/TiltLoader.d.ts +2 -1
  149. package/dist/loaders/TiltLoader.js +3 -1
  150. package/dist/loaders/TiltLoader.mjs +3 -1
  151. package/dist/loaders/VOXLoader.d.ts +4 -2
  152. package/dist/loaders/VRMLLoader.d.ts +2 -1
  153. package/dist/loaders/VRMLoader.d.ts +20 -0
  154. package/dist/loaders/VTKLoader.d.ts +2 -1
  155. package/dist/loaders/XLoader.d.ts +20 -0
  156. package/dist/loaders/XLoader.js +1 -1
  157. package/dist/loaders/XLoader.mjs +1 -1
  158. package/dist/loaders/XYZLoader.d.ts +2 -1
  159. package/dist/loaders/lwo/IFFParser.js +104 -110
  160. package/dist/loaders/lwo/IFFParser.mjs +104 -110
  161. package/dist/loaders/lwo/LWO2Parser.js +18 -33
  162. package/dist/loaders/lwo/LWO2Parser.mjs +18 -33
  163. package/dist/loaders/lwo/LWO3Parser.js +17 -33
  164. package/dist/loaders/lwo/LWO3Parser.mjs +17 -33
  165. package/dist/math/Capsule.d.ts +1 -1
  166. package/dist/math/Capsule.js +90 -92
  167. package/dist/math/Capsule.mjs +90 -92
  168. package/dist/math/ColorConverter.js +26 -36
  169. package/dist/math/ColorConverter.mjs +26 -36
  170. package/dist/math/ConvexHull.js +16 -17
  171. package/dist/math/ConvexHull.mjs +17 -18
  172. package/dist/math/ImprovedNoise.js +41 -39
  173. package/dist/math/ImprovedNoise.mjs +41 -39
  174. package/dist/math/Lut.js +65 -63
  175. package/dist/math/Lut.mjs +66 -64
  176. package/dist/math/MeshSurfaceSampler.d.ts +3 -0
  177. package/dist/math/MeshSurfaceSampler.js +85 -89
  178. package/dist/math/MeshSurfaceSampler.mjs +85 -89
  179. package/dist/math/OBB.js +68 -88
  180. package/dist/math/OBB.mjs +68 -88
  181. package/dist/math/Octree.js +240 -245
  182. package/dist/math/Octree.mjs +240 -245
  183. package/dist/misc/ConvexObjectBreaker.js +114 -120
  184. package/dist/misc/ConvexObjectBreaker.mjs +115 -121
  185. package/dist/misc/GPUComputationRenderer.d.ts +1 -0
  186. package/dist/misc/GPUComputationRenderer.js +191 -157
  187. package/dist/misc/GPUComputationRenderer.mjs +192 -158
  188. package/dist/misc/Gyroscope.js +16 -18
  189. package/dist/misc/Gyroscope.mjs +17 -19
  190. package/dist/misc/MD2Character.js +88 -86
  191. package/dist/misc/MD2Character.mjs +89 -87
  192. package/dist/misc/MD2CharacterComplex.js +106 -105
  193. package/dist/misc/MD2CharacterComplex.mjs +107 -106
  194. package/dist/misc/MorphAnimMesh.d.ts +1 -1
  195. package/dist/misc/MorphAnimMesh.js +33 -33
  196. package/dist/misc/MorphAnimMesh.mjs +33 -33
  197. package/dist/misc/MorphBlendMesh.js +68 -68
  198. package/dist/misc/MorphBlendMesh.mjs +68 -68
  199. package/dist/misc/ProgressiveLightmap.d.ts +1 -2
  200. package/dist/misc/RollerCoaster.js +321 -314
  201. package/dist/misc/RollerCoaster.mjs +322 -315
  202. package/dist/misc/Volume.d.ts +1 -1
  203. package/dist/misc/Volume.js +169 -166
  204. package/dist/misc/Volume.mjs +170 -167
  205. package/dist/misc/VolumeSlice.js +50 -51
  206. package/dist/misc/VolumeSlice.mjs +50 -51
  207. package/dist/modifiers/CurveModifier.d.ts +2 -2
  208. package/dist/modifiers/CurveModifier.js +1 -1
  209. package/dist/modifiers/CurveModifier.mjs +1 -1
  210. package/dist/modifiers/SimplifyModifier.js +2 -1
  211. package/dist/modifiers/SimplifyModifier.mjs +2 -1
  212. package/dist/objects/Lensflare.js +32 -21
  213. package/dist/objects/Lensflare.mjs +33 -22
  214. package/dist/objects/LightningStorm.d.ts +3 -3
  215. package/dist/objects/LightningStorm.js +3 -3
  216. package/dist/objects/LightningStorm.mjs +3 -3
  217. package/dist/objects/MarchingCubes.d.ts +1 -0
  218. package/dist/objects/MarchingCubes.js +4362 -10
  219. package/dist/objects/MarchingCubes.mjs +4363 -11
  220. package/dist/objects/Reflector.d.ts +5 -2
  221. package/dist/objects/Reflector.js +39 -12
  222. package/dist/objects/Reflector.mjs +40 -13
  223. package/dist/objects/ReflectorForSSRPass.js +25 -21
  224. package/dist/objects/ReflectorForSSRPass.mjs +26 -22
  225. package/dist/objects/ReflectorRTT.d.ts +6 -0
  226. package/dist/objects/Refractor.d.ts +5 -2
  227. package/dist/objects/Refractor.js +39 -12
  228. package/dist/objects/Refractor.mjs +40 -13
  229. package/dist/objects/ShadowMesh.d.ts +6 -3
  230. package/dist/objects/ShadowMesh.js +7 -3
  231. package/dist/objects/ShadowMesh.mjs +8 -4
  232. package/dist/objects/Sky.js +181 -137
  233. package/dist/objects/Sky.mjs +182 -138
  234. package/dist/objects/Water.d.ts +3 -3
  235. package/dist/objects/Water.js +3 -2
  236. package/dist/objects/Water.mjs +3 -2
  237. package/dist/objects/Water2.d.ts +2 -2
  238. package/dist/objects/Water2.js +16 -18
  239. package/dist/objects/Water2.mjs +17 -19
  240. package/dist/postprocessing/AdaptiveToneMappingPass.d.ts +2 -2
  241. package/dist/postprocessing/AdaptiveToneMappingPass.js +105 -112
  242. package/dist/postprocessing/AdaptiveToneMappingPass.mjs +107 -114
  243. package/dist/postprocessing/BokehPass.d.ts +1 -1
  244. package/dist/postprocessing/ClearPass.d.ts +3 -3
  245. package/dist/postprocessing/CubeTexturePass.js +37 -33
  246. package/dist/postprocessing/CubeTexturePass.mjs +37 -33
  247. package/dist/postprocessing/HalftonePass.d.ts +1 -1
  248. package/dist/postprocessing/LUTPass.d.ts +3 -3
  249. package/dist/postprocessing/RenderPixelatedPass.d.ts +28 -0
  250. package/dist/postprocessing/SAOPass.d.ts +5 -6
  251. package/dist/postprocessing/SAOPass.js +151 -145
  252. package/dist/postprocessing/SAOPass.mjs +153 -147
  253. package/dist/postprocessing/SSAARenderPass.d.ts +5 -5
  254. package/dist/postprocessing/SSAARenderPass.js +78 -55
  255. package/dist/postprocessing/SSAARenderPass.mjs +80 -57
  256. package/dist/postprocessing/SSAOPass.d.ts +4 -5
  257. package/dist/postprocessing/SSAOPass.js +17 -10
  258. package/dist/postprocessing/SSAOPass.mjs +17 -10
  259. package/dist/postprocessing/SSRPass.d.ts +6 -7
  260. package/dist/postprocessing/SSRPass.js +235 -262
  261. package/dist/postprocessing/SSRPass.mjs +237 -264
  262. package/dist/postprocessing/TAARenderPass.d.ts +2 -2
  263. package/dist/postprocessing/TAARenderPass.js +106 -27
  264. package/dist/postprocessing/TAARenderPass.mjs +107 -28
  265. package/dist/postprocessing/TexturePass.d.ts +2 -2
  266. package/dist/postprocessing/TexturePass.js +24 -22
  267. package/dist/postprocessing/TexturePass.mjs +25 -23
  268. package/dist/postprocessing/UnrealBloomPass.js +175 -118
  269. package/dist/postprocessing/UnrealBloomPass.mjs +177 -120
  270. package/dist/renderers/CSS2DRenderer.d.ts +2 -1
  271. package/dist/renderers/CSS2DRenderer.js +5 -4
  272. package/dist/renderers/CSS2DRenderer.mjs +6 -5
  273. package/dist/renderers/CSS3DRenderer.d.ts +1 -1
  274. package/dist/renderers/CSS3DRenderer.js +147 -113
  275. package/dist/renderers/CSS3DRenderer.mjs +148 -114
  276. package/dist/renderers/Projector.js +377 -389
  277. package/dist/renderers/Projector.mjs +377 -389
  278. package/dist/renderers/SVGRenderer.js +280 -275
  279. package/dist/renderers/SVGRenderer.mjs +280 -275
  280. package/dist/shaders/ACESFilmicToneMappingShader.d.ts +1 -1
  281. package/dist/shaders/AfterimageShader.d.ts +1 -1
  282. package/dist/shaders/BasicShader.d.ts +1 -1
  283. package/dist/shaders/BleachBypassShader.d.ts +1 -1
  284. package/dist/shaders/BokehShader.d.ts +2 -2
  285. package/dist/shaders/BokehShader2.d.ts +2 -2
  286. package/dist/shaders/BokehShader2.js +1 -1
  287. package/dist/shaders/BokehShader2.mjs +1 -1
  288. package/dist/shaders/ColorCorrectionShader.js +3 -3
  289. package/dist/shaders/ColorCorrectionShader.mjs +3 -3
  290. package/dist/shaders/ColorifyShader.js +1 -1
  291. package/dist/shaders/ColorifyShader.mjs +1 -1
  292. package/dist/shaders/ConvolutionShader.d.ts +2 -2
  293. package/dist/shaders/ConvolutionShader.js +1 -1
  294. package/dist/shaders/ConvolutionShader.mjs +1 -1
  295. package/dist/shaders/CopyShader.d.ts +1 -1
  296. package/dist/shaders/DepthLimitedBlurShader.d.ts +2 -2
  297. package/dist/shaders/DepthLimitedBlurShader.js +2 -2
  298. package/dist/shaders/DepthLimitedBlurShader.mjs +2 -2
  299. package/dist/shaders/DotScreenShader.js +2 -2
  300. package/dist/shaders/DotScreenShader.mjs +2 -2
  301. package/dist/shaders/FXAAShader.js +1 -1
  302. package/dist/shaders/FXAAShader.mjs +1 -1
  303. package/dist/shaders/FreiChenShader.js +1 -1
  304. package/dist/shaders/FreiChenShader.mjs +1 -1
  305. package/dist/shaders/GammaCorrectionShader.d.ts +1 -1
  306. package/dist/shaders/GodRaysShader.js +4 -4
  307. package/dist/shaders/GodRaysShader.mjs +4 -4
  308. package/dist/shaders/HorizontalBlurShader.d.ts +1 -1
  309. package/dist/shaders/LuminosityHighPassShader.js +1 -1
  310. package/dist/shaders/LuminosityHighPassShader.mjs +1 -1
  311. package/dist/shaders/NormalMapShader.js +2 -2
  312. package/dist/shaders/NormalMapShader.mjs +2 -2
  313. package/dist/shaders/SAOShader.d.ts +2 -2
  314. package/dist/shaders/SAOShader.js +3 -3
  315. package/dist/shaders/SAOShader.mjs +3 -3
  316. package/dist/shaders/SMAAShader.js +3 -3
  317. package/dist/shaders/SMAAShader.mjs +3 -3
  318. package/dist/shaders/SSAOShader.js +4 -4
  319. package/dist/shaders/SSAOShader.mjs +4 -4
  320. package/dist/shaders/SSRShader.js +4 -4
  321. package/dist/shaders/SSRShader.mjs +4 -4
  322. package/dist/shaders/SobelOperatorShader.js +1 -1
  323. package/dist/shaders/SobelOperatorShader.mjs +1 -1
  324. package/dist/shaders/SubsurfaceScatteringShader.d.ts +2 -2
  325. package/dist/shaders/SubsurfaceScatteringShader.js +91 -52
  326. package/dist/shaders/SubsurfaceScatteringShader.mjs +91 -52
  327. package/dist/shaders/ToonShader.js +25 -25
  328. package/dist/shaders/ToonShader.mjs +25 -25
  329. package/dist/shaders/TriangleBlurShader.js +1 -1
  330. package/dist/shaders/TriangleBlurShader.mjs +1 -1
  331. package/dist/shaders/VerticalBlurShader.d.ts +1 -1
  332. package/dist/shaders/VolumeShader.js +2 -2
  333. package/dist/shaders/VolumeShader.mjs +2 -2
  334. package/dist/shaders/types.d.ts +2 -2
  335. package/dist/types/Loader.d.ts +4 -0
  336. package/dist/types/Loader.js +26 -0
  337. package/dist/types/Loader.mjs +9 -0
  338. package/dist/types/shared.d.ts +2 -2
  339. package/dist/types/utils.d.ts +1 -1
  340. package/dist/utils/BufferGeometryUtils.d.ts +2 -2
  341. package/dist/utils/BufferGeometryUtils.js +1 -1
  342. package/dist/utils/BufferGeometryUtils.mjs +1 -1
  343. package/dist/utils/RoughnessMipmapper.d.ts +8 -0
  344. package/dist/utils/RoughnessMipmapper.js +79 -75
  345. package/dist/utils/RoughnessMipmapper.mjs +79 -75
  346. package/dist/utils/ShadowMapViewer.js +103 -106
  347. package/dist/utils/ShadowMapViewer.mjs +103 -106
  348. package/dist/utils/SkeletonUtils.d.ts +5 -21
  349. package/dist/utils/SkeletonUtils.js +182 -263
  350. package/dist/utils/SkeletonUtils.mjs +183 -264
  351. package/dist/utils/UVsDebug.js +37 -42
  352. package/dist/utils/UVsDebug.mjs +37 -42
  353. package/dist/webxr/ARButton.d.ts +2 -1
  354. package/dist/webxr/OculusHandModel.d.ts +2 -1
  355. package/dist/webxr/OculusHandPointerModel.d.ts +2 -2
  356. package/dist/webxr/OculusHandPointerModel.js +2 -2
  357. package/dist/webxr/OculusHandPointerModel.mjs +2 -2
  358. package/dist/webxr/VRButton.d.ts +2 -1
  359. package/dist/webxr/XRHandPrimitiveModel.js +2 -2
  360. package/dist/webxr/XRHandPrimitiveModel.mjs +2 -2
  361. package/package.json +5 -6
  362. package/dist/custom.d.ts +0 -5
  363. package/dist/loaders/NodeMaterialLoader.js +0 -146
  364. package/dist/loaders/NodeMaterialLoader.mjs +0 -146
  365. package/dist/nodes/Nodes.js +0 -347
  366. package/dist/nodes/Nodes.mjs +0 -347
  367. package/dist/nodes/ShaderNode.js +0 -408
  368. package/dist/nodes/ShaderNode.mjs +0 -408
  369. package/dist/nodes/accessors/BufferNode.js +0 -14
  370. package/dist/nodes/accessors/BufferNode.mjs +0 -15
  371. package/dist/nodes/accessors/CameraNode.js +0 -43
  372. package/dist/nodes/accessors/CameraNode.mjs +0 -44
  373. package/dist/nodes/accessors/CubeTextureNode.js +0 -41
  374. package/dist/nodes/accessors/CubeTextureNode.mjs +0 -42
  375. package/dist/nodes/accessors/MaterialNode.js +0 -70
  376. package/dist/nodes/accessors/MaterialNode.mjs +0 -71
  377. package/dist/nodes/accessors/MaterialReferenceNode.js +0 -13
  378. package/dist/nodes/accessors/MaterialReferenceNode.mjs +0 -14
  379. package/dist/nodes/accessors/ModelNode.js +0 -8
  380. package/dist/nodes/accessors/ModelNode.mjs +0 -9
  381. package/dist/nodes/accessors/ModelViewProjectionNode.js +0 -23
  382. package/dist/nodes/accessors/ModelViewProjectionNode.mjs +0 -24
  383. package/dist/nodes/accessors/NormalNode.js +0 -61
  384. package/dist/nodes/accessors/NormalNode.mjs +0 -62
  385. package/dist/nodes/accessors/Object3DNode.js +0 -75
  386. package/dist/nodes/accessors/Object3DNode.mjs +0 -76
  387. package/dist/nodes/accessors/PointUVNode.js +0 -12
  388. package/dist/nodes/accessors/PointUVNode.mjs +0 -13
  389. package/dist/nodes/accessors/PositionNode.js +0 -64
  390. package/dist/nodes/accessors/PositionNode.mjs +0 -65
  391. package/dist/nodes/accessors/ReferenceNode.js +0 -36
  392. package/dist/nodes/accessors/ReferenceNode.mjs +0 -37
  393. package/dist/nodes/accessors/ReflectNode.js +0 -42
  394. package/dist/nodes/accessors/ReflectNode.mjs +0 -43
  395. package/dist/nodes/accessors/SkinningNode.js +0 -57
  396. package/dist/nodes/accessors/SkinningNode.mjs +0 -58
  397. package/dist/nodes/accessors/TextureNode.js +0 -53
  398. package/dist/nodes/accessors/TextureNode.mjs +0 -54
  399. package/dist/nodes/accessors/UVNode.js +0 -22
  400. package/dist/nodes/accessors/UVNode.mjs +0 -23
  401. package/dist/nodes/core/ArrayUniformNode.js +0 -13
  402. package/dist/nodes/core/ArrayUniformNode.mjs +0 -14
  403. package/dist/nodes/core/AttributeNode.js +0 -29
  404. package/dist/nodes/core/AttributeNode.mjs +0 -30
  405. package/dist/nodes/core/BypassNode.js +0 -21
  406. package/dist/nodes/core/BypassNode.mjs +0 -22
  407. package/dist/nodes/core/CodeNode.js +0 -27
  408. package/dist/nodes/core/CodeNode.mjs +0 -28
  409. package/dist/nodes/core/ConstNode.js +0 -13
  410. package/dist/nodes/core/ConstNode.mjs +0 -14
  411. package/dist/nodes/core/ContextNode.js +0 -21
  412. package/dist/nodes/core/ContextNode.mjs +0 -22
  413. package/dist/nodes/core/ExpressionNode.js +0 -18
  414. package/dist/nodes/core/ExpressionNode.mjs +0 -19
  415. package/dist/nodes/core/FunctionCallNode.js +0 -36
  416. package/dist/nodes/core/FunctionCallNode.mjs +0 -37
  417. package/dist/nodes/core/FunctionNode.js +0 -55
  418. package/dist/nodes/core/FunctionNode.mjs +0 -56
  419. package/dist/nodes/core/InputNode.js +0 -37
  420. package/dist/nodes/core/InputNode.mjs +0 -38
  421. package/dist/nodes/core/Node.js +0 -138
  422. package/dist/nodes/core/Node.mjs +0 -139
  423. package/dist/nodes/core/NodeAttribute.js +0 -9
  424. package/dist/nodes/core/NodeAttribute.mjs +0 -10
  425. package/dist/nodes/core/NodeBuilder.js +0 -402
  426. package/dist/nodes/core/NodeBuilder.mjs +0 -402
  427. package/dist/nodes/core/NodeCode.js +0 -10
  428. package/dist/nodes/core/NodeCode.mjs +0 -11
  429. package/dist/nodes/core/NodeFrame.js +0 -34
  430. package/dist/nodes/core/NodeFrame.mjs +0 -35
  431. package/dist/nodes/core/NodeFunctionInput.js +0 -12
  432. package/dist/nodes/core/NodeFunctionInput.mjs +0 -13
  433. package/dist/nodes/core/NodeKeywords.js +0 -43
  434. package/dist/nodes/core/NodeKeywords.mjs +0 -44
  435. package/dist/nodes/core/NodeUniform.js +0 -17
  436. package/dist/nodes/core/NodeUniform.mjs +0 -18
  437. package/dist/nodes/core/NodeUtils.js +0 -57
  438. package/dist/nodes/core/NodeUtils.mjs +0 -57
  439. package/dist/nodes/core/NodeVar.js +0 -9
  440. package/dist/nodes/core/NodeVar.mjs +0 -10
  441. package/dist/nodes/core/NodeVary.js +0 -9
  442. package/dist/nodes/core/NodeVary.mjs +0 -10
  443. package/dist/nodes/core/PropertyNode.js +0 -20
  444. package/dist/nodes/core/PropertyNode.mjs +0 -21
  445. package/dist/nodes/core/TempNode.js +0 -24
  446. package/dist/nodes/core/TempNode.mjs +0 -25
  447. package/dist/nodes/core/UniformNode.js +0 -22
  448. package/dist/nodes/core/UniformNode.mjs +0 -23
  449. package/dist/nodes/core/VarNode.js +0 -30
  450. package/dist/nodes/core/VarNode.mjs +0 -31
  451. package/dist/nodes/core/VaryNode.js +0 -29
  452. package/dist/nodes/core/VaryNode.mjs +0 -30
  453. package/dist/nodes/core/constants.js +0 -24
  454. package/dist/nodes/core/constants.mjs +0 -24
  455. package/dist/nodes/display/ColorSpaceNode.js +0 -62
  456. package/dist/nodes/display/ColorSpaceNode.mjs +0 -62
  457. package/dist/nodes/display/NormalMapNode.js +0 -53
  458. package/dist/nodes/display/NormalMapNode.mjs +0 -54
  459. package/dist/nodes/fog/FogNode.js +0 -14
  460. package/dist/nodes/fog/FogNode.mjs +0 -15
  461. package/dist/nodes/fog/FogRangeNode.js +0 -16
  462. package/dist/nodes/fog/FogRangeNode.mjs +0 -17
  463. package/dist/nodes/functions/BSDFs.js +0 -64
  464. package/dist/nodes/functions/BSDFs.mjs +0 -64
  465. package/dist/nodes/lights/LightContextNode.js +0 -34
  466. package/dist/nodes/lights/LightContextNode.mjs +0 -35
  467. package/dist/nodes/lights/LightNode.js +0 -57
  468. package/dist/nodes/lights/LightNode.mjs +0 -58
  469. package/dist/nodes/lights/LightsNode.js +0 -58
  470. package/dist/nodes/lights/LightsNode.mjs +0 -59
  471. package/dist/nodes/loaders/NodeLoader.js +0 -195
  472. package/dist/nodes/loaders/NodeLoader.mjs +0 -196
  473. package/dist/nodes/loaders/NodeMaterialLoader.js +0 -23
  474. package/dist/nodes/loaders/NodeMaterialLoader.mjs +0 -24
  475. package/dist/nodes/loaders/NodeObjectLoader.js +0 -39
  476. package/dist/nodes/loaders/NodeObjectLoader.mjs +0 -40
  477. package/dist/nodes/materials/LineBasicNodeMaterial.js +0 -26
  478. package/dist/nodes/materials/LineBasicNodeMaterial.mjs +0 -27
  479. package/dist/nodes/materials/Materials.js +0 -24
  480. package/dist/nodes/materials/Materials.mjs +0 -24
  481. package/dist/nodes/materials/MeshBasicNodeMaterial.js +0 -27
  482. package/dist/nodes/materials/MeshBasicNodeMaterial.mjs +0 -28
  483. package/dist/nodes/materials/MeshStandardNodeMaterial.js +0 -40
  484. package/dist/nodes/materials/MeshStandardNodeMaterial.mjs +0 -41
  485. package/dist/nodes/materials/NodeMaterial.js +0 -63
  486. package/dist/nodes/materials/NodeMaterial.mjs +0 -64
  487. package/dist/nodes/materials/PointsNodeMaterial.js +0 -29
  488. package/dist/nodes/materials/PointsNodeMaterial.mjs +0 -30
  489. package/dist/nodes/math/CondNode.js +0 -40
  490. package/dist/nodes/math/CondNode.mjs +0 -41
  491. package/dist/nodes/math/MathNode.js +0 -165
  492. package/dist/nodes/math/MathNode.mjs +0 -166
  493. package/dist/nodes/math/OperatorNode.js +0 -102
  494. package/dist/nodes/math/OperatorNode.mjs +0 -103
  495. package/dist/nodes/procedural/CheckerNode.js +0 -20
  496. package/dist/nodes/procedural/CheckerNode.mjs +0 -21
  497. package/dist/nodes/utils/ArrayElementNode.js +0 -18
  498. package/dist/nodes/utils/ArrayElementNode.mjs +0 -19
  499. package/dist/nodes/utils/ConvertNode.js +0 -24
  500. package/dist/nodes/utils/ConvertNode.mjs +0 -25
  501. package/dist/nodes/utils/JoinNode.js +0 -25
  502. package/dist/nodes/utils/JoinNode.mjs +0 -26
  503. package/dist/nodes/utils/MatcapUVNode.js +0 -15
  504. package/dist/nodes/utils/MatcapUVNode.mjs +0 -16
  505. package/dist/nodes/utils/OscNode.js +0 -49
  506. package/dist/nodes/utils/OscNode.mjs +0 -50
  507. package/dist/nodes/utils/SplitNode.js +0 -44
  508. package/dist/nodes/utils/SplitNode.mjs +0 -45
  509. package/dist/nodes/utils/SpriteSheetUVNode.js +0 -39
  510. package/dist/nodes/utils/SpriteSheetUVNode.mjs +0 -40
  511. package/dist/nodes/utils/TimerNode.js +0 -43
  512. package/dist/nodes/utils/TimerNode.mjs +0 -44
  513. package/dist/offscreen/jank.js +0 -26
  514. package/dist/offscreen/jank.mjs +0 -27
  515. package/dist/offscreen/offscreen.js +0 -8
  516. package/dist/offscreen/offscreen.mjs +0 -7
  517. package/dist/offscreen/scene.js +0 -68
  518. package/dist/offscreen/scene.mjs +0 -52
  519. package/dist/renderers/nodes/accessors/CameraNode.js +0 -62
  520. package/dist/renderers/nodes/accessors/CameraNode.mjs +0 -63
  521. package/dist/renderers/nodes/accessors/ModelNode.js +0 -60
  522. package/dist/renderers/nodes/accessors/ModelNode.mjs +0 -61
  523. package/dist/renderers/nodes/accessors/ModelViewProjectionNode.js +0 -20
  524. package/dist/renderers/nodes/accessors/ModelViewProjectionNode.mjs +0 -21
  525. package/dist/renderers/nodes/accessors/NormalNode.js +0 -60
  526. package/dist/renderers/nodes/accessors/NormalNode.mjs +0 -61
  527. package/dist/renderers/nodes/accessors/PositionNode.js +0 -29
  528. package/dist/renderers/nodes/accessors/PositionNode.mjs +0 -30
  529. package/dist/renderers/nodes/accessors/UVNode.js +0 -12
  530. package/dist/renderers/nodes/accessors/UVNode.mjs +0 -13
  531. package/dist/renderers/nodes/core/AttributeNode.js +0 -34
  532. package/dist/renderers/nodes/core/AttributeNode.mjs +0 -35
  533. package/dist/renderers/nodes/core/InputNode.js +0 -30
  534. package/dist/renderers/nodes/core/InputNode.mjs +0 -31
  535. package/dist/renderers/nodes/core/Node.js +0 -33
  536. package/dist/renderers/nodes/core/Node.mjs +0 -34
  537. package/dist/renderers/nodes/core/NodeAttribute.js +0 -9
  538. package/dist/renderers/nodes/core/NodeAttribute.mjs +0 -10
  539. package/dist/renderers/nodes/core/NodeBuilder.js +0 -248
  540. package/dist/renderers/nodes/core/NodeBuilder.mjs +0 -249
  541. package/dist/renderers/nodes/core/NodeFrame.js +0 -34
  542. package/dist/renderers/nodes/core/NodeFrame.mjs +0 -35
  543. package/dist/renderers/nodes/core/NodeSlot.js +0 -9
  544. package/dist/renderers/nodes/core/NodeSlot.mjs +0 -10
  545. package/dist/renderers/nodes/core/NodeUniform.js +0 -17
  546. package/dist/renderers/nodes/core/NodeUniform.mjs +0 -18
  547. package/dist/renderers/nodes/core/NodeVary.js +0 -10
  548. package/dist/renderers/nodes/core/NodeVary.mjs +0 -11
  549. package/dist/renderers/nodes/core/VaryNode.js +0 -21
  550. package/dist/renderers/nodes/core/VaryNode.mjs +0 -22
  551. package/dist/renderers/nodes/core/constants.js +0 -22
  552. package/dist/renderers/nodes/core/constants.mjs +0 -22
  553. package/dist/renderers/nodes/inputs/ColorNode.js +0 -10
  554. package/dist/renderers/nodes/inputs/ColorNode.mjs +0 -11
  555. package/dist/renderers/nodes/inputs/FloatNode.js +0 -10
  556. package/dist/renderers/nodes/inputs/FloatNode.mjs +0 -11
  557. package/dist/renderers/nodes/inputs/Matrix3Node.js +0 -11
  558. package/dist/renderers/nodes/inputs/Matrix3Node.mjs +0 -12
  559. package/dist/renderers/nodes/inputs/Matrix4Node.js +0 -11
  560. package/dist/renderers/nodes/inputs/Matrix4Node.mjs +0 -12
  561. package/dist/renderers/nodes/inputs/TextureNode.js +0 -19
  562. package/dist/renderers/nodes/inputs/TextureNode.mjs +0 -20
  563. package/dist/renderers/nodes/inputs/Vector2Node.js +0 -10
  564. package/dist/renderers/nodes/inputs/Vector2Node.mjs +0 -11
  565. package/dist/renderers/nodes/inputs/Vector3Node.js +0 -11
  566. package/dist/renderers/nodes/inputs/Vector3Node.mjs +0 -12
  567. package/dist/renderers/nodes/inputs/Vector4Node.js +0 -11
  568. package/dist/renderers/nodes/inputs/Vector4Node.mjs +0 -12
  569. package/dist/renderers/nodes/math/MathNode.js +0 -54
  570. package/dist/renderers/nodes/math/MathNode.mjs +0 -55
  571. package/dist/renderers/nodes/math/OperatorNode.js +0 -41
  572. package/dist/renderers/nodes/math/OperatorNode.mjs +0 -42
  573. package/dist/renderers/nodes/utils/SwitchNode.js +0 -19
  574. package/dist/renderers/nodes/utils/SwitchNode.mjs +0 -20
  575. package/dist/renderers/nodes/utils/TimerNode.js +0 -13
  576. package/dist/renderers/nodes/utils/TimerNode.mjs +0 -14
  577. package/dist/renderers/webgpu/WebGPU.js +0 -23
  578. package/dist/renderers/webgpu/WebGPU.mjs +0 -24
  579. package/dist/renderers/webgpu/WebGPUAttributes.js +0 -68
  580. package/dist/renderers/webgpu/WebGPUAttributes.mjs +0 -69
  581. package/dist/renderers/webgpu/WebGPUBackground.js +0 -60
  582. package/dist/renderers/webgpu/WebGPUBackground.mjs +0 -61
  583. package/dist/renderers/webgpu/WebGPUBinding.js +0 -13
  584. package/dist/renderers/webgpu/WebGPUBinding.mjs +0 -14
  585. package/dist/renderers/webgpu/WebGPUBindings.js +0 -154
  586. package/dist/renderers/webgpu/WebGPUBindings.mjs +0 -155
  587. package/dist/renderers/webgpu/WebGPUComputePipelines.js +0 -43
  588. package/dist/renderers/webgpu/WebGPUComputePipelines.mjs +0 -44
  589. package/dist/renderers/webgpu/WebGPUGeometries.js +0 -40
  590. package/dist/renderers/webgpu/WebGPUGeometries.mjs +0 -41
  591. package/dist/renderers/webgpu/WebGPUInfo.js +0 -45
  592. package/dist/renderers/webgpu/WebGPUInfo.mjs +0 -46
  593. package/dist/renderers/webgpu/WebGPUObjects.js +0 -24
  594. package/dist/renderers/webgpu/WebGPUObjects.mjs +0 -25
  595. package/dist/renderers/webgpu/WebGPUProperties.js +0 -21
  596. package/dist/renderers/webgpu/WebGPUProperties.mjs +0 -22
  597. package/dist/renderers/webgpu/WebGPURenderLists.js +0 -118
  598. package/dist/renderers/webgpu/WebGPURenderLists.mjs +0 -119
  599. package/dist/renderers/webgpu/WebGPURenderPipelines.js +0 -545
  600. package/dist/renderers/webgpu/WebGPURenderPipelines.mjs +0 -546
  601. package/dist/renderers/webgpu/WebGPURenderer.js +0 -596
  602. package/dist/renderers/webgpu/WebGPURenderer.mjs +0 -575
  603. package/dist/renderers/webgpu/WebGPUSampledTexture.js +0 -40
  604. package/dist/renderers/webgpu/WebGPUSampledTexture.mjs +0 -40
  605. package/dist/renderers/webgpu/WebGPUSampler.js +0 -14
  606. package/dist/renderers/webgpu/WebGPUSampler.mjs +0 -15
  607. package/dist/renderers/webgpu/WebGPUStorageBuffer.js +0 -14
  608. package/dist/renderers/webgpu/WebGPUStorageBuffer.mjs +0 -15
  609. package/dist/renderers/webgpu/WebGPUTextureRenderer.js +0 -22
  610. package/dist/renderers/webgpu/WebGPUTextureRenderer.mjs +0 -23
  611. package/dist/renderers/webgpu/WebGPUTextureUtils.js +0 -97
  612. package/dist/renderers/webgpu/WebGPUTextureUtils.mjs +0 -98
  613. package/dist/renderers/webgpu/WebGPUTextures.js +0 -483
  614. package/dist/renderers/webgpu/WebGPUTextures.mjs +0 -484
  615. package/dist/renderers/webgpu/WebGPUUniform.js +0 -81
  616. package/dist/renderers/webgpu/WebGPUUniform.mjs +0 -81
  617. package/dist/renderers/webgpu/WebGPUUniformsGroup.js +0 -175
  618. package/dist/renderers/webgpu/WebGPUUniformsGroup.mjs +0 -176
  619. package/dist/renderers/webgpu/constants.js +0 -241
  620. package/dist/renderers/webgpu/constants.mjs +0 -241
  621. package/dist/renderers/webgpu/nodes/ShaderLib.js +0 -41
  622. package/dist/renderers/webgpu/nodes/ShaderLib.mjs +0 -42
  623. package/dist/renderers/webgpu/nodes/WebGPUNodeBuilder.js +0 -164
  624. package/dist/renderers/webgpu/nodes/WebGPUNodeBuilder.mjs +0 -165
  625. package/dist/renderers/webgpu/nodes/WebGPUNodeUniform.js +0 -73
  626. package/dist/renderers/webgpu/nodes/WebGPUNodeUniform.mjs +0 -73
  627. package/dist/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.js +0 -14
  628. package/dist/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.mjs +0 -15
  629. package/dist/renderers/webgpu/nodes/WebGPUNodes.js +0 -39
  630. package/dist/renderers/webgpu/nodes/WebGPUNodes.mjs +0 -40
@@ -1,241 +0,0 @@
1
- const GPUPrimitiveTopology = {
2
- PointList: "point-list",
3
- LineList: "line-list",
4
- LineStrip: "line-strip",
5
- TriangleList: "triangle-list",
6
- TriangleStrip: "triangle-strip"
7
- };
8
- const GPUCompareFunction = {
9
- Never: "never",
10
- Less: "less",
11
- Equal: "equal",
12
- LessEqual: "less-equal",
13
- Greater: "greater",
14
- NotEqual: "not-equal",
15
- GreaterEqual: "greater-equal",
16
- Always: "always"
17
- };
18
- const GPUStoreOp = {
19
- Store: "store",
20
- Clear: "clear"
21
- };
22
- const GPULoadOp = {
23
- Load: "load"
24
- };
25
- const GPUFrontFace = {
26
- CCW: "ccw",
27
- CW: "cw"
28
- };
29
- const GPUCullMode = {
30
- None: "none",
31
- Front: "front",
32
- Back: "back"
33
- };
34
- const GPUIndexFormat = {
35
- Uint16: "uint16",
36
- Uint32: "uint32"
37
- };
38
- const GPUVertexFormat = {
39
- Uchar2: "uchar2",
40
- Uchar4: "uchar4",
41
- Char2: "char2",
42
- Char4: "char4",
43
- Uchar2Norm: "uchar2norm",
44
- Uchar4Norm: "uchar4norm",
45
- Char2Norm: "char2norm",
46
- Char4Norm: "char4norm",
47
- Ushort2: "ushort2",
48
- Ushort4: "ushort4",
49
- Short2: "short2",
50
- Short4: "short4",
51
- Ushort2Norm: "ushort2norm",
52
- Ushort4Norm: "ushort4norm",
53
- Short2Norm: "short2norm",
54
- Short4Norm: "short4norm",
55
- Half2: "half2",
56
- Half4: "half4",
57
- Float: "float",
58
- Float2: "float2",
59
- Float3: "float3",
60
- Float4: "float4",
61
- Uint: "uint",
62
- Uint2: "uint2",
63
- Uint3: "uint3",
64
- Uint4: "uint4",
65
- Int: "int",
66
- Int2: "int2",
67
- Int3: "int3",
68
- Int4: "int4"
69
- };
70
- const GPUTextureFormat = {
71
- // 8-bit formats
72
- R8Unorm: "r8unorm",
73
- R8Snorm: "r8snorm",
74
- R8Uint: "r8uint",
75
- R8Sint: "r8sint",
76
- // 16-bit formats
77
- R16Uint: "r16uint",
78
- R16Sint: "r16sint",
79
- R16Float: "r16float",
80
- RG8Unorm: "rg8unorm",
81
- RG8Snorm: "rg8snorm",
82
- RG8Uint: "rg8uint",
83
- RG8Sint: "rg8sint",
84
- // 32-bit formats
85
- R32Uint: "r32uint",
86
- R32Sint: "r32sint",
87
- R32Float: "r32float",
88
- RG16Uint: "rg16uint",
89
- RG16Sint: "rg16sint",
90
- RG16Float: "rg16float",
91
- RGBA8Unorm: "rgba8unorm",
92
- RGBA8UnormSRGB: "rgba8unorm-srgb",
93
- RGBA8Snorm: "rgba8snorm",
94
- RGBA8Uint: "rgba8uint",
95
- RGBA8Sint: "rgba8sint",
96
- BRGA8Unorm: "bgra8unorm",
97
- BRGA8UnormSRGB: "bgra8unorm-srgb",
98
- // Packed 32-bit formats
99
- RGB9E5UFloat: "rgb9e5ufloat",
100
- RGB10A2Unorm: "rgb10a2unorm",
101
- RG11B10uFloat: "rgb10a2unorm",
102
- // 64-bit formats
103
- RG32Uint: "rg32uint",
104
- RG32Sint: "rg32sint",
105
- RG32Float: "rg32float",
106
- RGBA16Uint: "rgba16uint",
107
- RGBA16Sint: "rgba16sint",
108
- RGBA16Float: "rgba16float",
109
- // 128-bit formats
110
- RGBA32Uint: "rgba32uint",
111
- RGBA32Sint: "rgba32sint",
112
- RGBA32Float: "rgba32float",
113
- // Depth and stencil formats
114
- Stencil8: "stencil8",
115
- Depth16Unorm: "depth16unorm",
116
- Depth24Plus: "depth24plus",
117
- Depth24PlusStencil8: "depth24plus-stencil8",
118
- Depth32Float: "depth32float",
119
- // BC compressed formats usable if 'texture-compression-bc' is both
120
- // supported by the device/user agent and enabled in requestDevice.
121
- BC1RGBAUnorm: "bc1-rgba-unorm",
122
- BC1RGBAUnormSRGB: "bc1-rgba-unorm-srgb",
123
- BC2RGBAUnorm: "bc2-rgba-unorm",
124
- BC2RGBAUnormSRGB: "bc2-rgba-unorm-srgb",
125
- BC3RGBAUnorm: "bc3-rgba-unorm",
126
- BC3RGBAUnormSRGB: "bc3-rgba-unorm-srgb",
127
- BC4RUnorm: "bc4-r-unorm",
128
- BC4RSNorm: "bc4-r-snorm",
129
- BC5RGUnorm: "bc5-rg-unorm",
130
- BC5RGSnorm: "bc5-rg-snorm",
131
- BC6HRGBUFloat: "bc6h-rgb-ufloat",
132
- BC6HRGBFloat: "bc6h-rgb-float",
133
- BC7RGBAUnorm: "bc7-rgba-unorm",
134
- BC7RGBAUnormSRGB: "bc7-rgba-srgb",
135
- // 'depth24unorm-stencil8' extension
136
- Depth24UnormStencil8: "depth24unorm-stencil8",
137
- // 'depth32float-stencil8' extension
138
- Depth32FloatStencil8: "depth32float-stencil8"
139
- };
140
- const GPUAddressMode = {
141
- ClampToEdge: "clamp-to-edge",
142
- Repeat: "repeat",
143
- MirrorRepeat: "mirror-repeat"
144
- };
145
- const GPUFilterMode = {
146
- Linear: "linear",
147
- Nearest: "nearest"
148
- };
149
- const GPUBlendFactor = {
150
- Zero: "zero",
151
- One: "one",
152
- SrcColor: "src-color",
153
- OneMinusSrcColor: "one-minus-src-color",
154
- SrcAlpha: "src-alpha",
155
- OneMinusSrcAlpha: "one-minus-src-alpha",
156
- DstColor: "dst-color",
157
- OneMinusDstColor: "one-minus-dst-color",
158
- DstAlpha: "dst-alpha",
159
- OneMinusDstAlpha: "one-minus-dst-alpha",
160
- SrcAlphaSaturated: "src-alpha-saturated",
161
- BlendColor: "blend-color",
162
- OneMinusBlendColor: "one-minus-blend-color"
163
- };
164
- const GPUBlendOperation = {
165
- Add: "add",
166
- Subtract: "subtract",
167
- ReverseSubtract: "reverse-subtract",
168
- Min: "min",
169
- Max: "max"
170
- };
171
- const GPUColorWriteFlags = {
172
- None: 0,
173
- Red: 1,
174
- Green: 2,
175
- Blue: 4,
176
- Alpha: 8,
177
- All: 15
178
- };
179
- const GPUStencilOperation = {
180
- Keep: "keep",
181
- Zero: "zero",
182
- Replace: "replace",
183
- Invert: "invert",
184
- IncrementClamp: "increment-clamp",
185
- DecrementClamp: "decrement-clamp",
186
- IncrementWrap: "increment-wrap",
187
- DecrementWrap: "decrement-wrap"
188
- };
189
- const GPUBindingType = {
190
- UniformBuffer: "uniform-buffer",
191
- StorageBuffer: "storage-buffer",
192
- ReadonlyStorageBuffer: "readonly-storage-buffer",
193
- Sampler: "sampler",
194
- ComparisonSampler: "comparison-sampler",
195
- SampledTexture: "sampled-texture",
196
- MultisampledTexture: "multisampled-texture",
197
- ReadonlyStorageTexture: "readonly-storage-texture",
198
- WriteonlyStorageTexture: "writeonly-storage-texture"
199
- };
200
- const GPUTextureDimension = {
201
- OneD: "1d",
202
- TwoD: "2d",
203
- ThreeD: "3d"
204
- };
205
- const GPUTextureViewDimension = {
206
- OneD: "1d",
207
- TwoD: "2d",
208
- TwoDArray: "2d-array",
209
- Cube: "cube",
210
- CubeArray: "cube-array",
211
- ThreeD: "3d"
212
- };
213
- const GPUInputStepMode = {
214
- Vertex: "vertex",
215
- Instance: "instance"
216
- };
217
- const BlendColorFactor = 211;
218
- const OneMinusBlendColorFactor = 212;
219
- export {
220
- BlendColorFactor,
221
- GPUAddressMode,
222
- GPUBindingType,
223
- GPUBlendFactor,
224
- GPUBlendOperation,
225
- GPUColorWriteFlags,
226
- GPUCompareFunction,
227
- GPUCullMode,
228
- GPUFilterMode,
229
- GPUFrontFace,
230
- GPUIndexFormat,
231
- GPUInputStepMode,
232
- GPULoadOp,
233
- GPUPrimitiveTopology,
234
- GPUStencilOperation,
235
- GPUStoreOp,
236
- GPUTextureDimension,
237
- GPUTextureFormat,
238
- GPUTextureViewDimension,
239
- GPUVertexFormat,
240
- OneMinusBlendColorFactor
241
- };
@@ -1,41 +0,0 @@
1
- "use strict";
2
- const ShaderLib = {
3
- common: {
4
- vertexShader: `#version 450
5
-
6
- NODE_HEADER_ATTRIBUTES
7
- NODE_HEADER_UNIFORMS
8
- NODE_HEADER_VARYS
9
-
10
- void main(){
11
- NODE_BODY_VARYS
12
- gl_Position = NODE_MVP;
13
- }`,
14
- fragmentShader: `#version 450
15
-
16
- NODE_HEADER_ATTRIBUTES
17
- NODE_HEADER_UNIFORMS
18
- NODE_HEADER_VARYS
19
-
20
- layout(location = 0) out vec4 outColor;
21
-
22
- void main() {
23
-
24
- outColor = vec4( 1.0, 1.0, 1.0, 1.0 );
25
-
26
- #ifdef NODE_COLOR
27
-
28
- outColor = NODE_COLOR;
29
-
30
- #endif
31
-
32
- #ifdef NODE_OPACITY
33
-
34
- outColor.a *= NODE_OPACITY;
35
-
36
- #endif
37
-
38
- }`
39
- }
40
- };
41
- module.exports = ShaderLib;
@@ -1,42 +0,0 @@
1
- const ShaderLib = {
2
- common: {
3
- vertexShader: `#version 450
4
-
5
- NODE_HEADER_ATTRIBUTES
6
- NODE_HEADER_UNIFORMS
7
- NODE_HEADER_VARYS
8
-
9
- void main(){
10
- NODE_BODY_VARYS
11
- gl_Position = NODE_MVP;
12
- }`,
13
- fragmentShader: `#version 450
14
-
15
- NODE_HEADER_ATTRIBUTES
16
- NODE_HEADER_UNIFORMS
17
- NODE_HEADER_VARYS
18
-
19
- layout(location = 0) out vec4 outColor;
20
-
21
- void main() {
22
-
23
- outColor = vec4( 1.0, 1.0, 1.0, 1.0 );
24
-
25
- #ifdef NODE_COLOR
26
-
27
- outColor = NODE_COLOR;
28
-
29
- #endif
30
-
31
- #ifdef NODE_OPACITY
32
-
33
- outColor.a *= NODE_OPACITY;
34
-
35
- #endif
36
-
37
- }`
38
- }
39
- };
40
- export {
41
- ShaderLib as default
42
- };
@@ -1,164 +0,0 @@
1
- "use strict";
2
- const WebGPUNodeUniformsGroup = require("./WebGPUNodeUniformsGroup.js");
3
- const WebGPUNodeUniform = require("./WebGPUNodeUniform.js");
4
- const WebGPUSampler = require("../WebGPUSampler.js");
5
- const WebGPUSampledTexture = require("../WebGPUSampledTexture.js");
6
- const NodeSlot = require("../../nodes/core/NodeSlot.js");
7
- const NodeBuilder = require("../../nodes/core/NodeBuilder.js");
8
- const ModelViewProjectionNode = require("../../nodes/accessors/ModelViewProjectionNode.js");
9
- const ShaderLib = require("./ShaderLib.js");
10
- class WebGPUNodeBuilder extends NodeBuilder {
11
- constructor(material, renderer) {
12
- super(material, renderer);
13
- this.bindings = { vertex: [], fragment: [] };
14
- this.bindingsOffset = { vertex: 0, fragment: 0 };
15
- this.uniformsGroup = {};
16
- this.nativeShader = null;
17
- this._parseMaterial();
18
- }
19
- _parseMaterial() {
20
- const material = this.material;
21
- this.nativeShader = ShaderLib.common;
22
- if (material.isMeshBasicMaterial || material.isPointsMaterial || material.isLineBasicMaterial) {
23
- const mvpNode = new ModelViewProjectionNode();
24
- if (material.positionNode !== void 0) {
25
- mvpNode.position = material.positionNode;
26
- }
27
- this.addSlot("vertex", new NodeSlot(mvpNode, "MVP", "vec4"));
28
- if (material.colorNode !== void 0) {
29
- this.addSlot("fragment", new NodeSlot(material.colorNode, "COLOR", "vec4"));
30
- }
31
- if (material.opacityNode !== void 0) {
32
- this.addSlot("fragment", new NodeSlot(material.opacityNode, "OPACITY", "float"));
33
- }
34
- }
35
- }
36
- getTexture(textureProperty, uvSnippet) {
37
- return `texture( sampler2D( ${textureProperty}, ${textureProperty}_sampler ), ${uvSnippet} )`;
38
- }
39
- getPropertyName(node) {
40
- if (node.isNodeUniform) {
41
- const name = node.name;
42
- const type = node.type;
43
- if (type === "texture") {
44
- return name;
45
- } else {
46
- return `nodeUniforms.${name}`;
47
- }
48
- }
49
- return super.getPropertyName(node);
50
- }
51
- getBindings() {
52
- const bindings = this.bindings;
53
- return [...bindings.vertex, ...bindings.fragment];
54
- }
55
- getUniformFromNode(node, shaderStage, type) {
56
- const uniformNode = super.getUniformFromNode(node, shaderStage, type);
57
- const nodeData = this.getDataFromNode(node, shaderStage);
58
- if (nodeData.uniformGPU === void 0) {
59
- let uniformGPU;
60
- const bindings = this.bindings[shaderStage];
61
- if (type === "texture") {
62
- const sampler = new WebGPUSampler(`${uniformNode.name}_sampler`, uniformNode.value);
63
- const texture = new WebGPUSampledTexture.WebGPUSampledTexture(uniformNode.name, uniformNode.value);
64
- const lastBinding = bindings[bindings.length - 1];
65
- const index = lastBinding && lastBinding.isUniformsGroup ? bindings.length - 1 : bindings.length;
66
- bindings.splice(index, 0, sampler, texture);
67
- uniformGPU = { sampler, texture };
68
- } else {
69
- let uniformsGroup = this.uniformsGroup[shaderStage];
70
- if (uniformsGroup === void 0) {
71
- uniformsGroup = new WebGPUNodeUniformsGroup(shaderStage);
72
- this.uniformsGroup[shaderStage] = uniformsGroup;
73
- bindings.push(uniformsGroup);
74
- }
75
- if (type === "float") {
76
- uniformGPU = new WebGPUNodeUniform.FloatNodeUniform(uniformNode);
77
- } else if (type === "vec2") {
78
- uniformGPU = new WebGPUNodeUniform.Vector2NodeUniform(uniformNode);
79
- } else if (type === "vec3") {
80
- uniformGPU = new WebGPUNodeUniform.Vector3NodeUniform(uniformNode);
81
- } else if (type === "vec4") {
82
- uniformGPU = new WebGPUNodeUniform.Vector4NodeUniform(uniformNode);
83
- } else if (type === "color") {
84
- uniformGPU = new WebGPUNodeUniform.ColorNodeUniform(uniformNode);
85
- } else if (type === "mat3") {
86
- uniformGPU = new WebGPUNodeUniform.Matrix3NodeUniform(uniformNode);
87
- } else if (type === "mat4") {
88
- uniformGPU = new WebGPUNodeUniform.Matrix4NodeUniform(uniformNode);
89
- } else {
90
- throw new Error(`Uniform "${type}" not declared.`);
91
- }
92
- uniformsGroup.addUniform(uniformGPU);
93
- }
94
- nodeData.uniformGPU = uniformGPU;
95
- if (shaderStage === "vertex") {
96
- this.bindingsOffset["fragment"] = bindings.length;
97
- }
98
- }
99
- return uniformNode;
100
- }
101
- getAttributesHeaderSnippet(shaderStage) {
102
- let snippet = "";
103
- if (shaderStage === "vertex") {
104
- const attributes = this.attributes;
105
- for (let index = 0; index < attributes.length; index++) {
106
- const attribute = attributes[index];
107
- snippet += `layout(location = ${index}) in ${attribute.type} ${attribute.name};`;
108
- }
109
- }
110
- return snippet;
111
- }
112
- getVarysHeaderSnippet(shaderStage) {
113
- let snippet = "";
114
- const varys = this.varys;
115
- const ioStage = shaderStage === "vertex" ? "out" : "in";
116
- for (let index = 0; index < varys.length; index++) {
117
- const vary = varys[index];
118
- snippet += `layout(location = ${index}) ${ioStage} ${vary.type} ${vary.name};`;
119
- }
120
- return snippet;
121
- }
122
- getVarysBodySnippet(shaderStage) {
123
- let snippet = "";
124
- if (shaderStage === "vertex") {
125
- for (let vary of this.varys) {
126
- snippet += `${vary.name} = ${vary.snippet};`;
127
- }
128
- }
129
- return snippet;
130
- }
131
- getUniformsHeaderSnippet(shaderStage) {
132
- const uniforms = this.uniforms[shaderStage];
133
- let snippet = "";
134
- let groupSnippet = "";
135
- let index = this.bindingsOffset[shaderStage];
136
- for (let uniform of uniforms) {
137
- if (uniform.type === "texture") {
138
- snippet += `layout(set = 0, binding = ${index++}) uniform sampler ${uniform.name}_sampler;`;
139
- snippet += `layout(set = 0, binding = ${index++}) uniform texture2D ${uniform.name};`;
140
- } else {
141
- const vectorType = this.getVectorType(uniform.type);
142
- groupSnippet += `uniform ${vectorType} ${uniform.name};`;
143
- }
144
- }
145
- if (groupSnippet) {
146
- snippet += `layout(set = 0, binding = ${index++}) uniform NodeUniforms { ${groupSnippet} } nodeUniforms;`;
147
- }
148
- return snippet;
149
- }
150
- composeShaderCode(code, snippet) {
151
- const versionStrIndex = code.indexOf("\n");
152
- let finalCode = code.substr(0, versionStrIndex) + "\n\n";
153
- finalCode += snippet;
154
- finalCode += code.substr(versionStrIndex);
155
- return finalCode;
156
- }
157
- build() {
158
- super.build();
159
- this.vertexShader = this.composeShaderCode(this.nativeShader.vertexShader, this.vertexShader);
160
- this.fragmentShader = this.composeShaderCode(this.nativeShader.fragmentShader, this.fragmentShader);
161
- return this;
162
- }
163
- }
164
- module.exports = WebGPUNodeBuilder;
@@ -1,165 +0,0 @@
1
- import WebGPUNodeUniformsGroup from "./WebGPUNodeUniformsGroup.mjs";
2
- import { FloatNodeUniform, Vector2NodeUniform, Vector3NodeUniform, Vector4NodeUniform, ColorNodeUniform, Matrix3NodeUniform, Matrix4NodeUniform } from "./WebGPUNodeUniform.mjs";
3
- import WebGPUSampler from "../WebGPUSampler.mjs";
4
- import { WebGPUSampledTexture } from "../WebGPUSampledTexture.mjs";
5
- import NodeSlot from "../../nodes/core/NodeSlot.mjs";
6
- import NodeBuilder from "../../nodes/core/NodeBuilder.mjs";
7
- import ModelViewProjectionNode from "../../nodes/accessors/ModelViewProjectionNode.mjs";
8
- import ShaderLib from "./ShaderLib.mjs";
9
- class WebGPUNodeBuilder extends NodeBuilder {
10
- constructor(material, renderer) {
11
- super(material, renderer);
12
- this.bindings = { vertex: [], fragment: [] };
13
- this.bindingsOffset = { vertex: 0, fragment: 0 };
14
- this.uniformsGroup = {};
15
- this.nativeShader = null;
16
- this._parseMaterial();
17
- }
18
- _parseMaterial() {
19
- const material = this.material;
20
- this.nativeShader = ShaderLib.common;
21
- if (material.isMeshBasicMaterial || material.isPointsMaterial || material.isLineBasicMaterial) {
22
- const mvpNode = new ModelViewProjectionNode();
23
- if (material.positionNode !== void 0) {
24
- mvpNode.position = material.positionNode;
25
- }
26
- this.addSlot("vertex", new NodeSlot(mvpNode, "MVP", "vec4"));
27
- if (material.colorNode !== void 0) {
28
- this.addSlot("fragment", new NodeSlot(material.colorNode, "COLOR", "vec4"));
29
- }
30
- if (material.opacityNode !== void 0) {
31
- this.addSlot("fragment", new NodeSlot(material.opacityNode, "OPACITY", "float"));
32
- }
33
- }
34
- }
35
- getTexture(textureProperty, uvSnippet) {
36
- return `texture( sampler2D( ${textureProperty}, ${textureProperty}_sampler ), ${uvSnippet} )`;
37
- }
38
- getPropertyName(node) {
39
- if (node.isNodeUniform) {
40
- const name = node.name;
41
- const type = node.type;
42
- if (type === "texture") {
43
- return name;
44
- } else {
45
- return `nodeUniforms.${name}`;
46
- }
47
- }
48
- return super.getPropertyName(node);
49
- }
50
- getBindings() {
51
- const bindings = this.bindings;
52
- return [...bindings.vertex, ...bindings.fragment];
53
- }
54
- getUniformFromNode(node, shaderStage, type) {
55
- const uniformNode = super.getUniformFromNode(node, shaderStage, type);
56
- const nodeData = this.getDataFromNode(node, shaderStage);
57
- if (nodeData.uniformGPU === void 0) {
58
- let uniformGPU;
59
- const bindings = this.bindings[shaderStage];
60
- if (type === "texture") {
61
- const sampler = new WebGPUSampler(`${uniformNode.name}_sampler`, uniformNode.value);
62
- const texture = new WebGPUSampledTexture(uniformNode.name, uniformNode.value);
63
- const lastBinding = bindings[bindings.length - 1];
64
- const index = lastBinding && lastBinding.isUniformsGroup ? bindings.length - 1 : bindings.length;
65
- bindings.splice(index, 0, sampler, texture);
66
- uniformGPU = { sampler, texture };
67
- } else {
68
- let uniformsGroup = this.uniformsGroup[shaderStage];
69
- if (uniformsGroup === void 0) {
70
- uniformsGroup = new WebGPUNodeUniformsGroup(shaderStage);
71
- this.uniformsGroup[shaderStage] = uniformsGroup;
72
- bindings.push(uniformsGroup);
73
- }
74
- if (type === "float") {
75
- uniformGPU = new FloatNodeUniform(uniformNode);
76
- } else if (type === "vec2") {
77
- uniformGPU = new Vector2NodeUniform(uniformNode);
78
- } else if (type === "vec3") {
79
- uniformGPU = new Vector3NodeUniform(uniformNode);
80
- } else if (type === "vec4") {
81
- uniformGPU = new Vector4NodeUniform(uniformNode);
82
- } else if (type === "color") {
83
- uniformGPU = new ColorNodeUniform(uniformNode);
84
- } else if (type === "mat3") {
85
- uniformGPU = new Matrix3NodeUniform(uniformNode);
86
- } else if (type === "mat4") {
87
- uniformGPU = new Matrix4NodeUniform(uniformNode);
88
- } else {
89
- throw new Error(`Uniform "${type}" not declared.`);
90
- }
91
- uniformsGroup.addUniform(uniformGPU);
92
- }
93
- nodeData.uniformGPU = uniformGPU;
94
- if (shaderStage === "vertex") {
95
- this.bindingsOffset["fragment"] = bindings.length;
96
- }
97
- }
98
- return uniformNode;
99
- }
100
- getAttributesHeaderSnippet(shaderStage) {
101
- let snippet = "";
102
- if (shaderStage === "vertex") {
103
- const attributes = this.attributes;
104
- for (let index = 0; index < attributes.length; index++) {
105
- const attribute = attributes[index];
106
- snippet += `layout(location = ${index}) in ${attribute.type} ${attribute.name};`;
107
- }
108
- }
109
- return snippet;
110
- }
111
- getVarysHeaderSnippet(shaderStage) {
112
- let snippet = "";
113
- const varys = this.varys;
114
- const ioStage = shaderStage === "vertex" ? "out" : "in";
115
- for (let index = 0; index < varys.length; index++) {
116
- const vary = varys[index];
117
- snippet += `layout(location = ${index}) ${ioStage} ${vary.type} ${vary.name};`;
118
- }
119
- return snippet;
120
- }
121
- getVarysBodySnippet(shaderStage) {
122
- let snippet = "";
123
- if (shaderStage === "vertex") {
124
- for (let vary of this.varys) {
125
- snippet += `${vary.name} = ${vary.snippet};`;
126
- }
127
- }
128
- return snippet;
129
- }
130
- getUniformsHeaderSnippet(shaderStage) {
131
- const uniforms = this.uniforms[shaderStage];
132
- let snippet = "";
133
- let groupSnippet = "";
134
- let index = this.bindingsOffset[shaderStage];
135
- for (let uniform of uniforms) {
136
- if (uniform.type === "texture") {
137
- snippet += `layout(set = 0, binding = ${index++}) uniform sampler ${uniform.name}_sampler;`;
138
- snippet += `layout(set = 0, binding = ${index++}) uniform texture2D ${uniform.name};`;
139
- } else {
140
- const vectorType = this.getVectorType(uniform.type);
141
- groupSnippet += `uniform ${vectorType} ${uniform.name};`;
142
- }
143
- }
144
- if (groupSnippet) {
145
- snippet += `layout(set = 0, binding = ${index++}) uniform NodeUniforms { ${groupSnippet} } nodeUniforms;`;
146
- }
147
- return snippet;
148
- }
149
- composeShaderCode(code, snippet) {
150
- const versionStrIndex = code.indexOf("\n");
151
- let finalCode = code.substr(0, versionStrIndex) + "\n\n";
152
- finalCode += snippet;
153
- finalCode += code.substr(versionStrIndex);
154
- return finalCode;
155
- }
156
- build() {
157
- super.build();
158
- this.vertexShader = this.composeShaderCode(this.nativeShader.vertexShader, this.vertexShader);
159
- this.fragmentShader = this.composeShaderCode(this.nativeShader.fragmentShader, this.fragmentShader);
160
- return this;
161
- }
162
- }
163
- export {
164
- WebGPUNodeBuilder as default
165
- };