three-stdlib 2.22.7 → 2.22.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1065) hide show
  1. package/dist/_polyfill/CompressedArrayTexture.js +12 -0
  2. package/dist/_polyfill/CompressedArrayTexture.mjs +12 -0
  3. package/dist/_polyfill/Data3DTexture.js +17 -0
  4. package/dist/_polyfill/Data3DTexture.mjs +17 -0
  5. package/dist/animation/AnimationClipCreator.d.ts +12 -0
  6. package/dist/animation/AnimationClipCreator.js +57 -0
  7. package/dist/animation/AnimationClipCreator.mjs +57 -0
  8. package/dist/animation/CCDIKSolver.d.ts +25 -0
  9. package/dist/animation/CCDIKSolver.js +224 -0
  10. package/dist/animation/CCDIKSolver.mjs +224 -0
  11. package/dist/animation/MMDAnimationHelper.d.ts +93 -0
  12. package/dist/animation/MMDAnimationHelper.js +590 -0
  13. package/dist/animation/MMDAnimationHelper.mjs +590 -0
  14. package/dist/animation/MMDPhysics.d.ts +114 -0
  15. package/dist/animation/MMDPhysics.js +819 -0
  16. package/dist/animation/MMDPhysics.mjs +819 -0
  17. package/dist/cameras/CinematicCamera.d.ts +34 -0
  18. package/dist/cameras/CinematicCamera.js +131 -0
  19. package/dist/cameras/CinematicCamera.mjs +131 -0
  20. package/dist/controls/ArcballControls.d.ts +374 -0
  21. package/dist/controls/ArcballControls.js +2039 -0
  22. package/dist/controls/ArcballControls.mjs +2039 -0
  23. package/dist/controls/DeviceOrientationControls.d.ts +27 -0
  24. package/dist/controls/DeviceOrientationControls.js +84 -0
  25. package/dist/controls/DeviceOrientationControls.mjs +84 -0
  26. package/dist/controls/DragControls.d.ts +34 -0
  27. package/dist/controls/DragControls.js +182 -0
  28. package/dist/controls/DragControls.mjs +182 -0
  29. package/dist/controls/FirstPersonControls.d.ts +48 -0
  30. package/dist/controls/FirstPersonControls.js +229 -0
  31. package/dist/controls/FirstPersonControls.mjs +229 -0
  32. package/dist/controls/FlyControls.d.ts +32 -0
  33. package/dist/controls/FlyControls.js +248 -0
  34. package/dist/controls/FlyControls.mjs +248 -0
  35. package/dist/controls/OrbitControls.d.ts +63 -0
  36. package/dist/controls/OrbitControls.js +781 -0
  37. package/dist/controls/OrbitControls.mjs +781 -0
  38. package/dist/controls/PointerLockControls.d.ts +24 -0
  39. package/dist/controls/PointerLockControls.js +103 -0
  40. package/dist/controls/PointerLockControls.mjs +103 -0
  41. package/dist/controls/TrackballControls.d.ts +95 -0
  42. package/dist/controls/TrackballControls.js +502 -0
  43. package/dist/controls/TrackballControls.mjs +502 -0
  44. package/dist/controls/TransformControls.d.ts +151 -0
  45. package/dist/controls/TransformControls.js +1089 -0
  46. package/dist/controls/TransformControls.mjs +1089 -0
  47. package/dist/controls/experimental/CameraControls.d.ts +212 -0
  48. package/dist/controls/experimental/CameraControls.js +736 -0
  49. package/dist/controls/experimental/CameraControls.mjs +736 -0
  50. package/dist/csm/CSM.d.ts +61 -0
  51. package/dist/csm/CSM.js +244 -0
  52. package/dist/csm/CSM.mjs +244 -0
  53. package/dist/csm/CSMFrustum.d.ts +19 -0
  54. package/dist/csm/CSMFrustum.js +75 -0
  55. package/dist/csm/CSMFrustum.mjs +75 -0
  56. package/dist/csm/CSMHelper.d.ts +26 -0
  57. package/dist/csm/CSMHelper.js +114 -0
  58. package/dist/csm/CSMHelper.mjs +114 -0
  59. package/dist/csm/CSMShader.d.ts +4 -0
  60. package/dist/csm/CSMShader.js +257 -0
  61. package/dist/csm/CSMShader.mjs +257 -0
  62. package/dist/curves/CurveExtras.d.ts +68 -0
  63. package/dist/curves/CurveExtras.js +224 -0
  64. package/dist/curves/CurveExtras.mjs +224 -0
  65. package/dist/curves/NURBSCurve.d.ts +11 -0
  66. package/dist/curves/NURBSCurve.js +35 -0
  67. package/dist/curves/NURBSCurve.mjs +35 -0
  68. package/dist/curves/NURBSSurface.d.ts +13 -0
  69. package/dist/curves/NURBSSurface.js +28 -0
  70. package/dist/curves/NURBSSurface.mjs +28 -0
  71. package/dist/curves/NURBSUtils.d.ts +22 -0
  72. package/dist/curves/NURBSUtils.js +226 -0
  73. package/dist/curves/NURBSUtils.mjs +226 -0
  74. package/dist/custom.d.ts +5 -0
  75. package/dist/deprecated/Geometry.d.ts +342 -0
  76. package/dist/deprecated/Geometry.js +971 -0
  77. package/dist/deprecated/Geometry.mjs +971 -0
  78. package/dist/effects/AnaglyphEffect.d.ts +11 -0
  79. package/dist/effects/AnaglyphEffect.js +121 -0
  80. package/dist/effects/AnaglyphEffect.mjs +121 -0
  81. package/dist/effects/AsciiEffect.d.ts +18 -0
  82. package/dist/effects/AsciiEffect.js +173 -0
  83. package/dist/effects/AsciiEffect.mjs +173 -0
  84. package/dist/effects/OutlineEffect.d.ts +28 -0
  85. package/dist/effects/OutlineEffect.js +298 -0
  86. package/dist/effects/OutlineEffect.mjs +298 -0
  87. package/dist/effects/ParallaxBarrierEffect.d.ts +8 -0
  88. package/dist/effects/ParallaxBarrierEffect.js +64 -0
  89. package/dist/effects/ParallaxBarrierEffect.mjs +64 -0
  90. package/dist/effects/PeppersGhostEffect.d.ts +10 -0
  91. package/dist/effects/PeppersGhostEffect.js +85 -0
  92. package/dist/effects/PeppersGhostEffect.mjs +85 -0
  93. package/dist/effects/StereoEffect.d.ts +9 -0
  94. package/dist/effects/StereoEffect.js +32 -0
  95. package/dist/effects/StereoEffect.mjs +32 -0
  96. package/dist/environments/RoomEnvironment.d.ts +5 -0
  97. package/dist/environments/RoomEnvironment.js +95 -0
  98. package/dist/environments/RoomEnvironment.mjs +78 -0
  99. package/dist/exporters/ColladaExporter.d.ts +50 -0
  100. package/dist/exporters/ColladaExporter.js +331 -0
  101. package/dist/exporters/ColladaExporter.mjs +331 -0
  102. package/dist/exporters/DRACOExporter.d.ts +23 -0
  103. package/dist/exporters/DRACOExporter.js +141 -0
  104. package/dist/exporters/DRACOExporter.mjs +141 -0
  105. package/dist/exporters/GLTFExporter.d.ts +446 -0
  106. package/dist/exporters/GLTFExporter.js +1575 -0
  107. package/dist/exporters/GLTFExporter.mjs +1575 -0
  108. package/dist/exporters/MMDExporter.d.ts +12 -0
  109. package/dist/exporters/MMDExporter.js +131 -0
  110. package/dist/exporters/MMDExporter.mjs +131 -0
  111. package/dist/exporters/OBJExporter.d.ts +18 -0
  112. package/dist/exporters/OBJExporter.js +181 -0
  113. package/dist/exporters/OBJExporter.mjs +181 -0
  114. package/dist/exporters/PLYExporter.d.ts +23 -0
  115. package/dist/exporters/PLYExporter.js +280 -0
  116. package/dist/exporters/PLYExporter.mjs +280 -0
  117. package/dist/exporters/STLExporter.d.ts +31 -0
  118. package/dist/exporters/STLExporter.js +146 -0
  119. package/dist/exporters/STLExporter.mjs +146 -0
  120. package/dist/exporters/USDZExporter.d.ts +27 -0
  121. package/dist/exporters/USDZExporter.js +340 -0
  122. package/dist/exporters/USDZExporter.mjs +340 -0
  123. package/dist/geometries/BoxLineGeometry.d.ts +12 -0
  124. package/dist/geometries/BoxLineGeometry.js +45 -0
  125. package/dist/geometries/BoxLineGeometry.mjs +45 -0
  126. package/dist/geometries/ConvexGeometry.d.ts +5 -0
  127. package/dist/geometries/ConvexGeometry.js +29 -0
  128. package/dist/geometries/ConvexGeometry.mjs +29 -0
  129. package/dist/geometries/DecalGeometry.d.ts +10 -0
  130. package/dist/geometries/DecalGeometry.js +184 -0
  131. package/dist/geometries/DecalGeometry.mjs +184 -0
  132. package/dist/geometries/LightningStrike.d.ts +108 -0
  133. package/dist/geometries/LightningStrike.js +548 -0
  134. package/dist/geometries/LightningStrike.mjs +548 -0
  135. package/dist/geometries/ParametricGeometries.d.ts +26 -0
  136. package/dist/geometries/ParametricGeometries.js +129 -0
  137. package/dist/geometries/ParametricGeometries.mjs +129 -0
  138. package/dist/geometries/ParametricGeometry.d.ts +18 -0
  139. package/dist/geometries/ParametricGeometry.js +63 -0
  140. package/dist/geometries/ParametricGeometry.mjs +63 -0
  141. package/dist/geometries/RoundedBoxGeometry.d.ts +5 -0
  142. package/dist/geometries/RoundedBoxGeometry.js +91 -0
  143. package/dist/geometries/RoundedBoxGeometry.mjs +91 -0
  144. package/dist/geometries/TeapotGeometry.d.ts +13 -0
  145. package/dist/geometries/TeapotGeometry.js +1563 -0
  146. package/dist/geometries/TeapotGeometry.mjs +1563 -0
  147. package/dist/geometries/TextGeometry.d.ts +18 -0
  148. package/dist/geometries/TextGeometry.js +27 -0
  149. package/dist/geometries/TextGeometry.mjs +27 -0
  150. package/dist/helpers/LightProbeHelper.d.ts +10 -0
  151. package/dist/helpers/LightProbeHelper.js +73 -0
  152. package/dist/helpers/LightProbeHelper.mjs +73 -0
  153. package/dist/helpers/PositionalAudioHelper.d.ts +13 -0
  154. package/dist/helpers/PositionalAudioHelper.js +68 -0
  155. package/dist/helpers/PositionalAudioHelper.mjs +68 -0
  156. package/dist/helpers/RectAreaLightHelper.d.ts +10 -0
  157. package/dist/helpers/RectAreaLightHelper.js +44 -0
  158. package/dist/helpers/RectAreaLightHelper.mjs +44 -0
  159. package/dist/helpers/VertexNormalsHelper.d.ts +10 -0
  160. package/dist/helpers/VertexNormalsHelper.js +54 -0
  161. package/dist/helpers/VertexNormalsHelper.mjs +54 -0
  162. package/dist/helpers/VertexTangentsHelper.d.ts +10 -0
  163. package/dist/helpers/VertexTangentsHelper.js +45 -0
  164. package/dist/helpers/VertexTangentsHelper.mjs +45 -0
  165. package/dist/index.d.ts +325 -0
  166. package/dist/index.js +978 -0
  167. package/dist/index.mjs +978 -0
  168. package/dist/interactive/HTMLMesh.d.ts +6 -0
  169. package/dist/interactive/HTMLMesh.js +325 -0
  170. package/dist/interactive/HTMLMesh.mjs +325 -0
  171. package/dist/interactive/InteractiveGroup.d.ts +5 -0
  172. package/dist/interactive/InteractiveGroup.js +68 -0
  173. package/dist/interactive/InteractiveGroup.mjs +68 -0
  174. package/dist/interactive/SelectionBox.d.ts +15 -0
  175. package/dist/interactive/SelectionBox.js +137 -0
  176. package/dist/interactive/SelectionBox.mjs +137 -0
  177. package/dist/interactive/SelectionHelper.d.ts +17 -0
  178. package/dist/interactive/SelectionHelper.js +54 -0
  179. package/dist/interactive/SelectionHelper.mjs +54 -0
  180. package/dist/libs/MeshoptDecoder.d.ts +12 -0
  181. package/dist/libs/MeshoptDecoder.js +221 -0
  182. package/dist/libs/MeshoptDecoder.mjs +221 -0
  183. package/dist/libs/MotionControllers.d.ts +175 -0
  184. package/dist/libs/MotionControllers.js +325 -0
  185. package/dist/libs/MotionControllers.mjs +325 -0
  186. package/dist/lights/LightProbeGenerator.d.ts +6 -0
  187. package/dist/lights/LightProbeGenerator.js +145 -0
  188. package/dist/lights/LightProbeGenerator.mjs +145 -0
  189. package/dist/lights/RectAreaLightUniformsLib.d.ts +3 -0
  190. package/dist/lights/RectAreaLightUniformsLib.js +32842 -0
  191. package/dist/lights/RectAreaLightUniformsLib.mjs +32842 -0
  192. package/dist/lines/Line2.d.ts +11 -0
  193. package/dist/lines/Line2.js +13 -0
  194. package/dist/lines/Line2.mjs +13 -0
  195. package/dist/lines/LineGeometry.d.ts +10 -0
  196. package/dist/lines/LineGeometry.js +44 -0
  197. package/dist/lines/LineGeometry.mjs +44 -0
  198. package/dist/lines/LineMaterial.d.ts +31 -0
  199. package/dist/lines/LineMaterial.js +547 -0
  200. package/dist/lines/LineMaterial.mjs +547 -0
  201. package/dist/lines/LineSegments2.d.ts +14 -0
  202. package/dist/lines/LineSegments2.js +203 -0
  203. package/dist/lines/LineSegments2.mjs +203 -0
  204. package/dist/lines/LineSegmentsGeometry.d.ts +16 -0
  205. package/dist/lines/LineSegmentsGeometry.js +124 -0
  206. package/dist/lines/LineSegmentsGeometry.mjs +124 -0
  207. package/dist/lines/Wireframe.d.ts +11 -0
  208. package/dist/lines/Wireframe.js +32 -0
  209. package/dist/lines/Wireframe.mjs +32 -0
  210. package/dist/lines/WireframeGeometry2.d.ts +8 -0
  211. package/dist/lines/WireframeGeometry2.js +13 -0
  212. package/dist/lines/WireframeGeometry2.mjs +13 -0
  213. package/dist/loaders/3DMLoader.d.ts +17 -0
  214. package/dist/loaders/3DMLoader.js +803 -0
  215. package/dist/loaders/3DMLoader.mjs +803 -0
  216. package/dist/loaders/3MFLoader.d.ts +16 -0
  217. package/dist/loaders/3MFLoader.js +854 -0
  218. package/dist/loaders/3MFLoader.mjs +854 -0
  219. package/dist/loaders/AMFLoader.d.ts +14 -0
  220. package/dist/loaders/AMFLoader.js +284 -0
  221. package/dist/loaders/AMFLoader.mjs +284 -0
  222. package/dist/loaders/AssimpLoader.js +1396 -0
  223. package/dist/loaders/AssimpLoader.mjs +1396 -0
  224. package/dist/loaders/BVHLoader.d.ts +21 -0
  225. package/dist/loaders/BVHLoader.js +207 -0
  226. package/dist/loaders/BVHLoader.mjs +207 -0
  227. package/dist/loaders/BasisTextureLoader.d.ts +32 -0
  228. package/dist/loaders/BasisTextureLoader.js +480 -0
  229. package/dist/loaders/BasisTextureLoader.mjs +480 -0
  230. package/dist/loaders/ColladaLoader.d.ts +20 -0
  231. package/dist/loaders/ColladaLoader.js +2405 -0
  232. package/dist/loaders/ColladaLoader.mjs +2405 -0
  233. package/dist/loaders/DDSLoader.d.ts +16 -0
  234. package/dist/loaders/DDSLoader.js +148 -0
  235. package/dist/loaders/DDSLoader.mjs +148 -0
  236. package/dist/loaders/DRACOLoader.d.ts +18 -0
  237. package/dist/loaders/DRACOLoader.js +341 -0
  238. package/dist/loaders/DRACOLoader.mjs +341 -0
  239. package/dist/loaders/EXRLoader.d.ts +18 -0
  240. package/dist/loaders/EXRLoader.js +1354 -0
  241. package/dist/loaders/EXRLoader.mjs +1354 -0
  242. package/dist/loaders/FBXLoader.d.ts +14 -0
  243. package/dist/loaders/FBXLoader.js +2457 -0
  244. package/dist/loaders/FBXLoader.mjs +2457 -0
  245. package/dist/loaders/FontLoader.d.ts +36 -0
  246. package/dist/loaders/FontLoader.js +120 -0
  247. package/dist/loaders/FontLoader.mjs +120 -0
  248. package/dist/loaders/GCodeLoader.d.ts +15 -0
  249. package/dist/loaders/GCodeLoader.js +141 -0
  250. package/dist/loaders/GCodeLoader.mjs +141 -0
  251. package/dist/loaders/GLTFLoader.d.ts +153 -0
  252. package/dist/loaders/GLTFLoader.js +2459 -0
  253. package/dist/loaders/GLTFLoader.mjs +2459 -0
  254. package/dist/loaders/HDRCubeTextureLoader.d.ts +18 -0
  255. package/dist/loaders/HDRCubeTextureLoader.js +75 -0
  256. package/dist/loaders/HDRCubeTextureLoader.mjs +75 -0
  257. package/dist/loaders/KMZLoader.d.ts +16 -0
  258. package/dist/loaders/KMZLoader.js +75 -0
  259. package/dist/loaders/KMZLoader.mjs +75 -0
  260. package/dist/loaders/KTX2Loader.d.ts +16 -0
  261. package/dist/loaders/KTX2Loader.js +461 -0
  262. package/dist/loaders/KTX2Loader.mjs +461 -0
  263. package/dist/loaders/KTXLoader.d.ts +16 -0
  264. package/dist/loaders/KTXLoader.js +93 -0
  265. package/dist/loaders/KTXLoader.mjs +93 -0
  266. package/dist/loaders/LDrawLoader.d.ts +26 -0
  267. package/dist/loaders/LDrawLoader.js +1424 -0
  268. package/dist/loaders/LDrawLoader.mjs +1424 -0
  269. package/dist/loaders/LUT3dlLoader.d.ts +20 -0
  270. package/dist/loaders/LUT3dlLoader.js +103 -0
  271. package/dist/loaders/LUT3dlLoader.mjs +103 -0
  272. package/dist/loaders/LUTCubeLoader.d.ts +23 -0
  273. package/dist/loaders/LUTCubeLoader.js +107 -0
  274. package/dist/loaders/LUTCubeLoader.mjs +107 -0
  275. package/dist/loaders/LWOLoader.d.ts +26 -0
  276. package/dist/loaders/LWOLoader.js +645 -0
  277. package/dist/loaders/LWOLoader.mjs +645 -0
  278. package/dist/loaders/LottieLoader.d.ts +15 -0
  279. package/dist/loaders/LottieLoader.js +47 -0
  280. package/dist/loaders/LottieLoader.mjs +47 -0
  281. package/dist/loaders/MD2Loader.d.ts +14 -0
  282. package/dist/loaders/MD2Loader.js +359 -0
  283. package/dist/loaders/MD2Loader.mjs +359 -0
  284. package/dist/loaders/MDDLoader.d.ts +19 -0
  285. package/dist/loaders/MDDLoader.js +58 -0
  286. package/dist/loaders/MDDLoader.mjs +58 -0
  287. package/dist/loaders/MMDLoader.d.ts +63 -0
  288. package/dist/loaders/MMDLoader.js +1121 -0
  289. package/dist/loaders/MMDLoader.mjs +1121 -0
  290. package/dist/loaders/MTLLoader.d.ts +100 -0
  291. package/dist/loaders/MTLLoader.js +304 -0
  292. package/dist/loaders/MTLLoader.mjs +304 -0
  293. package/dist/loaders/NRRDLoader.d.ts +21 -0
  294. package/dist/loaders/NRRDLoader.js +401 -0
  295. package/dist/loaders/NRRDLoader.mjs +401 -0
  296. package/dist/loaders/NodeMaterialLoader.js +146 -0
  297. package/dist/loaders/NodeMaterialLoader.mjs +146 -0
  298. package/dist/loaders/OBJLoader.d.ts +17 -0
  299. package/dist/loaders/OBJLoader.js +487 -0
  300. package/dist/loaders/OBJLoader.mjs +487 -0
  301. package/dist/loaders/PCDLoader.d.ts +15 -0
  302. package/dist/loaders/PCDLoader.js +248 -0
  303. package/dist/loaders/PCDLoader.mjs +248 -0
  304. package/dist/loaders/PDBLoader.d.ts +22 -0
  305. package/dist/loaders/PDBLoader.js +247 -0
  306. package/dist/loaders/PDBLoader.mjs +247 -0
  307. package/dist/loaders/PLYLoader.d.ts +16 -0
  308. package/dist/loaders/PLYLoader.js +317 -0
  309. package/dist/loaders/PLYLoader.mjs +317 -0
  310. package/dist/loaders/PRWMLoader.d.ts +16 -0
  311. package/dist/loaders/PRWMLoader.js +160 -0
  312. package/dist/loaders/PRWMLoader.mjs +160 -0
  313. package/dist/loaders/PVRLoader.d.ts +16 -0
  314. package/dist/loaders/PVRLoader.js +131 -0
  315. package/dist/loaders/PVRLoader.mjs +131 -0
  316. package/dist/loaders/RGBELoader.d.ts +20 -0
  317. package/dist/loaders/RGBELoader.js +252 -0
  318. package/dist/loaders/RGBELoader.mjs +252 -0
  319. package/dist/loaders/RGBMLoader.d.ts +32 -0
  320. package/dist/loaders/RGBMLoader.js +998 -0
  321. package/dist/loaders/RGBMLoader.mjs +998 -0
  322. package/dist/loaders/STLLoader.d.ts +14 -0
  323. package/dist/loaders/STLLoader.js +190 -0
  324. package/dist/loaders/STLLoader.mjs +190 -0
  325. package/dist/loaders/SVGLoader.d.ts +63 -0
  326. package/dist/loaders/SVGLoader.js +1712 -0
  327. package/dist/loaders/SVGLoader.mjs +1712 -0
  328. package/dist/loaders/TDSLoader.d.ts +42 -0
  329. package/dist/loaders/TDSLoader.js +650 -0
  330. package/dist/loaders/TDSLoader.mjs +650 -0
  331. package/dist/loaders/TGALoader.d.ts +14 -0
  332. package/dist/loaders/TGALoader.js +285 -0
  333. package/dist/loaders/TGALoader.mjs +285 -0
  334. package/dist/loaders/TTFLoader.d.ts +15 -0
  335. package/dist/loaders/TTFLoader.js +131 -0
  336. package/dist/loaders/TTFLoader.mjs +131 -0
  337. package/dist/loaders/TiltLoader.d.ts +14 -0
  338. package/dist/loaders/TiltLoader.js +373 -0
  339. package/dist/loaders/TiltLoader.mjs +373 -0
  340. package/dist/loaders/VOXLoader.d.ts +28 -0
  341. package/dist/loaders/VOXLoader.js +432 -0
  342. package/dist/loaders/VOXLoader.mjs +432 -0
  343. package/dist/loaders/VRMLLoader.d.ts +14 -0
  344. package/dist/loaders/VRMLLoader.js +2105 -0
  345. package/dist/loaders/VRMLLoader.mjs +2105 -0
  346. package/dist/loaders/VRMLoader.js +38 -0
  347. package/dist/loaders/VRMLoader.mjs +38 -0
  348. package/dist/loaders/VTKLoader.d.ts +14 -0
  349. package/dist/loaders/VTKLoader.js +648 -0
  350. package/dist/loaders/VTKLoader.mjs +648 -0
  351. package/dist/loaders/XLoader.js +1258 -0
  352. package/dist/loaders/XLoader.mjs +1258 -0
  353. package/dist/loaders/XYZLoader.d.ts +14 -0
  354. package/dist/loaders/XYZLoader.js +60 -0
  355. package/dist/loaders/XYZLoader.mjs +60 -0
  356. package/dist/loaders/lwo/IFFParser.js +749 -0
  357. package/dist/loaders/lwo/IFFParser.mjs +749 -0
  358. package/dist/loaders/lwo/LWO2Parser.js +327 -0
  359. package/dist/loaders/lwo/LWO2Parser.mjs +327 -0
  360. package/dist/loaders/lwo/LWO3Parser.js +298 -0
  361. package/dist/loaders/lwo/LWO3Parser.mjs +298 -0
  362. package/dist/math/Capsule.d.ts +27 -0
  363. package/dist/math/Capsule.js +100 -0
  364. package/dist/math/Capsule.mjs +100 -0
  365. package/dist/math/ColorConverter.d.ts +21 -0
  366. package/dist/math/ColorConverter.js +52 -0
  367. package/dist/math/ColorConverter.mjs +52 -0
  368. package/dist/math/ConvexHull.d.ts +89 -0
  369. package/dist/math/ConvexHull.js +597 -0
  370. package/dist/math/ConvexHull.mjs +597 -0
  371. package/dist/math/ImprovedNoise.d.ts +4 -0
  372. package/dist/math/ImprovedNoise.js +302 -0
  373. package/dist/math/ImprovedNoise.mjs +302 -0
  374. package/dist/math/Lut.d.ts +27 -0
  375. package/dist/math/Lut.js +135 -0
  376. package/dist/math/Lut.mjs +135 -0
  377. package/dist/math/MeshSurfaceSampler.d.ts +15 -0
  378. package/dist/math/MeshSurfaceSampler.js +107 -0
  379. package/dist/math/MeshSurfaceSampler.mjs +107 -0
  380. package/dist/math/OBB.d.ts +24 -0
  381. package/dist/math/OBB.js +262 -0
  382. package/dist/math/OBB.mjs +262 -0
  383. package/dist/math/Octree.d.ts +24 -0
  384. package/dist/math/Octree.js +278 -0
  385. package/dist/math/Octree.mjs +278 -0
  386. package/dist/math/SimplexNoise.d.ts +21 -0
  387. package/dist/math/SimplexNoise.js +440 -0
  388. package/dist/math/SimplexNoise.mjs +440 -0
  389. package/dist/misc/ConvexObjectBreaker.d.ts +25 -0
  390. package/dist/misc/ConvexObjectBreaker.js +298 -0
  391. package/dist/misc/ConvexObjectBreaker.mjs +298 -0
  392. package/dist/misc/GPUComputationRenderer.d.ts +52 -0
  393. package/dist/misc/GPUComputationRenderer.js +171 -0
  394. package/dist/misc/GPUComputationRenderer.mjs +171 -0
  395. package/dist/misc/Gyroscope.d.ts +5 -0
  396. package/dist/misc/Gyroscope.js +35 -0
  397. package/dist/misc/Gyroscope.mjs +35 -0
  398. package/dist/misc/MD2Character.d.ts +33 -0
  399. package/dist/misc/MD2Character.js +165 -0
  400. package/dist/misc/MD2Character.mjs +165 -0
  401. package/dist/misc/MD2CharacterComplex.d.ts +47 -0
  402. package/dist/misc/MD2CharacterComplex.js +331 -0
  403. package/dist/misc/MD2CharacterComplex.mjs +331 -0
  404. package/dist/misc/MorphAnimMesh.d.ts +13 -0
  405. package/dist/misc/MorphAnimMesh.js +40 -0
  406. package/dist/misc/MorphAnimMesh.mjs +40 -0
  407. package/dist/misc/MorphBlendMesh.d.ts +21 -0
  408. package/dist/misc/MorphBlendMesh.js +179 -0
  409. package/dist/misc/MorphBlendMesh.mjs +179 -0
  410. package/dist/misc/ProgressiveLightmap.d.ts +61 -0
  411. package/dist/misc/ProgressiveLightmap.js +186 -0
  412. package/dist/misc/ProgressiveLightmap.mjs +186 -0
  413. package/dist/misc/RollerCoaster.d.ts +21 -0
  414. package/dist/misc/RollerCoaster.js +346 -0
  415. package/dist/misc/RollerCoaster.mjs +346 -0
  416. package/dist/misc/Timer.d.ts +27 -0
  417. package/dist/misc/Timer.js +101 -0
  418. package/dist/misc/Timer.mjs +101 -0
  419. package/dist/misc/TubePainter.d.ts +10 -0
  420. package/dist/misc/TubePainter.js +123 -0
  421. package/dist/misc/TubePainter.mjs +123 -0
  422. package/dist/misc/Volume.d.ts +37 -0
  423. package/dist/misc/Volume.js +302 -0
  424. package/dist/misc/Volume.mjs +302 -0
  425. package/dist/misc/VolumeSlice.d.ts +28 -0
  426. package/dist/misc/VolumeSlice.js +115 -0
  427. package/dist/misc/VolumeSlice.mjs +115 -0
  428. package/dist/misc/WebGL.d.ts +5 -0
  429. package/dist/misc/WebGL.js +74 -0
  430. package/dist/misc/WebGL.mjs +74 -0
  431. package/dist/modifiers/CurveModifier.d.ts +91 -0
  432. package/dist/modifiers/CurveModifier.js +232 -0
  433. package/dist/modifiers/CurveModifier.mjs +232 -0
  434. package/dist/modifiers/EdgeSplitModifier.d.ts +19 -0
  435. package/dist/modifiers/EdgeSplitModifier.js +167 -0
  436. package/dist/modifiers/EdgeSplitModifier.mjs +168 -0
  437. package/dist/modifiers/SimplifyModifier.d.ts +19 -0
  438. package/dist/modifiers/SimplifyModifier.js +300 -0
  439. package/dist/modifiers/SimplifyModifier.mjs +300 -0
  440. package/dist/modifiers/TessellateModifier.d.ts +11 -0
  441. package/dist/modifiers/TessellateModifier.js +214 -0
  442. package/dist/modifiers/TessellateModifier.mjs +214 -0
  443. package/dist/nodes/Nodes.js +347 -0
  444. package/dist/nodes/Nodes.mjs +347 -0
  445. package/dist/nodes/ShaderNode.js +408 -0
  446. package/dist/nodes/ShaderNode.mjs +408 -0
  447. package/dist/nodes/accessors/BufferNode.js +14 -0
  448. package/dist/nodes/accessors/BufferNode.mjs +15 -0
  449. package/dist/nodes/accessors/CameraNode.js +43 -0
  450. package/dist/nodes/accessors/CameraNode.mjs +44 -0
  451. package/dist/nodes/accessors/CubeTextureNode.js +41 -0
  452. package/dist/nodes/accessors/CubeTextureNode.mjs +42 -0
  453. package/dist/nodes/accessors/MaterialNode.js +70 -0
  454. package/dist/nodes/accessors/MaterialNode.mjs +71 -0
  455. package/dist/nodes/accessors/MaterialReferenceNode.js +13 -0
  456. package/dist/nodes/accessors/MaterialReferenceNode.mjs +14 -0
  457. package/dist/nodes/accessors/ModelNode.js +8 -0
  458. package/dist/nodes/accessors/ModelNode.mjs +9 -0
  459. package/dist/nodes/accessors/ModelViewProjectionNode.js +23 -0
  460. package/dist/nodes/accessors/ModelViewProjectionNode.mjs +24 -0
  461. package/dist/nodes/accessors/NormalNode.js +61 -0
  462. package/dist/nodes/accessors/NormalNode.mjs +62 -0
  463. package/dist/nodes/accessors/Object3DNode.js +75 -0
  464. package/dist/nodes/accessors/Object3DNode.mjs +76 -0
  465. package/dist/nodes/accessors/PointUVNode.js +12 -0
  466. package/dist/nodes/accessors/PointUVNode.mjs +13 -0
  467. package/dist/nodes/accessors/PositionNode.js +64 -0
  468. package/dist/nodes/accessors/PositionNode.mjs +65 -0
  469. package/dist/nodes/accessors/ReferenceNode.js +36 -0
  470. package/dist/nodes/accessors/ReferenceNode.mjs +37 -0
  471. package/dist/nodes/accessors/ReflectNode.js +42 -0
  472. package/dist/nodes/accessors/ReflectNode.mjs +43 -0
  473. package/dist/nodes/accessors/SkinningNode.js +57 -0
  474. package/dist/nodes/accessors/SkinningNode.mjs +58 -0
  475. package/dist/nodes/accessors/TextureNode.js +53 -0
  476. package/dist/nodes/accessors/TextureNode.mjs +54 -0
  477. package/dist/nodes/accessors/UVNode.js +22 -0
  478. package/dist/nodes/accessors/UVNode.mjs +23 -0
  479. package/dist/nodes/core/ArrayUniformNode.js +13 -0
  480. package/dist/nodes/core/ArrayUniformNode.mjs +14 -0
  481. package/dist/nodes/core/AttributeNode.js +29 -0
  482. package/dist/nodes/core/AttributeNode.mjs +30 -0
  483. package/dist/nodes/core/BypassNode.js +21 -0
  484. package/dist/nodes/core/BypassNode.mjs +22 -0
  485. package/dist/nodes/core/CodeNode.js +27 -0
  486. package/dist/nodes/core/CodeNode.mjs +28 -0
  487. package/dist/nodes/core/ConstNode.js +13 -0
  488. package/dist/nodes/core/ConstNode.mjs +14 -0
  489. package/dist/nodes/core/ContextNode.js +21 -0
  490. package/dist/nodes/core/ContextNode.mjs +22 -0
  491. package/dist/nodes/core/ExpressionNode.js +18 -0
  492. package/dist/nodes/core/ExpressionNode.mjs +19 -0
  493. package/dist/nodes/core/FunctionCallNode.js +36 -0
  494. package/dist/nodes/core/FunctionCallNode.mjs +37 -0
  495. package/dist/nodes/core/FunctionNode.js +55 -0
  496. package/dist/nodes/core/FunctionNode.mjs +56 -0
  497. package/dist/nodes/core/InputNode.js +37 -0
  498. package/dist/nodes/core/InputNode.mjs +38 -0
  499. package/dist/nodes/core/Node.js +138 -0
  500. package/dist/nodes/core/Node.mjs +139 -0
  501. package/dist/nodes/core/NodeAttribute.js +9 -0
  502. package/dist/nodes/core/NodeAttribute.mjs +10 -0
  503. package/dist/nodes/core/NodeBuilder.js +402 -0
  504. package/dist/nodes/core/NodeBuilder.mjs +402 -0
  505. package/dist/nodes/core/NodeCode.js +10 -0
  506. package/dist/nodes/core/NodeCode.mjs +11 -0
  507. package/dist/nodes/core/NodeFrame.js +34 -0
  508. package/dist/nodes/core/NodeFrame.mjs +35 -0
  509. package/dist/nodes/core/NodeFunctionInput.js +12 -0
  510. package/dist/nodes/core/NodeFunctionInput.mjs +13 -0
  511. package/dist/nodes/core/NodeKeywords.js +43 -0
  512. package/dist/nodes/core/NodeKeywords.mjs +44 -0
  513. package/dist/nodes/core/NodeUniform.js +17 -0
  514. package/dist/nodes/core/NodeUniform.mjs +18 -0
  515. package/dist/nodes/core/NodeUtils.js +57 -0
  516. package/dist/nodes/core/NodeUtils.mjs +57 -0
  517. package/dist/nodes/core/NodeVar.js +9 -0
  518. package/dist/nodes/core/NodeVar.mjs +10 -0
  519. package/dist/nodes/core/NodeVary.js +9 -0
  520. package/dist/nodes/core/NodeVary.mjs +10 -0
  521. package/dist/nodes/core/PropertyNode.js +20 -0
  522. package/dist/nodes/core/PropertyNode.mjs +21 -0
  523. package/dist/nodes/core/TempNode.js +24 -0
  524. package/dist/nodes/core/TempNode.mjs +25 -0
  525. package/dist/nodes/core/UniformNode.js +22 -0
  526. package/dist/nodes/core/UniformNode.mjs +23 -0
  527. package/dist/nodes/core/VarNode.js +30 -0
  528. package/dist/nodes/core/VarNode.mjs +31 -0
  529. package/dist/nodes/core/VaryNode.js +29 -0
  530. package/dist/nodes/core/VaryNode.mjs +30 -0
  531. package/dist/nodes/core/constants.js +24 -0
  532. package/dist/nodes/core/constants.mjs +24 -0
  533. package/dist/nodes/display/ColorSpaceNode.js +62 -0
  534. package/dist/nodes/display/ColorSpaceNode.mjs +62 -0
  535. package/dist/nodes/display/NormalMapNode.js +53 -0
  536. package/dist/nodes/display/NormalMapNode.mjs +54 -0
  537. package/dist/nodes/fog/FogNode.js +14 -0
  538. package/dist/nodes/fog/FogNode.mjs +15 -0
  539. package/dist/nodes/fog/FogRangeNode.js +16 -0
  540. package/dist/nodes/fog/FogRangeNode.mjs +17 -0
  541. package/dist/nodes/functions/BSDFs.js +64 -0
  542. package/dist/nodes/functions/BSDFs.mjs +64 -0
  543. package/dist/nodes/lights/LightContextNode.js +34 -0
  544. package/dist/nodes/lights/LightContextNode.mjs +35 -0
  545. package/dist/nodes/lights/LightNode.js +57 -0
  546. package/dist/nodes/lights/LightNode.mjs +58 -0
  547. package/dist/nodes/lights/LightsNode.js +58 -0
  548. package/dist/nodes/lights/LightsNode.mjs +59 -0
  549. package/dist/nodes/loaders/NodeLoader.js +195 -0
  550. package/dist/nodes/loaders/NodeLoader.mjs +196 -0
  551. package/dist/nodes/loaders/NodeMaterialLoader.js +23 -0
  552. package/dist/nodes/loaders/NodeMaterialLoader.mjs +24 -0
  553. package/dist/nodes/loaders/NodeObjectLoader.js +39 -0
  554. package/dist/nodes/loaders/NodeObjectLoader.mjs +40 -0
  555. package/dist/nodes/materials/LineBasicNodeMaterial.js +26 -0
  556. package/dist/nodes/materials/LineBasicNodeMaterial.mjs +27 -0
  557. package/dist/nodes/materials/Materials.js +24 -0
  558. package/dist/nodes/materials/Materials.mjs +24 -0
  559. package/dist/nodes/materials/MeshBasicNodeMaterial.js +27 -0
  560. package/dist/nodes/materials/MeshBasicNodeMaterial.mjs +28 -0
  561. package/dist/nodes/materials/MeshStandardNodeMaterial.js +40 -0
  562. package/dist/nodes/materials/MeshStandardNodeMaterial.mjs +41 -0
  563. package/dist/nodes/materials/NodeMaterial.js +63 -0
  564. package/dist/nodes/materials/NodeMaterial.mjs +64 -0
  565. package/dist/nodes/materials/PointsNodeMaterial.js +29 -0
  566. package/dist/nodes/materials/PointsNodeMaterial.mjs +30 -0
  567. package/dist/nodes/math/CondNode.js +40 -0
  568. package/dist/nodes/math/CondNode.mjs +41 -0
  569. package/dist/nodes/math/MathNode.js +165 -0
  570. package/dist/nodes/math/MathNode.mjs +166 -0
  571. package/dist/nodes/math/OperatorNode.js +102 -0
  572. package/dist/nodes/math/OperatorNode.mjs +103 -0
  573. package/dist/nodes/procedural/CheckerNode.js +20 -0
  574. package/dist/nodes/procedural/CheckerNode.mjs +21 -0
  575. package/dist/nodes/utils/ArrayElementNode.js +18 -0
  576. package/dist/nodes/utils/ArrayElementNode.mjs +19 -0
  577. package/dist/nodes/utils/ConvertNode.js +24 -0
  578. package/dist/nodes/utils/ConvertNode.mjs +25 -0
  579. package/dist/nodes/utils/JoinNode.js +25 -0
  580. package/dist/nodes/utils/JoinNode.mjs +26 -0
  581. package/dist/nodes/utils/MatcapUVNode.js +15 -0
  582. package/dist/nodes/utils/MatcapUVNode.mjs +16 -0
  583. package/dist/nodes/utils/OscNode.js +49 -0
  584. package/dist/nodes/utils/OscNode.mjs +50 -0
  585. package/dist/nodes/utils/SplitNode.js +44 -0
  586. package/dist/nodes/utils/SplitNode.mjs +45 -0
  587. package/dist/nodes/utils/SpriteSheetUVNode.js +39 -0
  588. package/dist/nodes/utils/SpriteSheetUVNode.mjs +40 -0
  589. package/dist/nodes/utils/TimerNode.js +43 -0
  590. package/dist/nodes/utils/TimerNode.mjs +44 -0
  591. package/dist/objects/GroundProjectedEnv.d.ts +12 -0
  592. package/dist/objects/GroundProjectedEnv.js +134 -0
  593. package/dist/objects/GroundProjectedEnv.mjs +134 -0
  594. package/dist/objects/Lensflare.d.ts +17 -0
  595. package/dist/objects/Lensflare.js +280 -0
  596. package/dist/objects/Lensflare.mjs +280 -0
  597. package/dist/objects/LightningStorm.d.ts +32 -0
  598. package/dist/objects/LightningStorm.js +110 -0
  599. package/dist/objects/LightningStorm.mjs +110 -0
  600. package/dist/objects/MarchingCubes.d.ts +75 -0
  601. package/dist/objects/MarchingCubes.js +457 -0
  602. package/dist/objects/MarchingCubes.mjs +457 -0
  603. package/dist/objects/Reflector.d.ts +19 -0
  604. package/dist/objects/Reflector.js +175 -0
  605. package/dist/objects/Reflector.mjs +175 -0
  606. package/dist/objects/ReflectorForSSRPass.d.ts +48 -0
  607. package/dist/objects/ReflectorForSSRPass.js +256 -0
  608. package/dist/objects/ReflectorForSSRPass.mjs +256 -0
  609. package/dist/objects/ReflectorRTT.js +10 -0
  610. package/dist/objects/ReflectorRTT.mjs +10 -0
  611. package/dist/objects/Refractor.d.ts +19 -0
  612. package/dist/objects/Refractor.js +188 -0
  613. package/dist/objects/Refractor.mjs +188 -0
  614. package/dist/objects/ShadowMesh.d.ts +7 -0
  615. package/dist/objects/ShadowMesh.js +41 -0
  616. package/dist/objects/ShadowMesh.mjs +41 -0
  617. package/dist/objects/Sky.d.ts +43 -0
  618. package/dist/objects/Sky.js +156 -0
  619. package/dist/objects/Sky.mjs +156 -0
  620. package/dist/objects/Water.d.ts +22 -0
  621. package/dist/objects/Water.js +241 -0
  622. package/dist/objects/Water.mjs +241 -0
  623. package/dist/objects/Water2.d.ts +22 -0
  624. package/dist/objects/Water2.js +258 -0
  625. package/dist/objects/Water2.mjs +258 -0
  626. package/dist/offscreen/jank.js +26 -0
  627. package/dist/offscreen/jank.mjs +27 -0
  628. package/dist/offscreen/offscreen.js +8 -0
  629. package/dist/offscreen/offscreen.mjs +7 -0
  630. package/dist/offscreen/scene.js +68 -0
  631. package/dist/offscreen/scene.mjs +52 -0
  632. package/dist/physics/AmmoPhysics.d.ts +7 -0
  633. package/dist/physics/AmmoPhysics.js +166 -0
  634. package/dist/physics/AmmoPhysics.mjs +166 -0
  635. package/dist/postprocessing/AdaptiveToneMappingPass.d.ts +29 -0
  636. package/dist/postprocessing/AdaptiveToneMappingPass.js +225 -0
  637. package/dist/postprocessing/AdaptiveToneMappingPass.mjs +225 -0
  638. package/dist/postprocessing/AfterimagePass.d.ts +15 -0
  639. package/dist/postprocessing/AfterimagePass.js +68 -0
  640. package/dist/postprocessing/AfterimagePass.mjs +68 -0
  641. package/dist/postprocessing/BloomPass.d.ts +16 -0
  642. package/dist/postprocessing/BloomPass.js +109 -0
  643. package/dist/postprocessing/BloomPass.mjs +109 -0
  644. package/dist/postprocessing/BokehPass.d.ts +26 -0
  645. package/dist/postprocessing/BokehPass.js +90 -0
  646. package/dist/postprocessing/BokehPass.mjs +90 -0
  647. package/dist/postprocessing/ClearPass.d.ts +10 -0
  648. package/dist/postprocessing/ClearPass.js +36 -0
  649. package/dist/postprocessing/ClearPass.mjs +36 -0
  650. package/dist/postprocessing/CubeTexturePass.d.ts +14 -0
  651. package/dist/postprocessing/CubeTexturePass.js +49 -0
  652. package/dist/postprocessing/CubeTexturePass.mjs +49 -0
  653. package/dist/postprocessing/DotScreenPass.d.ts +10 -0
  654. package/dist/postprocessing/DotScreenPass.js +49 -0
  655. package/dist/postprocessing/DotScreenPass.mjs +49 -0
  656. package/dist/postprocessing/EffectComposer.d.ts +27 -0
  657. package/dist/postprocessing/EffectComposer.js +156 -0
  658. package/dist/postprocessing/EffectComposer.mjs +156 -0
  659. package/dist/postprocessing/FilmPass.d.ts +10 -0
  660. package/dist/postprocessing/FilmPass.js +51 -0
  661. package/dist/postprocessing/FilmPass.mjs +51 -0
  662. package/dist/postprocessing/GlitchPass.d.ts +15 -0
  663. package/dist/postprocessing/GlitchPass.js +84 -0
  664. package/dist/postprocessing/GlitchPass.mjs +84 -0
  665. package/dist/postprocessing/HalftonePass.d.ts +26 -0
  666. package/dist/postprocessing/HalftonePass.js +53 -0
  667. package/dist/postprocessing/HalftonePass.mjs +53 -0
  668. package/dist/postprocessing/LUTPass.d.ts +13 -0
  669. package/dist/postprocessing/LUTPass.js +142 -0
  670. package/dist/postprocessing/LUTPass.mjs +142 -0
  671. package/dist/postprocessing/MaskPass.d.ts +14 -0
  672. package/dist/postprocessing/MaskPass.js +69 -0
  673. package/dist/postprocessing/MaskPass.mjs +69 -0
  674. package/dist/postprocessing/OutlinePass.d.ts +53 -0
  675. package/dist/postprocessing/OutlinePass.js +479 -0
  676. package/dist/postprocessing/OutlinePass.mjs +479 -0
  677. package/dist/postprocessing/Pass.d.ts +20 -0
  678. package/dist/postprocessing/Pass.js +48 -0
  679. package/dist/postprocessing/Pass.mjs +48 -0
  680. package/dist/postprocessing/RenderPass.d.ts +14 -0
  681. package/dist/postprocessing/RenderPass.js +59 -0
  682. package/dist/postprocessing/RenderPass.mjs +59 -0
  683. package/dist/postprocessing/RenderPixelatedPass.js +199 -0
  684. package/dist/postprocessing/RenderPixelatedPass.mjs +199 -0
  685. package/dist/postprocessing/SAOPass.d.ts +79 -0
  686. package/dist/postprocessing/SAOPass.js +282 -0
  687. package/dist/postprocessing/SAOPass.mjs +282 -0
  688. package/dist/postprocessing/SMAAPass.d.ts +21 -0
  689. package/dist/postprocessing/SMAAPass.js +112 -0
  690. package/dist/postprocessing/SMAAPass.mjs +112 -0
  691. package/dist/postprocessing/SSAARenderPass.d.ts +17 -0
  692. package/dist/postprocessing/SSAARenderPass.js +171 -0
  693. package/dist/postprocessing/SSAARenderPass.mjs +171 -0
  694. package/dist/postprocessing/SSAOPass.d.ts +71 -0
  695. package/dist/postprocessing/SSAOPass.js +265 -0
  696. package/dist/postprocessing/SSAOPass.mjs +265 -0
  697. package/dist/postprocessing/SSRPass.d.ts +124 -0
  698. package/dist/postprocessing/SSRPass.js +438 -0
  699. package/dist/postprocessing/SSRPass.mjs +438 -0
  700. package/dist/postprocessing/SavePass.d.ts +12 -0
  701. package/dist/postprocessing/SavePass.js +37 -0
  702. package/dist/postprocessing/SavePass.mjs +37 -0
  703. package/dist/postprocessing/ShaderPass.d.ts +13 -0
  704. package/dist/postprocessing/ShaderPass.js +49 -0
  705. package/dist/postprocessing/ShaderPass.mjs +49 -0
  706. package/dist/postprocessing/TAARenderPass.d.ts +8 -0
  707. package/dist/postprocessing/TAARenderPass.js +89 -0
  708. package/dist/postprocessing/TAARenderPass.mjs +89 -0
  709. package/dist/postprocessing/TexturePass.d.ts +12 -0
  710. package/dist/postprocessing/TexturePass.js +39 -0
  711. package/dist/postprocessing/TexturePass.mjs +39 -0
  712. package/dist/postprocessing/UnrealBloomPass.d.ts +31 -0
  713. package/dist/postprocessing/UnrealBloomPass.js +220 -0
  714. package/dist/postprocessing/UnrealBloomPass.mjs +220 -0
  715. package/dist/postprocessing/WaterPass.d.ts +30 -0
  716. package/dist/postprocessing/WaterPass.js +72 -0
  717. package/dist/postprocessing/WaterPass.mjs +72 -0
  718. package/dist/renderers/CSS2DRenderer.d.ts +22 -0
  719. package/dist/renderers/CSS2DRenderer.js +121 -0
  720. package/dist/renderers/CSS2DRenderer.mjs +121 -0
  721. package/dist/renderers/CSS3DRenderer.d.ts +26 -0
  722. package/dist/renderers/CSS3DRenderer.js +133 -0
  723. package/dist/renderers/CSS3DRenderer.mjs +133 -0
  724. package/dist/renderers/Projector.d.ts +60 -0
  725. package/dist/renderers/Projector.js +511 -0
  726. package/dist/renderers/Projector.mjs +511 -0
  727. package/dist/renderers/SVGRenderer.d.ts +25 -0
  728. package/dist/renderers/SVGRenderer.js +306 -0
  729. package/dist/renderers/SVGRenderer.mjs +306 -0
  730. package/dist/renderers/nodes/accessors/CameraNode.js +62 -0
  731. package/dist/renderers/nodes/accessors/CameraNode.mjs +63 -0
  732. package/dist/renderers/nodes/accessors/ModelNode.js +60 -0
  733. package/dist/renderers/nodes/accessors/ModelNode.mjs +61 -0
  734. package/dist/renderers/nodes/accessors/ModelViewProjectionNode.js +20 -0
  735. package/dist/renderers/nodes/accessors/ModelViewProjectionNode.mjs +21 -0
  736. package/dist/renderers/nodes/accessors/NormalNode.js +60 -0
  737. package/dist/renderers/nodes/accessors/NormalNode.mjs +61 -0
  738. package/dist/renderers/nodes/accessors/PositionNode.js +29 -0
  739. package/dist/renderers/nodes/accessors/PositionNode.mjs +30 -0
  740. package/dist/renderers/nodes/accessors/UVNode.js +12 -0
  741. package/dist/renderers/nodes/accessors/UVNode.mjs +13 -0
  742. package/dist/renderers/nodes/core/AttributeNode.js +34 -0
  743. package/dist/renderers/nodes/core/AttributeNode.mjs +35 -0
  744. package/dist/renderers/nodes/core/InputNode.js +30 -0
  745. package/dist/renderers/nodes/core/InputNode.mjs +31 -0
  746. package/dist/renderers/nodes/core/Node.js +33 -0
  747. package/dist/renderers/nodes/core/Node.mjs +34 -0
  748. package/dist/renderers/nodes/core/NodeAttribute.js +9 -0
  749. package/dist/renderers/nodes/core/NodeAttribute.mjs +10 -0
  750. package/dist/renderers/nodes/core/NodeBuilder.js +248 -0
  751. package/dist/renderers/nodes/core/NodeBuilder.mjs +249 -0
  752. package/dist/renderers/nodes/core/NodeFrame.js +34 -0
  753. package/dist/renderers/nodes/core/NodeFrame.mjs +35 -0
  754. package/dist/renderers/nodes/core/NodeSlot.js +9 -0
  755. package/dist/renderers/nodes/core/NodeSlot.mjs +10 -0
  756. package/dist/renderers/nodes/core/NodeUniform.js +17 -0
  757. package/dist/renderers/nodes/core/NodeUniform.mjs +18 -0
  758. package/dist/renderers/nodes/core/NodeVary.js +10 -0
  759. package/dist/renderers/nodes/core/NodeVary.mjs +11 -0
  760. package/dist/renderers/nodes/core/VaryNode.js +21 -0
  761. package/dist/renderers/nodes/core/VaryNode.mjs +22 -0
  762. package/dist/renderers/nodes/core/constants.js +22 -0
  763. package/dist/renderers/nodes/core/constants.mjs +22 -0
  764. package/dist/renderers/nodes/inputs/ColorNode.js +10 -0
  765. package/dist/renderers/nodes/inputs/ColorNode.mjs +11 -0
  766. package/dist/renderers/nodes/inputs/FloatNode.js +10 -0
  767. package/dist/renderers/nodes/inputs/FloatNode.mjs +11 -0
  768. package/dist/renderers/nodes/inputs/Matrix3Node.js +11 -0
  769. package/dist/renderers/nodes/inputs/Matrix3Node.mjs +12 -0
  770. package/dist/renderers/nodes/inputs/Matrix4Node.js +11 -0
  771. package/dist/renderers/nodes/inputs/Matrix4Node.mjs +12 -0
  772. package/dist/renderers/nodes/inputs/TextureNode.js +19 -0
  773. package/dist/renderers/nodes/inputs/TextureNode.mjs +20 -0
  774. package/dist/renderers/nodes/inputs/Vector2Node.js +10 -0
  775. package/dist/renderers/nodes/inputs/Vector2Node.mjs +11 -0
  776. package/dist/renderers/nodes/inputs/Vector3Node.js +11 -0
  777. package/dist/renderers/nodes/inputs/Vector3Node.mjs +12 -0
  778. package/dist/renderers/nodes/inputs/Vector4Node.js +11 -0
  779. package/dist/renderers/nodes/inputs/Vector4Node.mjs +12 -0
  780. package/dist/renderers/nodes/math/MathNode.js +54 -0
  781. package/dist/renderers/nodes/math/MathNode.mjs +55 -0
  782. package/dist/renderers/nodes/math/OperatorNode.js +41 -0
  783. package/dist/renderers/nodes/math/OperatorNode.mjs +42 -0
  784. package/dist/renderers/nodes/utils/SwitchNode.js +19 -0
  785. package/dist/renderers/nodes/utils/SwitchNode.mjs +20 -0
  786. package/dist/renderers/nodes/utils/TimerNode.js +13 -0
  787. package/dist/renderers/nodes/utils/TimerNode.mjs +14 -0
  788. package/dist/renderers/webgpu/WebGPU.js +23 -0
  789. package/dist/renderers/webgpu/WebGPU.mjs +24 -0
  790. package/dist/renderers/webgpu/WebGPUAttributes.js +68 -0
  791. package/dist/renderers/webgpu/WebGPUAttributes.mjs +69 -0
  792. package/dist/renderers/webgpu/WebGPUBackground.js +60 -0
  793. package/dist/renderers/webgpu/WebGPUBackground.mjs +61 -0
  794. package/dist/renderers/webgpu/WebGPUBinding.js +13 -0
  795. package/dist/renderers/webgpu/WebGPUBinding.mjs +14 -0
  796. package/dist/renderers/webgpu/WebGPUBindings.js +154 -0
  797. package/dist/renderers/webgpu/WebGPUBindings.mjs +155 -0
  798. package/dist/renderers/webgpu/WebGPUComputePipelines.js +43 -0
  799. package/dist/renderers/webgpu/WebGPUComputePipelines.mjs +44 -0
  800. package/dist/renderers/webgpu/WebGPUGeometries.js +40 -0
  801. package/dist/renderers/webgpu/WebGPUGeometries.mjs +41 -0
  802. package/dist/renderers/webgpu/WebGPUInfo.js +45 -0
  803. package/dist/renderers/webgpu/WebGPUInfo.mjs +46 -0
  804. package/dist/renderers/webgpu/WebGPUObjects.js +24 -0
  805. package/dist/renderers/webgpu/WebGPUObjects.mjs +25 -0
  806. package/dist/renderers/webgpu/WebGPUProperties.js +21 -0
  807. package/dist/renderers/webgpu/WebGPUProperties.mjs +22 -0
  808. package/dist/renderers/webgpu/WebGPURenderLists.js +118 -0
  809. package/dist/renderers/webgpu/WebGPURenderLists.mjs +119 -0
  810. package/dist/renderers/webgpu/WebGPURenderPipelines.js +545 -0
  811. package/dist/renderers/webgpu/WebGPURenderPipelines.mjs +546 -0
  812. package/dist/renderers/webgpu/WebGPURenderer.js +596 -0
  813. package/dist/renderers/webgpu/WebGPURenderer.mjs +575 -0
  814. package/dist/renderers/webgpu/WebGPUSampledTexture.js +40 -0
  815. package/dist/renderers/webgpu/WebGPUSampledTexture.mjs +40 -0
  816. package/dist/renderers/webgpu/WebGPUSampler.js +14 -0
  817. package/dist/renderers/webgpu/WebGPUSampler.mjs +15 -0
  818. package/dist/renderers/webgpu/WebGPUStorageBuffer.js +14 -0
  819. package/dist/renderers/webgpu/WebGPUStorageBuffer.mjs +15 -0
  820. package/dist/renderers/webgpu/WebGPUTextureRenderer.js +22 -0
  821. package/dist/renderers/webgpu/WebGPUTextureRenderer.mjs +23 -0
  822. package/dist/renderers/webgpu/WebGPUTextureUtils.js +97 -0
  823. package/dist/renderers/webgpu/WebGPUTextureUtils.mjs +98 -0
  824. package/dist/renderers/webgpu/WebGPUTextures.js +483 -0
  825. package/dist/renderers/webgpu/WebGPUTextures.mjs +484 -0
  826. package/dist/renderers/webgpu/WebGPUUniform.js +81 -0
  827. package/dist/renderers/webgpu/WebGPUUniform.mjs +81 -0
  828. package/dist/renderers/webgpu/WebGPUUniformsGroup.js +175 -0
  829. package/dist/renderers/webgpu/WebGPUUniformsGroup.mjs +176 -0
  830. package/dist/renderers/webgpu/constants.js +241 -0
  831. package/dist/renderers/webgpu/constants.mjs +241 -0
  832. package/dist/renderers/webgpu/nodes/ShaderLib.js +41 -0
  833. package/dist/renderers/webgpu/nodes/ShaderLib.mjs +42 -0
  834. package/dist/renderers/webgpu/nodes/WebGPUNodeBuilder.js +164 -0
  835. package/dist/renderers/webgpu/nodes/WebGPUNodeBuilder.mjs +165 -0
  836. package/dist/renderers/webgpu/nodes/WebGPUNodeUniform.js +73 -0
  837. package/dist/renderers/webgpu/nodes/WebGPUNodeUniform.mjs +73 -0
  838. package/dist/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.js +14 -0
  839. package/dist/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.mjs +15 -0
  840. package/dist/renderers/webgpu/nodes/WebGPUNodes.js +39 -0
  841. package/dist/renderers/webgpu/nodes/WebGPUNodes.mjs +40 -0
  842. package/dist/shaders/ACESFilmicToneMappingShader.d.ts +16 -0
  843. package/dist/shaders/ACESFilmicToneMappingShader.js +55 -0
  844. package/dist/shaders/ACESFilmicToneMappingShader.mjs +55 -0
  845. package/dist/shaders/AfterimageShader.d.ts +15 -0
  846. package/dist/shaders/AfterimageShader.js +32 -0
  847. package/dist/shaders/AfterimageShader.mjs +32 -0
  848. package/dist/shaders/BasicShader.d.ts +8 -0
  849. package/dist/shaders/BasicShader.js +12 -0
  850. package/dist/shaders/BasicShader.mjs +12 -0
  851. package/dist/shaders/BleachBypassShader.d.ts +14 -0
  852. package/dist/shaders/BleachBypassShader.js +35 -0
  853. package/dist/shaders/BleachBypassShader.mjs +35 -0
  854. package/dist/shaders/BlendShader.d.ts +21 -0
  855. package/dist/shaders/BlendShader.js +30 -0
  856. package/dist/shaders/BlendShader.mjs +30 -0
  857. package/dist/shaders/BokehShader.d.ts +24 -0
  858. package/dist/shaders/BokehShader.js +109 -0
  859. package/dist/shaders/BokehShader.mjs +109 -0
  860. package/dist/shaders/BokehShader2.d.ts +50 -0
  861. package/dist/shaders/BokehShader2.js +269 -0
  862. package/dist/shaders/BokehShader2.mjs +269 -0
  863. package/dist/shaders/BrightnessContrastShader.d.ts +21 -0
  864. package/dist/shaders/BrightnessContrastShader.js +32 -0
  865. package/dist/shaders/BrightnessContrastShader.mjs +32 -0
  866. package/dist/shaders/ColorCorrectionShader.d.ts +22 -0
  867. package/dist/shaders/ColorCorrectionShader.js +30 -0
  868. package/dist/shaders/ColorCorrectionShader.mjs +30 -0
  869. package/dist/shaders/ColorifyShader.d.ts +16 -0
  870. package/dist/shaders/ColorifyShader.js +28 -0
  871. package/dist/shaders/ColorifyShader.mjs +28 -0
  872. package/dist/shaders/ConvolutionShader.d.ts +21 -0
  873. package/dist/shaders/ConvolutionShader.js +55 -0
  874. package/dist/shaders/ConvolutionShader.mjs +55 -0
  875. package/dist/shaders/CopyShader.d.ts +12 -0
  876. package/dist/shaders/CopyShader.js +25 -0
  877. package/dist/shaders/CopyShader.mjs +25 -0
  878. package/dist/shaders/DOFMipMapShader.d.ts +23 -0
  879. package/dist/shaders/DOFMipMapShader.js +32 -0
  880. package/dist/shaders/DOFMipMapShader.mjs +32 -0
  881. package/dist/shaders/DepthLimitedBlurShader.d.ts +28 -0
  882. package/dist/shaders/DepthLimitedBlurShader.js +114 -0
  883. package/dist/shaders/DepthLimitedBlurShader.mjs +114 -0
  884. package/dist/shaders/DigitalGlitch.d.ts +39 -0
  885. package/dist/shaders/DigitalGlitch.js +85 -0
  886. package/dist/shaders/DigitalGlitch.mjs +85 -0
  887. package/dist/shaders/DotScreenShader.d.ts +27 -0
  888. package/dist/shaders/DotScreenShader.js +39 -0
  889. package/dist/shaders/DotScreenShader.mjs +39 -0
  890. package/dist/shaders/FXAAShader.d.ts +19 -0
  891. package/dist/shaders/FXAAShader.js +1098 -0
  892. package/dist/shaders/FXAAShader.mjs +1098 -0
  893. package/dist/shaders/FilmShader.d.ts +43 -0
  894. package/dist/shaders/FilmShader.js +53 -0
  895. package/dist/shaders/FilmShader.mjs +53 -0
  896. package/dist/shaders/FocusShader.d.ts +26 -0
  897. package/dist/shaders/FocusShader.js +55 -0
  898. package/dist/shaders/FocusShader.mjs +55 -0
  899. package/dist/shaders/FreiChenShader.d.ts +19 -0
  900. package/dist/shaders/FreiChenShader.js +64 -0
  901. package/dist/shaders/FreiChenShader.mjs +64 -0
  902. package/dist/shaders/FresnelShader.d.ts +24 -0
  903. package/dist/shaders/FresnelShader.js +47 -0
  904. package/dist/shaders/FresnelShader.mjs +47 -0
  905. package/dist/shaders/GammaCorrectionShader.d.ts +12 -0
  906. package/dist/shaders/GammaCorrectionShader.js +23 -0
  907. package/dist/shaders/GammaCorrectionShader.mjs +23 -0
  908. package/dist/shaders/GodRaysShader.d.ts +97 -0
  909. package/dist/shaders/GodRaysShader.js +183 -0
  910. package/dist/shaders/GodRaysShader.mjs +183 -0
  911. package/dist/shaders/HalftoneShader.d.ts +51 -0
  912. package/dist/shaders/HalftoneShader.js +228 -0
  913. package/dist/shaders/HalftoneShader.mjs +228 -0
  914. package/dist/shaders/HorizontalBlurShader.d.ts +18 -0
  915. package/dist/shaders/HorizontalBlurShader.js +49 -0
  916. package/dist/shaders/HorizontalBlurShader.mjs +49 -0
  917. package/dist/shaders/HorizontalTiltShiftShader.d.ts +23 -0
  918. package/dist/shaders/HorizontalTiltShiftShader.js +37 -0
  919. package/dist/shaders/HorizontalTiltShiftShader.mjs +37 -0
  920. package/dist/shaders/HueSaturationShader.d.ts +21 -0
  921. package/dist/shaders/HueSaturationShader.js +43 -0
  922. package/dist/shaders/HueSaturationShader.mjs +43 -0
  923. package/dist/shaders/KaleidoShader.d.ts +24 -0
  924. package/dist/shaders/KaleidoShader.js +34 -0
  925. package/dist/shaders/KaleidoShader.mjs +34 -0
  926. package/dist/shaders/LuminosityHighPassShader.d.ts +27 -0
  927. package/dist/shaders/LuminosityHighPassShader.js +37 -0
  928. package/dist/shaders/LuminosityHighPassShader.mjs +37 -0
  929. package/dist/shaders/LuminosityShader.d.ts +13 -0
  930. package/dist/shaders/LuminosityShader.js +25 -0
  931. package/dist/shaders/LuminosityShader.mjs +25 -0
  932. package/dist/shaders/MirrorShader.d.ts +18 -0
  933. package/dist/shaders/MirrorShader.js +35 -0
  934. package/dist/shaders/MirrorShader.mjs +35 -0
  935. package/dist/shaders/NormalMapShader.d.ts +23 -0
  936. package/dist/shaders/NormalMapShader.js +31 -0
  937. package/dist/shaders/NormalMapShader.mjs +31 -0
  938. package/dist/shaders/ParallaxShader.d.ts +28 -0
  939. package/dist/shaders/ParallaxShader.js +133 -0
  940. package/dist/shaders/ParallaxShader.mjs +133 -0
  941. package/dist/shaders/PixelShader.d.ts +18 -0
  942. package/dist/shaders/PixelShader.js +28 -0
  943. package/dist/shaders/PixelShader.mjs +28 -0
  944. package/dist/shaders/RGBShiftShader.d.ts +24 -0
  945. package/dist/shaders/RGBShiftShader.js +30 -0
  946. package/dist/shaders/RGBShiftShader.mjs +30 -0
  947. package/dist/shaders/SAOShader.d.ts +25 -0
  948. package/dist/shaders/SAOShader.js +144 -0
  949. package/dist/shaders/SAOShader.mjs +144 -0
  950. package/dist/shaders/SMAAShader.d.ts +60 -0
  951. package/dist/shaders/SMAAShader.js +358 -0
  952. package/dist/shaders/SMAAShader.mjs +358 -0
  953. package/dist/shaders/SSAOShader.d.ts +86 -0
  954. package/dist/shaders/SSAOShader.js +182 -0
  955. package/dist/shaders/SSAOShader.mjs +182 -0
  956. package/dist/shaders/SSRShader.d.ts +94 -0
  957. package/dist/shaders/SSRShader.js +342 -0
  958. package/dist/shaders/SSRShader.mjs +342 -0
  959. package/dist/shaders/SepiaShader.d.ts +17 -0
  960. package/dist/shaders/SepiaShader.js +29 -0
  961. package/dist/shaders/SepiaShader.mjs +29 -0
  962. package/dist/shaders/SobelOperatorShader.d.ts +19 -0
  963. package/dist/shaders/SobelOperatorShader.js +54 -0
  964. package/dist/shaders/SobelOperatorShader.mjs +54 -0
  965. package/dist/shaders/SubsurfaceScatteringShader.d.ts +5 -0
  966. package/dist/shaders/SubsurfaceScatteringShader.js +59 -0
  967. package/dist/shaders/SubsurfaceScatteringShader.mjs +59 -0
  968. package/dist/shaders/TechnicolorShader.d.ts +15 -0
  969. package/dist/shaders/TechnicolorShader.js +24 -0
  970. package/dist/shaders/TechnicolorShader.mjs +24 -0
  971. package/dist/shaders/ToneMapShader.d.ts +27 -0
  972. package/dist/shaders/ToneMapShader.js +51 -0
  973. package/dist/shaders/ToneMapShader.mjs +51 -0
  974. package/dist/shaders/ToonShader.d.ts +108 -0
  975. package/dist/shaders/ToonShader.js +188 -0
  976. package/dist/shaders/ToonShader.mjs +188 -0
  977. package/dist/shaders/TriangleBlurShader.d.ts +22 -0
  978. package/dist/shaders/TriangleBlurShader.js +37 -0
  979. package/dist/shaders/TriangleBlurShader.mjs +37 -0
  980. package/dist/shaders/UnpackDepthRGBAShader.d.ts +16 -0
  981. package/dist/shaders/UnpackDepthRGBAShader.js +26 -0
  982. package/dist/shaders/UnpackDepthRGBAShader.mjs +26 -0
  983. package/dist/shaders/VerticalBlurShader.d.ts +18 -0
  984. package/dist/shaders/VerticalBlurShader.js +50 -0
  985. package/dist/shaders/VerticalBlurShader.mjs +50 -0
  986. package/dist/shaders/VerticalTiltShiftShader.d.ts +23 -0
  987. package/dist/shaders/VerticalTiltShiftShader.js +37 -0
  988. package/dist/shaders/VerticalTiltShiftShader.mjs +37 -0
  989. package/dist/shaders/VignetteShader.d.ts +20 -0
  990. package/dist/shaders/VignetteShader.js +38 -0
  991. package/dist/shaders/VignetteShader.mjs +38 -0
  992. package/dist/shaders/VolumeShader.d.ts +30 -0
  993. package/dist/shaders/VolumeShader.js +225 -0
  994. package/dist/shaders/VolumeShader.mjs +225 -0
  995. package/dist/shaders/WaterRefractionShader.d.ts +21 -0
  996. package/dist/shaders/WaterRefractionShader.js +59 -0
  997. package/dist/shaders/WaterRefractionShader.mjs +59 -0
  998. package/dist/shaders/types.d.ts +14 -0
  999. package/dist/shaders/types.js +1 -0
  1000. package/dist/shaders/types.mjs +1 -0
  1001. package/dist/textures/FlakesTexture.d.ts +4 -0
  1002. package/dist/textures/FlakesTexture.js +30 -0
  1003. package/dist/textures/FlakesTexture.mjs +30 -0
  1004. package/dist/types/helpers.d.ts +1 -0
  1005. package/dist/types/helpers.js +4 -0
  1006. package/dist/types/helpers.mjs +4 -0
  1007. package/dist/types/shared.d.ts +2 -0
  1008. package/dist/types/utils.d.ts +3 -0
  1009. package/dist/utils/BufferGeometryUtils.d.ts +48 -0
  1010. package/dist/utils/BufferGeometryUtils.js +636 -0
  1011. package/dist/utils/BufferGeometryUtils.mjs +636 -0
  1012. package/dist/utils/GeometryCompressionUtils.d.ts +7 -0
  1013. package/dist/utils/GeometryCompressionUtils.js +573 -0
  1014. package/dist/utils/GeometryCompressionUtils.mjs +573 -0
  1015. package/dist/utils/GeometryUtils.d.ts +6 -0
  1016. package/dist/utils/GeometryUtils.js +109 -0
  1017. package/dist/utils/GeometryUtils.mjs +109 -0
  1018. package/dist/utils/LDrawUtils.d.ts +5 -0
  1019. package/dist/utils/RoughnessMipmapper.js +219 -0
  1020. package/dist/utils/RoughnessMipmapper.mjs +219 -0
  1021. package/dist/utils/SceneUtils.d.ts +9 -0
  1022. package/dist/utils/SceneUtils.js +36 -0
  1023. package/dist/utils/SceneUtils.mjs +36 -0
  1024. package/dist/utils/ShadowMapViewer.d.ts +24 -0
  1025. package/dist/utils/ShadowMapViewer.js +114 -0
  1026. package/dist/utils/ShadowMapViewer.mjs +114 -0
  1027. package/dist/utils/SkeletonUtils.d.ts +30 -0
  1028. package/dist/utils/SkeletonUtils.js +292 -0
  1029. package/dist/utils/SkeletonUtils.mjs +292 -0
  1030. package/dist/utils/UVsDebug.d.ts +3 -0
  1031. package/dist/utils/UVsDebug.js +85 -0
  1032. package/dist/utils/UVsDebug.mjs +85 -0
  1033. package/dist/utils/WorkerPool.js +62 -0
  1034. package/dist/utils/WorkerPool.mjs +62 -0
  1035. package/dist/webxr/ARButton.d.ts +5 -0
  1036. package/dist/webxr/ARButton.js +119 -0
  1037. package/dist/webxr/ARButton.mjs +119 -0
  1038. package/dist/webxr/OculusHandModel.d.ts +22 -0
  1039. package/dist/webxr/OculusHandModel.js +82 -0
  1040. package/dist/webxr/OculusHandModel.mjs +82 -0
  1041. package/dist/webxr/OculusHandPointerModel.d.ts +63 -0
  1042. package/dist/webxr/OculusHandPointerModel.js +224 -0
  1043. package/dist/webxr/OculusHandPointerModel.mjs +207 -0
  1044. package/dist/webxr/Text2D.d.ts +3 -0
  1045. package/dist/webxr/Text2D.js +48 -0
  1046. package/dist/webxr/Text2D.mjs +31 -0
  1047. package/dist/webxr/VRButton.d.ts +7 -0
  1048. package/dist/webxr/VRButton.js +111 -0
  1049. package/dist/webxr/VRButton.mjs +111 -0
  1050. package/dist/webxr/XRControllerModelFactory.d.ts +23 -0
  1051. package/dist/webxr/XRControllerModelFactory.js +174 -0
  1052. package/dist/webxr/XRControllerModelFactory.mjs +174 -0
  1053. package/dist/webxr/XREstimatedLight.d.ts +33 -0
  1054. package/dist/webxr/XREstimatedLight.js +126 -0
  1055. package/dist/webxr/XREstimatedLight.mjs +126 -0
  1056. package/dist/webxr/XRHandMeshModel.d.ts +9 -0
  1057. package/dist/webxr/XRHandMeshModel.js +82 -0
  1058. package/dist/webxr/XRHandMeshModel.mjs +82 -0
  1059. package/dist/webxr/XRHandModelFactory.d.ts +25 -0
  1060. package/dist/webxr/XRHandModelFactory.js +61 -0
  1061. package/dist/webxr/XRHandModelFactory.mjs +61 -0
  1062. package/dist/webxr/XRHandPrimitiveModel.d.ts +24 -0
  1063. package/dist/webxr/XRHandPrimitiveModel.js +68 -0
  1064. package/dist/webxr/XRHandPrimitiveModel.mjs +68 -0
  1065. package/package.json +1 -1
@@ -0,0 +1,1089 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import { Object3D, Raycaster, Vector3, Quaternion, Euler, Matrix4, MeshBasicMaterial, DoubleSide, LineBasicMaterial, CylinderGeometry, BoxGeometry, BufferGeometry, Float32BufferAttribute, Mesh, Line, OctahedronGeometry, PlaneGeometry, TorusGeometry, SphereGeometry, Color } from "three";
8
+ class TransformControls extends Object3D {
9
+ constructor(camera, domElement) {
10
+ super();
11
+ __publicField(this, "isTransformControls", true);
12
+ __publicField(this, "visible", false);
13
+ __publicField(this, "domElement");
14
+ __publicField(this, "raycaster", new Raycaster());
15
+ __publicField(this, "gizmo");
16
+ __publicField(this, "plane");
17
+ __publicField(this, "tempVector", new Vector3());
18
+ __publicField(this, "tempVector2", new Vector3());
19
+ __publicField(this, "tempQuaternion", new Quaternion());
20
+ __publicField(this, "unit", {
21
+ X: new Vector3(1, 0, 0),
22
+ Y: new Vector3(0, 1, 0),
23
+ Z: new Vector3(0, 0, 1)
24
+ });
25
+ __publicField(this, "pointStart", new Vector3());
26
+ __publicField(this, "pointEnd", new Vector3());
27
+ __publicField(this, "offset", new Vector3());
28
+ __publicField(this, "rotationAxis", new Vector3());
29
+ __publicField(this, "startNorm", new Vector3());
30
+ __publicField(this, "endNorm", new Vector3());
31
+ __publicField(this, "rotationAngle", 0);
32
+ __publicField(this, "cameraPosition", new Vector3());
33
+ __publicField(this, "cameraQuaternion", new Quaternion());
34
+ __publicField(this, "cameraScale", new Vector3());
35
+ __publicField(this, "parentPosition", new Vector3());
36
+ __publicField(this, "parentQuaternion", new Quaternion());
37
+ __publicField(this, "parentQuaternionInv", new Quaternion());
38
+ __publicField(this, "parentScale", new Vector3());
39
+ __publicField(this, "worldPositionStart", new Vector3());
40
+ __publicField(this, "worldQuaternionStart", new Quaternion());
41
+ __publicField(this, "worldScaleStart", new Vector3());
42
+ __publicField(this, "worldPosition", new Vector3());
43
+ __publicField(this, "worldQuaternion", new Quaternion());
44
+ __publicField(this, "worldQuaternionInv", new Quaternion());
45
+ __publicField(this, "worldScale", new Vector3());
46
+ __publicField(this, "eye", new Vector3());
47
+ __publicField(this, "positionStart", new Vector3());
48
+ __publicField(this, "quaternionStart", new Quaternion());
49
+ __publicField(this, "scaleStart", new Vector3());
50
+ __publicField(this, "camera");
51
+ __publicField(this, "object");
52
+ __publicField(this, "enabled", true);
53
+ __publicField(this, "axis", null);
54
+ __publicField(this, "mode", "translate");
55
+ __publicField(this, "translationSnap", null);
56
+ __publicField(this, "rotationSnap", null);
57
+ __publicField(this, "scaleSnap", null);
58
+ __publicField(this, "space", "world");
59
+ __publicField(this, "size", 1);
60
+ __publicField(this, "dragging", false);
61
+ __publicField(this, "showX", true);
62
+ __publicField(this, "showY", true);
63
+ __publicField(this, "showZ", true);
64
+ // events
65
+ __publicField(this, "changeEvent", { type: "change" });
66
+ __publicField(this, "mouseDownEvent", { type: "mouseDown", mode: this.mode });
67
+ __publicField(this, "mouseUpEvent", { type: "mouseUp", mode: this.mode });
68
+ __publicField(this, "objectChangeEvent", { type: "objectChange" });
69
+ __publicField(this, "intersectObjectWithRay", (object, raycaster, includeInvisible) => {
70
+ const allIntersections = raycaster.intersectObject(object, true);
71
+ for (let i = 0; i < allIntersections.length; i++) {
72
+ if (allIntersections[i].object.visible || includeInvisible) {
73
+ return allIntersections[i];
74
+ }
75
+ }
76
+ return false;
77
+ });
78
+ // Set current object
79
+ __publicField(this, "attach", (object) => {
80
+ this.object = object;
81
+ this.visible = true;
82
+ return this;
83
+ });
84
+ // Detatch from object
85
+ __publicField(this, "detach", () => {
86
+ this.object = void 0;
87
+ this.visible = false;
88
+ this.axis = null;
89
+ return this;
90
+ });
91
+ // Reset
92
+ __publicField(this, "reset", () => {
93
+ if (!this.enabled)
94
+ return this;
95
+ if (this.dragging) {
96
+ if (this.object !== void 0) {
97
+ this.object.position.copy(this.positionStart);
98
+ this.object.quaternion.copy(this.quaternionStart);
99
+ this.object.scale.copy(this.scaleStart);
100
+ this.dispatchEvent(this.changeEvent);
101
+ this.dispatchEvent(this.objectChangeEvent);
102
+ this.pointStart.copy(this.pointEnd);
103
+ }
104
+ }
105
+ return this;
106
+ });
107
+ __publicField(this, "updateMatrixWorld", () => {
108
+ if (this.object !== void 0) {
109
+ this.object.updateMatrixWorld();
110
+ if (this.object.parent === null) {
111
+ console.error("TransformControls: The attached 3D object must be a part of the scene graph.");
112
+ } else {
113
+ this.object.parent.matrixWorld.decompose(this.parentPosition, this.parentQuaternion, this.parentScale);
114
+ }
115
+ this.object.matrixWorld.decompose(this.worldPosition, this.worldQuaternion, this.worldScale);
116
+ this.parentQuaternionInv.copy(this.parentQuaternion).invert();
117
+ this.worldQuaternionInv.copy(this.worldQuaternion).invert();
118
+ }
119
+ this.camera.updateMatrixWorld();
120
+ this.camera.matrixWorld.decompose(this.cameraPosition, this.cameraQuaternion, this.cameraScale);
121
+ this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize();
122
+ super.updateMatrixWorld();
123
+ });
124
+ __publicField(this, "pointerHover", (pointer) => {
125
+ if (this.object === void 0 || this.dragging === true)
126
+ return;
127
+ this.raycaster.setFromCamera(pointer, this.camera);
128
+ const intersect = this.intersectObjectWithRay(this.gizmo.picker[this.mode], this.raycaster);
129
+ if (intersect) {
130
+ this.axis = intersect.object.name;
131
+ } else {
132
+ this.axis = null;
133
+ }
134
+ });
135
+ __publicField(this, "pointerDown", (pointer) => {
136
+ if (this.object === void 0 || this.dragging === true || pointer.button !== 0)
137
+ return;
138
+ if (this.axis !== null) {
139
+ this.raycaster.setFromCamera(pointer, this.camera);
140
+ const planeIntersect = this.intersectObjectWithRay(this.plane, this.raycaster, true);
141
+ if (planeIntersect) {
142
+ let space = this.space;
143
+ if (this.mode === "scale") {
144
+ space = "local";
145
+ } else if (this.axis === "E" || this.axis === "XYZE" || this.axis === "XYZ") {
146
+ space = "world";
147
+ }
148
+ if (space === "local" && this.mode === "rotate") {
149
+ const snap = this.rotationSnap;
150
+ if (this.axis === "X" && snap)
151
+ this.object.rotation.x = Math.round(this.object.rotation.x / snap) * snap;
152
+ if (this.axis === "Y" && snap)
153
+ this.object.rotation.y = Math.round(this.object.rotation.y / snap) * snap;
154
+ if (this.axis === "Z" && snap)
155
+ this.object.rotation.z = Math.round(this.object.rotation.z / snap) * snap;
156
+ }
157
+ this.object.updateMatrixWorld();
158
+ if (this.object.parent) {
159
+ this.object.parent.updateMatrixWorld();
160
+ }
161
+ this.positionStart.copy(this.object.position);
162
+ this.quaternionStart.copy(this.object.quaternion);
163
+ this.scaleStart.copy(this.object.scale);
164
+ this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this.worldScaleStart);
165
+ this.pointStart.copy(planeIntersect.point).sub(this.worldPositionStart);
166
+ }
167
+ this.dragging = true;
168
+ this.mouseDownEvent.mode = this.mode;
169
+ this.dispatchEvent(this.mouseDownEvent);
170
+ }
171
+ });
172
+ __publicField(this, "pointerMove", (pointer) => {
173
+ const axis = this.axis;
174
+ const mode = this.mode;
175
+ const object = this.object;
176
+ let space = this.space;
177
+ if (mode === "scale") {
178
+ space = "local";
179
+ } else if (axis === "E" || axis === "XYZE" || axis === "XYZ") {
180
+ space = "world";
181
+ }
182
+ if (object === void 0 || axis === null || this.dragging === false || pointer.button !== -1)
183
+ return;
184
+ this.raycaster.setFromCamera(pointer, this.camera);
185
+ const planeIntersect = this.intersectObjectWithRay(this.plane, this.raycaster, true);
186
+ if (!planeIntersect)
187
+ return;
188
+ this.pointEnd.copy(planeIntersect.point).sub(this.worldPositionStart);
189
+ if (mode === "translate") {
190
+ this.offset.copy(this.pointEnd).sub(this.pointStart);
191
+ if (space === "local" && axis !== "XYZ") {
192
+ this.offset.applyQuaternion(this.worldQuaternionInv);
193
+ }
194
+ if (axis.indexOf("X") === -1)
195
+ this.offset.x = 0;
196
+ if (axis.indexOf("Y") === -1)
197
+ this.offset.y = 0;
198
+ if (axis.indexOf("Z") === -1)
199
+ this.offset.z = 0;
200
+ if (space === "local" && axis !== "XYZ") {
201
+ this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale);
202
+ } else {
203
+ this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale);
204
+ }
205
+ object.position.copy(this.offset).add(this.positionStart);
206
+ if (this.translationSnap) {
207
+ if (space === "local") {
208
+ object.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert());
209
+ if (axis.search("X") !== -1) {
210
+ object.position.x = Math.round(object.position.x / this.translationSnap) * this.translationSnap;
211
+ }
212
+ if (axis.search("Y") !== -1) {
213
+ object.position.y = Math.round(object.position.y / this.translationSnap) * this.translationSnap;
214
+ }
215
+ if (axis.search("Z") !== -1) {
216
+ object.position.z = Math.round(object.position.z / this.translationSnap) * this.translationSnap;
217
+ }
218
+ object.position.applyQuaternion(this.quaternionStart);
219
+ }
220
+ if (space === "world") {
221
+ if (object.parent) {
222
+ object.position.add(this.tempVector.setFromMatrixPosition(object.parent.matrixWorld));
223
+ }
224
+ if (axis.search("X") !== -1) {
225
+ object.position.x = Math.round(object.position.x / this.translationSnap) * this.translationSnap;
226
+ }
227
+ if (axis.search("Y") !== -1) {
228
+ object.position.y = Math.round(object.position.y / this.translationSnap) * this.translationSnap;
229
+ }
230
+ if (axis.search("Z") !== -1) {
231
+ object.position.z = Math.round(object.position.z / this.translationSnap) * this.translationSnap;
232
+ }
233
+ if (object.parent) {
234
+ object.position.sub(this.tempVector.setFromMatrixPosition(object.parent.matrixWorld));
235
+ }
236
+ }
237
+ }
238
+ } else if (mode === "scale") {
239
+ if (axis.search("XYZ") !== -1) {
240
+ let d = this.pointEnd.length() / this.pointStart.length();
241
+ if (this.pointEnd.dot(this.pointStart) < 0)
242
+ d *= -1;
243
+ this.tempVector2.set(d, d, d);
244
+ } else {
245
+ this.tempVector.copy(this.pointStart);
246
+ this.tempVector2.copy(this.pointEnd);
247
+ this.tempVector.applyQuaternion(this.worldQuaternionInv);
248
+ this.tempVector2.applyQuaternion(this.worldQuaternionInv);
249
+ this.tempVector2.divide(this.tempVector);
250
+ if (axis.search("X") === -1) {
251
+ this.tempVector2.x = 1;
252
+ }
253
+ if (axis.search("Y") === -1) {
254
+ this.tempVector2.y = 1;
255
+ }
256
+ if (axis.search("Z") === -1) {
257
+ this.tempVector2.z = 1;
258
+ }
259
+ }
260
+ object.scale.copy(this.scaleStart).multiply(this.tempVector2);
261
+ if (this.scaleSnap && this.object) {
262
+ if (axis.search("X") !== -1) {
263
+ this.object.scale.x = Math.round(object.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap;
264
+ }
265
+ if (axis.search("Y") !== -1) {
266
+ object.scale.y = Math.round(object.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap;
267
+ }
268
+ if (axis.search("Z") !== -1) {
269
+ object.scale.z = Math.round(object.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap;
270
+ }
271
+ }
272
+ } else if (mode === "rotate") {
273
+ this.offset.copy(this.pointEnd).sub(this.pointStart);
274
+ const ROTATION_SPEED = 20 / this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));
275
+ if (axis === "E") {
276
+ this.rotationAxis.copy(this.eye);
277
+ this.rotationAngle = this.pointEnd.angleTo(this.pointStart);
278
+ this.startNorm.copy(this.pointStart).normalize();
279
+ this.endNorm.copy(this.pointEnd).normalize();
280
+ this.rotationAngle *= this.endNorm.cross(this.startNorm).dot(this.eye) < 0 ? 1 : -1;
281
+ } else if (axis === "XYZE") {
282
+ this.rotationAxis.copy(this.offset).cross(this.eye).normalize();
283
+ this.rotationAngle = this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye)) * ROTATION_SPEED;
284
+ } else if (axis === "X" || axis === "Y" || axis === "Z") {
285
+ this.rotationAxis.copy(this.unit[axis]);
286
+ this.tempVector.copy(this.unit[axis]);
287
+ if (space === "local") {
288
+ this.tempVector.applyQuaternion(this.worldQuaternion);
289
+ }
290
+ this.rotationAngle = this.offset.dot(this.tempVector.cross(this.eye).normalize()) * ROTATION_SPEED;
291
+ }
292
+ if (this.rotationSnap) {
293
+ this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap;
294
+ }
295
+ if (space === "local" && axis !== "E" && axis !== "XYZE") {
296
+ object.quaternion.copy(this.quaternionStart);
297
+ object.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize();
298
+ } else {
299
+ this.rotationAxis.applyQuaternion(this.parentQuaternionInv);
300
+ object.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle));
301
+ object.quaternion.multiply(this.quaternionStart).normalize();
302
+ }
303
+ }
304
+ this.dispatchEvent(this.changeEvent);
305
+ this.dispatchEvent(this.objectChangeEvent);
306
+ });
307
+ __publicField(this, "pointerUp", (pointer) => {
308
+ if (pointer.button !== 0)
309
+ return;
310
+ if (this.dragging && this.axis !== null) {
311
+ this.mouseUpEvent.mode = this.mode;
312
+ this.dispatchEvent(this.mouseUpEvent);
313
+ }
314
+ this.dragging = false;
315
+ this.axis = null;
316
+ });
317
+ __publicField(this, "getPointer", (event) => {
318
+ var _a, _b;
319
+ if (this.domElement && ((_a = this.domElement.ownerDocument) == null ? void 0 : _a.pointerLockElement)) {
320
+ return {
321
+ x: 0,
322
+ y: 0,
323
+ button: event.button
324
+ };
325
+ } else {
326
+ const pointer = event.changedTouches ? event.changedTouches[0] : event;
327
+ const rect = (_b = this.domElement) == null ? void 0 : _b.getBoundingClientRect();
328
+ return {
329
+ x: (pointer.clientX - rect.left) / rect.width * 2 - 1,
330
+ y: -(pointer.clientY - rect.top) / rect.height * 2 + 1,
331
+ button: event.button
332
+ };
333
+ }
334
+ });
335
+ __publicField(this, "onPointerHover", (event) => {
336
+ if (!this.enabled)
337
+ return;
338
+ switch (event.pointerType) {
339
+ case "mouse":
340
+ case "pen":
341
+ this.pointerHover(this.getPointer(event));
342
+ break;
343
+ }
344
+ });
345
+ __publicField(this, "onPointerDown", (event) => {
346
+ if (!this.enabled || !this.domElement)
347
+ return;
348
+ this.domElement.style.touchAction = "none";
349
+ this.domElement.ownerDocument.addEventListener("pointermove", this.onPointerMove);
350
+ this.pointerHover(this.getPointer(event));
351
+ this.pointerDown(this.getPointer(event));
352
+ });
353
+ __publicField(this, "onPointerMove", (event) => {
354
+ if (!this.enabled)
355
+ return;
356
+ this.pointerMove(this.getPointer(event));
357
+ });
358
+ __publicField(this, "onPointerUp", (event) => {
359
+ if (!this.enabled || !this.domElement)
360
+ return;
361
+ this.domElement.style.touchAction = "";
362
+ this.domElement.ownerDocument.removeEventListener("pointermove", this.onPointerMove);
363
+ this.pointerUp(this.getPointer(event));
364
+ });
365
+ __publicField(this, "getMode", () => this.mode);
366
+ __publicField(this, "setMode", (mode) => {
367
+ this.mode = mode;
368
+ });
369
+ __publicField(this, "setTranslationSnap", (translationSnap) => {
370
+ this.translationSnap = translationSnap;
371
+ });
372
+ __publicField(this, "setRotationSnap", (rotationSnap) => {
373
+ this.rotationSnap = rotationSnap;
374
+ });
375
+ __publicField(this, "setScaleSnap", (scaleSnap) => {
376
+ this.scaleSnap = scaleSnap;
377
+ });
378
+ __publicField(this, "setSize", (size) => {
379
+ this.size = size;
380
+ });
381
+ __publicField(this, "setSpace", (space) => {
382
+ this.space = space;
383
+ });
384
+ __publicField(this, "update", () => {
385
+ console.warn(
386
+ "THREE.TransformControls: update function has no more functionality and therefore has been deprecated."
387
+ );
388
+ });
389
+ __publicField(this, "connect", (domElement) => {
390
+ if (domElement === document) {
391
+ console.error(
392
+ 'THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'
393
+ );
394
+ }
395
+ this.domElement = domElement;
396
+ this.domElement.addEventListener("pointerdown", this.onPointerDown);
397
+ this.domElement.addEventListener("pointermove", this.onPointerHover);
398
+ this.domElement.ownerDocument.addEventListener("pointerup", this.onPointerUp);
399
+ });
400
+ __publicField(this, "dispose", () => {
401
+ var _a, _b, _c, _d, _e, _f;
402
+ (_a = this.domElement) == null ? void 0 : _a.removeEventListener("pointerdown", this.onPointerDown);
403
+ (_b = this.domElement) == null ? void 0 : _b.removeEventListener("pointermove", this.onPointerHover);
404
+ (_d = (_c = this.domElement) == null ? void 0 : _c.ownerDocument) == null ? void 0 : _d.removeEventListener("pointermove", this.onPointerMove);
405
+ (_f = (_e = this.domElement) == null ? void 0 : _e.ownerDocument) == null ? void 0 : _f.removeEventListener("pointerup", this.onPointerUp);
406
+ this.traverse((child) => {
407
+ const mesh = child;
408
+ if (mesh.geometry) {
409
+ mesh.geometry.dispose();
410
+ }
411
+ if (mesh.material) {
412
+ mesh.material.dispose();
413
+ }
414
+ });
415
+ });
416
+ this.domElement = domElement;
417
+ this.camera = camera;
418
+ this.gizmo = new TransformControlsGizmo();
419
+ this.add(this.gizmo);
420
+ this.plane = new TransformControlsPlane();
421
+ this.add(this.plane);
422
+ const defineProperty = (propName, defaultValue) => {
423
+ let propValue = defaultValue;
424
+ Object.defineProperty(this, propName, {
425
+ get: function() {
426
+ return propValue !== void 0 ? propValue : defaultValue;
427
+ },
428
+ set: function(value) {
429
+ if (propValue !== value) {
430
+ propValue = value;
431
+ this.plane[propName] = value;
432
+ this.gizmo[propName] = value;
433
+ this.dispatchEvent({ type: propName + "-changed", value });
434
+ this.dispatchEvent(this.changeEvent);
435
+ }
436
+ }
437
+ });
438
+ this[propName] = defaultValue;
439
+ this.plane[propName] = defaultValue;
440
+ this.gizmo[propName] = defaultValue;
441
+ };
442
+ defineProperty("camera", this.camera);
443
+ defineProperty("object", this.object);
444
+ defineProperty("enabled", this.enabled);
445
+ defineProperty("axis", this.axis);
446
+ defineProperty("mode", this.mode);
447
+ defineProperty("translationSnap", this.translationSnap);
448
+ defineProperty("rotationSnap", this.rotationSnap);
449
+ defineProperty("scaleSnap", this.scaleSnap);
450
+ defineProperty("space", this.space);
451
+ defineProperty("size", this.size);
452
+ defineProperty("dragging", this.dragging);
453
+ defineProperty("showX", this.showX);
454
+ defineProperty("showY", this.showY);
455
+ defineProperty("showZ", this.showZ);
456
+ defineProperty("worldPosition", this.worldPosition);
457
+ defineProperty("worldPositionStart", this.worldPositionStart);
458
+ defineProperty("worldQuaternion", this.worldQuaternion);
459
+ defineProperty("worldQuaternionStart", this.worldQuaternionStart);
460
+ defineProperty("cameraPosition", this.cameraPosition);
461
+ defineProperty("cameraQuaternion", this.cameraQuaternion);
462
+ defineProperty("pointStart", this.pointStart);
463
+ defineProperty("pointEnd", this.pointEnd);
464
+ defineProperty("rotationAxis", this.rotationAxis);
465
+ defineProperty("rotationAngle", this.rotationAngle);
466
+ defineProperty("eye", this.eye);
467
+ if (domElement !== void 0)
468
+ this.connect(domElement);
469
+ }
470
+ }
471
+ class TransformControlsGizmo extends Object3D {
472
+ constructor() {
473
+ super();
474
+ __publicField(this, "isTransformControlsGizmo", true);
475
+ __publicField(this, "type", "TransformControlsGizmo");
476
+ __publicField(this, "tempVector", new Vector3(0, 0, 0));
477
+ __publicField(this, "tempEuler", new Euler());
478
+ __publicField(this, "alignVector", new Vector3(0, 1, 0));
479
+ __publicField(this, "zeroVector", new Vector3(0, 0, 0));
480
+ __publicField(this, "lookAtMatrix", new Matrix4());
481
+ __publicField(this, "tempQuaternion", new Quaternion());
482
+ __publicField(this, "tempQuaternion2", new Quaternion());
483
+ __publicField(this, "identityQuaternion", new Quaternion());
484
+ __publicField(this, "unitX", new Vector3(1, 0, 0));
485
+ __publicField(this, "unitY", new Vector3(0, 1, 0));
486
+ __publicField(this, "unitZ", new Vector3(0, 0, 1));
487
+ __publicField(this, "gizmo");
488
+ __publicField(this, "picker");
489
+ __publicField(this, "helper");
490
+ // these are set from parent class TransformControls
491
+ __publicField(this, "rotationAxis", new Vector3());
492
+ __publicField(this, "cameraPosition", new Vector3());
493
+ __publicField(this, "worldPositionStart", new Vector3());
494
+ __publicField(this, "worldQuaternionStart", new Quaternion());
495
+ __publicField(this, "worldPosition", new Vector3());
496
+ __publicField(this, "worldQuaternion", new Quaternion());
497
+ __publicField(this, "eye", new Vector3());
498
+ __publicField(this, "camera", null);
499
+ __publicField(this, "enabled", true);
500
+ __publicField(this, "axis", null);
501
+ __publicField(this, "mode", "translate");
502
+ __publicField(this, "space", "world");
503
+ __publicField(this, "size", 1);
504
+ __publicField(this, "dragging", false);
505
+ __publicField(this, "showX", true);
506
+ __publicField(this, "showY", true);
507
+ __publicField(this, "showZ", true);
508
+ // updateMatrixWorld will update transformations and appearance of individual handles
509
+ __publicField(this, "updateMatrixWorld", () => {
510
+ let space = this.space;
511
+ if (this.mode === "scale") {
512
+ space = "local";
513
+ }
514
+ const quaternion = space === "local" ? this.worldQuaternion : this.identityQuaternion;
515
+ this.gizmo["translate"].visible = this.mode === "translate";
516
+ this.gizmo["rotate"].visible = this.mode === "rotate";
517
+ this.gizmo["scale"].visible = this.mode === "scale";
518
+ this.helper["translate"].visible = this.mode === "translate";
519
+ this.helper["rotate"].visible = this.mode === "rotate";
520
+ this.helper["scale"].visible = this.mode === "scale";
521
+ let handles = [];
522
+ handles = handles.concat(this.picker[this.mode].children);
523
+ handles = handles.concat(this.gizmo[this.mode].children);
524
+ handles = handles.concat(this.helper[this.mode].children);
525
+ for (let i = 0; i < handles.length; i++) {
526
+ const handle = handles[i];
527
+ handle.visible = true;
528
+ handle.rotation.set(0, 0, 0);
529
+ handle.position.copy(this.worldPosition);
530
+ let factor;
531
+ if (this.camera.isOrthographicCamera) {
532
+ factor = (this.camera.top - this.camera.bottom) / this.camera.zoom;
533
+ } else {
534
+ factor = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7);
535
+ }
536
+ handle.scale.set(1, 1, 1).multiplyScalar(factor * this.size / 7);
537
+ if (handle.tag === "helper") {
538
+ handle.visible = false;
539
+ if (handle.name === "AXIS") {
540
+ handle.position.copy(this.worldPositionStart);
541
+ handle.visible = !!this.axis;
542
+ if (this.axis === "X") {
543
+ this.tempQuaternion.setFromEuler(this.tempEuler.set(0, 0, 0));
544
+ handle.quaternion.copy(quaternion).multiply(this.tempQuaternion);
545
+ if (Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(quaternion).dot(this.eye)) > 0.9) {
546
+ handle.visible = false;
547
+ }
548
+ }
549
+ if (this.axis === "Y") {
550
+ this.tempQuaternion.setFromEuler(this.tempEuler.set(0, 0, Math.PI / 2));
551
+ handle.quaternion.copy(quaternion).multiply(this.tempQuaternion);
552
+ if (Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(quaternion).dot(this.eye)) > 0.9) {
553
+ handle.visible = false;
554
+ }
555
+ }
556
+ if (this.axis === "Z") {
557
+ this.tempQuaternion.setFromEuler(this.tempEuler.set(0, Math.PI / 2, 0));
558
+ handle.quaternion.copy(quaternion).multiply(this.tempQuaternion);
559
+ if (Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(quaternion).dot(this.eye)) > 0.9) {
560
+ handle.visible = false;
561
+ }
562
+ }
563
+ if (this.axis === "XYZE") {
564
+ this.tempQuaternion.setFromEuler(this.tempEuler.set(0, Math.PI / 2, 0));
565
+ this.alignVector.copy(this.rotationAxis);
566
+ handle.quaternion.setFromRotationMatrix(
567
+ this.lookAtMatrix.lookAt(this.zeroVector, this.alignVector, this.unitY)
568
+ );
569
+ handle.quaternion.multiply(this.tempQuaternion);
570
+ handle.visible = this.dragging;
571
+ }
572
+ if (this.axis === "E") {
573
+ handle.visible = false;
574
+ }
575
+ } else if (handle.name === "START") {
576
+ handle.position.copy(this.worldPositionStart);
577
+ handle.visible = this.dragging;
578
+ } else if (handle.name === "END") {
579
+ handle.position.copy(this.worldPosition);
580
+ handle.visible = this.dragging;
581
+ } else if (handle.name === "DELTA") {
582
+ handle.position.copy(this.worldPositionStart);
583
+ handle.quaternion.copy(this.worldQuaternionStart);
584
+ this.tempVector.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1);
585
+ this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert());
586
+ handle.scale.copy(this.tempVector);
587
+ handle.visible = this.dragging;
588
+ } else {
589
+ handle.quaternion.copy(quaternion);
590
+ if (this.dragging) {
591
+ handle.position.copy(this.worldPositionStart);
592
+ } else {
593
+ handle.position.copy(this.worldPosition);
594
+ }
595
+ if (this.axis) {
596
+ handle.visible = this.axis.search(handle.name) !== -1;
597
+ }
598
+ }
599
+ continue;
600
+ }
601
+ handle.quaternion.copy(quaternion);
602
+ if (this.mode === "translate" || this.mode === "scale") {
603
+ const AXIS_HIDE_TRESHOLD = 0.99;
604
+ const PLANE_HIDE_TRESHOLD = 0.2;
605
+ const AXIS_FLIP_TRESHOLD = 0;
606
+ if (handle.name === "X" || handle.name === "XYZX") {
607
+ if (Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(quaternion).dot(this.eye)) > AXIS_HIDE_TRESHOLD) {
608
+ handle.scale.set(1e-10, 1e-10, 1e-10);
609
+ handle.visible = false;
610
+ }
611
+ }
612
+ if (handle.name === "Y" || handle.name === "XYZY") {
613
+ if (Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(quaternion).dot(this.eye)) > AXIS_HIDE_TRESHOLD) {
614
+ handle.scale.set(1e-10, 1e-10, 1e-10);
615
+ handle.visible = false;
616
+ }
617
+ }
618
+ if (handle.name === "Z" || handle.name === "XYZZ") {
619
+ if (Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(quaternion).dot(this.eye)) > AXIS_HIDE_TRESHOLD) {
620
+ handle.scale.set(1e-10, 1e-10, 1e-10);
621
+ handle.visible = false;
622
+ }
623
+ }
624
+ if (handle.name === "XY") {
625
+ if (Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(quaternion).dot(this.eye)) < PLANE_HIDE_TRESHOLD) {
626
+ handle.scale.set(1e-10, 1e-10, 1e-10);
627
+ handle.visible = false;
628
+ }
629
+ }
630
+ if (handle.name === "YZ") {
631
+ if (Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(quaternion).dot(this.eye)) < PLANE_HIDE_TRESHOLD) {
632
+ handle.scale.set(1e-10, 1e-10, 1e-10);
633
+ handle.visible = false;
634
+ }
635
+ }
636
+ if (handle.name === "XZ") {
637
+ if (Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(quaternion).dot(this.eye)) < PLANE_HIDE_TRESHOLD) {
638
+ handle.scale.set(1e-10, 1e-10, 1e-10);
639
+ handle.visible = false;
640
+ }
641
+ }
642
+ if (handle.name.search("X") !== -1) {
643
+ if (this.alignVector.copy(this.unitX).applyQuaternion(quaternion).dot(this.eye) < AXIS_FLIP_TRESHOLD) {
644
+ if (handle.tag === "fwd") {
645
+ handle.visible = false;
646
+ } else {
647
+ handle.scale.x *= -1;
648
+ }
649
+ } else if (handle.tag === "bwd") {
650
+ handle.visible = false;
651
+ }
652
+ }
653
+ if (handle.name.search("Y") !== -1) {
654
+ if (this.alignVector.copy(this.unitY).applyQuaternion(quaternion).dot(this.eye) < AXIS_FLIP_TRESHOLD) {
655
+ if (handle.tag === "fwd") {
656
+ handle.visible = false;
657
+ } else {
658
+ handle.scale.y *= -1;
659
+ }
660
+ } else if (handle.tag === "bwd") {
661
+ handle.visible = false;
662
+ }
663
+ }
664
+ if (handle.name.search("Z") !== -1) {
665
+ if (this.alignVector.copy(this.unitZ).applyQuaternion(quaternion).dot(this.eye) < AXIS_FLIP_TRESHOLD) {
666
+ if (handle.tag === "fwd") {
667
+ handle.visible = false;
668
+ } else {
669
+ handle.scale.z *= -1;
670
+ }
671
+ } else if (handle.tag === "bwd") {
672
+ handle.visible = false;
673
+ }
674
+ }
675
+ } else if (this.mode === "rotate") {
676
+ this.tempQuaternion2.copy(quaternion);
677
+ this.alignVector.copy(this.eye).applyQuaternion(this.tempQuaternion.copy(quaternion).invert());
678
+ if (handle.name.search("E") !== -1) {
679
+ handle.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.eye, this.zeroVector, this.unitY));
680
+ }
681
+ if (handle.name === "X") {
682
+ this.tempQuaternion.setFromAxisAngle(this.unitX, Math.atan2(-this.alignVector.y, this.alignVector.z));
683
+ this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2, this.tempQuaternion);
684
+ handle.quaternion.copy(this.tempQuaternion);
685
+ }
686
+ if (handle.name === "Y") {
687
+ this.tempQuaternion.setFromAxisAngle(this.unitY, Math.atan2(this.alignVector.x, this.alignVector.z));
688
+ this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2, this.tempQuaternion);
689
+ handle.quaternion.copy(this.tempQuaternion);
690
+ }
691
+ if (handle.name === "Z") {
692
+ this.tempQuaternion.setFromAxisAngle(this.unitZ, Math.atan2(this.alignVector.y, this.alignVector.x));
693
+ this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2, this.tempQuaternion);
694
+ handle.quaternion.copy(this.tempQuaternion);
695
+ }
696
+ }
697
+ handle.visible = handle.visible && (handle.name.indexOf("X") === -1 || this.showX);
698
+ handle.visible = handle.visible && (handle.name.indexOf("Y") === -1 || this.showY);
699
+ handle.visible = handle.visible && (handle.name.indexOf("Z") === -1 || this.showZ);
700
+ handle.visible = handle.visible && (handle.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ);
701
+ handle.material.tempOpacity = handle.material.tempOpacity || handle.material.opacity;
702
+ handle.material.tempColor = handle.material.tempColor || handle.material.color.clone();
703
+ handle.material.color.copy(handle.material.tempColor);
704
+ handle.material.opacity = handle.material.tempOpacity;
705
+ if (!this.enabled) {
706
+ handle.material.opacity *= 0.5;
707
+ handle.material.color.lerp(new Color(1, 1, 1), 0.5);
708
+ } else if (this.axis) {
709
+ if (handle.name === this.axis) {
710
+ handle.material.opacity = 1;
711
+ handle.material.color.lerp(new Color(1, 1, 1), 0.5);
712
+ } else if (this.axis.split("").some(function(a) {
713
+ return handle.name === a;
714
+ })) {
715
+ handle.material.opacity = 1;
716
+ handle.material.color.lerp(new Color(1, 1, 1), 0.5);
717
+ } else {
718
+ handle.material.opacity *= 0.25;
719
+ handle.material.color.lerp(new Color(1, 1, 1), 0.5);
720
+ }
721
+ }
722
+ }
723
+ super.updateMatrixWorld();
724
+ });
725
+ const gizmoMaterial = new MeshBasicMaterial({
726
+ depthTest: false,
727
+ depthWrite: false,
728
+ transparent: true,
729
+ side: DoubleSide,
730
+ fog: false,
731
+ toneMapped: false
732
+ });
733
+ const gizmoLineMaterial = new LineBasicMaterial({
734
+ depthTest: false,
735
+ depthWrite: false,
736
+ transparent: true,
737
+ linewidth: 1,
738
+ fog: false,
739
+ toneMapped: false
740
+ });
741
+ const matInvisible = gizmoMaterial.clone();
742
+ matInvisible.opacity = 0.15;
743
+ const matHelper = gizmoMaterial.clone();
744
+ matHelper.opacity = 0.33;
745
+ const matRed = gizmoMaterial.clone();
746
+ matRed.color.set(16711680);
747
+ const matGreen = gizmoMaterial.clone();
748
+ matGreen.color.set(65280);
749
+ const matBlue = gizmoMaterial.clone();
750
+ matBlue.color.set(255);
751
+ const matWhiteTransparent = gizmoMaterial.clone();
752
+ matWhiteTransparent.opacity = 0.25;
753
+ const matYellowTransparent = matWhiteTransparent.clone();
754
+ matYellowTransparent.color.set(16776960);
755
+ const matCyanTransparent = matWhiteTransparent.clone();
756
+ matCyanTransparent.color.set(65535);
757
+ const matMagentaTransparent = matWhiteTransparent.clone();
758
+ matMagentaTransparent.color.set(16711935);
759
+ const matYellow = gizmoMaterial.clone();
760
+ matYellow.color.set(16776960);
761
+ const matLineRed = gizmoLineMaterial.clone();
762
+ matLineRed.color.set(16711680);
763
+ const matLineGreen = gizmoLineMaterial.clone();
764
+ matLineGreen.color.set(65280);
765
+ const matLineBlue = gizmoLineMaterial.clone();
766
+ matLineBlue.color.set(255);
767
+ const matLineCyan = gizmoLineMaterial.clone();
768
+ matLineCyan.color.set(65535);
769
+ const matLineMagenta = gizmoLineMaterial.clone();
770
+ matLineMagenta.color.set(16711935);
771
+ const matLineYellow = gizmoLineMaterial.clone();
772
+ matLineYellow.color.set(16776960);
773
+ const matLineGray = gizmoLineMaterial.clone();
774
+ matLineGray.color.set(7895160);
775
+ const matLineYellowTransparent = matLineYellow.clone();
776
+ matLineYellowTransparent.opacity = 0.25;
777
+ const arrowGeometry = new CylinderGeometry(0, 0.05, 0.2, 12, 1, false);
778
+ const scaleHandleGeometry = new BoxGeometry(0.125, 0.125, 0.125);
779
+ const lineGeometry = new BufferGeometry();
780
+ lineGeometry.setAttribute("position", new Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3));
781
+ const CircleGeometry = (radius, arc) => {
782
+ const geometry = new BufferGeometry();
783
+ const vertices = [];
784
+ for (let i = 0; i <= 64 * arc; ++i) {
785
+ vertices.push(0, Math.cos(i / 32 * Math.PI) * radius, Math.sin(i / 32 * Math.PI) * radius);
786
+ }
787
+ geometry.setAttribute("position", new Float32BufferAttribute(vertices, 3));
788
+ return geometry;
789
+ };
790
+ const TranslateHelperGeometry = () => {
791
+ const geometry = new BufferGeometry();
792
+ geometry.setAttribute("position", new Float32BufferAttribute([0, 0, 0, 1, 1, 1], 3));
793
+ return geometry;
794
+ };
795
+ const gizmoTranslate = {
796
+ X: [
797
+ [new Mesh(arrowGeometry, matRed), [1, 0, 0], [0, 0, -Math.PI / 2], null, "fwd"],
798
+ [new Mesh(arrowGeometry, matRed), [1, 0, 0], [0, 0, Math.PI / 2], null, "bwd"],
799
+ [new Line(lineGeometry, matLineRed)]
800
+ ],
801
+ Y: [
802
+ [new Mesh(arrowGeometry, matGreen), [0, 1, 0], null, null, "fwd"],
803
+ [new Mesh(arrowGeometry, matGreen), [0, 1, 0], [Math.PI, 0, 0], null, "bwd"],
804
+ [new Line(lineGeometry, matLineGreen), null, [0, 0, Math.PI / 2]]
805
+ ],
806
+ Z: [
807
+ [new Mesh(arrowGeometry, matBlue), [0, 0, 1], [Math.PI / 2, 0, 0], null, "fwd"],
808
+ [new Mesh(arrowGeometry, matBlue), [0, 0, 1], [-Math.PI / 2, 0, 0], null, "bwd"],
809
+ [new Line(lineGeometry, matLineBlue), null, [0, -Math.PI / 2, 0]]
810
+ ],
811
+ XYZ: [[new Mesh(new OctahedronGeometry(0.1, 0), matWhiteTransparent.clone()), [0, 0, 0], [0, 0, 0]]],
812
+ XY: [
813
+ [new Mesh(new PlaneGeometry(0.295, 0.295), matYellowTransparent.clone()), [0.15, 0.15, 0]],
814
+ [new Line(lineGeometry, matLineYellow), [0.18, 0.3, 0], null, [0.125, 1, 1]],
815
+ [new Line(lineGeometry, matLineYellow), [0.3, 0.18, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]
816
+ ],
817
+ YZ: [
818
+ [new Mesh(new PlaneGeometry(0.295, 0.295), matCyanTransparent.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]],
819
+ [new Line(lineGeometry, matLineCyan), [0, 0.18, 0.3], [0, 0, Math.PI / 2], [0.125, 1, 1]],
820
+ [new Line(lineGeometry, matLineCyan), [0, 0.3, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
821
+ ],
822
+ XZ: [
823
+ [
824
+ new Mesh(new PlaneGeometry(0.295, 0.295), matMagentaTransparent.clone()),
825
+ [0.15, 0, 0.15],
826
+ [-Math.PI / 2, 0, 0]
827
+ ],
828
+ [new Line(lineGeometry, matLineMagenta), [0.18, 0, 0.3], null, [0.125, 1, 1]],
829
+ [new Line(lineGeometry, matLineMagenta), [0.3, 0, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
830
+ ]
831
+ };
832
+ const pickerTranslate = {
833
+ X: [[new Mesh(new CylinderGeometry(0.2, 0, 1, 4, 1, false), matInvisible), [0.6, 0, 0], [0, 0, -Math.PI / 2]]],
834
+ Y: [[new Mesh(new CylinderGeometry(0.2, 0, 1, 4, 1, false), matInvisible), [0, 0.6, 0]]],
835
+ Z: [[new Mesh(new CylinderGeometry(0.2, 0, 1, 4, 1, false), matInvisible), [0, 0, 0.6], [Math.PI / 2, 0, 0]]],
836
+ XYZ: [[new Mesh(new OctahedronGeometry(0.2, 0), matInvisible)]],
837
+ XY: [[new Mesh(new PlaneGeometry(0.4, 0.4), matInvisible), [0.2, 0.2, 0]]],
838
+ YZ: [[new Mesh(new PlaneGeometry(0.4, 0.4), matInvisible), [0, 0.2, 0.2], [0, Math.PI / 2, 0]]],
839
+ XZ: [[new Mesh(new PlaneGeometry(0.4, 0.4), matInvisible), [0.2, 0, 0.2], [-Math.PI / 2, 0, 0]]]
840
+ };
841
+ const helperTranslate = {
842
+ START: [[new Mesh(new OctahedronGeometry(0.01, 2), matHelper), null, null, null, "helper"]],
843
+ END: [[new Mesh(new OctahedronGeometry(0.01, 2), matHelper), null, null, null, "helper"]],
844
+ DELTA: [[new Line(TranslateHelperGeometry(), matHelper), null, null, null, "helper"]],
845
+ X: [[new Line(lineGeometry, matHelper.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
846
+ Y: [[new Line(lineGeometry, matHelper.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
847
+ Z: [[new Line(lineGeometry, matHelper.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]]
848
+ };
849
+ const gizmoRotate = {
850
+ X: [
851
+ [new Line(CircleGeometry(1, 0.5), matLineRed)],
852
+ [new Mesh(new OctahedronGeometry(0.04, 0), matRed), [0, 0, 0.99], null, [1, 3, 1]]
853
+ ],
854
+ Y: [
855
+ [new Line(CircleGeometry(1, 0.5), matLineGreen), null, [0, 0, -Math.PI / 2]],
856
+ [new Mesh(new OctahedronGeometry(0.04, 0), matGreen), [0, 0, 0.99], null, [3, 1, 1]]
857
+ ],
858
+ Z: [
859
+ [new Line(CircleGeometry(1, 0.5), matLineBlue), null, [0, Math.PI / 2, 0]],
860
+ [new Mesh(new OctahedronGeometry(0.04, 0), matBlue), [0.99, 0, 0], null, [1, 3, 1]]
861
+ ],
862
+ E: [
863
+ [new Line(CircleGeometry(1.25, 1), matLineYellowTransparent), null, [0, Math.PI / 2, 0]],
864
+ [
865
+ new Mesh(new CylinderGeometry(0.03, 0, 0.15, 4, 1, false), matLineYellowTransparent),
866
+ [1.17, 0, 0],
867
+ [0, 0, -Math.PI / 2],
868
+ [1, 1, 1e-3]
869
+ ],
870
+ [
871
+ new Mesh(new CylinderGeometry(0.03, 0, 0.15, 4, 1, false), matLineYellowTransparent),
872
+ [-1.17, 0, 0],
873
+ [0, 0, Math.PI / 2],
874
+ [1, 1, 1e-3]
875
+ ],
876
+ [
877
+ new Mesh(new CylinderGeometry(0.03, 0, 0.15, 4, 1, false), matLineYellowTransparent),
878
+ [0, -1.17, 0],
879
+ [Math.PI, 0, 0],
880
+ [1, 1, 1e-3]
881
+ ],
882
+ [
883
+ new Mesh(new CylinderGeometry(0.03, 0, 0.15, 4, 1, false), matLineYellowTransparent),
884
+ [0, 1.17, 0],
885
+ [0, 0, 0],
886
+ [1, 1, 1e-3]
887
+ ]
888
+ ],
889
+ XYZE: [[new Line(CircleGeometry(1, 1), matLineGray), null, [0, Math.PI / 2, 0]]]
890
+ };
891
+ const helperRotate = {
892
+ AXIS: [[new Line(lineGeometry, matHelper.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]]
893
+ };
894
+ const pickerRotate = {
895
+ X: [[new Mesh(new TorusGeometry(1, 0.1, 4, 24), matInvisible), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]],
896
+ Y: [[new Mesh(new TorusGeometry(1, 0.1, 4, 24), matInvisible), [0, 0, 0], [Math.PI / 2, 0, 0]]],
897
+ Z: [[new Mesh(new TorusGeometry(1, 0.1, 4, 24), matInvisible), [0, 0, 0], [0, 0, -Math.PI / 2]]],
898
+ E: [[new Mesh(new TorusGeometry(1.25, 0.1, 2, 24), matInvisible)]],
899
+ XYZE: [[new Mesh(new SphereGeometry(0.7, 10, 8), matInvisible)]]
900
+ };
901
+ const gizmoScale = {
902
+ X: [
903
+ [new Mesh(scaleHandleGeometry, matRed), [0.8, 0, 0], [0, 0, -Math.PI / 2]],
904
+ [new Line(lineGeometry, matLineRed), null, null, [0.8, 1, 1]]
905
+ ],
906
+ Y: [
907
+ [new Mesh(scaleHandleGeometry, matGreen), [0, 0.8, 0]],
908
+ [new Line(lineGeometry, matLineGreen), null, [0, 0, Math.PI / 2], [0.8, 1, 1]]
909
+ ],
910
+ Z: [
911
+ [new Mesh(scaleHandleGeometry, matBlue), [0, 0, 0.8], [Math.PI / 2, 0, 0]],
912
+ [new Line(lineGeometry, matLineBlue), null, [0, -Math.PI / 2, 0], [0.8, 1, 1]]
913
+ ],
914
+ XY: [
915
+ [new Mesh(scaleHandleGeometry, matYellowTransparent), [0.85, 0.85, 0], null, [2, 2, 0.2]],
916
+ [new Line(lineGeometry, matLineYellow), [0.855, 0.98, 0], null, [0.125, 1, 1]],
917
+ [new Line(lineGeometry, matLineYellow), [0.98, 0.855, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]
918
+ ],
919
+ YZ: [
920
+ [new Mesh(scaleHandleGeometry, matCyanTransparent), [0, 0.85, 0.85], null, [0.2, 2, 2]],
921
+ [new Line(lineGeometry, matLineCyan), [0, 0.855, 0.98], [0, 0, Math.PI / 2], [0.125, 1, 1]],
922
+ [new Line(lineGeometry, matLineCyan), [0, 0.98, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
923
+ ],
924
+ XZ: [
925
+ [new Mesh(scaleHandleGeometry, matMagentaTransparent), [0.85, 0, 0.85], null, [2, 0.2, 2]],
926
+ [new Line(lineGeometry, matLineMagenta), [0.855, 0, 0.98], null, [0.125, 1, 1]],
927
+ [new Line(lineGeometry, matLineMagenta), [0.98, 0, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
928
+ ],
929
+ XYZX: [[new Mesh(new BoxGeometry(0.125, 0.125, 0.125), matWhiteTransparent.clone()), [1.1, 0, 0]]],
930
+ XYZY: [[new Mesh(new BoxGeometry(0.125, 0.125, 0.125), matWhiteTransparent.clone()), [0, 1.1, 0]]],
931
+ XYZZ: [[new Mesh(new BoxGeometry(0.125, 0.125, 0.125), matWhiteTransparent.clone()), [0, 0, 1.1]]]
932
+ };
933
+ const pickerScale = {
934
+ X: [[new Mesh(new CylinderGeometry(0.2, 0, 0.8, 4, 1, false), matInvisible), [0.5, 0, 0], [0, 0, -Math.PI / 2]]],
935
+ Y: [[new Mesh(new CylinderGeometry(0.2, 0, 0.8, 4, 1, false), matInvisible), [0, 0.5, 0]]],
936
+ Z: [[new Mesh(new CylinderGeometry(0.2, 0, 0.8, 4, 1, false), matInvisible), [0, 0, 0.5], [Math.PI / 2, 0, 0]]],
937
+ XY: [[new Mesh(scaleHandleGeometry, matInvisible), [0.85, 0.85, 0], null, [3, 3, 0.2]]],
938
+ YZ: [[new Mesh(scaleHandleGeometry, matInvisible), [0, 0.85, 0.85], null, [0.2, 3, 3]]],
939
+ XZ: [[new Mesh(scaleHandleGeometry, matInvisible), [0.85, 0, 0.85], null, [3, 0.2, 3]]],
940
+ XYZX: [[new Mesh(new BoxGeometry(0.2, 0.2, 0.2), matInvisible), [1.1, 0, 0]]],
941
+ XYZY: [[new Mesh(new BoxGeometry(0.2, 0.2, 0.2), matInvisible), [0, 1.1, 0]]],
942
+ XYZZ: [[new Mesh(new BoxGeometry(0.2, 0.2, 0.2), matInvisible), [0, 0, 1.1]]]
943
+ };
944
+ const helperScale = {
945
+ X: [[new Line(lineGeometry, matHelper.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
946
+ Y: [[new Line(lineGeometry, matHelper.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
947
+ Z: [[new Line(lineGeometry, matHelper.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]]
948
+ };
949
+ const setupGizmo = (gizmoMap) => {
950
+ const gizmo = new Object3D();
951
+ for (let name in gizmoMap) {
952
+ for (let i = gizmoMap[name].length; i--; ) {
953
+ const object = gizmoMap[name][i][0].clone();
954
+ const position = gizmoMap[name][i][1];
955
+ const rotation = gizmoMap[name][i][2];
956
+ const scale = gizmoMap[name][i][3];
957
+ const tag = gizmoMap[name][i][4];
958
+ object.name = name;
959
+ object.tag = tag;
960
+ if (position) {
961
+ object.position.set(position[0], position[1], position[2]);
962
+ }
963
+ if (rotation) {
964
+ object.rotation.set(rotation[0], rotation[1], rotation[2]);
965
+ }
966
+ if (scale) {
967
+ object.scale.set(scale[0], scale[1], scale[2]);
968
+ }
969
+ object.updateMatrix();
970
+ const tempGeometry = object.geometry.clone();
971
+ tempGeometry.applyMatrix4(object.matrix);
972
+ object.geometry = tempGeometry;
973
+ object.renderOrder = Infinity;
974
+ object.position.set(0, 0, 0);
975
+ object.rotation.set(0, 0, 0);
976
+ object.scale.set(1, 1, 1);
977
+ gizmo.add(object);
978
+ }
979
+ }
980
+ return gizmo;
981
+ };
982
+ this.gizmo = {};
983
+ this.picker = {};
984
+ this.helper = {};
985
+ this.add(this.gizmo["translate"] = setupGizmo(gizmoTranslate));
986
+ this.add(this.gizmo["rotate"] = setupGizmo(gizmoRotate));
987
+ this.add(this.gizmo["scale"] = setupGizmo(gizmoScale));
988
+ this.add(this.picker["translate"] = setupGizmo(pickerTranslate));
989
+ this.add(this.picker["rotate"] = setupGizmo(pickerRotate));
990
+ this.add(this.picker["scale"] = setupGizmo(pickerScale));
991
+ this.add(this.helper["translate"] = setupGizmo(helperTranslate));
992
+ this.add(this.helper["rotate"] = setupGizmo(helperRotate));
993
+ this.add(this.helper["scale"] = setupGizmo(helperScale));
994
+ this.picker["translate"].visible = false;
995
+ this.picker["rotate"].visible = false;
996
+ this.picker["scale"].visible = false;
997
+ }
998
+ }
999
+ class TransformControlsPlane extends Mesh {
1000
+ constructor() {
1001
+ super(
1002
+ new PlaneGeometry(1e5, 1e5, 2, 2),
1003
+ new MeshBasicMaterial({
1004
+ visible: false,
1005
+ wireframe: true,
1006
+ side: DoubleSide,
1007
+ transparent: true,
1008
+ opacity: 0.1,
1009
+ toneMapped: false
1010
+ })
1011
+ );
1012
+ __publicField(this, "isTransformControlsPlane", true);
1013
+ __publicField(this, "type", "TransformControlsPlane");
1014
+ __publicField(this, "unitX", new Vector3(1, 0, 0));
1015
+ __publicField(this, "unitY", new Vector3(0, 1, 0));
1016
+ __publicField(this, "unitZ", new Vector3(0, 0, 1));
1017
+ __publicField(this, "tempVector", new Vector3());
1018
+ __publicField(this, "dirVector", new Vector3());
1019
+ __publicField(this, "alignVector", new Vector3());
1020
+ __publicField(this, "tempMatrix", new Matrix4());
1021
+ __publicField(this, "identityQuaternion", new Quaternion());
1022
+ // these are set from parent class TransformControls
1023
+ __publicField(this, "cameraQuaternion", new Quaternion());
1024
+ __publicField(this, "worldPosition", new Vector3());
1025
+ __publicField(this, "worldQuaternion", new Quaternion());
1026
+ __publicField(this, "eye", new Vector3());
1027
+ __publicField(this, "axis", null);
1028
+ __publicField(this, "mode", "translate");
1029
+ __publicField(this, "space", "world");
1030
+ __publicField(this, "updateMatrixWorld", () => {
1031
+ let space = this.space;
1032
+ this.position.copy(this.worldPosition);
1033
+ if (this.mode === "scale")
1034
+ space = "local";
1035
+ this.unitX.set(1, 0, 0).applyQuaternion(space === "local" ? this.worldQuaternion : this.identityQuaternion);
1036
+ this.unitY.set(0, 1, 0).applyQuaternion(space === "local" ? this.worldQuaternion : this.identityQuaternion);
1037
+ this.unitZ.set(0, 0, 1).applyQuaternion(space === "local" ? this.worldQuaternion : this.identityQuaternion);
1038
+ this.alignVector.copy(this.unitY);
1039
+ switch (this.mode) {
1040
+ case "translate":
1041
+ case "scale":
1042
+ switch (this.axis) {
1043
+ case "X":
1044
+ this.alignVector.copy(this.eye).cross(this.unitX);
1045
+ this.dirVector.copy(this.unitX).cross(this.alignVector);
1046
+ break;
1047
+ case "Y":
1048
+ this.alignVector.copy(this.eye).cross(this.unitY);
1049
+ this.dirVector.copy(this.unitY).cross(this.alignVector);
1050
+ break;
1051
+ case "Z":
1052
+ this.alignVector.copy(this.eye).cross(this.unitZ);
1053
+ this.dirVector.copy(this.unitZ).cross(this.alignVector);
1054
+ break;
1055
+ case "XY":
1056
+ this.dirVector.copy(this.unitZ);
1057
+ break;
1058
+ case "YZ":
1059
+ this.dirVector.copy(this.unitX);
1060
+ break;
1061
+ case "XZ":
1062
+ this.alignVector.copy(this.unitZ);
1063
+ this.dirVector.copy(this.unitY);
1064
+ break;
1065
+ case "XYZ":
1066
+ case "E":
1067
+ this.dirVector.set(0, 0, 0);
1068
+ break;
1069
+ }
1070
+ break;
1071
+ case "rotate":
1072
+ default:
1073
+ this.dirVector.set(0, 0, 0);
1074
+ }
1075
+ if (this.dirVector.length() === 0) {
1076
+ this.quaternion.copy(this.cameraQuaternion);
1077
+ } else {
1078
+ this.tempMatrix.lookAt(this.tempVector.set(0, 0, 0), this.dirVector, this.alignVector);
1079
+ this.quaternion.setFromRotationMatrix(this.tempMatrix);
1080
+ }
1081
+ super.updateMatrixWorld();
1082
+ });
1083
+ }
1084
+ }
1085
+ export {
1086
+ TransformControls,
1087
+ TransformControlsGizmo,
1088
+ TransformControlsPlane
1089
+ };