three-stdlib 2.22.10 → 2.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (554) hide show
  1. package/dist/_polyfill/CompressedArrayTexture.cjs +12 -0
  2. package/dist/_polyfill/CompressedArrayTexture.js +6 -6
  3. package/dist/_polyfill/Data3DTexture.cjs +17 -0
  4. package/dist/_polyfill/Data3DTexture.js +8 -8
  5. package/dist/animation/{AnimationClipCreator.mjs → AnimationClipCreator.cjs} +18 -18
  6. package/dist/animation/AnimationClipCreator.js +18 -18
  7. package/dist/animation/{CCDIKSolver.mjs → CCDIKSolver.cjs} +32 -32
  8. package/dist/animation/CCDIKSolver.js +32 -32
  9. package/dist/animation/{MMDAnimationHelper.mjs → MMDAnimationHelper.cjs} +17 -17
  10. package/dist/animation/MMDAnimationHelper.js +17 -17
  11. package/dist/animation/{MMDPhysics.mjs → MMDPhysics.cjs} +25 -25
  12. package/dist/animation/MMDPhysics.js +25 -25
  13. package/dist/cameras/{CinematicCamera.mjs → CinematicCamera.cjs} +17 -17
  14. package/dist/cameras/CinematicCamera.js +17 -17
  15. package/dist/controls/{ArcballControls.mjs → ArcballControls.cjs} +102 -102
  16. package/dist/controls/ArcballControls.js +102 -102
  17. package/dist/controls/{DeviceOrientationControls.mjs → DeviceOrientationControls.cjs} +14 -14
  18. package/dist/controls/DeviceOrientationControls.js +14 -14
  19. package/dist/controls/{DragControls.mjs → DragControls.cjs} +12 -12
  20. package/dist/controls/DragControls.js +12 -12
  21. package/dist/controls/{FirstPersonControls.mjs → FirstPersonControls.cjs} +16 -16
  22. package/dist/controls/FirstPersonControls.js +16 -16
  23. package/dist/controls/{FlyControls.mjs → FlyControls.cjs} +10 -10
  24. package/dist/controls/FlyControls.js +10 -10
  25. package/dist/controls/{OrbitControls.mjs → OrbitControls.cjs} +52 -54
  26. package/dist/controls/OrbitControls.d.ts +4 -4
  27. package/dist/controls/OrbitControls.js +52 -54
  28. package/dist/controls/{PointerLockControls.mjs → PointerLockControls.cjs} +8 -8
  29. package/dist/controls/PointerLockControls.js +8 -8
  30. package/dist/controls/{TrackballControls.mjs → TrackballControls.cjs} +32 -32
  31. package/dist/controls/TrackballControls.d.ts +2 -2
  32. package/dist/controls/TrackballControls.js +32 -32
  33. package/dist/controls/{TransformControls.mjs → TransformControls.cjs} +169 -169
  34. package/dist/controls/TransformControls.js +169 -169
  35. package/dist/controls/experimental/{CameraControls.mjs → CameraControls.cjs} +59 -59
  36. package/dist/controls/experimental/CameraControls.js +59 -59
  37. package/dist/csm/{CSM.mjs → CSM.cjs} +17 -17
  38. package/dist/csm/CSM.js +17 -17
  39. package/dist/csm/{CSMFrustum.mjs → CSMFrustum.cjs} +7 -7
  40. package/dist/csm/CSMFrustum.js +7 -7
  41. package/dist/csm/{CSMHelper.mjs → CSMHelper.cjs} +14 -14
  42. package/dist/csm/CSMHelper.js +14 -14
  43. package/dist/csm/{CSMShader.mjs → CSMShader.cjs} +5 -5
  44. package/dist/csm/CSMShader.js +5 -5
  45. package/dist/curves/{CurveExtras.mjs → CurveExtras.cjs} +45 -45
  46. package/dist/curves/CurveExtras.js +45 -45
  47. package/dist/curves/{NURBSCurve.mjs → NURBSCurve.cjs} +11 -11
  48. package/dist/curves/NURBSCurve.js +11 -11
  49. package/dist/curves/{NURBSSurface.mjs → NURBSSurface.cjs} +7 -7
  50. package/dist/curves/NURBSSurface.js +7 -7
  51. package/dist/curves/{NURBSUtils.mjs → NURBSUtils.cjs} +17 -17
  52. package/dist/curves/NURBSUtils.js +17 -17
  53. package/dist/deprecated/{Geometry.mjs → Geometry.cjs} +51 -51
  54. package/dist/deprecated/Geometry.js +51 -51
  55. package/dist/effects/{AnaglyphEffect.mjs → AnaglyphEffect.cjs} +14 -14
  56. package/dist/effects/AnaglyphEffect.js +14 -14
  57. package/dist/effects/{AsciiEffect.mjs → AsciiEffect.cjs} +3 -3
  58. package/dist/effects/AsciiEffect.js +3 -3
  59. package/dist/effects/{OutlineEffect.mjs → OutlineEffect.cjs} +8 -8
  60. package/dist/effects/OutlineEffect.js +8 -8
  61. package/dist/effects/{ParallaxBarrierEffect.mjs → ParallaxBarrierEffect.cjs} +12 -12
  62. package/dist/effects/ParallaxBarrierEffect.js +12 -12
  63. package/dist/effects/{PeppersGhostEffect.mjs → PeppersGhostEffect.cjs} +11 -11
  64. package/dist/effects/PeppersGhostEffect.js +11 -11
  65. package/dist/effects/{StereoEffect.mjs → StereoEffect.cjs} +6 -6
  66. package/dist/effects/StereoEffect.js +6 -6
  67. package/dist/environments/RoomEnvironment.cjs +95 -0
  68. package/dist/environments/RoomEnvironment.js +23 -40
  69. package/dist/exporters/{ColladaExporter.mjs → ColladaExporter.cjs} +16 -16
  70. package/dist/exporters/ColladaExporter.js +16 -16
  71. package/dist/exporters/{DRACOExporter.mjs → DRACOExporter.cjs} +8 -8
  72. package/dist/exporters/DRACOExporter.js +8 -8
  73. package/dist/exporters/{GLTFExporter.mjs → GLTFExporter.cjs} +52 -49
  74. package/dist/exporters/GLTFExporter.js +52 -49
  75. package/dist/exporters/{MMDExporter.mjs → MMDExporter.cjs} +10 -10
  76. package/dist/exporters/MMDExporter.js +10 -10
  77. package/dist/exporters/{OBJExporter.mjs → OBJExporter.cjs} +13 -13
  78. package/dist/exporters/OBJExporter.js +13 -13
  79. package/dist/exporters/{PLYExporter.mjs → PLYExporter.cjs} +8 -8
  80. package/dist/exporters/PLYExporter.js +8 -8
  81. package/dist/exporters/{STLExporter.mjs → STLExporter.cjs} +12 -12
  82. package/dist/exporters/STLExporter.js +12 -12
  83. package/dist/exporters/{USDZExporter.mjs → USDZExporter.cjs} +10 -10
  84. package/dist/exporters/USDZExporter.js +10 -10
  85. package/dist/geometries/{BoxLineGeometry.mjs → BoxLineGeometry.cjs} +6 -6
  86. package/dist/geometries/BoxLineGeometry.js +6 -6
  87. package/dist/geometries/ConvexGeometry.cjs +26 -0
  88. package/dist/geometries/ConvexGeometry.js +9 -9
  89. package/dist/geometries/{DecalGeometry.mjs → DecalGeometry.cjs} +16 -16
  90. package/dist/geometries/DecalGeometry.js +16 -16
  91. package/dist/geometries/{LightningStrike.mjs → LightningStrike.cjs} +45 -45
  92. package/dist/geometries/LightningStrike.js +45 -45
  93. package/dist/geometries/{ParametricGeometries.mjs → ParametricGeometries.cjs} +11 -11
  94. package/dist/geometries/ParametricGeometries.js +11 -11
  95. package/dist/geometries/{ParametricGeometry.mjs → ParametricGeometry.cjs} +11 -11
  96. package/dist/geometries/ParametricGeometry.js +11 -11
  97. package/dist/geometries/{RoundedBoxGeometry.mjs → RoundedBoxGeometry.cjs} +10 -10
  98. package/dist/geometries/RoundedBoxGeometry.js +10 -10
  99. package/dist/geometries/{TeapotGeometry.mjs → TeapotGeometry.cjs} +21 -21
  100. package/dist/geometries/TeapotGeometry.js +21 -21
  101. package/dist/geometries/{TextGeometry.mjs → TextGeometry.cjs} +6 -6
  102. package/dist/geometries/TextGeometry.js +6 -6
  103. package/dist/helpers/{LightProbeHelper.mjs → LightProbeHelper.cjs} +7 -7
  104. package/dist/helpers/LightProbeHelper.js +7 -7
  105. package/dist/helpers/{PositionalAudioHelper.mjs → PositionalAudioHelper.cjs} +11 -11
  106. package/dist/helpers/PositionalAudioHelper.js +11 -11
  107. package/dist/helpers/{RectAreaLightHelper.mjs → RectAreaLightHelper.cjs} +11 -11
  108. package/dist/helpers/RectAreaLightHelper.js +11 -11
  109. package/dist/helpers/{VertexNormalsHelper.mjs → VertexNormalsHelper.cjs} +11 -11
  110. package/dist/helpers/VertexNormalsHelper.js +11 -11
  111. package/dist/helpers/{VertexTangentsHelper.mjs → VertexTangentsHelper.cjs} +10 -10
  112. package/dist/helpers/VertexTangentsHelper.js +10 -10
  113. package/dist/index.cjs +613 -0
  114. package/dist/index.js +613 -613
  115. package/dist/interactive/{HTMLMesh.mjs → HTMLMesh.cjs} +11 -11
  116. package/dist/interactive/HTMLMesh.js +11 -11
  117. package/dist/interactive/{InteractiveGroup.mjs → InteractiveGroup.cjs} +8 -8
  118. package/dist/interactive/InteractiveGroup.js +8 -8
  119. package/dist/interactive/{SelectionBox.mjs → SelectionBox.cjs} +21 -21
  120. package/dist/interactive/SelectionBox.js +21 -21
  121. package/dist/interactive/{SelectionHelper.mjs → SelectionHelper.cjs} +7 -7
  122. package/dist/interactive/SelectionHelper.js +7 -7
  123. package/dist/libs/{MeshoptDecoder.mjs → MeshoptDecoder.cjs} +3 -3
  124. package/dist/libs/MeshoptDecoder.js +3 -3
  125. package/dist/libs/{MotionControllers.mjs → MotionControllers.cjs} +6 -6
  126. package/dist/libs/MotionControllers.js +6 -6
  127. package/dist/lights/{LightProbeGenerator.mjs → LightProbeGenerator.cjs} +16 -16
  128. package/dist/lights/LightProbeGenerator.js +16 -16
  129. package/dist/lights/{RectAreaLightUniformsLib.mjs → RectAreaLightUniformsLib.cjs} +42 -42
  130. package/dist/lights/RectAreaLightUniformsLib.js +42 -42
  131. package/dist/lines/Line2.cjs +13 -0
  132. package/dist/lines/Line2.js +8 -8
  133. package/dist/lines/{LineGeometry.mjs → LineGeometry.cjs} +5 -5
  134. package/dist/lines/LineGeometry.js +5 -5
  135. package/dist/lines/{LineMaterial.mjs → LineMaterial.cjs} +10 -10
  136. package/dist/lines/LineMaterial.js +10 -10
  137. package/dist/lines/{LineSegments2.mjs → LineSegments2.cjs} +28 -28
  138. package/dist/lines/LineSegments2.js +28 -28
  139. package/dist/lines/{LineSegmentsGeometry.mjs → LineSegmentsGeometry.cjs} +18 -18
  140. package/dist/lines/LineSegmentsGeometry.js +18 -18
  141. package/dist/lines/Wireframe.cjs +32 -0
  142. package/dist/lines/Wireframe.js +13 -13
  143. package/dist/lines/WireframeGeometry2.cjs +13 -0
  144. package/dist/lines/WireframeGeometry2.js +7 -7
  145. package/dist/loaders/{3DMLoader.mjs → 3DMLoader.cjs} +37 -37
  146. package/dist/loaders/3DMLoader.js +37 -37
  147. package/dist/loaders/{3MFLoader.mjs → 3MFLoader.cjs} +53 -53
  148. package/dist/loaders/3MFLoader.js +53 -53
  149. package/dist/loaders/{AMFLoader.mjs → AMFLoader.cjs} +19 -19
  150. package/dist/loaders/AMFLoader.js +19 -19
  151. package/dist/loaders/{AssimpLoader.mjs → AssimpLoader.cjs} +41 -41
  152. package/dist/loaders/AssimpLoader.js +41 -41
  153. package/dist/loaders/{BVHLoader.mjs → BVHLoader.cjs} +18 -18
  154. package/dist/loaders/BVHLoader.js +18 -18
  155. package/dist/loaders/{BasisTextureLoader.mjs → BasisTextureLoader.cjs} +22 -22
  156. package/dist/loaders/BasisTextureLoader.js +22 -22
  157. package/dist/loaders/{ColladaLoader.mjs → ColladaLoader.cjs} +76 -76
  158. package/dist/loaders/ColladaLoader.js +76 -76
  159. package/dist/loaders/{DDSLoader.mjs → DDSLoader.cjs} +10 -10
  160. package/dist/loaders/DDSLoader.js +10 -10
  161. package/dist/loaders/{DRACOLoader.mjs → DRACOLoader.cjs} +12 -12
  162. package/dist/loaders/DRACOLoader.js +12 -12
  163. package/dist/loaders/{EXRLoader.mjs → EXRLoader.cjs} +23 -23
  164. package/dist/loaders/EXRLoader.js +23 -23
  165. package/dist/loaders/{FBXLoader.mjs → FBXLoader.cjs} +116 -116
  166. package/dist/loaders/FBXLoader.js +116 -116
  167. package/dist/loaders/{FontLoader.mjs → FontLoader.cjs} +9 -9
  168. package/dist/loaders/FontLoader.js +9 -9
  169. package/dist/loaders/{GCodeLoader.mjs → GCodeLoader.cjs} +13 -13
  170. package/dist/loaders/GCodeLoader.js +13 -13
  171. package/dist/loaders/{GLTFLoader.mjs → GLTFLoader.cjs} +112 -112
  172. package/dist/loaders/GLTFLoader.js +112 -112
  173. package/dist/loaders/{HDRCubeTextureLoader.mjs → HDRCubeTextureLoader.cjs} +15 -15
  174. package/dist/loaders/HDRCubeTextureLoader.js +15 -15
  175. package/dist/loaders/{KMZLoader.mjs → KMZLoader.cjs} +13 -13
  176. package/dist/loaders/KMZLoader.js +13 -13
  177. package/dist/loaders/{KTX2Loader.mjs → KTX2Loader.cjs} +65 -65
  178. package/dist/loaders/KTX2Loader.js +65 -65
  179. package/dist/loaders/{KTXLoader.mjs → KTXLoader.cjs} +5 -5
  180. package/dist/loaders/KTXLoader.js +5 -5
  181. package/dist/loaders/{LDrawLoader.mjs → LDrawLoader.cjs} +39 -39
  182. package/dist/loaders/LDrawLoader.js +39 -39
  183. package/dist/loaders/{LUT3dlLoader.mjs → LUT3dlLoader.cjs} +22 -22
  184. package/dist/loaders/LUT3dlLoader.js +22 -22
  185. package/dist/loaders/{LUTCubeLoader.mjs → LUTCubeLoader.cjs} +22 -22
  186. package/dist/loaders/LUTCubeLoader.js +22 -22
  187. package/dist/loaders/{LWOLoader.mjs → LWOLoader.cjs} +42 -42
  188. package/dist/loaders/LWOLoader.js +42 -42
  189. package/dist/loaders/{LottieLoader.mjs → LottieLoader.cjs} +8 -8
  190. package/dist/loaders/LottieLoader.js +8 -8
  191. package/dist/loaders/{MD2Loader.mjs → MD2Loader.cjs} +15 -15
  192. package/dist/loaders/MD2Loader.js +15 -15
  193. package/dist/loaders/{MDDLoader.mjs → MDDLoader.cjs} +9 -9
  194. package/dist/loaders/MDDLoader.js +9 -9
  195. package/dist/loaders/{MMDLoader.mjs → MMDLoader.cjs} +59 -59
  196. package/dist/loaders/MMDLoader.js +59 -59
  197. package/dist/loaders/{MTLLoader.mjs → MTLLoader.cjs} +17 -17
  198. package/dist/loaders/MTLLoader.js +17 -17
  199. package/dist/loaders/{NRRDLoader.mjs → NRRDLoader.cjs} +17 -17
  200. package/dist/loaders/NRRDLoader.js +17 -17
  201. package/dist/loaders/{OBJLoader.mjs → OBJLoader.cjs} +37 -37
  202. package/dist/loaders/OBJLoader.js +37 -37
  203. package/dist/loaders/{PCDLoader.mjs → PCDLoader.cjs} +13 -13
  204. package/dist/loaders/PCDLoader.js +13 -13
  205. package/dist/loaders/{PDBLoader.mjs → PDBLoader.cjs} +11 -11
  206. package/dist/loaders/PDBLoader.js +11 -11
  207. package/dist/loaders/{PLYLoader.mjs → PLYLoader.cjs} +13 -13
  208. package/dist/loaders/PLYLoader.js +13 -13
  209. package/dist/loaders/{PRWMLoader.mjs → PRWMLoader.cjs} +9 -9
  210. package/dist/loaders/PRWMLoader.js +9 -9
  211. package/dist/loaders/{PVRLoader.mjs → PVRLoader.cjs} +11 -11
  212. package/dist/loaders/PVRLoader.js +11 -11
  213. package/dist/loaders/{RGBELoader.mjs → RGBELoader.cjs} +18 -18
  214. package/dist/loaders/RGBELoader.js +18 -18
  215. package/dist/loaders/{RGBMLoader.mjs → RGBMLoader.cjs} +16 -16
  216. package/dist/loaders/RGBMLoader.js +16 -16
  217. package/dist/loaders/{STLLoader.mjs → STLLoader.cjs} +15 -15
  218. package/dist/loaders/STLLoader.js +15 -15
  219. package/dist/loaders/{SVGLoader.mjs → SVGLoader.cjs} +55 -55
  220. package/dist/loaders/SVGLoader.js +55 -55
  221. package/dist/loaders/{TDSLoader.mjs → TDSLoader.cjs} +20 -20
  222. package/dist/loaders/TDSLoader.js +20 -20
  223. package/dist/loaders/{TGALoader.mjs → TGALoader.cjs} +6 -6
  224. package/dist/loaders/TGALoader.js +6 -6
  225. package/dist/loaders/{TTFLoader.mjs → TTFLoader.cjs} +9 -9
  226. package/dist/loaders/TTFLoader.js +9 -9
  227. package/dist/loaders/{TiltLoader.mjs → TiltLoader.cjs} +26 -26
  228. package/dist/loaders/TiltLoader.js +26 -26
  229. package/dist/loaders/{VOXLoader.mjs → VOXLoader.cjs} +18 -18
  230. package/dist/loaders/VOXLoader.js +18 -18
  231. package/dist/loaders/{VRMLLoader.mjs → VRMLLoader.cjs} +125 -125
  232. package/dist/loaders/VRMLLoader.js +125 -125
  233. package/dist/loaders/{VRMLoader.mjs → VRMLoader.cjs} +7 -7
  234. package/dist/loaders/VRMLoader.js +7 -7
  235. package/dist/loaders/{VTKLoader.mjs → VTKLoader.cjs} +24 -24
  236. package/dist/loaders/VTKLoader.js +24 -24
  237. package/dist/loaders/{XLoader.mjs → XLoader.cjs} +42 -42
  238. package/dist/loaders/XLoader.js +42 -42
  239. package/dist/loaders/{XYZLoader.mjs → XYZLoader.cjs} +9 -9
  240. package/dist/loaders/XYZLoader.js +9 -9
  241. package/dist/loaders/lwo/{IFFParser.mjs → IFFParser.cjs} +7 -7
  242. package/dist/loaders/lwo/IFFParser.js +7 -7
  243. package/dist/loaders/lwo/{LWO2Parser.mjs → LWO2Parser.cjs} +3 -3
  244. package/dist/loaders/lwo/LWO2Parser.js +3 -3
  245. package/dist/loaders/lwo/{LWO3Parser.mjs → LWO3Parser.cjs} +3 -3
  246. package/dist/loaders/lwo/LWO3Parser.js +3 -3
  247. package/dist/math/{Capsule.mjs → Capsule.cjs} +8 -8
  248. package/dist/math/Capsule.js +8 -8
  249. package/dist/math/{ColorConverter.mjs → ColorConverter.cjs} +7 -7
  250. package/dist/math/ColorConverter.js +7 -7
  251. package/dist/math/{ConvexHull.mjs → ConvexHull.cjs} +18 -18
  252. package/dist/math/ConvexHull.js +18 -18
  253. package/dist/math/{ImprovedNoise.mjs → ImprovedNoise.cjs} +3 -3
  254. package/dist/math/ImprovedNoise.js +3 -3
  255. package/dist/math/{Lut.mjs → Lut.cjs} +14 -14
  256. package/dist/math/Lut.js +14 -14
  257. package/dist/math/{MeshSurfaceSampler.mjs → MeshSurfaceSampler.cjs} +6 -6
  258. package/dist/math/MeshSurfaceSampler.js +6 -6
  259. package/dist/math/{OBB.mjs → OBB.cjs} +21 -21
  260. package/dist/math/OBB.js +21 -21
  261. package/dist/math/{Octree.mjs → Octree.cjs} +19 -19
  262. package/dist/math/Octree.js +19 -19
  263. package/dist/math/{SimplexNoise.mjs → SimplexNoise.cjs} +3 -3
  264. package/dist/math/SimplexNoise.js +3 -3
  265. package/dist/misc/{ConvexObjectBreaker.mjs → ConvexObjectBreaker.cjs} +25 -25
  266. package/dist/misc/ConvexObjectBreaker.js +25 -25
  267. package/dist/misc/{GPUComputationRenderer.mjs → GPUComputationRenderer.cjs} +19 -19
  268. package/dist/misc/GPUComputationRenderer.js +19 -19
  269. package/dist/misc/{Gyroscope.mjs → Gyroscope.cjs} +11 -11
  270. package/dist/misc/Gyroscope.js +11 -11
  271. package/dist/misc/{MD2Character.mjs → MD2Character.cjs} +14 -14
  272. package/dist/misc/MD2Character.js +14 -14
  273. package/dist/misc/{MD2CharacterComplex.mjs → MD2CharacterComplex.cjs} +20 -20
  274. package/dist/misc/MD2CharacterComplex.js +20 -20
  275. package/dist/misc/{MorphAnimMesh.mjs → MorphAnimMesh.cjs} +8 -8
  276. package/dist/misc/MorphAnimMesh.js +8 -8
  277. package/dist/misc/{MorphBlendMesh.mjs → MorphBlendMesh.cjs} +6 -6
  278. package/dist/misc/MorphBlendMesh.js +6 -6
  279. package/dist/misc/{ProgressiveLightmap.mjs → ProgressiveLightmap.cjs} +17 -17
  280. package/dist/misc/ProgressiveLightmap.js +17 -17
  281. package/dist/misc/{RollerCoaster.mjs → RollerCoaster.cjs} +77 -77
  282. package/dist/misc/RollerCoaster.js +77 -77
  283. package/dist/misc/{Timer.mjs → Timer.cjs} +3 -3
  284. package/dist/misc/Timer.js +3 -3
  285. package/dist/misc/{TubePainter.mjs → TubePainter.cjs} +24 -24
  286. package/dist/misc/TubePainter.js +24 -24
  287. package/dist/misc/{Volume.mjs → Volume.cjs} +18 -18
  288. package/dist/misc/Volume.js +18 -18
  289. package/dist/misc/{VolumeSlice.mjs → VolumeSlice.cjs} +10 -10
  290. package/dist/misc/VolumeSlice.js +10 -10
  291. package/dist/misc/{WebGL.mjs → WebGL.cjs} +7 -7
  292. package/dist/misc/WebGL.js +7 -7
  293. package/dist/modifiers/{CurveModifier.mjs → CurveModifier.cjs} +17 -17
  294. package/dist/modifiers/CurveModifier.js +17 -17
  295. package/dist/modifiers/{EdgeSplitModifier.mjs → EdgeSplitModifier.cjs} +12 -13
  296. package/dist/modifiers/EdgeSplitModifier.js +13 -12
  297. package/dist/modifiers/{SimplifyModifier.mjs → SimplifyModifier.cjs} +12 -12
  298. package/dist/modifiers/SimplifyModifier.js +12 -12
  299. package/dist/modifiers/{TessellateModifier.mjs → TessellateModifier.cjs} +30 -30
  300. package/dist/modifiers/TessellateModifier.js +30 -30
  301. package/dist/objects/{GroundProjectedEnv.mjs → GroundProjectedEnv.cjs} +8 -8
  302. package/dist/objects/GroundProjectedEnv.js +8 -8
  303. package/dist/objects/{Lensflare.mjs → Lensflare.cjs} +37 -37
  304. package/dist/objects/Lensflare.js +37 -37
  305. package/dist/objects/{LightningStorm.mjs → LightningStorm.cjs} +17 -17
  306. package/dist/objects/LightningStorm.js +17 -17
  307. package/dist/objects/{MarchingCubes.mjs → MarchingCubes.cjs} +21 -21
  308. package/dist/objects/MarchingCubes.js +21 -21
  309. package/dist/objects/{Reflector.mjs → Reflector.cjs} +23 -23
  310. package/dist/objects/Reflector.js +23 -23
  311. package/dist/objects/{ReflectorForSSRPass.mjs → ReflectorForSSRPass.cjs} +33 -33
  312. package/dist/objects/ReflectorForSSRPass.js +33 -33
  313. package/dist/objects/ReflectorRTT.cjs +10 -0
  314. package/dist/objects/ReflectorRTT.js +5 -5
  315. package/dist/objects/{Refractor.mjs → Refractor.cjs} +26 -26
  316. package/dist/objects/Refractor.js +26 -26
  317. package/dist/objects/{ShadowMesh.mjs → ShadowMesh.cjs} +9 -9
  318. package/dist/objects/ShadowMesh.js +9 -9
  319. package/dist/objects/{Sky.mjs → Sky.cjs} +11 -11
  320. package/dist/objects/Sky.js +11 -11
  321. package/dist/objects/{Water.mjs → Water.cjs} +33 -33
  322. package/dist/objects/Water.js +33 -33
  323. package/dist/objects/{Water2.mjs → Water2.cjs} +20 -20
  324. package/dist/objects/Water2.js +20 -20
  325. package/dist/physics/{AmmoPhysics.mjs → AmmoPhysics.cjs} +3 -3
  326. package/dist/physics/AmmoPhysics.js +3 -3
  327. package/dist/postprocessing/{AdaptiveToneMappingPass.mjs → AdaptiveToneMappingPass.cjs} +32 -32
  328. package/dist/postprocessing/AdaptiveToneMappingPass.js +32 -32
  329. package/dist/postprocessing/{AfterimagePass.mjs → AfterimagePass.cjs} +21 -21
  330. package/dist/postprocessing/AfterimagePass.js +21 -21
  331. package/dist/postprocessing/{BloomPass.mjs → BloomPass.cjs} +20 -20
  332. package/dist/postprocessing/BloomPass.js +20 -20
  333. package/dist/postprocessing/{BokehPass.mjs → BokehPass.cjs} +19 -19
  334. package/dist/postprocessing/BokehPass.js +19 -19
  335. package/dist/postprocessing/{ClearPass.mjs → ClearPass.cjs} +7 -7
  336. package/dist/postprocessing/ClearPass.js +7 -7
  337. package/dist/postprocessing/{CubeTexturePass.mjs → CubeTexturePass.cjs} +14 -14
  338. package/dist/postprocessing/CubeTexturePass.js +14 -14
  339. package/dist/postprocessing/{DotScreenPass.mjs → DotScreenPass.cjs} +12 -12
  340. package/dist/postprocessing/DotScreenPass.js +12 -12
  341. package/dist/postprocessing/{EffectComposer.mjs → EffectComposer.cjs} +20 -20
  342. package/dist/postprocessing/EffectComposer.js +20 -20
  343. package/dist/postprocessing/{FilmPass.mjs → FilmPass.cjs} +12 -12
  344. package/dist/postprocessing/FilmPass.js +12 -12
  345. package/dist/postprocessing/{GlitchPass.mjs → GlitchPass.cjs} +26 -26
  346. package/dist/postprocessing/GlitchPass.js +26 -26
  347. package/dist/postprocessing/{HalftonePass.mjs → HalftonePass.cjs} +13 -13
  348. package/dist/postprocessing/HalftonePass.js +13 -13
  349. package/dist/postprocessing/{LUTPass.mjs → LUTPass.cjs} +5 -5
  350. package/dist/postprocessing/LUTPass.js +5 -5
  351. package/dist/postprocessing/{MaskPass.mjs → MaskPass.cjs} +7 -7
  352. package/dist/postprocessing/MaskPass.js +7 -7
  353. package/dist/postprocessing/{OutlinePass.mjs → OutlinePass.cjs} +45 -45
  354. package/dist/postprocessing/OutlinePass.js +45 -45
  355. package/dist/postprocessing/{Pass.mjs → Pass.cjs} +8 -8
  356. package/dist/postprocessing/Pass.js +8 -8
  357. package/dist/postprocessing/{RenderPass.mjs → RenderPass.cjs} +7 -7
  358. package/dist/postprocessing/RenderPass.js +7 -7
  359. package/dist/postprocessing/{RenderPixelatedPass.mjs → RenderPixelatedPass.cjs} +18 -18
  360. package/dist/postprocessing/RenderPixelatedPass.js +18 -18
  361. package/dist/postprocessing/{SAOPass.mjs → SAOPass.cjs} +69 -69
  362. package/dist/postprocessing/SAOPass.js +69 -69
  363. package/dist/postprocessing/{SMAAPass.mjs → SMAAPass.cjs} +30 -30
  364. package/dist/postprocessing/SMAAPass.js +30 -30
  365. package/dist/postprocessing/{SSAARenderPass.mjs → SSAARenderPass.cjs} +19 -19
  366. package/dist/postprocessing/SSAARenderPass.js +19 -19
  367. package/dist/postprocessing/{SSAOPass.mjs → SSAOPass.cjs} +63 -63
  368. package/dist/postprocessing/SSAOPass.js +63 -63
  369. package/dist/postprocessing/{SSRPass.mjs → SSRPass.cjs} +86 -86
  370. package/dist/postprocessing/SSRPass.js +86 -86
  371. package/dist/postprocessing/{SavePass.mjs → SavePass.cjs} +13 -13
  372. package/dist/postprocessing/SavePass.js +13 -13
  373. package/dist/postprocessing/{ShaderPass.mjs → ShaderPass.cjs} +10 -10
  374. package/dist/postprocessing/ShaderPass.js +10 -10
  375. package/dist/postprocessing/{TAARenderPass.mjs → TAARenderPass.cjs} +8 -8
  376. package/dist/postprocessing/TAARenderPass.js +8 -8
  377. package/dist/postprocessing/{TexturePass.mjs → TexturePass.cjs} +11 -11
  378. package/dist/postprocessing/TexturePass.js +11 -11
  379. package/dist/postprocessing/{UnrealBloomPass.mjs → UnrealBloomPass.cjs} +36 -36
  380. package/dist/postprocessing/UnrealBloomPass.js +36 -36
  381. package/dist/postprocessing/{WaterPass.mjs → WaterPass.cjs} +10 -10
  382. package/dist/postprocessing/WaterPass.js +10 -10
  383. package/dist/renderers/{CSS2DRenderer.mjs → CSS2DRenderer.cjs} +12 -12
  384. package/dist/renderers/CSS2DRenderer.js +12 -12
  385. package/dist/renderers/{CSS3DRenderer.mjs → CSS3DRenderer.cjs} +12 -12
  386. package/dist/renderers/CSS3DRenderer.js +12 -12
  387. package/dist/renderers/{Projector.mjs → Projector.cjs} +21 -21
  388. package/dist/renderers/Projector.js +21 -21
  389. package/dist/renderers/{SVGRenderer.mjs → SVGRenderer.cjs} +12 -12
  390. package/dist/renderers/SVGRenderer.js +12 -12
  391. package/dist/shaders/{ACESFilmicToneMappingShader.mjs → ACESFilmicToneMappingShader.cjs} +3 -3
  392. package/dist/shaders/ACESFilmicToneMappingShader.js +3 -3
  393. package/dist/shaders/{AfterimageShader.mjs → AfterimageShader.cjs} +3 -3
  394. package/dist/shaders/AfterimageShader.js +3 -3
  395. package/dist/shaders/{BasicShader.mjs → BasicShader.cjs} +3 -3
  396. package/dist/shaders/BasicShader.js +3 -3
  397. package/dist/shaders/{BleachBypassShader.mjs → BleachBypassShader.cjs} +3 -3
  398. package/dist/shaders/BleachBypassShader.js +3 -3
  399. package/dist/shaders/{BlendShader.mjs → BlendShader.cjs} +3 -3
  400. package/dist/shaders/BlendShader.js +3 -3
  401. package/dist/shaders/{BokehShader.mjs → BokehShader.cjs} +3 -3
  402. package/dist/shaders/BokehShader.js +3 -3
  403. package/dist/shaders/{BokehShader2.mjs → BokehShader2.cjs} +6 -6
  404. package/dist/shaders/BokehShader2.js +6 -6
  405. package/dist/shaders/{BrightnessContrastShader.mjs → BrightnessContrastShader.cjs} +3 -3
  406. package/dist/shaders/BrightnessContrastShader.js +3 -3
  407. package/dist/shaders/{ColorCorrectionShader.mjs → ColorCorrectionShader.cjs} +7 -7
  408. package/dist/shaders/ColorCorrectionShader.js +7 -7
  409. package/dist/shaders/{ColorifyShader.mjs → ColorifyShader.cjs} +5 -5
  410. package/dist/shaders/ColorifyShader.js +5 -5
  411. package/dist/shaders/{ConvolutionShader.mjs → ConvolutionShader.cjs} +5 -5
  412. package/dist/shaders/ConvolutionShader.js +5 -5
  413. package/dist/shaders/{CopyShader.mjs → CopyShader.cjs} +3 -3
  414. package/dist/shaders/CopyShader.js +3 -3
  415. package/dist/shaders/{DOFMipMapShader.mjs → DOFMipMapShader.cjs} +3 -3
  416. package/dist/shaders/DOFMipMapShader.js +3 -3
  417. package/dist/shaders/{DepthLimitedBlurShader.mjs → DepthLimitedBlurShader.cjs} +7 -7
  418. package/dist/shaders/DepthLimitedBlurShader.js +7 -7
  419. package/dist/shaders/{DigitalGlitch.mjs → DigitalGlitch.cjs} +3 -3
  420. package/dist/shaders/DigitalGlitch.js +3 -3
  421. package/dist/shaders/{DotScreenShader.mjs → DotScreenShader.cjs} +6 -6
  422. package/dist/shaders/DotScreenShader.js +6 -6
  423. package/dist/shaders/{FXAAShader.mjs → FXAAShader.cjs} +5 -5
  424. package/dist/shaders/FXAAShader.js +5 -5
  425. package/dist/shaders/{FilmShader.mjs → FilmShader.cjs} +3 -3
  426. package/dist/shaders/FilmShader.js +3 -3
  427. package/dist/shaders/{FocusShader.mjs → FocusShader.cjs} +3 -3
  428. package/dist/shaders/FocusShader.js +3 -3
  429. package/dist/shaders/{FreiChenShader.mjs → FreiChenShader.cjs} +5 -5
  430. package/dist/shaders/FreiChenShader.js +5 -5
  431. package/dist/shaders/{FresnelShader.mjs → FresnelShader.cjs} +3 -3
  432. package/dist/shaders/FresnelShader.js +3 -3
  433. package/dist/shaders/{GammaCorrectionShader.mjs → GammaCorrectionShader.cjs} +3 -3
  434. package/dist/shaders/GammaCorrectionShader.js +3 -3
  435. package/dist/shaders/{GodRaysShader.mjs → GodRaysShader.cjs} +11 -11
  436. package/dist/shaders/GodRaysShader.js +11 -11
  437. package/dist/shaders/{HalftoneShader.mjs → HalftoneShader.cjs} +3 -3
  438. package/dist/shaders/HalftoneShader.js +3 -3
  439. package/dist/shaders/{HorizontalBlurShader.mjs → HorizontalBlurShader.cjs} +3 -3
  440. package/dist/shaders/HorizontalBlurShader.js +3 -3
  441. package/dist/shaders/{HorizontalTiltShiftShader.mjs → HorizontalTiltShiftShader.cjs} +3 -3
  442. package/dist/shaders/HorizontalTiltShiftShader.js +3 -3
  443. package/dist/shaders/{HueSaturationShader.mjs → HueSaturationShader.cjs} +3 -3
  444. package/dist/shaders/HueSaturationShader.js +3 -3
  445. package/dist/shaders/{KaleidoShader.mjs → KaleidoShader.cjs} +3 -3
  446. package/dist/shaders/KaleidoShader.js +3 -3
  447. package/dist/shaders/{LuminosityHighPassShader.mjs → LuminosityHighPassShader.cjs} +5 -5
  448. package/dist/shaders/LuminosityHighPassShader.js +5 -5
  449. package/dist/shaders/{LuminosityShader.mjs → LuminosityShader.cjs} +3 -3
  450. package/dist/shaders/LuminosityShader.js +3 -3
  451. package/dist/shaders/{MirrorShader.mjs → MirrorShader.cjs} +3 -3
  452. package/dist/shaders/MirrorShader.js +3 -3
  453. package/dist/shaders/{NormalMapShader.mjs → NormalMapShader.cjs} +6 -6
  454. package/dist/shaders/NormalMapShader.js +6 -6
  455. package/dist/shaders/{ParallaxShader.mjs → ParallaxShader.cjs} +3 -3
  456. package/dist/shaders/ParallaxShader.js +3 -3
  457. package/dist/shaders/{PixelShader.mjs → PixelShader.cjs} +3 -3
  458. package/dist/shaders/PixelShader.js +3 -3
  459. package/dist/shaders/{RGBShiftShader.mjs → RGBShiftShader.cjs} +3 -3
  460. package/dist/shaders/RGBShiftShader.js +3 -3
  461. package/dist/shaders/{SAOShader.mjs → SAOShader.cjs} +7 -7
  462. package/dist/shaders/SAOShader.js +7 -7
  463. package/dist/shaders/{SMAAShader.mjs → SMAAShader.cjs} +9 -9
  464. package/dist/shaders/SMAAShader.js +9 -9
  465. package/dist/shaders/{SSAOShader.mjs → SSAOShader.cjs} +10 -10
  466. package/dist/shaders/SSAOShader.js +10 -10
  467. package/dist/shaders/{SSRShader.mjs → SSRShader.cjs} +10 -10
  468. package/dist/shaders/SSRShader.js +10 -10
  469. package/dist/shaders/{SepiaShader.mjs → SepiaShader.cjs} +3 -3
  470. package/dist/shaders/SepiaShader.js +3 -3
  471. package/dist/shaders/{SobelOperatorShader.mjs → SobelOperatorShader.cjs} +5 -5
  472. package/dist/shaders/SobelOperatorShader.js +5 -5
  473. package/dist/shaders/{SubsurfaceScatteringShader.mjs → SubsurfaceScatteringShader.cjs} +13 -13
  474. package/dist/shaders/SubsurfaceScatteringShader.js +13 -13
  475. package/dist/shaders/{TechnicolorShader.mjs → TechnicolorShader.cjs} +3 -3
  476. package/dist/shaders/TechnicolorShader.js +3 -3
  477. package/dist/shaders/{ToneMapShader.mjs → ToneMapShader.cjs} +3 -3
  478. package/dist/shaders/ToneMapShader.js +3 -3
  479. package/dist/shaders/{ToonShader.mjs → ToonShader.cjs} +32 -32
  480. package/dist/shaders/ToonShader.js +32 -32
  481. package/dist/shaders/{TriangleBlurShader.mjs → TriangleBlurShader.cjs} +5 -5
  482. package/dist/shaders/TriangleBlurShader.js +5 -5
  483. package/dist/shaders/{UnpackDepthRGBAShader.mjs → UnpackDepthRGBAShader.cjs} +3 -3
  484. package/dist/shaders/UnpackDepthRGBAShader.js +3 -3
  485. package/dist/shaders/{VerticalBlurShader.mjs → VerticalBlurShader.cjs} +3 -3
  486. package/dist/shaders/VerticalBlurShader.js +3 -3
  487. package/dist/shaders/{VerticalTiltShiftShader.mjs → VerticalTiltShiftShader.cjs} +3 -3
  488. package/dist/shaders/VerticalTiltShiftShader.js +3 -3
  489. package/dist/shaders/{VignetteShader.mjs → VignetteShader.cjs} +3 -3
  490. package/dist/shaders/VignetteShader.js +3 -3
  491. package/dist/shaders/{VolumeShader.mjs → VolumeShader.cjs} +6 -6
  492. package/dist/shaders/VolumeShader.js +6 -6
  493. package/dist/shaders/{WaterRefractionShader.mjs → WaterRefractionShader.cjs} +3 -3
  494. package/dist/shaders/WaterRefractionShader.js +3 -3
  495. package/dist/shaders/types.cjs +1 -0
  496. package/dist/shaders/types.js +1 -1
  497. package/dist/textures/{FlakesTexture.mjs → FlakesTexture.cjs} +3 -3
  498. package/dist/textures/FlakesTexture.js +3 -3
  499. package/dist/types/Loader.cjs +26 -0
  500. package/dist/types/Loader.js +5 -22
  501. package/dist/types/helpers.cjs +4 -0
  502. package/dist/types/helpers.js +3 -3
  503. package/dist/utils/{BufferGeometryUtils.mjs → BufferGeometryUtils.cjs} +41 -41
  504. package/dist/utils/BufferGeometryUtils.js +41 -41
  505. package/dist/utils/{GeometryCompressionUtils.mjs → GeometryCompressionUtils.cjs} +94 -94
  506. package/dist/utils/GeometryCompressionUtils.js +94 -94
  507. package/dist/utils/{GeometryUtils.mjs → GeometryUtils.cjs} +18 -18
  508. package/dist/utils/GeometryUtils.js +18 -18
  509. package/dist/utils/{RoughnessMipmapper.mjs → RoughnessMipmapper.cjs} +13 -13
  510. package/dist/utils/RoughnessMipmapper.js +13 -13
  511. package/dist/utils/{SceneUtils.mjs → SceneUtils.cjs} +8 -8
  512. package/dist/utils/SceneUtils.js +8 -8
  513. package/dist/utils/{ShadowMapViewer.mjs → ShadowMapViewer.cjs} +18 -18
  514. package/dist/utils/ShadowMapViewer.js +18 -18
  515. package/dist/utils/{SkeletonUtils.mjs → SkeletonUtils.cjs} +10 -10
  516. package/dist/utils/SkeletonUtils.js +10 -10
  517. package/dist/utils/{UVsDebug.mjs → UVsDebug.cjs} +7 -7
  518. package/dist/utils/UVsDebug.js +7 -7
  519. package/dist/utils/{WorkerPool.mjs → WorkerPool.cjs} +3 -3
  520. package/dist/utils/WorkerPool.js +3 -3
  521. package/dist/webxr/{ARButton.mjs → ARButton.cjs} +3 -3
  522. package/dist/webxr/ARButton.js +3 -3
  523. package/dist/webxr/{OculusHandModel.mjs → OculusHandModel.cjs} +9 -9
  524. package/dist/webxr/OculusHandModel.js +9 -9
  525. package/dist/webxr/{OculusHandPointerModel.mjs → OculusHandPointerModel.cjs} +41 -24
  526. package/dist/webxr/OculusHandPointerModel.js +24 -41
  527. package/dist/webxr/Text2D.cjs +48 -0
  528. package/dist/webxr/Text2D.js +9 -26
  529. package/dist/webxr/{VRButton.mjs → VRButton.cjs} +3 -3
  530. package/dist/webxr/VRButton.js +3 -3
  531. package/dist/webxr/{XRControllerModelFactory.mjs → XRControllerModelFactory.cjs} +18 -18
  532. package/dist/webxr/XRControllerModelFactory.js +18 -18
  533. package/dist/webxr/{XREstimatedLight.mjs → XREstimatedLight.cjs} +8 -8
  534. package/dist/webxr/XREstimatedLight.js +8 -8
  535. package/dist/webxr/{XRHandMeshModel.mjs → XRHandMeshModel.cjs} +5 -5
  536. package/dist/webxr/XRHandMeshModel.js +5 -5
  537. package/dist/webxr/{XRHandModelFactory.mjs → XRHandModelFactory.cjs} +10 -10
  538. package/dist/webxr/XRHandModelFactory.js +10 -10
  539. package/dist/webxr/{XRHandPrimitiveModel.mjs → XRHandPrimitiveModel.cjs} +11 -11
  540. package/dist/webxr/XRHandPrimitiveModel.js +11 -11
  541. package/package.json +3 -3
  542. package/dist/_polyfill/CompressedArrayTexture.mjs +0 -12
  543. package/dist/_polyfill/Data3DTexture.mjs +0 -17
  544. package/dist/environments/RoomEnvironment.mjs +0 -78
  545. package/dist/geometries/ConvexGeometry.mjs +0 -26
  546. package/dist/index.mjs +0 -613
  547. package/dist/lines/Line2.mjs +0 -13
  548. package/dist/lines/Wireframe.mjs +0 -32
  549. package/dist/lines/WireframeGeometry2.mjs +0 -13
  550. package/dist/objects/ReflectorRTT.mjs +0 -10
  551. package/dist/shaders/types.mjs +0 -1
  552. package/dist/types/Loader.mjs +0 -9
  553. package/dist/types/helpers.mjs +0 -4
  554. package/dist/webxr/Text2D.mjs +0 -31
@@ -1,12 +1,10 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
3
  var __publicField = (obj, key, value) => {
5
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
5
  return value;
7
6
  };
8
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
- const THREE = require("three");
7
+ import { Matrix4, EventDispatcher, Vector2, Vector3, Quaternion, Group, EllipseCurve, BufferGeometry, PerspectiveCamera, MathUtils, OrthographicCamera, Box3, Sphere, GridHelper, LineBasicMaterial, Line, Raycaster } from "three";
10
8
  const STATE = {
11
9
  IDLE: Symbol(),
12
10
  ROTATE: Symbol(),
@@ -32,13 +30,13 @@ const _center = {
32
30
  y: 0
33
31
  };
34
32
  const _transformation = {
35
- camera: /* @__PURE__ */ new THREE.Matrix4(),
36
- gizmos: /* @__PURE__ */ new THREE.Matrix4()
33
+ camera: /* @__PURE__ */ new Matrix4(),
34
+ gizmos: /* @__PURE__ */ new Matrix4()
37
35
  };
38
36
  const _changeEvent = { type: "change" };
39
37
  const _startEvent = { type: "start" };
40
38
  const _endEvent = { type: "end" };
41
- class ArcballControls extends THREE.EventDispatcher {
39
+ class ArcballControls extends EventDispatcher {
42
40
  constructor(camera, domElement = null, scene = null) {
43
41
  super();
44
42
  __publicField(this, "camera");
@@ -139,9 +137,9 @@ class ArcballControls extends THREE.EventDispatcher {
139
137
  }
140
138
  }
141
139
  const newRadius = this._tbRadius / scale;
142
- const curve = new THREE.EllipseCurve(0, 0, newRadius, newRadius);
140
+ const curve = new EllipseCurve(0, 0, newRadius, newRadius);
143
141
  const points = curve.getPoints(this._curvePts);
144
- const curveGeometry = new THREE.BufferGeometry().setFromPoints(points);
142
+ const curveGeometry = new BufferGeometry().setFromPoints(points);
145
143
  for (const gizmo in this._gizmos.children) {
146
144
  const child = this._gizmos.children[gizmo];
147
145
  child.geometry = curveGeometry;
@@ -358,10 +356,10 @@ class ArcballControls extends THREE.EventDispatcher {
358
356
  }
359
357
  if (this.cursorZoom && this.enablePan) {
360
358
  let scalePoint;
361
- if (this.camera instanceof THREE.OrthographicCamera) {
359
+ if (this.camera instanceof OrthographicCamera) {
362
360
  scalePoint = (_a = this.unprojectOnTbPlane(this.camera, event.clientX, event.clientY, this.domElement)) == null ? void 0 : _a.applyQuaternion(this.camera.quaternion).multiplyScalar(1 / this.camera.zoom).add(this._gizmos.position);
363
361
  }
364
- if (this.camera instanceof THREE.PerspectiveCamera) {
362
+ if (this.camera instanceof PerspectiveCamera) {
365
363
  scalePoint = (_b = this.unprojectOnTbPlane(this.camera, event.clientX, event.clientY, this.domElement)) == null ? void 0 : _b.applyQuaternion(this.camera.quaternion).add(this._gizmos.position);
366
364
  }
367
365
  if (scalePoint !== void 0)
@@ -378,7 +376,7 @@ class ArcballControls extends THREE.EventDispatcher {
378
376
  this.dispatchEvent(_endEvent);
379
377
  break;
380
378
  case "FOV":
381
- if (this.camera instanceof THREE.PerspectiveCamera) {
379
+ if (this.camera instanceof PerspectiveCamera) {
382
380
  this.updateTbState(STATE.FOV, true);
383
381
  if (event.deltaX != 0) {
384
382
  sgn = event.deltaX / notchDeltaY;
@@ -392,15 +390,15 @@ class ArcballControls extends THREE.EventDispatcher {
392
390
  this._v3_1.setFromMatrixPosition(this._cameraMatrixState);
393
391
  const x = this._v3_1.distanceTo(this._gizmos.position);
394
392
  let xNew = x / size;
395
- xNew = THREE.MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
396
- const y = x * Math.tan(THREE.MathUtils.DEG2RAD * this.camera.fov * 0.5);
397
- let newFov = THREE.MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
393
+ xNew = MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
394
+ const y = x * Math.tan(MathUtils.DEG2RAD * this.camera.fov * 0.5);
395
+ let newFov = MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
398
396
  if (newFov > this.maxFov) {
399
397
  newFov = this.maxFov;
400
398
  } else if (newFov < this.minFov) {
401
399
  newFov = this.minFov;
402
400
  }
403
- const newDistance = y / Math.tan(THREE.MathUtils.DEG2RAD * (newFov / 2));
401
+ const newDistance = y / Math.tan(MathUtils.DEG2RAD * (newFov / 2));
404
402
  size = x / newDistance;
405
403
  this.setFov(newFov);
406
404
  this.applyTransformMatrix(this.applyScale(size, this._gizmos.position, false));
@@ -473,7 +471,7 @@ class ArcballControls extends THREE.EventDispatcher {
473
471
  case "FOV":
474
472
  if (!this.enableZoom)
475
473
  return;
476
- if (this.camera instanceof THREE.PerspectiveCamera) {
474
+ if (this.camera instanceof PerspectiveCamera) {
477
475
  if (this._animationId != -1) {
478
476
  cancelAnimationFrame(this._animationId);
479
477
  this._animationId = -1;
@@ -613,7 +611,7 @@ class ArcballControls extends THREE.EventDispatcher {
613
611
  }
614
612
  break;
615
613
  case STATE.FOV:
616
- if (this.enableZoom && this.camera instanceof THREE.PerspectiveCamera) {
614
+ if (this.enableZoom && this.camera instanceof PerspectiveCamera) {
617
615
  if (restart) {
618
616
  this.dispatchEvent(_endEvent);
619
617
  this.dispatchEvent(_startEvent);
@@ -637,11 +635,11 @@ class ArcballControls extends THREE.EventDispatcher {
637
635
  this._v3_1.setFromMatrixPosition(this._cameraMatrixState);
638
636
  const x = this._v3_1.distanceTo(this._gizmos.position);
639
637
  let xNew = x / size;
640
- xNew = THREE.MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
641
- const y = x * Math.tan(THREE.MathUtils.DEG2RAD * this._fovState * 0.5);
642
- let newFov = THREE.MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
643
- newFov = THREE.MathUtils.clamp(newFov, this.minFov, this.maxFov);
644
- const newDistance = y / Math.tan(THREE.MathUtils.DEG2RAD * (newFov / 2));
638
+ xNew = MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
639
+ const y = x * Math.tan(MathUtils.DEG2RAD * this._fovState * 0.5);
640
+ let newFov = MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
641
+ newFov = MathUtils.clamp(newFov, this.minFov, this.maxFov);
642
+ const newDistance = y / Math.tan(MathUtils.DEG2RAD * (newFov / 2));
645
643
  size = x / newDistance;
646
644
  this._v3_2.setFromMatrixPosition(this._gizmoMatrixState);
647
645
  this.setFov(newFov);
@@ -778,12 +776,12 @@ class ArcballControls extends THREE.EventDispatcher {
778
776
  }
779
777
  this._currentFingerRotation = this.getAngle(this._touchCurrent[1], this._touchCurrent[0]) + this.getAngle(this._touchStart[1], this._touchStart[0]);
780
778
  if (!this.enablePan) {
781
- rotationPoint = new THREE.Vector3().setFromMatrixPosition(this._gizmoMatrixState);
779
+ rotationPoint = new Vector3().setFromMatrixPosition(this._gizmoMatrixState);
782
780
  } else if (this.camera) {
783
781
  this._v3_2.setFromMatrixPosition(this._gizmoMatrixState);
784
782
  rotationPoint = (_a = this.unprojectOnTbPlane(this.camera, _center.x, _center.y, this.domElement)) == null ? void 0 : _a.applyQuaternion(this.camera.quaternion).multiplyScalar(1 / this.camera.zoom).add(this._v3_2);
785
783
  }
786
- const amount = THREE.MathUtils.DEG2RAD * (this._startFingerRotation - this._currentFingerRotation);
784
+ const amount = MathUtils.DEG2RAD * (this._startFingerRotation - this._currentFingerRotation);
787
785
  if (rotationPoint !== void 0) {
788
786
  this.applyTransformMatrix(this.zRotate(rotationPoint, amount));
789
787
  }
@@ -825,9 +823,9 @@ class ArcballControls extends THREE.EventDispatcher {
825
823
  if (!this.enablePan) {
826
824
  scalePoint = this._gizmos.position;
827
825
  } else {
828
- if (this.camera instanceof THREE.OrthographicCamera) {
826
+ if (this.camera instanceof OrthographicCamera) {
829
827
  scalePoint = (_a = this.unprojectOnTbPlane(this.camera, _center.x, _center.y, this.domElement)) == null ? void 0 : _a.applyQuaternion(this.camera.quaternion).multiplyScalar(1 / this.camera.zoom).add(this._gizmos.position);
830
- } else if (this.camera instanceof THREE.PerspectiveCamera) {
828
+ } else if (this.camera instanceof PerspectiveCamera) {
831
829
  scalePoint = (_b = this.unprojectOnTbPlane(this.camera, _center.x, _center.y, this.domElement)) == null ? void 0 : _b.applyQuaternion(this.camera.quaternion).add(this._gizmos.position);
832
830
  }
833
831
  }
@@ -879,11 +877,11 @@ class ArcballControls extends THREE.EventDispatcher {
879
877
  this._v3_1.setFromMatrixPosition(this._cameraMatrixState);
880
878
  const x = this._v3_1.distanceTo(this._gizmos.position);
881
879
  let xNew = x / size;
882
- xNew = THREE.MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
883
- const y = x * Math.tan(THREE.MathUtils.DEG2RAD * this._fovState * 0.5);
884
- let newFov = THREE.MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
885
- newFov = THREE.MathUtils.clamp(newFov, this.minFov, this.maxFov);
886
- const newDistance = y / Math.tan(THREE.MathUtils.DEG2RAD * (newFov / 2));
880
+ xNew = MathUtils.clamp(xNew, this.minDistance, this.maxDistance);
881
+ const y = x * Math.tan(MathUtils.DEG2RAD * this._fovState * 0.5);
882
+ let newFov = MathUtils.RAD2DEG * (Math.atan(y / xNew) * 2);
883
+ newFov = MathUtils.clamp(newFov, this.minFov, this.maxFov);
884
+ const newDistance = y / Math.tan(MathUtils.DEG2RAD * (newFov / 2));
887
885
  size = x / newDistance;
888
886
  this._v3_2.setFromMatrixPosition(this._gizmoMatrixState);
889
887
  this.setFov(newFov);
@@ -1080,11 +1078,11 @@ class ArcballControls extends THREE.EventDispatcher {
1080
1078
  __publicField(this, "calculateTbRadius", (camera) => {
1081
1079
  const factor = 0.67;
1082
1080
  const distance = camera.position.distanceTo(this._gizmos.position);
1083
- if (camera instanceof THREE.PerspectiveCamera) {
1084
- const halfFovV = THREE.MathUtils.DEG2RAD * camera.fov * 0.5;
1081
+ if (camera instanceof PerspectiveCamera) {
1082
+ const halfFovV = MathUtils.DEG2RAD * camera.fov * 0.5;
1085
1083
  const halfFovH = Math.atan(camera.aspect * Math.tan(halfFovV));
1086
1084
  return Math.tan(Math.min(halfFovV, halfFovH)) * distance * factor;
1087
- } else if (camera instanceof THREE.OrthographicCamera) {
1085
+ } else if (camera instanceof OrthographicCamera) {
1088
1086
  return Math.min(camera.top, camera.right) * factor;
1089
1087
  }
1090
1088
  });
@@ -1120,16 +1118,16 @@ class ArcballControls extends THREE.EventDispatcher {
1120
1118
  const color = 8947848;
1121
1119
  const multiplier = 3;
1122
1120
  let size, divisions, maxLength, tick;
1123
- if (this.camera instanceof THREE.OrthographicCamera) {
1121
+ if (this.camera instanceof OrthographicCamera) {
1124
1122
  const width = this.camera.right - this.camera.left;
1125
1123
  const height = this.camera.bottom - this.camera.top;
1126
1124
  maxLength = Math.max(width, height);
1127
1125
  tick = maxLength / 20;
1128
1126
  size = maxLength / this.camera.zoom * multiplier;
1129
1127
  divisions = size / tick * this.camera.zoom;
1130
- } else if (this.camera instanceof THREE.PerspectiveCamera) {
1128
+ } else if (this.camera instanceof PerspectiveCamera) {
1131
1129
  const distance = this.camera.position.distanceTo(this._gizmos.position);
1132
- const halfFovV = THREE.MathUtils.DEG2RAD * this.camera.fov * 0.5;
1130
+ const halfFovV = MathUtils.DEG2RAD * this.camera.fov * 0.5;
1133
1131
  const halfFovH = Math.atan(this.camera.aspect * Math.tan(halfFovV));
1134
1132
  maxLength = Math.tan(Math.max(halfFovV, halfFovH)) * distance * 2;
1135
1133
  tick = maxLength / 20;
@@ -1137,7 +1135,7 @@ class ArcballControls extends THREE.EventDispatcher {
1137
1135
  divisions = size / tick;
1138
1136
  }
1139
1137
  if (this._grid == null && this.camera) {
1140
- this._grid = new THREE.GridHelper(size, divisions, color, color);
1138
+ this._grid = new GridHelper(size, divisions, color, color);
1141
1139
  this._grid.position.copy(this._gizmos.position);
1142
1140
  this._gridPosition.copy(this._grid.position);
1143
1141
  this._grid.quaternion.copy(this.camera.quaternion);
@@ -1226,7 +1224,7 @@ class ArcballControls extends THREE.EventDispatcher {
1226
1224
  */
1227
1225
  __publicField(this, "getCursorPosition", (cursorX, cursorY, canvas) => {
1228
1226
  this._v2_1.copy(this.getCursorNDC(cursorX, cursorY, canvas));
1229
- if (this.camera instanceof THREE.OrthographicCamera) {
1227
+ if (this.camera instanceof OrthographicCamera) {
1230
1228
  this._v2_1.x *= (this.camera.right - this.camera.left) * 0.5;
1231
1229
  this._v2_1.y *= (this.camera.top - this.camera.bottom) * 0.5;
1232
1230
  }
@@ -1240,7 +1238,7 @@ class ArcballControls extends THREE.EventDispatcher {
1240
1238
  if (camera) {
1241
1239
  camera.lookAt(this.target);
1242
1240
  camera.updateMatrix();
1243
- if (camera instanceof THREE.PerspectiveCamera) {
1241
+ if (camera instanceof PerspectiveCamera) {
1244
1242
  this._fov0 = camera.fov;
1245
1243
  this._fovState = camera.fov;
1246
1244
  }
@@ -1272,15 +1270,15 @@ class ArcballControls extends THREE.EventDispatcher {
1272
1270
  * @param {number} tbRadius The trackball radius
1273
1271
  */
1274
1272
  __publicField(this, "makeGizmos", (tbCenter, tbRadius) => {
1275
- const curve = new THREE.EllipseCurve(0, 0, tbRadius, tbRadius);
1273
+ const curve = new EllipseCurve(0, 0, tbRadius, tbRadius);
1276
1274
  const points = curve.getPoints(this._curvePts);
1277
- const curveGeometry = new THREE.BufferGeometry().setFromPoints(points);
1278
- const curveMaterialX = new THREE.LineBasicMaterial({ color: 16744576, fog: false, transparent: true, opacity: 0.6 });
1279
- const curveMaterialY = new THREE.LineBasicMaterial({ color: 8454016, fog: false, transparent: true, opacity: 0.6 });
1280
- const curveMaterialZ = new THREE.LineBasicMaterial({ color: 8421631, fog: false, transparent: true, opacity: 0.6 });
1281
- const gizmoX = new THREE.Line(curveGeometry, curveMaterialX);
1282
- const gizmoY = new THREE.Line(curveGeometry, curveMaterialY);
1283
- const gizmoZ = new THREE.Line(curveGeometry, curveMaterialZ);
1275
+ const curveGeometry = new BufferGeometry().setFromPoints(points);
1276
+ const curveMaterialX = new LineBasicMaterial({ color: 16744576, fog: false, transparent: true, opacity: 0.6 });
1277
+ const curveMaterialY = new LineBasicMaterial({ color: 8454016, fog: false, transparent: true, opacity: 0.6 });
1278
+ const curveMaterialZ = new LineBasicMaterial({ color: 8421631, fog: false, transparent: true, opacity: 0.6 });
1279
+ const gizmoX = new Line(curveGeometry, curveMaterialX);
1280
+ const gizmoY = new Line(curveGeometry, curveMaterialY);
1281
+ const gizmoZ = new Line(curveGeometry, curveMaterialZ);
1284
1282
  const rotation = Math.PI * 0.5;
1285
1283
  gizmoX.rotation.x = rotation;
1286
1284
  gizmoY.rotation.y = rotation;
@@ -1386,10 +1384,10 @@ class ArcballControls extends THREE.EventDispatcher {
1386
1384
  __publicField(this, "pan", (p0, p1, adjust = false) => {
1387
1385
  if (this.camera) {
1388
1386
  const movement = p0.clone().sub(p1);
1389
- if (this.camera instanceof THREE.OrthographicCamera) {
1387
+ if (this.camera instanceof OrthographicCamera) {
1390
1388
  movement.multiplyScalar(1 / this.camera.zoom);
1391
1389
  }
1392
- if (this.camera instanceof THREE.PerspectiveCamera && adjust) {
1390
+ if (this.camera instanceof PerspectiveCamera && adjust) {
1393
1391
  this._v3_1.setFromMatrixPosition(this._cameraMatrixState0);
1394
1392
  this._v3_2.setFromMatrixPosition(this._gizmoMatrixState0);
1395
1393
  const distanceFactor = this._v3_1.distanceTo(this._v3_2) / this.camera.position.distanceTo(this._gizmos.position);
@@ -1407,7 +1405,7 @@ class ArcballControls extends THREE.EventDispatcher {
1407
1405
  __publicField(this, "reset", () => {
1408
1406
  if (this.camera) {
1409
1407
  this.camera.zoom = this._zoom0;
1410
- if (this.camera instanceof THREE.PerspectiveCamera) {
1408
+ if (this.camera instanceof PerspectiveCamera) {
1411
1409
  this.camera.fov = this._fov0;
1412
1410
  }
1413
1411
  this.camera.near = this._nearPos;
@@ -1449,7 +1447,7 @@ class ArcballControls extends THREE.EventDispatcher {
1449
1447
  __publicField(this, "copyState", () => {
1450
1448
  if (this.camera) {
1451
1449
  const state = JSON.stringify(
1452
- this.camera instanceof THREE.OrthographicCamera ? {
1450
+ this.camera instanceof OrthographicCamera ? {
1453
1451
  arcballState: {
1454
1452
  cameraFar: this.camera.far,
1455
1453
  cameraMatrix: this.camera.matrix,
@@ -1491,7 +1489,7 @@ class ArcballControls extends THREE.EventDispatcher {
1491
1489
  this._farPos = this.camera.far;
1492
1490
  this._zoom0 = this.camera.zoom;
1493
1491
  this._up0.copy(this.camera.up);
1494
- if (this.camera instanceof THREE.PerspectiveCamera) {
1492
+ if (this.camera instanceof PerspectiveCamera) {
1495
1493
  this._fov0 = this.camera.fov;
1496
1494
  }
1497
1495
  });
@@ -1507,7 +1505,7 @@ class ArcballControls extends THREE.EventDispatcher {
1507
1505
  return;
1508
1506
  const scalePoint = point.clone();
1509
1507
  let sizeInverse = 1 / size;
1510
- if (this.camera instanceof THREE.OrthographicCamera) {
1508
+ if (this.camera instanceof OrthographicCamera) {
1511
1509
  this.camera.zoom = this._zoomState;
1512
1510
  this.camera.zoom *= size;
1513
1511
  if (this.camera.zoom > this.maxZoom) {
@@ -1531,7 +1529,7 @@ class ArcballControls extends THREE.EventDispatcher {
1531
1529
  this.setTransformationMatrices(this._m4_1, this._m4_2);
1532
1530
  return _transformation;
1533
1531
  }
1534
- if (this.camera instanceof THREE.PerspectiveCamera) {
1532
+ if (this.camera instanceof PerspectiveCamera) {
1535
1533
  this._v3_1.setFromMatrixPosition(this._cameraMatrixState);
1536
1534
  this._v3_2.setFromMatrixPosition(this._gizmoMatrixState);
1537
1535
  let distance = this._v3_1.distanceTo(scalePoint);
@@ -1569,8 +1567,8 @@ class ArcballControls extends THREE.EventDispatcher {
1569
1567
  * @param {Number} value fov to be setted
1570
1568
  */
1571
1569
  __publicField(this, "setFov", (value) => {
1572
- if (this.camera instanceof THREE.PerspectiveCamera) {
1573
- this.camera.fov = THREE.MathUtils.clamp(value, this.minFov, this.maxFov);
1570
+ if (this.camera instanceof PerspectiveCamera) {
1571
+ this.camera.fov = MathUtils.clamp(value, this.minFov, this.maxFov);
1574
1572
  this.camera.updateProjectionMatrix();
1575
1573
  }
1576
1574
  });
@@ -1620,7 +1618,7 @@ class ArcballControls extends THREE.EventDispatcher {
1620
1618
  __publicField(this, "unprojectOnObj", (cursor, camera) => {
1621
1619
  if (!this.scene)
1622
1620
  return null;
1623
- const raycaster = new THREE.Raycaster();
1621
+ const raycaster = new Raycaster();
1624
1622
  raycaster.near = camera.near;
1625
1623
  raycaster.far = camera.far;
1626
1624
  raycaster.setFromCamera(cursor, camera);
@@ -1642,7 +1640,7 @@ class ArcballControls extends THREE.EventDispatcher {
1642
1640
  * @returns {Vector3} The unprojected point on the trackball surface
1643
1641
  */
1644
1642
  __publicField(this, "unprojectOnTbSurface", (camera, cursorX, cursorY, canvas, tbRadius) => {
1645
- if (camera instanceof THREE.OrthographicCamera) {
1643
+ if (camera instanceof OrthographicCamera) {
1646
1644
  this._v2_1.copy(this.getCursorPosition(cursorX, cursorY, canvas));
1647
1645
  this._v3_1.set(this._v2_1.x, this._v2_1.y, 0);
1648
1646
  const x2 = Math.pow(this._v2_1.x, 2);
@@ -1655,7 +1653,7 @@ class ArcballControls extends THREE.EventDispatcher {
1655
1653
  }
1656
1654
  return this._v3_1;
1657
1655
  }
1658
- if (camera instanceof THREE.PerspectiveCamera) {
1656
+ if (camera instanceof PerspectiveCamera) {
1659
1657
  this._v2_1.copy(this.getCursorNDC(cursorX, cursorY, canvas));
1660
1658
  this._v3_1.set(this._v2_1.x, this._v2_1.y, -1);
1661
1659
  this._v3_1.applyMatrix4(camera.projectionMatrixInverse);
@@ -1677,7 +1675,7 @@ class ArcballControls extends THREE.EventDispatcher {
1677
1675
  if (delta >= 0) {
1678
1676
  this._v2_1.setX((-b - Math.sqrt(delta)) / (2 * a));
1679
1677
  this._v2_1.setY(m * this._v2_1.x + q);
1680
- const angle = THREE.MathUtils.RAD2DEG * this._v2_1.angle();
1678
+ const angle = MathUtils.RAD2DEG * this._v2_1.angle();
1681
1679
  if (angle >= 45) {
1682
1680
  const rayLength2 = Math.sqrt(Math.pow(this._v2_1.x, 2) + Math.pow(cameraGizmoDistance - this._v2_1.y, 2));
1683
1681
  rayDir.multiplyScalar(rayLength2);
@@ -1707,12 +1705,12 @@ class ArcballControls extends THREE.EventDispatcher {
1707
1705
  * @returns {Vector3} The unprojected point on the trackball plane
1708
1706
  */
1709
1707
  __publicField(this, "unprojectOnTbPlane", (camera, cursorX, cursorY, canvas, initialDistance = false) => {
1710
- if (camera instanceof THREE.OrthographicCamera) {
1708
+ if (camera instanceof OrthographicCamera) {
1711
1709
  this._v2_1.copy(this.getCursorPosition(cursorX, cursorY, canvas));
1712
1710
  this._v3_1.set(this._v2_1.x, this._v2_1.y, 0);
1713
1711
  return this._v3_1.clone();
1714
1712
  }
1715
- if (camera instanceof THREE.PerspectiveCamera) {
1713
+ if (camera instanceof PerspectiveCamera) {
1716
1714
  this._v2_1.copy(this.getCursorNDC(cursorX, cursorY, canvas));
1717
1715
  this._v3_1.set(this._v2_1.x, this._v2_1.y, -1);
1718
1716
  this._v3_1.applyMatrix4(camera.projectionMatrixInverse);
@@ -1746,12 +1744,12 @@ class ArcballControls extends THREE.EventDispatcher {
1746
1744
  return;
1747
1745
  this._cameraMatrixState.copy(this.camera.matrix);
1748
1746
  this._gizmoMatrixState.copy(this._gizmos.matrix);
1749
- if (this.camera instanceof THREE.OrthographicCamera) {
1747
+ if (this.camera instanceof OrthographicCamera) {
1750
1748
  this._cameraProjectionState.copy(this.camera.projectionMatrix);
1751
1749
  this.camera.updateProjectionMatrix();
1752
1750
  this._zoomState = this.camera.zoom;
1753
1751
  }
1754
- if (this.camera instanceof THREE.PerspectiveCamera) {
1752
+ if (this.camera instanceof PerspectiveCamera) {
1755
1753
  this._fovState = this.camera.fov;
1756
1754
  }
1757
1755
  });
@@ -1779,21 +1777,21 @@ class ArcballControls extends THREE.EventDispatcher {
1779
1777
  }
1780
1778
  if (!this.camera)
1781
1779
  return;
1782
- if (this.camera instanceof THREE.OrthographicCamera) {
1780
+ if (this.camera instanceof OrthographicCamera) {
1783
1781
  if (this.camera.zoom > this.maxZoom || this.camera.zoom < this.minZoom) {
1784
- const newZoom = THREE.MathUtils.clamp(this.camera.zoom, this.minZoom, this.maxZoom);
1782
+ const newZoom = MathUtils.clamp(this.camera.zoom, this.minZoom, this.maxZoom);
1785
1783
  this.applyTransformMatrix(this.applyScale(newZoom / this.camera.zoom, this._gizmos.position, true));
1786
1784
  }
1787
1785
  }
1788
- if (this.camera instanceof THREE.PerspectiveCamera) {
1786
+ if (this.camera instanceof PerspectiveCamera) {
1789
1787
  const distance = this.camera.position.distanceTo(this._gizmos.position);
1790
1788
  if (distance > this.maxDistance + EPS || distance < this.minDistance - EPS) {
1791
- const newDistance = THREE.MathUtils.clamp(distance, this.minDistance, this.maxDistance);
1789
+ const newDistance = MathUtils.clamp(distance, this.minDistance, this.maxDistance);
1792
1790
  this.applyTransformMatrix(this.applyScale(newDistance / distance, this._gizmos.position));
1793
1791
  this.updateMatrixState();
1794
1792
  }
1795
1793
  if (this.camera.fov < this.minFov || this.camera.fov > this.maxFov) {
1796
- this.camera.fov = THREE.MathUtils.clamp(this.camera.fov, this.minFov, this.maxFov);
1794
+ this.camera.fov = MathUtils.clamp(this.camera.fov, this.minFov, this.maxFov);
1797
1795
  this.camera.updateProjectionMatrix();
1798
1796
  }
1799
1797
  const oldRadius = this._tbRadius;
@@ -1804,9 +1802,9 @@ class ArcballControls extends THREE.EventDispatcher {
1804
1802
  if (oldRadius < this._tbRadius - EPS || oldRadius > this._tbRadius + EPS) {
1805
1803
  const scale = (this._gizmos.scale.x + this._gizmos.scale.y + this._gizmos.scale.z) / 3;
1806
1804
  const newRadius = this._tbRadius / scale;
1807
- const curve = new THREE.EllipseCurve(0, 0, newRadius, newRadius);
1805
+ const curve = new EllipseCurve(0, 0, newRadius, newRadius);
1808
1806
  const points = curve.getPoints(this._curvePts);
1809
- const curveGeometry = new THREE.BufferGeometry().setFromPoints(points);
1807
+ const curveGeometry = new BufferGeometry().setFromPoints(points);
1810
1808
  for (const gizmo in this._gizmos.children) {
1811
1809
  const child = this._gizmos.children[gizmo];
1812
1810
  child.geometry = curveGeometry;
@@ -1824,7 +1822,7 @@ class ArcballControls extends THREE.EventDispatcher {
1824
1822
  this.camera.near = state.arcballState.cameraNear;
1825
1823
  this.camera.far = state.arcballState.cameraFar;
1826
1824
  this.camera.zoom = state.arcballState.cameraZoom;
1827
- if (this.camera instanceof THREE.PerspectiveCamera) {
1825
+ if (this.camera instanceof PerspectiveCamera) {
1828
1826
  this.camera.fov = state.arcballState.cameraFov;
1829
1827
  }
1830
1828
  this._gizmoMatrixState.fromArray(state.arcballState.gizmoMatrix.elements);
@@ -1836,7 +1834,7 @@ class ArcballControls extends THREE.EventDispatcher {
1836
1834
  if (tbRadius !== void 0) {
1837
1835
  this._tbRadius = tbRadius;
1838
1836
  }
1839
- const gizmoTmp = new THREE.Matrix4().copy(this._gizmoMatrixState0);
1837
+ const gizmoTmp = new Matrix4().copy(this._gizmoMatrixState0);
1840
1838
  this.makeGizmos(this._gizmos.position, this._tbRadius);
1841
1839
  this._gizmoMatrixState0.copy(gizmoTmp);
1842
1840
  this.camera.lookAt(this._gizmos.position);
@@ -1849,33 +1847,33 @@ class ArcballControls extends THREE.EventDispatcher {
1849
1847
  this.scene = scene;
1850
1848
  this.mouseActions = [];
1851
1849
  this._mouseOp = null;
1852
- this._v2_1 = new THREE.Vector2();
1853
- this._v3_1 = new THREE.Vector3();
1854
- this._v3_2 = new THREE.Vector3();
1855
- this._m4_1 = new THREE.Matrix4();
1856
- this._m4_2 = new THREE.Matrix4();
1857
- this._quat = new THREE.Quaternion();
1858
- this._translationMatrix = new THREE.Matrix4();
1859
- this._rotationMatrix = new THREE.Matrix4();
1860
- this._scaleMatrix = new THREE.Matrix4();
1861
- this._rotationAxis = new THREE.Vector3();
1862
- this._cameraMatrixState = new THREE.Matrix4();
1863
- this._cameraProjectionState = new THREE.Matrix4();
1850
+ this._v2_1 = new Vector2();
1851
+ this._v3_1 = new Vector3();
1852
+ this._v3_2 = new Vector3();
1853
+ this._m4_1 = new Matrix4();
1854
+ this._m4_2 = new Matrix4();
1855
+ this._quat = new Quaternion();
1856
+ this._translationMatrix = new Matrix4();
1857
+ this._rotationMatrix = new Matrix4();
1858
+ this._scaleMatrix = new Matrix4();
1859
+ this._rotationAxis = new Vector3();
1860
+ this._cameraMatrixState = new Matrix4();
1861
+ this._cameraProjectionState = new Matrix4();
1864
1862
  this._fovState = 1;
1865
- this._upState = new THREE.Vector3();
1863
+ this._upState = new Vector3();
1866
1864
  this._zoomState = 1;
1867
1865
  this._nearPos = 0;
1868
1866
  this._farPos = 0;
1869
- this._gizmoMatrixState = new THREE.Matrix4();
1870
- this._up0 = new THREE.Vector3();
1867
+ this._gizmoMatrixState = new Matrix4();
1868
+ this._up0 = new Vector3();
1871
1869
  this._zoom0 = 1;
1872
1870
  this._fov0 = 0;
1873
1871
  this._initialNear = 0;
1874
1872
  this._nearPos0 = 0;
1875
1873
  this._initialFar = 0;
1876
1874
  this._farPos0 = 0;
1877
- this._cameraMatrixState0 = new THREE.Matrix4();
1878
- this._gizmoMatrixState0 = new THREE.Matrix4();
1875
+ this._cameraMatrixState0 = new Matrix4();
1876
+ this._gizmoMatrixState0 = new Matrix4();
1879
1877
  this._button = -1;
1880
1878
  this._touchStart = [];
1881
1879
  this._touchCurrent = [];
@@ -1894,11 +1892,11 @@ class ArcballControls extends THREE.EventDispatcher {
1894
1892
  this._maxInterval = 300;
1895
1893
  this._posThreshold = 24;
1896
1894
  this._movementThreshold = 24;
1897
- this._currentCursorPosition = new THREE.Vector3();
1898
- this._startCursorPosition = new THREE.Vector3();
1895
+ this._currentCursorPosition = new Vector3();
1896
+ this._startCursorPosition = new Vector3();
1899
1897
  this._grid = null;
1900
- this._gridPosition = new THREE.Vector3();
1901
- this._gizmos = new THREE.Group();
1898
+ this._gridPosition = new Vector3();
1899
+ this._gizmos = new Group();
1902
1900
  this._curvePts = 128;
1903
1901
  this._timeStart = -1;
1904
1902
  this._animationId = -1;
@@ -1907,8 +1905,8 @@ class ArcballControls extends THREE.EventDispatcher {
1907
1905
  this._timeCurrent = 0;
1908
1906
  this._anglePrev = 0;
1909
1907
  this._angleCurrent = 0;
1910
- this._cursorPosPrev = new THREE.Vector3();
1911
- this._cursorPosCurr = new THREE.Vector3();
1908
+ this._cursorPosPrev = new Vector3();
1909
+ this._cursorPosCurr = new Vector3();
1912
1910
  this._wPrev = 0;
1913
1911
  this._wCurr = 0;
1914
1912
  this.adjustNearFar = false;
@@ -1928,8 +1926,8 @@ class ArcballControls extends THREE.EventDispatcher {
1928
1926
  this.maxDistance = Infinity;
1929
1927
  this.minZoom = 0;
1930
1928
  this.maxZoom = Infinity;
1931
- this.target = new THREE.Vector3(0, 0, 0);
1932
- this._currentTarget = new THREE.Vector3(0, 0, 0);
1929
+ this.target = new Vector3(0, 0, 0);
1930
+ this._currentTarget = new Vector3(0, 0, 0);
1933
1931
  this._tbRadius = 1;
1934
1932
  this._state = STATE.IDLE;
1935
1933
  this.setCamera(camera);
@@ -1967,9 +1965,9 @@ class ArcballControls extends THREE.EventDispatcher {
1967
1965
  }
1968
1966
  if (this.adjustNearFar) {
1969
1967
  const cameraDistance = this.camera.position.distanceTo(this._gizmos.position);
1970
- const bb = new THREE.Box3();
1968
+ const bb = new Box3();
1971
1969
  bb.setFromObject(this._gizmos);
1972
- const sphere = new THREE.Sphere();
1970
+ const sphere = new Sphere();
1973
1971
  bb.getBoundingSphere(sphere);
1974
1972
  const adjustedNearPosition = Math.max(this._nearPos0, sphere.radius + sphere.center.length());
1975
1973
  const regularNearPosition = cameraDistance - this._initialNear;
@@ -2030,4 +2028,6 @@ class ArcballControls extends THREE.EventDispatcher {
2030
2028
  }
2031
2029
  }
2032
2030
  }
2033
- exports.ArcballControls = ArcballControls;
2031
+ export {
2032
+ ArcballControls
2033
+ };
@@ -1,11 +1,13 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
4
  var __publicField = (obj, key, value) => {
4
5
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
6
  return value;
6
7
  };
7
- import { EventDispatcher, Vector3, Euler, Quaternion, MathUtils } from "three";
8
- class DeviceOrientationControls extends EventDispatcher {
8
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
+ const THREE = require("three");
10
+ class DeviceOrientationControls extends THREE.EventDispatcher {
9
11
  // radians
10
12
  constructor(object) {
11
13
  super();
@@ -23,10 +25,10 @@ class DeviceOrientationControls extends EventDispatcher {
23
25
  this.screenOrientation = window.orientation || 0;
24
26
  });
25
27
  // The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''
26
- __publicField(this, "zee", new Vector3(0, 0, 1));
27
- __publicField(this, "euler", new Euler());
28
- __publicField(this, "q0", new Quaternion());
29
- __publicField(this, "q1", new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5)));
28
+ __publicField(this, "zee", new THREE.Vector3(0, 0, 1));
29
+ __publicField(this, "euler", new THREE.Euler());
30
+ __publicField(this, "q0", new THREE.Quaternion());
31
+ __publicField(this, "q1", new THREE.Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5)));
30
32
  // - PI/2 around the x-axis
31
33
  __publicField(this, "setObjectQuaternion", (quaternion, alpha, beta, gamma, orient) => {
32
34
  this.euler.set(beta, alpha, -gamma, "YXZ");
@@ -57,16 +59,16 @@ class DeviceOrientationControls extends EventDispatcher {
57
59
  window.removeEventListener("deviceorientation", this.onDeviceOrientationChangeEvent);
58
60
  this.enabled = false;
59
61
  });
60
- __publicField(this, "lastQuaternion", new Quaternion());
62
+ __publicField(this, "lastQuaternion", new THREE.Quaternion());
61
63
  __publicField(this, "update", () => {
62
64
  if (this.enabled === false)
63
65
  return;
64
66
  const device = this.deviceOrientation;
65
67
  if (device) {
66
- const alpha = device.alpha ? MathUtils.degToRad(device.alpha) + this.alphaOffset : 0;
67
- const beta = device.beta ? MathUtils.degToRad(device.beta) : 0;
68
- const gamma = device.gamma ? MathUtils.degToRad(device.gamma) : 0;
69
- const orient = this.screenOrientation ? MathUtils.degToRad(this.screenOrientation) : 0;
68
+ const alpha = device.alpha ? THREE.MathUtils.degToRad(device.alpha) + this.alphaOffset : 0;
69
+ const beta = device.beta ? THREE.MathUtils.degToRad(device.beta) : 0;
70
+ const gamma = device.gamma ? THREE.MathUtils.degToRad(device.gamma) : 0;
71
+ const orient = this.screenOrientation ? THREE.MathUtils.degToRad(this.screenOrientation) : 0;
70
72
  this.setObjectQuaternion(this.object.quaternion, alpha, beta, gamma, orient);
71
73
  if (8 * (1 - this.lastQuaternion.dot(this.object.quaternion)) > this.EPS) {
72
74
  this.lastQuaternion.copy(this.object.quaternion);
@@ -80,6 +82,4 @@ class DeviceOrientationControls extends EventDispatcher {
80
82
  this.connect();
81
83
  }
82
84
  }
83
- export {
84
- DeviceOrientationControls
85
- };
85
+ exports.DeviceOrientationControls = DeviceOrientationControls;