kitchen-simulator 5.0.0-test.1 → 5.0.0-test.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1619) hide show
  1. package/package.json +45 -51
  2. package/src/KitchenConfigurator.jsx +1 -1
  3. package/src/components/export.js +16 -23
  4. package/src/components/viewer3d/scene-creator.js +23 -26
  5. package/src/components/viewer3d/viewer3d.js +18 -18
  6. package/src/index.js +1 -4
  7. package/es/@history.js +0 -3
  8. package/es/@history.js.map +0 -1
  9. package/es/AppContext.js +0 -4
  10. package/es/AppContext.js.map +0 -1
  11. package/es/KitchenConfigurator.js +0 -1345
  12. package/es/KitchenConfigurator.js.map +0 -1
  13. package/es/KitchenConfiguratorApp.js +0 -532
  14. package/es/KitchenConfiguratorApp.js.map +0 -1
  15. package/es/actions/area-actions.js +0 -15
  16. package/es/actions/area-actions.js.map +0 -1
  17. package/es/actions/export.js +0 -26
  18. package/es/actions/export.js.map +0 -1
  19. package/es/actions/groups-actions.js +0 -90
  20. package/es/actions/groups-actions.js.map +0 -1
  21. package/es/actions/holes-actions.js +0 -120
  22. package/es/actions/holes-actions.js.map +0 -1
  23. package/es/actions/items-actions.js +0 -314
  24. package/es/actions/items-actions.js.map +0 -1
  25. package/es/actions/lines-actions.js +0 -83
  26. package/es/actions/lines-actions.js.map +0 -1
  27. package/es/actions/project-actions.js +0 -282
  28. package/es/actions/project-actions.js.map +0 -1
  29. package/es/actions/scene-actions.js +0 -34
  30. package/es/actions/scene-actions.js.map +0 -1
  31. package/es/actions/user-actions.js +0 -59
  32. package/es/actions/user-actions.js.map +0 -1
  33. package/es/actions/vertices-actions.js +0 -28
  34. package/es/actions/vertices-actions.js.map +0 -1
  35. package/es/actions/viewer2d-actions.js +0 -59
  36. package/es/actions/viewer2d-actions.js.map +0 -1
  37. package/es/actions/viewer3d-actions.js +0 -24
  38. package/es/actions/viewer3d-actions.js.map +0 -1
  39. package/es/catalog/areas/area/planner-element.js +0 -41
  40. package/es/catalog/areas/area/planner-element.js.map +0 -1
  41. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  42. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  43. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  44. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  45. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  46. package/es/catalog/back.png +0 -0
  47. package/es/catalog/catalog.js +0 -278
  48. package/es/catalog/catalog.js.map +0 -1
  49. package/es/catalog/doors.png +0 -0
  50. package/es/catalog/doorways.png +0 -0
  51. package/es/catalog/envMap/nx.hdr +0 -0
  52. package/es/catalog/envMap/ny.hdr +0 -0
  53. package/es/catalog/envMap/nz.hdr +0 -0
  54. package/es/catalog/envMap/px.hdr +0 -0
  55. package/es/catalog/envMap/py.hdr +0 -0
  56. package/es/catalog/envMap/pz.hdr +0 -0
  57. package/es/catalog/factories/area-factory-3d.js +0 -183
  58. package/es/catalog/factories/area-factory-3d.js.map +0 -1
  59. package/es/catalog/factories/area-factory.js +0 -82
  60. package/es/catalog/factories/area-factory.js.map +0 -1
  61. package/es/catalog/factories/export.js +0 -8
  62. package/es/catalog/factories/export.js.map +0 -1
  63. package/es/catalog/factories/wall-factory-3d.js +0 -203
  64. package/es/catalog/factories/wall-factory-3d.js.map +0 -1
  65. package/es/catalog/factories/wall-factory.js +0 -269
  66. package/es/catalog/factories/wall-factory.js.map +0 -1
  67. package/es/catalog/holes/door-closet/planner-element.js +0 -223
  68. package/es/catalog/holes/door-closet/planner-element.js.map +0 -1
  69. package/es/catalog/holes/door-double/door_double.png +0 -0
  70. package/es/catalog/holes/door-double/planner-element.js +0 -316
  71. package/es/catalog/holes/door-double/planner-element.js.map +0 -1
  72. package/es/catalog/holes/door-exterior/planner-element.js +0 -216
  73. package/es/catalog/holes/door-exterior/planner-element.js.map +0 -1
  74. package/es/catalog/holes/door-interior/planner-element.js +0 -228
  75. package/es/catalog/holes/door-interior/planner-element.js.map +0 -1
  76. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  77. package/es/catalog/holes/door-panic/planner-element.js +0 -504
  78. package/es/catalog/holes/door-panic/planner-element.js.map +0 -1
  79. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  80. package/es/catalog/holes/door-panic-double/planner-element.js +0 -464
  81. package/es/catalog/holes/door-panic-double/planner-element.js.map +0 -1
  82. package/es/catalog/holes/door-sliding/planner-element.js +0 -226
  83. package/es/catalog/holes/door-sliding/planner-element.js.map +0 -1
  84. package/es/catalog/holes/doorway-framed/planner-element.js +0 -146
  85. package/es/catalog/holes/doorway-framed/planner-element.js.map +0 -1
  86. package/es/catalog/holes/doorway-frameless/planner-element.js +0 -105
  87. package/es/catalog/holes/doorway-frameless/planner-element.js.map +0 -1
  88. package/es/catalog/holes/gate/gate.jpg +0 -0
  89. package/es/catalog/holes/window-clear/planner-element.js +0 -167
  90. package/es/catalog/holes/window-clear/planner-element.js.map +0 -1
  91. package/es/catalog/holes/window-clear/texture.png +0 -0
  92. package/es/catalog/holes/window-cross/planner-element.js +0 -166
  93. package/es/catalog/holes/window-cross/planner-element.js.map +0 -1
  94. package/es/catalog/holes/window-cross/texture.png +0 -0
  95. package/es/catalog/holes/window-double-hung/planner-element.js +0 -304
  96. package/es/catalog/holes/window-double-hung/planner-element.js.map +0 -1
  97. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  98. package/es/catalog/holes/window-vertical/planner-element.js +0 -277
  99. package/es/catalog/holes/window-vertical/planner-element.js.map +0 -1
  100. package/es/catalog/holes/window-vertical/texture.png +0 -0
  101. package/es/catalog/lines/wall/planner-element.js +0 -71
  102. package/es/catalog/lines/wall/planner-element.js.map +0 -1
  103. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  104. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  105. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  106. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  107. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  108. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  109. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  110. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  111. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  112. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  113. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  114. package/es/catalog/lines/wall/wall.png +0 -0
  115. package/es/catalog/molding/molding-dcm/planner-element.js +0 -30
  116. package/es/catalog/molding/molding-dcm/planner-element.js.map +0 -1
  117. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  118. package/es/catalog/molding/molding-fbm/planner-element.js +0 -30
  119. package/es/catalog/molding/molding-fbm/planner-element.js.map +0 -1
  120. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  121. package/es/catalog/molding/molding-lrm/planner-element.js +0 -30
  122. package/es/catalog/molding/molding-lrm/planner-element.js.map +0 -1
  123. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  124. package/es/catalog/properties/export.js +0 -22
  125. package/es/catalog/properties/export.js.map +0 -1
  126. package/es/catalog/properties/property-checkbox.js +0 -72
  127. package/es/catalog/properties/property-checkbox.js.map +0 -1
  128. package/es/catalog/properties/property-color.js +0 -40
  129. package/es/catalog/properties/property-color.js.map +0 -1
  130. package/es/catalog/properties/property-enum.js +0 -56
  131. package/es/catalog/properties/property-enum.js.map +0 -1
  132. package/es/catalog/properties/property-hidden.js +0 -20
  133. package/es/catalog/properties/property-hidden.js.map +0 -1
  134. package/es/catalog/properties/property-lenght-measure.js +0 -102
  135. package/es/catalog/properties/property-lenght-measure.js.map +0 -1
  136. package/es/catalog/properties/property-length-measure.js +0 -86
  137. package/es/catalog/properties/property-length-measure.js.map +0 -1
  138. package/es/catalog/properties/property-length-measure_hole.js +0 -102
  139. package/es/catalog/properties/property-length-measure_hole.js.map +0 -1
  140. package/es/catalog/properties/property-number.js +0 -49
  141. package/es/catalog/properties/property-number.js.map +0 -1
  142. package/es/catalog/properties/property-read-only.js +0 -27
  143. package/es/catalog/properties/property-read-only.js.map +0 -1
  144. package/es/catalog/properties/property-string.js +0 -49
  145. package/es/catalog/properties/property-string.js.map +0 -1
  146. package/es/catalog/properties/property-toggle.js +0 -40
  147. package/es/catalog/properties/property-toggle.js.map +0 -1
  148. package/es/catalog/properties/shared-property-style.js +0 -15
  149. package/es/catalog/properties/shared-property-style.js.map +0 -1
  150. package/es/catalog/utils/FuseUtils.js +0 -83
  151. package/es/catalog/utils/FuseUtils.js.map +0 -1
  152. package/es/catalog/utils/exporter.js +0 -149
  153. package/es/catalog/utils/exporter.js.map +0 -1
  154. package/es/catalog/utils/geom-utils.js +0 -190
  155. package/es/catalog/utils/geom-utils.js.map +0 -1
  156. package/es/catalog/utils/item-loader.js +0 -1522
  157. package/es/catalog/utils/item-loader.js.map +0 -1
  158. package/es/catalog/utils/load-obj.js +0 -92
  159. package/es/catalog/utils/load-obj.js.map +0 -1
  160. package/es/catalog/utils/mtl-loader.js +0 -358
  161. package/es/catalog/utils/mtl-loader.js.map +0 -1
  162. package/es/catalog/utils/obj-loader.js +0 -477
  163. package/es/catalog/utils/obj-loader.js.map +0 -1
  164. package/es/catalog/windows.png +0 -0
  165. package/es/class/FuseUtils.js +0 -83
  166. package/es/class/FuseUtils.js.map +0 -1
  167. package/es/class/area.js +0 -146
  168. package/es/class/area.js.map +0 -1
  169. package/es/class/export.js +0 -25
  170. package/es/class/export.js.map +0 -1
  171. package/es/class/group.js +0 -441
  172. package/es/class/group.js.map +0 -1
  173. package/es/class/guide.js +0 -63
  174. package/es/class/guide.js.map +0 -1
  175. package/es/class/hole.js +0 -931
  176. package/es/class/hole.js.map +0 -1
  177. package/es/class/item.js +0 -1888
  178. package/es/class/item.js.map +0 -1
  179. package/es/class/layer.js +0 -668
  180. package/es/class/layer.js.map +0 -1
  181. package/es/class/line.js +0 -1290
  182. package/es/class/line.js.map +0 -1
  183. package/es/class/project.js +0 -823
  184. package/es/class/project.js.map +0 -1
  185. package/es/class/vertex.js +0 -267
  186. package/es/class/vertex.js.map +0 -1
  187. package/es/components/atoms/Snackbar/index.js +0 -50
  188. package/es/components/atoms/Snackbar/index.js.map +0 -1
  189. package/es/components/atoms/radio-button/index.js +0 -26
  190. package/es/components/atoms/radio-button/index.js.map +0 -1
  191. package/es/components/atoms/radio-button/styles.js +0 -5
  192. package/es/components/atoms/radio-button/styles.js.map +0 -1
  193. package/es/components/button/MainButton.js +0 -92
  194. package/es/components/button/MainButton.js.map +0 -1
  195. package/es/components/button/ToggleMeasureButton.js +0 -56
  196. package/es/components/button/ToggleMeasureButton.js.map +0 -1
  197. package/es/components/catalog-view/catalog-breadcrumb.js +0 -53
  198. package/es/components/catalog-view/catalog-breadcrumb.js.map +0 -1
  199. package/es/components/catalog-view/catalog-item.js +0 -226
  200. package/es/components/catalog-view/catalog-item.js.map +0 -1
  201. package/es/components/catalog-view/catalog-list.js +0 -182
  202. package/es/components/catalog-view/catalog-list.js.map +0 -1
  203. package/es/components/catalog-view/catalog-page-item.js +0 -130
  204. package/es/components/catalog-view/catalog-page-item.js.map +0 -1
  205. package/es/components/catalog-view/catalog-turn-back-page-item.js +0 -106
  206. package/es/components/catalog-view/catalog-turn-back-page-item.js.map +0 -1
  207. package/es/components/configurator/custom-configurator.js +0 -94
  208. package/es/components/configurator/custom-configurator.js.map +0 -1
  209. package/es/components/configurator/project-configurator.js +0 -131
  210. package/es/components/configurator/project-configurator.js.map +0 -1
  211. package/es/components/content.js +0 -123
  212. package/es/components/content.js.map +0 -1
  213. package/es/components/export.js +0 -24
  214. package/es/components/export.js.map +0 -1
  215. package/es/components/firstsetting/button/styles.js +0 -27
  216. package/es/components/firstsetting/button/styles.js.map +0 -1
  217. package/es/components/firstsetting/export.js +0 -9
  218. package/es/components/firstsetting/export.js.map +0 -1
  219. package/es/components/firstsetting/firstsetting-content-button.js +0 -217
  220. package/es/components/firstsetting/firstsetting-content-button.js.map +0 -1
  221. package/es/components/firstsetting/firstsetting-toggle-button.js +0 -126
  222. package/es/components/firstsetting/firstsetting-toggle-button.js.map +0 -1
  223. package/es/components/firstsetting/firstsetting.js +0 -626
  224. package/es/components/firstsetting/firstsetting.js.map +0 -1
  225. package/es/components/footerbar/button/ControlButton.js +0 -72
  226. package/es/components/footerbar/button/ControlButton.js.map +0 -1
  227. package/es/components/footerbar/button/DirectionButton.js +0 -69
  228. package/es/components/footerbar/button/DirectionButton.js.map +0 -1
  229. package/es/components/footerbar/button/DirectionPanSpinButton.js +0 -50
  230. package/es/components/footerbar/button/DirectionPanSpinButton.js.map +0 -1
  231. package/es/components/footerbar/button/ToggleButton.js +0 -76
  232. package/es/components/footerbar/button/ToggleButton.js.map +0 -1
  233. package/es/components/footerbar/button/ToggleConvertButton.js +0 -73
  234. package/es/components/footerbar/button/ToggleConvertButton.js.map +0 -1
  235. package/es/components/footerbar/button/ToggleMeasureButton.js +0 -52
  236. package/es/components/footerbar/button/ToggleMeasureButton.js.map +0 -1
  237. package/es/components/footerbar/button/styles.js +0 -22
  238. package/es/components/footerbar/button/styles.js.map +0 -1
  239. package/es/components/footerbar/export.js +0 -9
  240. package/es/components/footerbar/export.js.map +0 -1
  241. package/es/components/footerbar/footer-content-button.js +0 -217
  242. package/es/components/footerbar/footer-content-button.js.map +0 -1
  243. package/es/components/footerbar/footer-toggle-button.js +0 -126
  244. package/es/components/footerbar/footer-toggle-button.js.map +0 -1
  245. package/es/components/footerbar/footerbar.js +0 -801
  246. package/es/components/footerbar/footerbar.js.map +0 -1
  247. package/es/components/footerbar/styles.js +0 -34
  248. package/es/components/footerbar/styles.js.map +0 -1
  249. package/es/components/header/button/MenuButton.js +0 -70
  250. package/es/components/header/button/MenuButton.js.map +0 -1
  251. package/es/components/header/button/SaveButton.js +0 -48
  252. package/es/components/header/button/SaveButton.js.map +0 -1
  253. package/es/components/header/button/styles.js +0 -59
  254. package/es/components/header/button/styles.js.map +0 -1
  255. package/es/components/header/export.js +0 -5
  256. package/es/components/header/export.js.map +0 -1
  257. package/es/components/header/header.js +0 -550
  258. package/es/components/header/header.js.map +0 -1
  259. package/es/components/header/header.style.css +0 -47
  260. package/es/components/header/styles.js +0 -41
  261. package/es/components/header/styles.js.map +0 -1
  262. package/es/components/login/Login.js +0 -86
  263. package/es/components/login/Login.js.map +0 -1
  264. package/es/components/login/LoginForm/index.js +0 -132
  265. package/es/components/login/LoginForm/index.js.map +0 -1
  266. package/es/components/login/Register.js +0 -96
  267. package/es/components/login/Register.js.map +0 -1
  268. package/es/components/login/RegisterForm/index.js +0 -230
  269. package/es/components/login/RegisterForm/index.js.map +0 -1
  270. package/es/components/login/jwtService.js +0 -232
  271. package/es/components/login/jwtService.js.map +0 -1
  272. package/es/components/login/style.css +0 -158
  273. package/es/components/login/style.scss +0 -260
  274. package/es/components/molecules/slider/index.js +0 -13
  275. package/es/components/molecules/slider/index.js.map +0 -1
  276. package/es/components/molecules/slider/styles.js +0 -2
  277. package/es/components/molecules/slider/styles.js.map +0 -1
  278. package/es/components/molecules/slider/styles.scss +0 -3
  279. package/es/components/myprojects/export.js +0 -5
  280. package/es/components/myprojects/export.js.map +0 -1
  281. package/es/components/myprojects/index.js +0 -446
  282. package/es/components/myprojects/index.js.map +0 -1
  283. package/es/components/myprojects/styles.js +0 -24
  284. package/es/components/myprojects/styles.js.map +0 -1
  285. package/es/components/sidebar/custom-accordion.js +0 -38
  286. package/es/components/sidebar/custom-accordion.js.map +0 -1
  287. package/es/components/sidebar/export.js +0 -14
  288. package/es/components/sidebar/export.js.map +0 -1
  289. package/es/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js +0 -65
  290. package/es/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js.map +0 -1
  291. package/es/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js +0 -116
  292. package/es/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js.map +0 -1
  293. package/es/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js +0 -126
  294. package/es/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js.map +0 -1
  295. package/es/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js +0 -251
  296. package/es/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js.map +0 -1
  297. package/es/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js +0 -75
  298. package/es/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js.map +0 -1
  299. package/es/components/sidebar/panel-element-editor/element-editor.js +0 -878
  300. package/es/components/sidebar/panel-element-editor/element-editor.js.map +0 -1
  301. package/es/components/sidebar/panel-element-editor/multi-elements-editor.js +0 -2
  302. package/es/components/sidebar/panel-element-editor/multi-elements-editor.js.map +0 -1
  303. package/es/components/sidebar/panel-element-editor/panel-element-editor.js +0 -49
  304. package/es/components/sidebar/panel-element-editor/panel-element-editor.js.map +0 -1
  305. package/es/components/sidebar/panel-element-editor/panel-multi-elements-editor.js +0 -118
  306. package/es/components/sidebar/panel-element-editor/panel-multi-elements-editor.js.map +0 -1
  307. package/es/components/sidebar/panel-group-editor.js +0 -211
  308. package/es/components/sidebar/panel-group-editor.js.map +0 -1
  309. package/es/components/sidebar/panel-groups.js +0 -267
  310. package/es/components/sidebar/panel-groups.js.map +0 -1
  311. package/es/components/sidebar/panel-guides.js +0 -185
  312. package/es/components/sidebar/panel-guides.js.map +0 -1
  313. package/es/components/sidebar/panel-layer-elements.js +0 -251
  314. package/es/components/sidebar/panel-layer-elements.js.map +0 -1
  315. package/es/components/sidebar/panel-layers.js +0 -340
  316. package/es/components/sidebar/panel-layers.js.map +0 -1
  317. package/es/components/sidebar/panel.js +0 -103
  318. package/es/components/sidebar/panel.js.map +0 -1
  319. package/es/components/sidebar/sidebar.js +0 -109
  320. package/es/components/sidebar/sidebar.js.map +0 -1
  321. package/es/components/sidebar/toolbar-panel.js +0 -164
  322. package/es/components/sidebar/toolbar-panel.js.map +0 -1
  323. package/es/components/sign/export.js +0 -6
  324. package/es/components/sign/export.js.map +0 -1
  325. package/es/components/sign/main/index.js +0 -560
  326. package/es/components/sign/main/index.js.map +0 -1
  327. package/es/components/sign/main/styles.js +0 -20
  328. package/es/components/sign/main/styles.js.map +0 -1
  329. package/es/components/style/button.js +0 -114
  330. package/es/components/style/button.js.map +0 -1
  331. package/es/components/style/cancel-button.js +0 -23
  332. package/es/components/style/cancel-button.js.map +0 -1
  333. package/es/components/style/content-container.js +0 -34
  334. package/es/components/style/content-container.js.map +0 -1
  335. package/es/components/style/content-title.js +0 -30
  336. package/es/components/style/content-title.js.map +0 -1
  337. package/es/components/style/delete-button.js +0 -26
  338. package/es/components/style/delete-button.js.map +0 -1
  339. package/es/components/style/export.js +0 -32
  340. package/es/components/style/export.js.map +0 -1
  341. package/es/components/style/form-block.js +0 -25
  342. package/es/components/style/form-block.js.map +0 -1
  343. package/es/components/style/form-color-input.js +0 -28
  344. package/es/components/style/form-color-input.js.map +0 -1
  345. package/es/components/style/form-label.js +0 -27
  346. package/es/components/style/form-label.js.map +0 -1
  347. package/es/components/style/form-number-input.js +0 -190
  348. package/es/components/style/form-number-input.js.map +0 -1
  349. package/es/components/style/form-number-input_2.js +0 -207
  350. package/es/components/style/form-number-input_2.js.map +0 -1
  351. package/es/components/style/form-select.js +0 -21
  352. package/es/components/style/form-select.js.map +0 -1
  353. package/es/components/style/form-slider.js +0 -46
  354. package/es/components/style/form-slider.js.map +0 -1
  355. package/es/components/style/form-submit-button.js +0 -27
  356. package/es/components/style/form-submit-button.js.map +0 -1
  357. package/es/components/style/form-text-input.js +0 -77
  358. package/es/components/style/form-text-input.js.map +0 -1
  359. package/es/components/toolbar/button/ControlButton.js +0 -69
  360. package/es/components/toolbar/button/ControlButton.js.map +0 -1
  361. package/es/components/toolbar/button/DirectionButton.js +0 -50
  362. package/es/components/toolbar/button/DirectionButton.js.map +0 -1
  363. package/es/components/toolbar/button/RightButton.js +0 -133
  364. package/es/components/toolbar/button/RightButton.js.map +0 -1
  365. package/es/components/toolbar/button/ToggleButton.js +0 -59
  366. package/es/components/toolbar/button/ToggleButton.js.map +0 -1
  367. package/es/components/toolbar/button/index.js +0 -88
  368. package/es/components/toolbar/button/index.js.map +0 -1
  369. package/es/components/toolbar/button/styles.js +0 -14
  370. package/es/components/toolbar/button/styles.js.map +0 -1
  371. package/es/components/toolbar/components/DoorStyleMenu.js +0 -105
  372. package/es/components/toolbar/components/DoorStyleMenu.js.map +0 -1
  373. package/es/components/toolbar/components/Pricing.js +0 -101
  374. package/es/components/toolbar/components/Pricing.js.map +0 -1
  375. package/es/components/toolbar/components/ReviewForQuote.js +0 -476
  376. package/es/components/toolbar/components/ReviewForQuote.js.map +0 -1
  377. package/es/components/toolbar/export.js +0 -14
  378. package/es/components/toolbar/export.js.map +0 -1
  379. package/es/components/toolbar/main/Alert.js +0 -125
  380. package/es/components/toolbar/main/Alert.js.map +0 -1
  381. package/es/components/toolbar/main/TakePictureModal.js +0 -100
  382. package/es/components/toolbar/main/TakePictureModal.js.map +0 -1
  383. package/es/components/toolbar/main/confirm-popup.js +0 -88
  384. package/es/components/toolbar/main/confirm-popup.js.map +0 -1
  385. package/es/components/toolbar/main/index.js +0 -4612
  386. package/es/components/toolbar/main/index.js.map +0 -1
  387. package/es/components/toolbar/main/lShaped.json +0 -311
  388. package/es/components/toolbar/main/longNarrow.json +0 -238
  389. package/es/components/toolbar/main/myComponents.js +0 -118
  390. package/es/components/toolbar/main/myComponents.js.map +0 -1
  391. package/es/components/toolbar/main/oRectangle.json +0 -220
  392. package/es/components/toolbar/main/rectangle.json +0 -238
  393. package/es/components/toolbar/main/style.css +0 -107
  394. package/es/components/toolbar/main/styles.js +0 -64
  395. package/es/components/toolbar/main/styles.js.map +0 -1
  396. package/es/components/toolbar/plugin-item.js +0 -150
  397. package/es/components/toolbar/plugin-item.js.map +0 -1
  398. package/es/components/toolbar/popup/appliance/appliance-category/index.js +0 -77
  399. package/es/components/toolbar/popup/appliance/appliance-category/index.js.map +0 -1
  400. package/es/components/toolbar/popup/appliance/choose-appliance/index.js +0 -76
  401. package/es/components/toolbar/popup/appliance/choose-appliance/index.js.map +0 -1
  402. package/es/components/toolbar/popup/appliance/index.js +0 -81
  403. package/es/components/toolbar/popup/appliance/index.js.map +0 -1
  404. package/es/components/toolbar/popup/autosaveprompt/index.js +0 -91
  405. package/es/components/toolbar/popup/autosaveprompt/index.js.map +0 -1
  406. package/es/components/toolbar/popup/autosaveprompt/styles.css +0 -64
  407. package/es/components/toolbar/popup/autosaveprompt/styles.js +0 -9
  408. package/es/components/toolbar/popup/autosaveprompt/styles.js.map +0 -1
  409. package/es/components/toolbar/popup/cabinet/cabinet-category/index.js +0 -77
  410. package/es/components/toolbar/popup/cabinet/cabinet-category/index.js.map +0 -1
  411. package/es/components/toolbar/popup/cabinet/choose-product/index.js +0 -98
  412. package/es/components/toolbar/popup/cabinet/choose-product/index.js.map +0 -1
  413. package/es/components/toolbar/popup/cabinet/index.js +0 -83
  414. package/es/components/toolbar/popup/cabinet/index.js.map +0 -1
  415. package/es/components/toolbar/popup/doorStyle/choose-style/index.js +0 -50
  416. package/es/components/toolbar/popup/doorStyle/choose-style/index.js.map +0 -1
  417. package/es/components/toolbar/popup/doorStyle/index.js +0 -61
  418. package/es/components/toolbar/popup/doorStyle/index.js.map +0 -1
  419. package/es/components/toolbar/popup/doorStyle/style-category/index.js +0 -143
  420. package/es/components/toolbar/popup/doorStyle/style-category/index.js.map +0 -1
  421. package/es/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -3
  422. package/es/components/toolbar/popup/downloadsummary/downloadSummaryContext.js.map +0 -1
  423. package/es/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js +0 -119
  424. package/es/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js.map +0 -1
  425. package/es/components/toolbar/popup/downloadsummary/index.js +0 -564
  426. package/es/components/toolbar/popup/downloadsummary/index.js.map +0 -1
  427. package/es/components/toolbar/popup/downloadsummary/show2D/show2DView.js +0 -51
  428. package/es/components/toolbar/popup/downloadsummary/show2D/show2DView.js.map +0 -1
  429. package/es/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js +0 -191
  430. package/es/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js.map +0 -1
  431. package/es/components/toolbar/popup/downloadsummary/show3D/show3DView.js +0 -245
  432. package/es/components/toolbar/popup/downloadsummary/show3D/show3DView.js.map +0 -1
  433. package/es/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js +0 -1758
  434. package/es/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js.map +0 -1
  435. package/es/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -87
  436. package/es/components/toolbar/popup/downloadsummary/showCabinetInfo.js.map +0 -1
  437. package/es/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js +0 -116
  438. package/es/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js.map +0 -1
  439. package/es/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js +0 -1710
  440. package/es/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js.map +0 -1
  441. package/es/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js +0 -175
  442. package/es/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js.map +0 -1
  443. package/es/components/toolbar/popup/downloadsummary/showWarranty.js +0 -106
  444. package/es/components/toolbar/popup/downloadsummary/showWarranty.js.map +0 -1
  445. package/es/components/toolbar/popup/downloadsummary/styles.css +0 -177
  446. package/es/components/toolbar/popup/downloadsummary/styles.js +0 -40
  447. package/es/components/toolbar/popup/downloadsummary/styles.js.map +0 -1
  448. package/es/components/toolbar/popup/finishingtouch/category/index.js +0 -35
  449. package/es/components/toolbar/popup/finishingtouch/category/index.js.map +0 -1
  450. package/es/components/toolbar/popup/finishingtouch/index.js +0 -47
  451. package/es/components/toolbar/popup/finishingtouch/index.js.map +0 -1
  452. package/es/components/toolbar/popup/finishingtouch/material-edit.js +0 -156
  453. package/es/components/toolbar/popup/finishingtouch/material-edit.js.map +0 -1
  454. package/es/components/toolbar/popup/finishingtouch/product/index.js +0 -56
  455. package/es/components/toolbar/popup/finishingtouch/product/index.js.map +0 -1
  456. package/es/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js +0 -116
  457. package/es/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js.map +0 -1
  458. package/es/components/toolbar/popup/floorplan/choose-floor/index.js +0 -246
  459. package/es/components/toolbar/popup/floorplan/choose-floor/index.js.map +0 -1
  460. package/es/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
  461. package/es/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
  462. package/es/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
  463. package/es/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
  464. package/es/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -11
  465. package/es/components/toolbar/popup/floorplan/choose-floor/styles.js.map +0 -1
  466. package/es/components/toolbar/popup/floorplan/floor-category/index.js +0 -90
  467. package/es/components/toolbar/popup/floorplan/floor-category/index.js.map +0 -1
  468. package/es/components/toolbar/popup/floorplan/index.js +0 -49
  469. package/es/components/toolbar/popup/floorplan/index.js.map +0 -1
  470. package/es/components/toolbar/popup/index.js +0 -188
  471. package/es/components/toolbar/popup/index.js.map +0 -1
  472. package/es/components/toolbar/popup/newproject/index.js +0 -67
  473. package/es/components/toolbar/popup/newproject/index.js.map +0 -1
  474. package/es/components/toolbar/popup/newproject/styles.css +0 -64
  475. package/es/components/toolbar/popup/newproject/styles.js +0 -9
  476. package/es/components/toolbar/popup/newproject/styles.js.map +0 -1
  477. package/es/components/toolbar/popup/product/appliance.js +0 -65
  478. package/es/components/toolbar/popup/product/appliance.js.map +0 -1
  479. package/es/components/toolbar/popup/product/cabinetproduct.js +0 -25
  480. package/es/components/toolbar/popup/product/cabinetproduct.js.map +0 -1
  481. package/es/components/toolbar/popup/product/doorstyle.js +0 -50
  482. package/es/components/toolbar/popup/product/doorstyle.js.map +0 -1
  483. package/es/components/toolbar/popup/product/doorstyleproduct.js +0 -51
  484. package/es/components/toolbar/popup/product/doorstyleproduct.js.map +0 -1
  485. package/es/components/toolbar/popup/product/floor.js +0 -52
  486. package/es/components/toolbar/popup/product/floor.js.map +0 -1
  487. package/es/components/toolbar/popup/product/floorproduct.js +0 -61
  488. package/es/components/toolbar/popup/product/floorproduct.js.map +0 -1
  489. package/es/components/toolbar/popup/product/index.js +0 -52
  490. package/es/components/toolbar/popup/product/index.js.map +0 -1
  491. package/es/components/toolbar/popup/product/primary.js +0 -63
  492. package/es/components/toolbar/popup/product/primary.js.map +0 -1
  493. package/es/components/toolbar/popup/product/productline.js +0 -120
  494. package/es/components/toolbar/popup/product/productline.js.map +0 -1
  495. package/es/components/toolbar/popup/product/reviewItem.js +0 -338
  496. package/es/components/toolbar/popup/product/reviewItem.js.map +0 -1
  497. package/es/components/toolbar/popup/product/reviewMolding.js +0 -282
  498. package/es/components/toolbar/popup/product/reviewMolding.js.map +0 -1
  499. package/es/components/toolbar/popup/product/style.css +0 -54
  500. package/es/components/toolbar/popup/product/styles.js +0 -71
  501. package/es/components/toolbar/popup/product/styles.js.map +0 -1
  502. package/es/components/toolbar/popup/savedesign/FullPictureForm.js +0 -161
  503. package/es/components/toolbar/popup/savedesign/FullPictureForm.js.map +0 -1
  504. package/es/components/toolbar/popup/savedesign/index.js +0 -508
  505. package/es/components/toolbar/popup/savedesign/index.js.map +0 -1
  506. package/es/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
  507. package/es/components/toolbar/popup/savedesign/styles.js +0 -19
  508. package/es/components/toolbar/popup/savedesign/styles.js.map +0 -1
  509. package/es/components/toolbar/popup/setDoorStyleOption/index.js +0 -57
  510. package/es/components/toolbar/popup/setDoorStyleOption/index.js.map +0 -1
  511. package/es/components/toolbar/popup/styles.js +0 -98
  512. package/es/components/toolbar/popup/styles.js.map +0 -1
  513. package/es/components/toolbar/popup/submitforquote/AddToCartOptions.js +0 -157
  514. package/es/components/toolbar/popup/submitforquote/AddToCartOptions.js.map +0 -1
  515. package/es/components/toolbar/popup/submitforquote/CustomerRequestsForm.js +0 -85
  516. package/es/components/toolbar/popup/submitforquote/CustomerRequestsForm.js.map +0 -1
  517. package/es/components/toolbar/popup/submitforquote/SkipDesignerReview.js +0 -36
  518. package/es/components/toolbar/popup/submitforquote/SkipDesignerReview.js.map +0 -1
  519. package/es/components/toolbar/popup/submitforquote/StepDots.js +0 -33
  520. package/es/components/toolbar/popup/submitforquote/StepDots.js.map +0 -1
  521. package/es/components/toolbar/popup/submitforquote/cart-choice.js +0 -132
  522. package/es/components/toolbar/popup/submitforquote/cart-choice.js.map +0 -1
  523. package/es/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -43
  524. package/es/components/toolbar/popup/submitforquote/doorstyle-menus.js.map +0 -1
  525. package/es/components/toolbar/popup/submitforquote/index.js +0 -690
  526. package/es/components/toolbar/popup/submitforquote/index.js.map +0 -1
  527. package/es/components/toolbar/popup/submitforquote/styles.css +0 -105
  528. package/es/components/toolbar/popup/submitforquote/styles.js +0 -31
  529. package/es/components/toolbar/popup/submitforquote/styles.js.map +0 -1
  530. package/es/components/toolbar/popup/submitprompt/index.js +0 -71
  531. package/es/components/toolbar/popup/submitprompt/index.js.map +0 -1
  532. package/es/components/toolbar/popup/submitprompt/styles.css +0 -64
  533. package/es/components/toolbar/popup/submitprompt/styles.js +0 -9
  534. package/es/components/toolbar/popup/submitprompt/styles.js.map +0 -1
  535. package/es/components/toolbar/toolbar-button.js +0 -105
  536. package/es/components/toolbar/toolbar-button.js.map +0 -1
  537. package/es/components/toolbar/toolbar-load-button.js +0 -29
  538. package/es/components/toolbar/toolbar-load-button.js.map +0 -1
  539. package/es/components/toolbar/toolbar-save-button.js +0 -27
  540. package/es/components/toolbar/toolbar-save-button.js.map +0 -1
  541. package/es/components/tutorial-view/Modal.js +0 -498
  542. package/es/components/tutorial-view/Modal.js.map +0 -1
  543. package/es/components/tutorial-view/style.css +0 -111
  544. package/es/components/tutorial-view/styles.js +0 -6
  545. package/es/components/tutorial-view/styles.js.map +0 -1
  546. package/es/components/viewer2d/area.js +0 -83
  547. package/es/components/viewer2d/area.js.map +0 -1
  548. package/es/components/viewer2d/export.js +0 -32
  549. package/es/components/viewer2d/export.js.map +0 -1
  550. package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -38
  551. package/es/components/viewer2d/grids/grid-horizontal-streak.js.map +0 -1
  552. package/es/components/viewer2d/grids/grid-streak.js +0 -38
  553. package/es/components/viewer2d/grids/grid-streak.js.map +0 -1
  554. package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -38
  555. package/es/components/viewer2d/grids/grid-vertical-streak.js.map +0 -1
  556. package/es/components/viewer2d/grids/grids.js +0 -36
  557. package/es/components/viewer2d/grids/grids.js.map +0 -1
  558. package/es/components/viewer2d/group.js +0 -54
  559. package/es/components/viewer2d/group.js.map +0 -1
  560. package/es/components/viewer2d/item.js +0 -514
  561. package/es/components/viewer2d/item.js.map +0 -1
  562. package/es/components/viewer2d/layer.js +0 -165
  563. package/es/components/viewer2d/layer.js.map +0 -1
  564. package/es/components/viewer2d/line.js +0 -889
  565. package/es/components/viewer2d/line.js.map +0 -1
  566. package/es/components/viewer2d/ruler.js +0 -101
  567. package/es/components/viewer2d/ruler.js.map +0 -1
  568. package/es/components/viewer2d/rulerDist.js +0 -147
  569. package/es/components/viewer2d/rulerDist.js.map +0 -1
  570. package/es/components/viewer2d/rulerX.js +0 -152
  571. package/es/components/viewer2d/rulerX.js.map +0 -1
  572. package/es/components/viewer2d/rulerY.js +0 -154
  573. package/es/components/viewer2d/rulerY.js.map +0 -1
  574. package/es/components/viewer2d/scene.js +0 -141
  575. package/es/components/viewer2d/scene.js.map +0 -1
  576. package/es/components/viewer2d/snap.js +0 -75
  577. package/es/components/viewer2d/snap.js.map +0 -1
  578. package/es/components/viewer2d/state.js +0 -79
  579. package/es/components/viewer2d/state.js.map +0 -1
  580. package/es/components/viewer2d/utils.js +0 -163
  581. package/es/components/viewer2d/utils.js.map +0 -1
  582. package/es/components/viewer2d/vertex.js +0 -67
  583. package/es/components/viewer2d/vertex.js.map +0 -1
  584. package/es/components/viewer2d/viewer2d.js +0 -1402
  585. package/es/components/viewer2d/viewer2d.js.map +0 -1
  586. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2593
  587. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js.map +0 -1
  588. package/es/components/viewer3d/dcm.js +0 -402
  589. package/es/components/viewer3d/dcm.js.map +0 -1
  590. package/es/components/viewer3d/fbm.js +0 -415
  591. package/es/components/viewer3d/fbm.js.map +0 -1
  592. package/es/components/viewer3d/front3D.js +0 -67
  593. package/es/components/viewer3d/front3D.js.map +0 -1
  594. package/es/components/viewer3d/grid-creator.js +0 -26
  595. package/es/components/viewer3d/grid-creator.js.map +0 -1
  596. package/es/components/viewer3d/grids/grid-horizontal-streak.js +0 -37
  597. package/es/components/viewer3d/grids/grid-horizontal-streak.js.map +0 -1
  598. package/es/components/viewer3d/grids/grid-streak.js +0 -28
  599. package/es/components/viewer3d/grids/grid-streak.js.map +0 -1
  600. package/es/components/viewer3d/grids/grid-vertical-streak.js +0 -37
  601. package/es/components/viewer3d/grids/grid-vertical-streak.js.map +0 -1
  602. package/es/components/viewer3d/libs/first-person-controls.js +0 -68
  603. package/es/components/viewer3d/libs/first-person-controls.js.map +0 -1
  604. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1282
  605. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js.map +0 -1
  606. package/es/components/viewer3d/libs/mtl-loader.js +0 -358
  607. package/es/components/viewer3d/libs/mtl-loader.js.map +0 -1
  608. package/es/components/viewer3d/libs/obj-loader.js +0 -463
  609. package/es/components/viewer3d/libs/obj-loader.js.map +0 -1
  610. package/es/components/viewer3d/libs/orbit-controls.js +0 -699
  611. package/es/components/viewer3d/libs/orbit-controls.js.map +0 -1
  612. package/es/components/viewer3d/libs/pointer-lock-controls.js +0 -46
  613. package/es/components/viewer3d/libs/pointer-lock-controls.js.map +0 -1
  614. package/es/components/viewer3d/lrm.js +0 -306
  615. package/es/components/viewer3d/lrm.js.map +0 -1
  616. package/es/components/viewer3d/model.js +0 -709
  617. package/es/components/viewer3d/model.js.map +0 -1
  618. package/es/components/viewer3d/pointer-lock-navigation.js +0 -116
  619. package/es/components/viewer3d/pointer-lock-navigation.js.map +0 -1
  620. package/es/components/viewer3d/ruler-utils/itemRect.js +0 -62
  621. package/es/components/viewer3d/ruler-utils/itemRect.js.map +0 -1
  622. package/es/components/viewer3d/ruler-utils/layer3D.js +0 -496
  623. package/es/components/viewer3d/ruler-utils/layer3D.js.map +0 -1
  624. package/es/components/viewer3d/ruler-utils/ruler3D.js +0 -228
  625. package/es/components/viewer3d/ruler-utils/ruler3D.js.map +0 -1
  626. package/es/components/viewer3d/ruler-utils/scene3D.js +0 -62
  627. package/es/components/viewer3d/ruler-utils/scene3D.js.map +0 -1
  628. package/es/components/viewer3d/ruler-utils/state3D.js +0 -19
  629. package/es/components/viewer3d/ruler-utils/state3D.js.map +0 -1
  630. package/es/components/viewer3d/scene-creator.js +0 -3607
  631. package/es/components/viewer3d/scene-creator.js.map +0 -1
  632. package/es/components/viewer3d/three-memory-cleaner.js +0 -52
  633. package/es/components/viewer3d/three-memory-cleaner.js.map +0 -1
  634. package/es/components/viewer3d/viewer3d-first-person.js +0 -316
  635. package/es/components/viewer3d/viewer3d-first-person.js.map +0 -1
  636. package/es/components/viewer3d/viewer3d.js +0 -2504
  637. package/es/components/viewer3d/viewer3d.js.map +0 -1
  638. package/es/components/wizardstep/button/styles.js +0 -60
  639. package/es/components/wizardstep/button/styles.js.map +0 -1
  640. package/es/components/wizardstep/export.js +0 -5
  641. package/es/components/wizardstep/export.js.map +0 -1
  642. package/es/components/wizardstep/index.js +0 -971
  643. package/es/components/wizardstep/index.js.map +0 -1
  644. package/es/components/wizardstep/styles.js +0 -61
  645. package/es/components/wizardstep/styles.js.map +0 -1
  646. package/es/components/wizardstep/wizardstep-content-button.js +0 -217
  647. package/es/components/wizardstep/wizardstep-content-button.js.map +0 -1
  648. package/es/components/wizardstep/wizardstep-toggle-button.js +0 -126
  649. package/es/components/wizardstep/wizardstep-toggle-button.js.map +0 -1
  650. package/es/constants.js +0 -637
  651. package/es/constants.js.map +0 -1
  652. package/es/hooks/useCheckCart.js +0 -53
  653. package/es/hooks/useCheckCart.js.map +0 -1
  654. package/es/hooks/useGetPricesBySku.js +0 -74
  655. package/es/hooks/useGetPricesBySku.js.map +0 -1
  656. package/es/hooks/useValidateToken.js +0 -201
  657. package/es/hooks/useValidateToken.js.map +0 -1
  658. package/es/index.js +0 -18
  659. package/es/index.js.map +0 -1
  660. package/es/models.js +0 -511
  661. package/es/models.js.map +0 -1
  662. package/es/plugins/SVGLoader.js +0 -1413
  663. package/es/plugins/SVGLoader.js.map +0 -1
  664. package/es/plugins/autosave.js +0 -34
  665. package/es/plugins/autosave.js.map +0 -1
  666. package/es/plugins/console-debugger.js +0 -38
  667. package/es/plugins/console-debugger.js.map +0 -1
  668. package/es/plugins/export.js +0 -10
  669. package/es/plugins/export.js.map +0 -1
  670. package/es/plugins/keyboard.js +0 -102
  671. package/es/plugins/keyboard.js.map +0 -1
  672. package/es/reducers/areas-reducer.js +0 -13
  673. package/es/reducers/areas-reducer.js.map +0 -1
  674. package/es/reducers/export.js +0 -26
  675. package/es/reducers/export.js.map +0 -1
  676. package/es/reducers/groups-reducer.js +0 -39
  677. package/es/reducers/groups-reducer.js.map +0 -1
  678. package/es/reducers/holes-reducer.js +0 -63
  679. package/es/reducers/holes-reducer.js.map +0 -1
  680. package/es/reducers/items-reducer.js +0 -144
  681. package/es/reducers/items-reducer.js.map +0 -1
  682. package/es/reducers/lines-reducer.js +0 -46
  683. package/es/reducers/lines-reducer.js.map +0 -1
  684. package/es/reducers/project-reducer.js +0 -130
  685. package/es/reducers/project-reducer.js.map +0 -1
  686. package/es/reducers/reducer.js +0 -20
  687. package/es/reducers/reducer.js.map +0 -1
  688. package/es/reducers/scene-reducer.js +0 -29
  689. package/es/reducers/scene-reducer.js.map +0 -1
  690. package/es/reducers/user-reducer.js +0 -42
  691. package/es/reducers/user-reducer.js.map +0 -1
  692. package/es/reducers/vertices-reducer.js +0 -20
  693. package/es/reducers/vertices-reducer.js.map +0 -1
  694. package/es/reducers/viewer2d-reducer.js +0 -76
  695. package/es/reducers/viewer2d-reducer.js.map +0 -1
  696. package/es/reducers/viewer3d-reducer.js +0 -57
  697. package/es/reducers/viewer3d-reducer.js.map +0 -1
  698. package/es/shared-style.js +0 -67
  699. package/es/shared-style.js.map +0 -1
  700. package/es/styles/export.js +0 -6
  701. package/es/styles/export.js.map +0 -1
  702. package/es/styles/tabs.css +0 -40
  703. package/es/translator/en.js +0 -105
  704. package/es/translator/en.js.map +0 -1
  705. package/es/translator/it.js +0 -80
  706. package/es/translator/it.js.map +0 -1
  707. package/es/translator/ru.js +0 -80
  708. package/es/translator/ru.js.map +0 -1
  709. package/es/translator/translator.js +0 -85
  710. package/es/translator/translator.js.map +0 -1
  711. package/es/utils/browser.js +0 -34
  712. package/es/utils/browser.js.map +0 -1
  713. package/es/utils/email-validator.js +0 -5
  714. package/es/utils/email-validator.js.map +0 -1
  715. package/es/utils/export.js +0 -26
  716. package/es/utils/export.js.map +0 -1
  717. package/es/utils/geometry.js +0 -2237
  718. package/es/utils/geometry.js.map +0 -1
  719. package/es/utils/get-edges-of-subgraphs.js +0 -27
  720. package/es/utils/get-edges-of-subgraphs.js.map +0 -1
  721. package/es/utils/graph-cycles.js +0 -239
  722. package/es/utils/graph-cycles.js.map +0 -1
  723. package/es/utils/graph-inner-cycles.js +0 -47
  724. package/es/utils/graph-inner-cycles.js.map +0 -1
  725. package/es/utils/graph.js +0 -150
  726. package/es/utils/graph.js.map +0 -1
  727. package/es/utils/helper.js +0 -337
  728. package/es/utils/helper.js.map +0 -1
  729. package/es/utils/history.js +0 -30
  730. package/es/utils/history.js.map +0 -1
  731. package/es/utils/id-broker.js +0 -20
  732. package/es/utils/id-broker.js.map +0 -1
  733. package/es/utils/logger.js +0 -9
  734. package/es/utils/logger.js.map +0 -1
  735. package/es/utils/math.js +0 -51
  736. package/es/utils/math.js.map +0 -1
  737. package/es/utils/molding.js +0 -840
  738. package/es/utils/molding.js.map +0 -1
  739. package/es/utils/name-generator.js +0 -19
  740. package/es/utils/name-generator.js.map +0 -1
  741. package/es/utils/objects-utils.js +0 -51
  742. package/es/utils/objects-utils.js.map +0 -1
  743. package/es/utils/phone-validator.js +0 -5
  744. package/es/utils/phone-validator.js.map +0 -1
  745. package/es/utils/process-black-list.js +0 -19
  746. package/es/utils/process-black-list.js.map +0 -1
  747. package/es/utils/react-if.js +0 -19
  748. package/es/utils/react-if.js.map +0 -1
  749. package/es/utils/snap-scene.js +0 -100
  750. package/es/utils/snap-scene.js.map +0 -1
  751. package/es/utils/snap.js +0 -238
  752. package/es/utils/snap.js.map +0 -1
  753. package/es/utils/threeCSG.es6.js +0 -499
  754. package/es/utils/threeCSG.es6.js.map +0 -1
  755. package/es/version.js +0 -2
  756. package/es/version.js.map +0 -1
  757. package/lib/@history.js +0 -11
  758. package/lib/@history.js.map +0 -1
  759. package/lib/AppContext.js +0 -11
  760. package/lib/AppContext.js.map +0 -1
  761. package/lib/KitchenConfigurator.js +0 -1353
  762. package/lib/KitchenConfigurator.js.map +0 -1
  763. package/lib/KitchenConfiguratorApp.js +0 -539
  764. package/lib/KitchenConfiguratorApp.js.map +0 -1
  765. package/lib/actions/area-actions.js +0 -22
  766. package/lib/actions/area-actions.js.map +0 -1
  767. package/lib/actions/export.js +0 -44
  768. package/lib/actions/export.js.map +0 -1
  769. package/lib/actions/groups-actions.js +0 -108
  770. package/lib/actions/groups-actions.js.map +0 -1
  771. package/lib/actions/holes-actions.js +0 -141
  772. package/lib/actions/holes-actions.js.map +0 -1
  773. package/lib/actions/items-actions.js +0 -365
  774. package/lib/actions/items-actions.js.map +0 -1
  775. package/lib/actions/lines-actions.js +0 -98
  776. package/lib/actions/lines-actions.js.map +0 -1
  777. package/lib/actions/project-actions.js +0 -333
  778. package/lib/actions/project-actions.js.map +0 -1
  779. package/lib/actions/scene-actions.js +0 -44
  780. package/lib/actions/scene-actions.js.map +0 -1
  781. package/lib/actions/user-actions.js +0 -69
  782. package/lib/actions/user-actions.js.map +0 -1
  783. package/lib/actions/vertices-actions.js +0 -36
  784. package/lib/actions/vertices-actions.js.map +0 -1
  785. package/lib/actions/viewer2d-actions.js +0 -74
  786. package/lib/actions/viewer2d-actions.js.map +0 -1
  787. package/lib/actions/viewer3d-actions.js +0 -33
  788. package/lib/actions/viewer3d-actions.js.map +0 -1
  789. package/lib/catalog/areas/area/planner-element.js +0 -47
  790. package/lib/catalog/areas/area/planner-element.js.map +0 -1
  791. package/lib/catalog/catalog.js +0 -283
  792. package/lib/catalog/catalog.js.map +0 -1
  793. package/lib/catalog/factories/area-factory-3d.js +0 -192
  794. package/lib/catalog/factories/area-factory-3d.js.map +0 -1
  795. package/lib/catalog/factories/area-factory.js +0 -90
  796. package/lib/catalog/factories/area-factory.js.map +0 -1
  797. package/lib/catalog/factories/export.js +0 -26
  798. package/lib/catalog/factories/export.js.map +0 -1
  799. package/lib/catalog/factories/wall-factory-3d.js +0 -213
  800. package/lib/catalog/factories/wall-factory-3d.js.map +0 -1
  801. package/lib/catalog/factories/wall-factory.js +0 -279
  802. package/lib/catalog/factories/wall-factory.js.map +0 -1
  803. package/lib/catalog/holes/door-closet/planner-element.js +0 -232
  804. package/lib/catalog/holes/door-closet/planner-element.js.map +0 -1
  805. package/lib/catalog/holes/door-double/planner-element.js +0 -325
  806. package/lib/catalog/holes/door-double/planner-element.js.map +0 -1
  807. package/lib/catalog/holes/door-exterior/planner-element.js +0 -225
  808. package/lib/catalog/holes/door-exterior/planner-element.js.map +0 -1
  809. package/lib/catalog/holes/door-interior/planner-element.js +0 -237
  810. package/lib/catalog/holes/door-interior/planner-element.js.map +0 -1
  811. package/lib/catalog/holes/door-panic/planner-element.js +0 -513
  812. package/lib/catalog/holes/door-panic/planner-element.js.map +0 -1
  813. package/lib/catalog/holes/door-panic-double/planner-element.js +0 -473
  814. package/lib/catalog/holes/door-panic-double/planner-element.js.map +0 -1
  815. package/lib/catalog/holes/door-sliding/planner-element.js +0 -235
  816. package/lib/catalog/holes/door-sliding/planner-element.js.map +0 -1
  817. package/lib/catalog/holes/doorway-framed/planner-element.js +0 -155
  818. package/lib/catalog/holes/doorway-framed/planner-element.js.map +0 -1
  819. package/lib/catalog/holes/doorway-frameless/planner-element.js +0 -114
  820. package/lib/catalog/holes/doorway-frameless/planner-element.js.map +0 -1
  821. package/lib/catalog/holes/window-clear/planner-element.js +0 -176
  822. package/lib/catalog/holes/window-clear/planner-element.js.map +0 -1
  823. package/lib/catalog/holes/window-cross/planner-element.js +0 -175
  824. package/lib/catalog/holes/window-cross/planner-element.js.map +0 -1
  825. package/lib/catalog/holes/window-double-hung/planner-element.js +0 -313
  826. package/lib/catalog/holes/window-double-hung/planner-element.js.map +0 -1
  827. package/lib/catalog/holes/window-vertical/planner-element.js +0 -286
  828. package/lib/catalog/holes/window-vertical/planner-element.js.map +0 -1
  829. package/lib/catalog/lines/wall/planner-element.js +0 -77
  830. package/lib/catalog/lines/wall/planner-element.js.map +0 -1
  831. package/lib/catalog/molding/molding-dcm/planner-element.js +0 -39
  832. package/lib/catalog/molding/molding-dcm/planner-element.js.map +0 -1
  833. package/lib/catalog/molding/molding-fbm/planner-element.js +0 -39
  834. package/lib/catalog/molding/molding-fbm/planner-element.js.map +0 -1
  835. package/lib/catalog/molding/molding-lrm/planner-element.js +0 -39
  836. package/lib/catalog/molding/molding-lrm/planner-element.js.map +0 -1
  837. package/lib/catalog/properties/export.js +0 -82
  838. package/lib/catalog/properties/export.js.map +0 -1
  839. package/lib/catalog/properties/property-checkbox.js +0 -79
  840. package/lib/catalog/properties/property-checkbox.js.map +0 -1
  841. package/lib/catalog/properties/property-color.js +0 -47
  842. package/lib/catalog/properties/property-color.js.map +0 -1
  843. package/lib/catalog/properties/property-enum.js +0 -63
  844. package/lib/catalog/properties/property-enum.js.map +0 -1
  845. package/lib/catalog/properties/property-hidden.js +0 -27
  846. package/lib/catalog/properties/property-hidden.js.map +0 -1
  847. package/lib/catalog/properties/property-lenght-measure.js +0 -109
  848. package/lib/catalog/properties/property-lenght-measure.js.map +0 -1
  849. package/lib/catalog/properties/property-length-measure.js +0 -93
  850. package/lib/catalog/properties/property-length-measure.js.map +0 -1
  851. package/lib/catalog/properties/property-length-measure_hole.js +0 -109
  852. package/lib/catalog/properties/property-length-measure_hole.js.map +0 -1
  853. package/lib/catalog/properties/property-number.js +0 -56
  854. package/lib/catalog/properties/property-number.js.map +0 -1
  855. package/lib/catalog/properties/property-read-only.js +0 -34
  856. package/lib/catalog/properties/property-read-only.js.map +0 -1
  857. package/lib/catalog/properties/property-string.js +0 -56
  858. package/lib/catalog/properties/property-string.js.map +0 -1
  859. package/lib/catalog/properties/property-toggle.js +0 -47
  860. package/lib/catalog/properties/property-toggle.js.map +0 -1
  861. package/lib/catalog/properties/shared-property-style.js +0 -21
  862. package/lib/catalog/properties/shared-property-style.js.map +0 -1
  863. package/lib/catalog/utils/FuseUtils.js +0 -89
  864. package/lib/catalog/utils/FuseUtils.js.map +0 -1
  865. package/lib/catalog/utils/exporter.js +0 -156
  866. package/lib/catalog/utils/exporter.js.map +0 -1
  867. package/lib/catalog/utils/geom-utils.js +0 -206
  868. package/lib/catalog/utils/geom-utils.js.map +0 -1
  869. package/lib/catalog/utils/item-loader.js +0 -1534
  870. package/lib/catalog/utils/item-loader.js.map +0 -1
  871. package/lib/catalog/utils/load-obj.js +0 -100
  872. package/lib/catalog/utils/load-obj.js.map +0 -1
  873. package/lib/catalog/utils/mtl-loader.js +0 -360
  874. package/lib/catalog/utils/mtl-loader.js.map +0 -1
  875. package/lib/catalog/utils/obj-loader.js +0 -479
  876. package/lib/catalog/utils/obj-loader.js.map +0 -1
  877. package/lib/class/FuseUtils.js +0 -89
  878. package/lib/class/FuseUtils.js.map +0 -1
  879. package/lib/class/area.js +0 -151
  880. package/lib/class/area.js.map +0 -1
  881. package/lib/class/export.js +0 -97
  882. package/lib/class/export.js.map +0 -1
  883. package/lib/class/group.js +0 -446
  884. package/lib/class/group.js.map +0 -1
  885. package/lib/class/guide.js +0 -68
  886. package/lib/class/guide.js.map +0 -1
  887. package/lib/class/hole.js +0 -935
  888. package/lib/class/hole.js.map +0 -1
  889. package/lib/class/item.js +0 -1894
  890. package/lib/class/item.js.map +0 -1
  891. package/lib/class/layer.js +0 -673
  892. package/lib/class/layer.js.map +0 -1
  893. package/lib/class/line.js +0 -1296
  894. package/lib/class/line.js.map +0 -1
  895. package/lib/class/project.js +0 -829
  896. package/lib/class/project.js.map +0 -1
  897. package/lib/class/vertex.js +0 -272
  898. package/lib/class/vertex.js.map +0 -1
  899. package/lib/components/atoms/Snackbar/index.js +0 -57
  900. package/lib/components/atoms/Snackbar/index.js.map +0 -1
  901. package/lib/components/atoms/radio-button/index.js +0 -33
  902. package/lib/components/atoms/radio-button/index.js.map +0 -1
  903. package/lib/components/atoms/radio-button/styles.js +0 -12
  904. package/lib/components/atoms/radio-button/styles.js.map +0 -1
  905. package/lib/components/button/MainButton.js +0 -98
  906. package/lib/components/button/MainButton.js.map +0 -1
  907. package/lib/components/button/ToggleMeasureButton.js +0 -63
  908. package/lib/components/button/ToggleMeasureButton.js.map +0 -1
  909. package/lib/components/catalog-view/catalog-breadcrumb.js +0 -61
  910. package/lib/components/catalog-view/catalog-breadcrumb.js.map +0 -1
  911. package/lib/components/catalog-view/catalog-item.js +0 -233
  912. package/lib/components/catalog-view/catalog-item.js.map +0 -1
  913. package/lib/components/catalog-view/catalog-list.js +0 -189
  914. package/lib/components/catalog-view/catalog-list.js.map +0 -1
  915. package/lib/components/catalog-view/catalog-page-item.js +0 -137
  916. package/lib/components/catalog-view/catalog-page-item.js.map +0 -1
  917. package/lib/components/catalog-view/catalog-turn-back-page-item.js +0 -113
  918. package/lib/components/catalog-view/catalog-turn-back-page-item.js.map +0 -1
  919. package/lib/components/configurator/custom-configurator.js +0 -101
  920. package/lib/components/configurator/custom-configurator.js.map +0 -1
  921. package/lib/components/configurator/project-configurator.js +0 -138
  922. package/lib/components/configurator/project-configurator.js.map +0 -1
  923. package/lib/components/content.js +0 -132
  924. package/lib/components/content.js.map +0 -1
  925. package/lib/components/export.js +0 -90
  926. package/lib/components/export.js.map +0 -1
  927. package/lib/components/firstsetting/button/styles.js +0 -34
  928. package/lib/components/firstsetting/button/styles.js.map +0 -1
  929. package/lib/components/firstsetting/export.js +0 -16
  930. package/lib/components/firstsetting/export.js.map +0 -1
  931. package/lib/components/firstsetting/firstsetting-content-button.js +0 -224
  932. package/lib/components/firstsetting/firstsetting-content-button.js.map +0 -1
  933. package/lib/components/firstsetting/firstsetting-toggle-button.js +0 -133
  934. package/lib/components/firstsetting/firstsetting-toggle-button.js.map +0 -1
  935. package/lib/components/firstsetting/firstsetting.js +0 -633
  936. package/lib/components/firstsetting/firstsetting.js.map +0 -1
  937. package/lib/components/footerbar/button/ControlButton.js +0 -79
  938. package/lib/components/footerbar/button/ControlButton.js.map +0 -1
  939. package/lib/components/footerbar/button/DirectionButton.js +0 -76
  940. package/lib/components/footerbar/button/DirectionButton.js.map +0 -1
  941. package/lib/components/footerbar/button/DirectionPanSpinButton.js +0 -57
  942. package/lib/components/footerbar/button/DirectionPanSpinButton.js.map +0 -1
  943. package/lib/components/footerbar/button/ToggleButton.js +0 -83
  944. package/lib/components/footerbar/button/ToggleButton.js.map +0 -1
  945. package/lib/components/footerbar/button/ToggleConvertButton.js +0 -80
  946. package/lib/components/footerbar/button/ToggleConvertButton.js.map +0 -1
  947. package/lib/components/footerbar/button/ToggleMeasureButton.js +0 -59
  948. package/lib/components/footerbar/button/ToggleMeasureButton.js.map +0 -1
  949. package/lib/components/footerbar/button/styles.js +0 -29
  950. package/lib/components/footerbar/button/styles.js.map +0 -1
  951. package/lib/components/footerbar/export.js +0 -16
  952. package/lib/components/footerbar/export.js.map +0 -1
  953. package/lib/components/footerbar/footer-content-button.js +0 -224
  954. package/lib/components/footerbar/footer-content-button.js.map +0 -1
  955. package/lib/components/footerbar/footer-toggle-button.js +0 -133
  956. package/lib/components/footerbar/footer-toggle-button.js.map +0 -1
  957. package/lib/components/footerbar/footerbar.js +0 -808
  958. package/lib/components/footerbar/footerbar.js.map +0 -1
  959. package/lib/components/footerbar/styles.js +0 -41
  960. package/lib/components/footerbar/styles.js.map +0 -1
  961. package/lib/components/header/button/MenuButton.js +0 -77
  962. package/lib/components/header/button/MenuButton.js.map +0 -1
  963. package/lib/components/header/button/SaveButton.js +0 -57
  964. package/lib/components/header/button/SaveButton.js.map +0 -1
  965. package/lib/components/header/button/styles.js +0 -68
  966. package/lib/components/header/button/styles.js.map +0 -1
  967. package/lib/components/header/export.js +0 -12
  968. package/lib/components/header/export.js.map +0 -1
  969. package/lib/components/header/header.js +0 -556
  970. package/lib/components/header/header.js.map +0 -1
  971. package/lib/components/header/styles.js +0 -47
  972. package/lib/components/header/styles.js.map +0 -1
  973. package/lib/components/login/Login.js +0 -94
  974. package/lib/components/login/Login.js.map +0 -1
  975. package/lib/components/login/LoginForm/index.js +0 -140
  976. package/lib/components/login/LoginForm/index.js.map +0 -1
  977. package/lib/components/login/Register.js +0 -104
  978. package/lib/components/login/Register.js.map +0 -1
  979. package/lib/components/login/RegisterForm/index.js +0 -237
  980. package/lib/components/login/RegisterForm/index.js.map +0 -1
  981. package/lib/components/login/jwtService.js +0 -239
  982. package/lib/components/login/jwtService.js.map +0 -1
  983. package/lib/components/molecules/slider/index.js +0 -22
  984. package/lib/components/molecules/slider/index.js.map +0 -1
  985. package/lib/components/molecules/slider/styles.js +0 -2
  986. package/lib/components/molecules/slider/styles.js.map +0 -1
  987. package/lib/components/myprojects/export.js +0 -12
  988. package/lib/components/myprojects/export.js.map +0 -1
  989. package/lib/components/myprojects/index.js +0 -453
  990. package/lib/components/myprojects/index.js.map +0 -1
  991. package/lib/components/myprojects/styles.js +0 -31
  992. package/lib/components/myprojects/styles.js.map +0 -1
  993. package/lib/components/sidebar/custom-accordion.js +0 -45
  994. package/lib/components/sidebar/custom-accordion.js.map +0 -1
  995. package/lib/components/sidebar/export.js +0 -50
  996. package/lib/components/sidebar/export.js.map +0 -1
  997. package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js +0 -74
  998. package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js.map +0 -1
  999. package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js +0 -124
  1000. package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js.map +0 -1
  1001. package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js +0 -135
  1002. package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js.map +0 -1
  1003. package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js +0 -260
  1004. package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js.map +0 -1
  1005. package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js +0 -84
  1006. package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js.map +0 -1
  1007. package/lib/components/sidebar/panel-element-editor/element-editor.js +0 -884
  1008. package/lib/components/sidebar/panel-element-editor/element-editor.js.map +0 -1
  1009. package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js +0 -2
  1010. package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js.map +0 -1
  1011. package/lib/components/sidebar/panel-element-editor/panel-element-editor.js +0 -56
  1012. package/lib/components/sidebar/panel-element-editor/panel-element-editor.js.map +0 -1
  1013. package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js +0 -125
  1014. package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js.map +0 -1
  1015. package/lib/components/sidebar/panel-group-editor.js +0 -218
  1016. package/lib/components/sidebar/panel-group-editor.js.map +0 -1
  1017. package/lib/components/sidebar/panel-groups.js +0 -274
  1018. package/lib/components/sidebar/panel-groups.js.map +0 -1
  1019. package/lib/components/sidebar/panel-guides.js +0 -192
  1020. package/lib/components/sidebar/panel-guides.js.map +0 -1
  1021. package/lib/components/sidebar/panel-layer-elements.js +0 -258
  1022. package/lib/components/sidebar/panel-layer-elements.js.map +0 -1
  1023. package/lib/components/sidebar/panel-layers.js +0 -347
  1024. package/lib/components/sidebar/panel-layers.js.map +0 -1
  1025. package/lib/components/sidebar/panel.js +0 -110
  1026. package/lib/components/sidebar/panel.js.map +0 -1
  1027. package/lib/components/sidebar/sidebar.js +0 -117
  1028. package/lib/components/sidebar/sidebar.js.map +0 -1
  1029. package/lib/components/sidebar/toolbar-panel.js +0 -171
  1030. package/lib/components/sidebar/toolbar-panel.js.map +0 -1
  1031. package/lib/components/sign/export.js +0 -18
  1032. package/lib/components/sign/export.js.map +0 -1
  1033. package/lib/components/sign/main/index.js +0 -567
  1034. package/lib/components/sign/main/index.js.map +0 -1
  1035. package/lib/components/sign/main/styles.js +0 -27
  1036. package/lib/components/sign/main/styles.js.map +0 -1
  1037. package/lib/components/style/button.js +0 -121
  1038. package/lib/components/style/button.js.map +0 -1
  1039. package/lib/components/style/cancel-button.js +0 -30
  1040. package/lib/components/style/cancel-button.js.map +0 -1
  1041. package/lib/components/style/content-container.js +0 -41
  1042. package/lib/components/style/content-container.js.map +0 -1
  1043. package/lib/components/style/content-title.js +0 -38
  1044. package/lib/components/style/content-title.js.map +0 -1
  1045. package/lib/components/style/delete-button.js +0 -35
  1046. package/lib/components/style/delete-button.js.map +0 -1
  1047. package/lib/components/style/export.js +0 -122
  1048. package/lib/components/style/export.js.map +0 -1
  1049. package/lib/components/style/form-block.js +0 -32
  1050. package/lib/components/style/form-block.js.map +0 -1
  1051. package/lib/components/style/form-color-input.js +0 -35
  1052. package/lib/components/style/form-color-input.js.map +0 -1
  1053. package/lib/components/style/form-label.js +0 -34
  1054. package/lib/components/style/form-label.js.map +0 -1
  1055. package/lib/components/style/form-number-input.js +0 -197
  1056. package/lib/components/style/form-number-input.js.map +0 -1
  1057. package/lib/components/style/form-number-input_2.js +0 -214
  1058. package/lib/components/style/form-number-input_2.js.map +0 -1
  1059. package/lib/components/style/form-select.js +0 -30
  1060. package/lib/components/style/form-select.js.map +0 -1
  1061. package/lib/components/style/form-slider.js +0 -53
  1062. package/lib/components/style/form-slider.js.map +0 -1
  1063. package/lib/components/style/form-submit-button.js +0 -36
  1064. package/lib/components/style/form-submit-button.js.map +0 -1
  1065. package/lib/components/style/form-text-input.js +0 -84
  1066. package/lib/components/style/form-text-input.js.map +0 -1
  1067. package/lib/components/toolbar/button/ControlButton.js +0 -76
  1068. package/lib/components/toolbar/button/ControlButton.js.map +0 -1
  1069. package/lib/components/toolbar/button/DirectionButton.js +0 -57
  1070. package/lib/components/toolbar/button/DirectionButton.js.map +0 -1
  1071. package/lib/components/toolbar/button/RightButton.js +0 -140
  1072. package/lib/components/toolbar/button/RightButton.js.map +0 -1
  1073. package/lib/components/toolbar/button/ToggleButton.js +0 -66
  1074. package/lib/components/toolbar/button/ToggleButton.js.map +0 -1
  1075. package/lib/components/toolbar/button/index.js +0 -94
  1076. package/lib/components/toolbar/button/index.js.map +0 -1
  1077. package/lib/components/toolbar/button/styles.js +0 -21
  1078. package/lib/components/toolbar/button/styles.js.map +0 -1
  1079. package/lib/components/toolbar/components/DoorStyleMenu.js +0 -112
  1080. package/lib/components/toolbar/components/DoorStyleMenu.js.map +0 -1
  1081. package/lib/components/toolbar/components/Pricing.js +0 -110
  1082. package/lib/components/toolbar/components/Pricing.js.map +0 -1
  1083. package/lib/components/toolbar/components/ReviewForQuote.js +0 -485
  1084. package/lib/components/toolbar/components/ReviewForQuote.js.map +0 -1
  1085. package/lib/components/toolbar/export.js +0 -50
  1086. package/lib/components/toolbar/export.js.map +0 -1
  1087. package/lib/components/toolbar/main/Alert.js +0 -132
  1088. package/lib/components/toolbar/main/Alert.js.map +0 -1
  1089. package/lib/components/toolbar/main/TakePictureModal.js +0 -109
  1090. package/lib/components/toolbar/main/TakePictureModal.js.map +0 -1
  1091. package/lib/components/toolbar/main/confirm-popup.js +0 -95
  1092. package/lib/components/toolbar/main/confirm-popup.js.map +0 -1
  1093. package/lib/components/toolbar/main/index.js +0 -4619
  1094. package/lib/components/toolbar/main/index.js.map +0 -1
  1095. package/lib/components/toolbar/main/myComponents.js +0 -125
  1096. package/lib/components/toolbar/main/myComponents.js.map +0 -1
  1097. package/lib/components/toolbar/main/styles.js +0 -73
  1098. package/lib/components/toolbar/main/styles.js.map +0 -1
  1099. package/lib/components/toolbar/plugin-item.js +0 -156
  1100. package/lib/components/toolbar/plugin-item.js.map +0 -1
  1101. package/lib/components/toolbar/popup/appliance/appliance-category/index.js +0 -86
  1102. package/lib/components/toolbar/popup/appliance/appliance-category/index.js.map +0 -1
  1103. package/lib/components/toolbar/popup/appliance/choose-appliance/index.js +0 -85
  1104. package/lib/components/toolbar/popup/appliance/choose-appliance/index.js.map +0 -1
  1105. package/lib/components/toolbar/popup/appliance/index.js +0 -89
  1106. package/lib/components/toolbar/popup/appliance/index.js.map +0 -1
  1107. package/lib/components/toolbar/popup/autosaveprompt/index.js +0 -99
  1108. package/lib/components/toolbar/popup/autosaveprompt/index.js.map +0 -1
  1109. package/lib/components/toolbar/popup/autosaveprompt/styles.js +0 -16
  1110. package/lib/components/toolbar/popup/autosaveprompt/styles.js.map +0 -1
  1111. package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js +0 -86
  1112. package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js.map +0 -1
  1113. package/lib/components/toolbar/popup/cabinet/choose-product/index.js +0 -107
  1114. package/lib/components/toolbar/popup/cabinet/choose-product/index.js.map +0 -1
  1115. package/lib/components/toolbar/popup/cabinet/index.js +0 -91
  1116. package/lib/components/toolbar/popup/cabinet/index.js.map +0 -1
  1117. package/lib/components/toolbar/popup/doorStyle/choose-style/index.js +0 -59
  1118. package/lib/components/toolbar/popup/doorStyle/choose-style/index.js.map +0 -1
  1119. package/lib/components/toolbar/popup/doorStyle/index.js +0 -68
  1120. package/lib/components/toolbar/popup/doorStyle/index.js.map +0 -1
  1121. package/lib/components/toolbar/popup/doorStyle/style-category/index.js +0 -152
  1122. package/lib/components/toolbar/popup/doorStyle/style-category/index.js.map +0 -1
  1123. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -9
  1124. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js.map +0 -1
  1125. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js +0 -128
  1126. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js.map +0 -1
  1127. package/lib/components/toolbar/popup/downloadsummary/index.js +0 -572
  1128. package/lib/components/toolbar/popup/downloadsummary/index.js.map +0 -1
  1129. package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js +0 -60
  1130. package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js.map +0 -1
  1131. package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js +0 -200
  1132. package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js.map +0 -1
  1133. package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js +0 -254
  1134. package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js.map +0 -1
  1135. package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js +0 -1762
  1136. package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js.map +0 -1
  1137. package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -96
  1138. package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js.map +0 -1
  1139. package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js +0 -125
  1140. package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js.map +0 -1
  1141. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js +0 -1713
  1142. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js.map +0 -1
  1143. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js +0 -184
  1144. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js.map +0 -1
  1145. package/lib/components/toolbar/popup/downloadsummary/showWarranty.js +0 -115
  1146. package/lib/components/toolbar/popup/downloadsummary/showWarranty.js.map +0 -1
  1147. package/lib/components/toolbar/popup/downloadsummary/styles.js +0 -47
  1148. package/lib/components/toolbar/popup/downloadsummary/styles.js.map +0 -1
  1149. package/lib/components/toolbar/popup/finishingtouch/category/index.js +0 -44
  1150. package/lib/components/toolbar/popup/finishingtouch/category/index.js.map +0 -1
  1151. package/lib/components/toolbar/popup/finishingtouch/index.js +0 -54
  1152. package/lib/components/toolbar/popup/finishingtouch/index.js.map +0 -1
  1153. package/lib/components/toolbar/popup/finishingtouch/material-edit.js +0 -163
  1154. package/lib/components/toolbar/popup/finishingtouch/material-edit.js.map +0 -1
  1155. package/lib/components/toolbar/popup/finishingtouch/product/index.js +0 -65
  1156. package/lib/components/toolbar/popup/finishingtouch/product/index.js.map +0 -1
  1157. package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js +0 -124
  1158. package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js.map +0 -1
  1159. package/lib/components/toolbar/popup/floorplan/choose-floor/index.js +0 -255
  1160. package/lib/components/toolbar/popup/floorplan/choose-floor/index.js.map +0 -1
  1161. package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -20
  1162. package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js.map +0 -1
  1163. package/lib/components/toolbar/popup/floorplan/floor-category/index.js +0 -99
  1164. package/lib/components/toolbar/popup/floorplan/floor-category/index.js.map +0 -1
  1165. package/lib/components/toolbar/popup/floorplan/index.js +0 -56
  1166. package/lib/components/toolbar/popup/floorplan/index.js.map +0 -1
  1167. package/lib/components/toolbar/popup/index.js +0 -195
  1168. package/lib/components/toolbar/popup/index.js.map +0 -1
  1169. package/lib/components/toolbar/popup/newproject/index.js +0 -75
  1170. package/lib/components/toolbar/popup/newproject/index.js.map +0 -1
  1171. package/lib/components/toolbar/popup/newproject/styles.js +0 -16
  1172. package/lib/components/toolbar/popup/newproject/styles.js.map +0 -1
  1173. package/lib/components/toolbar/popup/product/appliance.js +0 -73
  1174. package/lib/components/toolbar/popup/product/appliance.js.map +0 -1
  1175. package/lib/components/toolbar/popup/product/cabinetproduct.js +0 -33
  1176. package/lib/components/toolbar/popup/product/cabinetproduct.js.map +0 -1
  1177. package/lib/components/toolbar/popup/product/doorstyle.js +0 -59
  1178. package/lib/components/toolbar/popup/product/doorstyle.js.map +0 -1
  1179. package/lib/components/toolbar/popup/product/doorstyleproduct.js +0 -59
  1180. package/lib/components/toolbar/popup/product/doorstyleproduct.js.map +0 -1
  1181. package/lib/components/toolbar/popup/product/floor.js +0 -59
  1182. package/lib/components/toolbar/popup/product/floor.js.map +0 -1
  1183. package/lib/components/toolbar/popup/product/floorproduct.js +0 -68
  1184. package/lib/components/toolbar/popup/product/floorproduct.js.map +0 -1
  1185. package/lib/components/toolbar/popup/product/index.js +0 -59
  1186. package/lib/components/toolbar/popup/product/index.js.map +0 -1
  1187. package/lib/components/toolbar/popup/product/primary.js +0 -71
  1188. package/lib/components/toolbar/popup/product/primary.js.map +0 -1
  1189. package/lib/components/toolbar/popup/product/productline.js +0 -128
  1190. package/lib/components/toolbar/popup/product/productline.js.map +0 -1
  1191. package/lib/components/toolbar/popup/product/reviewItem.js +0 -346
  1192. package/lib/components/toolbar/popup/product/reviewItem.js.map +0 -1
  1193. package/lib/components/toolbar/popup/product/reviewMolding.js +0 -291
  1194. package/lib/components/toolbar/popup/product/reviewMolding.js.map +0 -1
  1195. package/lib/components/toolbar/popup/product/styles.js +0 -79
  1196. package/lib/components/toolbar/popup/product/styles.js.map +0 -1
  1197. package/lib/components/toolbar/popup/savedesign/FullPictureForm.js +0 -169
  1198. package/lib/components/toolbar/popup/savedesign/FullPictureForm.js.map +0 -1
  1199. package/lib/components/toolbar/popup/savedesign/index.js +0 -516
  1200. package/lib/components/toolbar/popup/savedesign/index.js.map +0 -1
  1201. package/lib/components/toolbar/popup/savedesign/styles.js +0 -26
  1202. package/lib/components/toolbar/popup/savedesign/styles.js.map +0 -1
  1203. package/lib/components/toolbar/popup/setDoorStyleOption/index.js +0 -64
  1204. package/lib/components/toolbar/popup/setDoorStyleOption/index.js.map +0 -1
  1205. package/lib/components/toolbar/popup/styles.js +0 -104
  1206. package/lib/components/toolbar/popup/styles.js.map +0 -1
  1207. package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js +0 -166
  1208. package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js.map +0 -1
  1209. package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js +0 -93
  1210. package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js.map +0 -1
  1211. package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js +0 -45
  1212. package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js.map +0 -1
  1213. package/lib/components/toolbar/popup/submitforquote/StepDots.js +0 -40
  1214. package/lib/components/toolbar/popup/submitforquote/StepDots.js.map +0 -1
  1215. package/lib/components/toolbar/popup/submitforquote/cart-choice.js +0 -141
  1216. package/lib/components/toolbar/popup/submitforquote/cart-choice.js.map +0 -1
  1217. package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -50
  1218. package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js.map +0 -1
  1219. package/lib/components/toolbar/popup/submitforquote/index.js +0 -698
  1220. package/lib/components/toolbar/popup/submitforquote/index.js.map +0 -1
  1221. package/lib/components/toolbar/popup/submitforquote/styles.js +0 -38
  1222. package/lib/components/toolbar/popup/submitforquote/styles.js.map +0 -1
  1223. package/lib/components/toolbar/popup/submitprompt/index.js +0 -79
  1224. package/lib/components/toolbar/popup/submitprompt/index.js.map +0 -1
  1225. package/lib/components/toolbar/popup/submitprompt/styles.js +0 -16
  1226. package/lib/components/toolbar/popup/submitprompt/styles.js.map +0 -1
  1227. package/lib/components/toolbar/toolbar-button.js +0 -111
  1228. package/lib/components/toolbar/toolbar-button.js.map +0 -1
  1229. package/lib/components/toolbar/toolbar-load-button.js +0 -36
  1230. package/lib/components/toolbar/toolbar-load-button.js.map +0 -1
  1231. package/lib/components/toolbar/toolbar-save-button.js +0 -34
  1232. package/lib/components/toolbar/toolbar-save-button.js.map +0 -1
  1233. package/lib/components/tutorial-view/Modal.js +0 -503
  1234. package/lib/components/tutorial-view/Modal.js.map +0 -1
  1235. package/lib/components/tutorial-view/styles.js +0 -13
  1236. package/lib/components/tutorial-view/styles.js.map +0 -1
  1237. package/lib/components/viewer2d/area.js +0 -90
  1238. package/lib/components/viewer2d/area.js.map +0 -1
  1239. package/lib/components/viewer2d/export.js +0 -122
  1240. package/lib/components/viewer2d/export.js.map +0 -1
  1241. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -45
  1242. package/lib/components/viewer2d/grids/grid-horizontal-streak.js.map +0 -1
  1243. package/lib/components/viewer2d/grids/grid-streak.js +0 -45
  1244. package/lib/components/viewer2d/grids/grid-streak.js.map +0 -1
  1245. package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -45
  1246. package/lib/components/viewer2d/grids/grid-vertical-streak.js.map +0 -1
  1247. package/lib/components/viewer2d/grids/grids.js +0 -45
  1248. package/lib/components/viewer2d/grids/grids.js.map +0 -1
  1249. package/lib/components/viewer2d/group.js +0 -63
  1250. package/lib/components/viewer2d/group.js.map +0 -1
  1251. package/lib/components/viewer2d/item.js +0 -522
  1252. package/lib/components/viewer2d/item.js.map +0 -1
  1253. package/lib/components/viewer2d/layer.js +0 -172
  1254. package/lib/components/viewer2d/layer.js.map +0 -1
  1255. package/lib/components/viewer2d/line.js +0 -899
  1256. package/lib/components/viewer2d/line.js.map +0 -1
  1257. package/lib/components/viewer2d/ruler.js +0 -108
  1258. package/lib/components/viewer2d/ruler.js.map +0 -1
  1259. package/lib/components/viewer2d/rulerDist.js +0 -154
  1260. package/lib/components/viewer2d/rulerDist.js.map +0 -1
  1261. package/lib/components/viewer2d/rulerX.js +0 -159
  1262. package/lib/components/viewer2d/rulerX.js.map +0 -1
  1263. package/lib/components/viewer2d/rulerY.js +0 -161
  1264. package/lib/components/viewer2d/rulerY.js.map +0 -1
  1265. package/lib/components/viewer2d/scene.js +0 -148
  1266. package/lib/components/viewer2d/scene.js.map +0 -1
  1267. package/lib/components/viewer2d/snap.js +0 -84
  1268. package/lib/components/viewer2d/snap.js.map +0 -1
  1269. package/lib/components/viewer2d/state.js +0 -88
  1270. package/lib/components/viewer2d/state.js.map +0 -1
  1271. package/lib/components/viewer2d/utils.js +0 -174
  1272. package/lib/components/viewer2d/utils.js.map +0 -1
  1273. package/lib/components/viewer2d/vertex.js +0 -76
  1274. package/lib/components/viewer2d/vertex.js.map +0 -1
  1275. package/lib/components/viewer2d/viewer2d.js +0 -1409
  1276. package/lib/components/viewer2d/viewer2d.js.map +0 -1
  1277. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2598
  1278. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js.map +0 -1
  1279. package/lib/components/viewer3d/dcm.js +0 -408
  1280. package/lib/components/viewer3d/dcm.js.map +0 -1
  1281. package/lib/components/viewer3d/fbm.js +0 -421
  1282. package/lib/components/viewer3d/fbm.js.map +0 -1
  1283. package/lib/components/viewer3d/front3D.js +0 -76
  1284. package/lib/components/viewer3d/front3D.js.map +0 -1
  1285. package/lib/components/viewer3d/grid-creator.js +0 -35
  1286. package/lib/components/viewer3d/grid-creator.js.map +0 -1
  1287. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +0 -45
  1288. package/lib/components/viewer3d/grids/grid-horizontal-streak.js.map +0 -1
  1289. package/lib/components/viewer3d/grids/grid-streak.js +0 -36
  1290. package/lib/components/viewer3d/grids/grid-streak.js.map +0 -1
  1291. package/lib/components/viewer3d/grids/grid-vertical-streak.js +0 -45
  1292. package/lib/components/viewer3d/grids/grid-vertical-streak.js.map +0 -1
  1293. package/lib/components/viewer3d/libs/first-person-controls.js +0 -75
  1294. package/lib/components/viewer3d/libs/first-person-controls.js.map +0 -1
  1295. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1288
  1296. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js.map +0 -1
  1297. package/lib/components/viewer3d/libs/mtl-loader.js +0 -360
  1298. package/lib/components/viewer3d/libs/mtl-loader.js.map +0 -1
  1299. package/lib/components/viewer3d/libs/obj-loader.js +0 -465
  1300. package/lib/components/viewer3d/libs/obj-loader.js.map +0 -1
  1301. package/lib/components/viewer3d/libs/orbit-controls.js +0 -701
  1302. package/lib/components/viewer3d/libs/orbit-controls.js.map +0 -1
  1303. package/lib/components/viewer3d/libs/pointer-lock-controls.js +0 -48
  1304. package/lib/components/viewer3d/libs/pointer-lock-controls.js.map +0 -1
  1305. package/lib/components/viewer3d/lrm.js +0 -312
  1306. package/lib/components/viewer3d/lrm.js.map +0 -1
  1307. package/lib/components/viewer3d/model.js +0 -715
  1308. package/lib/components/viewer3d/model.js.map +0 -1
  1309. package/lib/components/viewer3d/pointer-lock-navigation.js +0 -123
  1310. package/lib/components/viewer3d/pointer-lock-navigation.js.map +0 -1
  1311. package/lib/components/viewer3d/ruler-utils/itemRect.js +0 -69
  1312. package/lib/components/viewer3d/ruler-utils/itemRect.js.map +0 -1
  1313. package/lib/components/viewer3d/ruler-utils/layer3D.js +0 -503
  1314. package/lib/components/viewer3d/ruler-utils/layer3D.js.map +0 -1
  1315. package/lib/components/viewer3d/ruler-utils/ruler3D.js +0 -235
  1316. package/lib/components/viewer3d/ruler-utils/ruler3D.js.map +0 -1
  1317. package/lib/components/viewer3d/ruler-utils/scene3D.js +0 -70
  1318. package/lib/components/viewer3d/ruler-utils/scene3D.js.map +0 -1
  1319. package/lib/components/viewer3d/ruler-utils/state3D.js +0 -26
  1320. package/lib/components/viewer3d/ruler-utils/state3D.js.map +0 -1
  1321. package/lib/components/viewer3d/scene-creator.js +0 -3641
  1322. package/lib/components/viewer3d/scene-creator.js.map +0 -1
  1323. package/lib/components/viewer3d/three-memory-cleaner.js +0 -61
  1324. package/lib/components/viewer3d/three-memory-cleaner.js.map +0 -1
  1325. package/lib/components/viewer3d/viewer3d-first-person.js +0 -321
  1326. package/lib/components/viewer3d/viewer3d-first-person.js.map +0 -1
  1327. package/lib/components/viewer3d/viewer3d.js +0 -2508
  1328. package/lib/components/viewer3d/viewer3d.js.map +0 -1
  1329. package/lib/components/wizardstep/button/styles.js +0 -67
  1330. package/lib/components/wizardstep/button/styles.js.map +0 -1
  1331. package/lib/components/wizardstep/export.js +0 -12
  1332. package/lib/components/wizardstep/export.js.map +0 -1
  1333. package/lib/components/wizardstep/index.js +0 -978
  1334. package/lib/components/wizardstep/index.js.map +0 -1
  1335. package/lib/components/wizardstep/styles.js +0 -68
  1336. package/lib/components/wizardstep/styles.js.map +0 -1
  1337. package/lib/components/wizardstep/wizardstep-content-button.js +0 -224
  1338. package/lib/components/wizardstep/wizardstep-content-button.js.map +0 -1
  1339. package/lib/components/wizardstep/wizardstep-toggle-button.js +0 -133
  1340. package/lib/components/wizardstep/wizardstep-toggle-button.js.map +0 -1
  1341. package/lib/constants.js +0 -646
  1342. package/lib/constants.js.map +0 -1
  1343. package/lib/hooks/useCheckCart.js +0 -60
  1344. package/lib/hooks/useCheckCart.js.map +0 -1
  1345. package/lib/hooks/useGetPricesBySku.js +0 -81
  1346. package/lib/hooks/useGetPricesBySku.js.map +0 -1
  1347. package/lib/hooks/useValidateToken.js +0 -207
  1348. package/lib/hooks/useValidateToken.js.map +0 -1
  1349. package/lib/index.js +0 -108
  1350. package/lib/index.js.map +0 -1
  1351. package/lib/models.js +0 -518
  1352. package/lib/models.js.map +0 -1
  1353. package/lib/plugins/SVGLoader.js +0 -1418
  1354. package/lib/plugins/SVGLoader.js.map +0 -1
  1355. package/lib/plugins/autosave.js +0 -40
  1356. package/lib/plugins/autosave.js.map +0 -1
  1357. package/lib/plugins/console-debugger.js +0 -45
  1358. package/lib/plugins/console-debugger.js.map +0 -1
  1359. package/lib/plugins/export.js +0 -34
  1360. package/lib/plugins/export.js.map +0 -1
  1361. package/lib/plugins/keyboard.js +0 -108
  1362. package/lib/plugins/keyboard.js.map +0 -1
  1363. package/lib/reducers/areas-reducer.js +0 -19
  1364. package/lib/reducers/areas-reducer.js.map +0 -1
  1365. package/lib/reducers/export.js +0 -98
  1366. package/lib/reducers/export.js.map +0 -1
  1367. package/lib/reducers/groups-reducer.js +0 -45
  1368. package/lib/reducers/groups-reducer.js.map +0 -1
  1369. package/lib/reducers/holes-reducer.js +0 -69
  1370. package/lib/reducers/holes-reducer.js.map +0 -1
  1371. package/lib/reducers/items-reducer.js +0 -147
  1372. package/lib/reducers/items-reducer.js.map +0 -1
  1373. package/lib/reducers/lines-reducer.js +0 -52
  1374. package/lib/reducers/lines-reducer.js.map +0 -1
  1375. package/lib/reducers/project-reducer.js +0 -136
  1376. package/lib/reducers/project-reducer.js.map +0 -1
  1377. package/lib/reducers/reducer.js +0 -27
  1378. package/lib/reducers/reducer.js.map +0 -1
  1379. package/lib/reducers/scene-reducer.js +0 -35
  1380. package/lib/reducers/scene-reducer.js.map +0 -1
  1381. package/lib/reducers/user-reducer.js +0 -48
  1382. package/lib/reducers/user-reducer.js.map +0 -1
  1383. package/lib/reducers/vertices-reducer.js +0 -26
  1384. package/lib/reducers/vertices-reducer.js.map +0 -1
  1385. package/lib/reducers/viewer2d-reducer.js +0 -83
  1386. package/lib/reducers/viewer2d-reducer.js.map +0 -1
  1387. package/lib/reducers/viewer3d-reducer.js +0 -64
  1388. package/lib/reducers/viewer3d-reducer.js.map +0 -1
  1389. package/lib/shared-style.js +0 -73
  1390. package/lib/shared-style.js.map +0 -1
  1391. package/lib/styles/export.js +0 -14
  1392. package/lib/styles/export.js.map +0 -1
  1393. package/lib/translator/en.js +0 -111
  1394. package/lib/translator/en.js.map +0 -1
  1395. package/lib/translator/it.js +0 -86
  1396. package/lib/translator/it.js.map +0 -1
  1397. package/lib/translator/ru.js +0 -86
  1398. package/lib/translator/ru.js.map +0 -1
  1399. package/lib/translator/translator.js +0 -91
  1400. package/lib/translator/translator.js.map +0 -1
  1401. package/lib/utils/browser.js +0 -41
  1402. package/lib/utils/browser.js.map +0 -1
  1403. package/lib/utils/email-validator.js +0 -11
  1404. package/lib/utils/email-validator.js.map +0 -1
  1405. package/lib/utils/export.js +0 -57
  1406. package/lib/utils/export.js.map +0 -1
  1407. package/lib/utils/geometry.js +0 -2329
  1408. package/lib/utils/geometry.js.map +0 -1
  1409. package/lib/utils/get-edges-of-subgraphs.js +0 -29
  1410. package/lib/utils/get-edges-of-subgraphs.js.map +0 -1
  1411. package/lib/utils/graph-cycles.js +0 -241
  1412. package/lib/utils/graph-cycles.js.map +0 -1
  1413. package/lib/utils/graph-inner-cycles.js +0 -55
  1414. package/lib/utils/graph-inner-cycles.js.map +0 -1
  1415. package/lib/utils/graph.js +0 -152
  1416. package/lib/utils/graph.js.map +0 -1
  1417. package/lib/utils/helper.js +0 -360
  1418. package/lib/utils/helper.js.map +0 -1
  1419. package/lib/utils/history.js +0 -37
  1420. package/lib/utils/history.js.map +0 -1
  1421. package/lib/utils/id-broker.js +0 -26
  1422. package/lib/utils/id-broker.js.map +0 -1
  1423. package/lib/utils/logger.js +0 -15
  1424. package/lib/utils/logger.js.map +0 -1
  1425. package/lib/utils/math.js +0 -58
  1426. package/lib/utils/math.js.map +0 -1
  1427. package/lib/utils/molding.js +0 -864
  1428. package/lib/utils/molding.js.map +0 -1
  1429. package/lib/utils/name-generator.js +0 -24
  1430. package/lib/utils/name-generator.js.map +0 -1
  1431. package/lib/utils/objects-utils.js +0 -61
  1432. package/lib/utils/objects-utils.js.map +0 -1
  1433. package/lib/utils/phone-validator.js +0 -11
  1434. package/lib/utils/phone-validator.js.map +0 -1
  1435. package/lib/utils/process-black-list.js +0 -25
  1436. package/lib/utils/process-black-list.js.map +0 -1
  1437. package/lib/utils/react-if.js +0 -25
  1438. package/lib/utils/react-if.js.map +0 -1
  1439. package/lib/utils/snap-scene.js +0 -106
  1440. package/lib/utils/snap-scene.js.map +0 -1
  1441. package/lib/utils/snap.js +0 -250
  1442. package/lib/utils/snap.js.map +0 -1
  1443. package/lib/utils/threeCSG.es6.js +0 -504
  1444. package/lib/utils/threeCSG.es6.js.map +0 -1
  1445. package/lib/version.js +0 -8
  1446. package/lib/version.js.map +0 -1
  1447. package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
  1448. package/src/components/catalog-view/catalog-item.jsx +0 -229
  1449. package/src/components/catalog-view/catalog-list.jsx +0 -173
  1450. package/src/components/catalog-view/catalog-page-item.jsx +0 -110
  1451. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
  1452. package/src/components/configurator/custom-configurator.jsx +0 -77
  1453. package/src/components/configurator/project-configurator.jsx +0 -120
  1454. package/src/components/firstsetting/button/styles.js +0 -223
  1455. package/src/components/firstsetting/export.js +0 -9
  1456. package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
  1457. package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
  1458. package/src/components/firstsetting/firstsetting.jsx +0 -814
  1459. package/src/components/footerbar/button/ControlButton.jsx +0 -43
  1460. package/src/components/footerbar/button/DirectionButton.jsx +0 -54
  1461. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
  1462. package/src/components/footerbar/button/ToggleButton.jsx +0 -58
  1463. package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
  1464. package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
  1465. package/src/components/footerbar/button/styles.js +0 -217
  1466. package/src/components/footerbar/export.js +0 -9
  1467. package/src/components/footerbar/footer-content-button.jsx +0 -198
  1468. package/src/components/footerbar/footer-toggle-button.jsx +0 -101
  1469. package/src/components/footerbar/footerbar.jsx +0 -1103
  1470. package/src/components/footerbar/styles.js +0 -263
  1471. package/src/components/header/button/MenuButton.jsx +0 -46
  1472. package/src/components/header/button/SaveButton.jsx +0 -54
  1473. package/src/components/header/button/styles.js +0 -181
  1474. package/src/components/header/export.js +0 -5
  1475. package/src/components/header/header.jsx +0 -631
  1476. package/src/components/header/header.style.css +0 -47
  1477. package/src/components/header/styles.js +0 -320
  1478. package/src/components/login/Login.js +0 -77
  1479. package/src/components/login/LoginForm/index.js +0 -108
  1480. package/src/components/login/Register.js +0 -83
  1481. package/src/components/login/RegisterForm/index.js +0 -171
  1482. package/src/components/login/jwtService.js +0 -201
  1483. package/src/components/login/style.css +0 -158
  1484. package/src/components/login/style.scss +0 -260
  1485. package/src/components/myprojects/export.js +0 -5
  1486. package/src/components/myprojects/index.jsx +0 -445
  1487. package/src/components/myprojects/styles.js +0 -241
  1488. package/src/components/sidebar/custom-accordion.jsx +0 -48
  1489. package/src/components/sidebar/export.js +0 -15
  1490. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
  1491. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
  1492. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
  1493. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
  1494. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
  1495. package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
  1496. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  1497. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
  1498. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
  1499. package/src/components/sidebar/panel-group-editor.jsx +0 -272
  1500. package/src/components/sidebar/panel-groups.jsx +0 -310
  1501. package/src/components/sidebar/panel-guides.jsx +0 -192
  1502. package/src/components/sidebar/panel-layer-elements.jsx +0 -298
  1503. package/src/components/sidebar/panel-layers.jsx +0 -381
  1504. package/src/components/sidebar/panel.jsx +0 -71
  1505. package/src/components/sidebar/sidebar.jsx +0 -106
  1506. package/src/components/sidebar/toolbar-panel.jsx +0 -139
  1507. package/src/components/sign/export.js +0 -7
  1508. package/src/components/sign/main/index.jsx +0 -523
  1509. package/src/components/sign/main/styles.js +0 -163
  1510. package/src/components/toolbar/button/ControlButton.jsx +0 -41
  1511. package/src/components/toolbar/button/DirectionButton.jsx +0 -34
  1512. package/src/components/toolbar/button/RightButton.jsx +0 -103
  1513. package/src/components/toolbar/button/ToggleButton.jsx +0 -41
  1514. package/src/components/toolbar/button/index.jsx +0 -55
  1515. package/src/components/toolbar/button/styles.js +0 -127
  1516. package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
  1517. package/src/components/toolbar/components/Pricing.jsx +0 -126
  1518. package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
  1519. package/src/components/toolbar/export.js +0 -21
  1520. package/src/components/toolbar/main/Alert.js +0 -122
  1521. package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
  1522. package/src/components/toolbar/main/confirm-popup.jsx +0 -99
  1523. package/src/components/toolbar/main/index.jsx +0 -5687
  1524. package/src/components/toolbar/main/lShaped.json +0 -311
  1525. package/src/components/toolbar/main/longNarrow.json +0 -238
  1526. package/src/components/toolbar/main/myComponents.js +0 -123
  1527. package/src/components/toolbar/main/oRectangle.json +0 -220
  1528. package/src/components/toolbar/main/rectangle.json +0 -238
  1529. package/src/components/toolbar/main/style.css +0 -107
  1530. package/src/components/toolbar/main/styles.js +0 -696
  1531. package/src/components/toolbar/plugin-item.jsx +0 -123
  1532. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
  1533. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
  1534. package/src/components/toolbar/popup/appliance/index.jsx +0 -83
  1535. package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
  1536. package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
  1537. package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
  1538. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
  1539. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
  1540. package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
  1541. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
  1542. package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
  1543. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
  1544. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
  1545. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
  1546. package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
  1547. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
  1548. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
  1549. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
  1550. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
  1551. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
  1552. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
  1553. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
  1554. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
  1555. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
  1556. package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
  1557. package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
  1558. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
  1559. package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
  1560. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
  1561. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
  1562. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
  1563. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
  1564. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
  1565. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
  1566. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
  1567. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
  1568. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
  1569. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
  1570. package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
  1571. package/src/components/toolbar/popup/index.jsx +0 -241
  1572. package/src/components/toolbar/popup/newproject/index.jsx +0 -59
  1573. package/src/components/toolbar/popup/newproject/styles.css +0 -64
  1574. package/src/components/toolbar/popup/newproject/styles.js +0 -41
  1575. package/src/components/toolbar/popup/product/appliance.jsx +0 -54
  1576. package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
  1577. package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
  1578. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
  1579. package/src/components/toolbar/popup/product/floor.jsx +0 -36
  1580. package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
  1581. package/src/components/toolbar/popup/product/index.jsx +0 -36
  1582. package/src/components/toolbar/popup/product/primary.jsx +0 -77
  1583. package/src/components/toolbar/popup/product/productline.jsx +0 -93
  1584. package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
  1585. package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
  1586. package/src/components/toolbar/popup/product/style.css +0 -54
  1587. package/src/components/toolbar/popup/product/styles.js +0 -260
  1588. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
  1589. package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
  1590. package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
  1591. package/src/components/toolbar/popup/savedesign/styles.js +0 -151
  1592. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
  1593. package/src/components/toolbar/popup/styles.js +0 -909
  1594. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
  1595. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
  1596. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
  1597. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
  1598. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
  1599. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
  1600. package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
  1601. package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
  1602. package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
  1603. package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
  1604. package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
  1605. package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
  1606. package/src/components/toolbar/toolbar-button.jsx +0 -90
  1607. package/src/components/toolbar/toolbar-load-button.jsx +0 -36
  1608. package/src/components/toolbar/toolbar-save-button.jsx +0 -32
  1609. package/src/components/wizardstep/button/styles.js +0 -677
  1610. package/src/components/wizardstep/export.js +0 -5
  1611. package/src/components/wizardstep/index.jsx +0 -1372
  1612. package/src/components/wizardstep/styles.js +0 -688
  1613. package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
  1614. package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
  1615. package/src/hooks/useCheckCart.js +0 -38
  1616. package/src/hooks/useGetPricesBySku.js +0 -59
  1617. package/src/hooks/useValidateToken.js +0 -181
  1618. package/src/styles/export.js +0 -7
  1619. package/src/styles/tabs.css +0 -40
@@ -1,2598 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.EventDispatcher = void 0;
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
- function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
12
- function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
13
- function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
14
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
15
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
16
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
17
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
18
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
20
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
23
- /*!
24
- * camera-controls
25
- * https://github.com/yomotsu/camera-controls
26
- * (c) 2017 @yomotsu
27
- * Released under the MIT License.
28
- */
29
- // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#value
30
- var MOUSE_BUTTON = {
31
- LEFT: 1,
32
- RIGHT: 2,
33
- MIDDLE: 4
34
- };
35
- var ACTION = Object.freeze({
36
- NONE: 0,
37
- ROTATE: 1,
38
- TRUCK: 2,
39
- OFFSET: 4,
40
- DOLLY: 8,
41
- ZOOM: 16,
42
- TOUCH_ROTATE: 32,
43
- TOUCH_TRUCK: 64,
44
- TOUCH_OFFSET: 128,
45
- TOUCH_DOLLY: 256,
46
- TOUCH_ZOOM: 512,
47
- TOUCH_DOLLY_TRUCK: 1024,
48
- TOUCH_DOLLY_OFFSET: 2048,
49
- TOUCH_DOLLY_ROTATE: 4096,
50
- TOUCH_ZOOM_TRUCK: 8192,
51
- TOUCH_ZOOM_OFFSET: 16384,
52
- TOUCH_ZOOM_ROTATE: 32768
53
- });
54
- var DOLLY_DIRECTION = {
55
- NONE: 0,
56
- IN: 1,
57
- OUT: -1
58
- };
59
- function isPerspectiveCamera(camera) {
60
- return camera.isPerspectiveCamera;
61
- }
62
- function isOrthographicCamera(camera) {
63
- return camera.isOrthographicCamera;
64
- }
65
- var PI_2 = Math.PI * 2;
66
- var PI_HALF = Math.PI / 2;
67
- var EPSILON = 1e-5;
68
- var DEG2RAD = Math.PI / 180;
69
- function clamp(value, min, max) {
70
- return Math.max(min, Math.min(max, value));
71
- }
72
- function approxZero(number) {
73
- var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EPSILON;
74
- return Math.abs(number) < error;
75
- }
76
- function approxEquals(a, b) {
77
- var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EPSILON;
78
- return approxZero(a - b, error);
79
- }
80
- function roundToStep(value, step) {
81
- return Math.round(value / step) * step;
82
- }
83
- function infinityToMaxNumber(value) {
84
- if (isFinite(value)) return value;
85
- if (value < 0) return -Number.MAX_VALUE;
86
- return Number.MAX_VALUE;
87
- }
88
- function maxNumberToInfinity(value) {
89
- if (Math.abs(value) < Number.MAX_VALUE) return value;
90
- return value * Infinity;
91
- }
92
- // https://docs.unity3d.com/ScriptReference/Mathf.SmoothDamp.html
93
- // https://github.com/Unity-Technologies/UnityCsReference/blob/a2bdfe9b3c4cd4476f44bf52f848063bfaf7b6b9/Runtime/Export/Math/Mathf.cs#L308
94
- function smoothDamp(current, target, currentVelocityRef, smoothTime) {
95
- var maxSpeed = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Infinity;
96
- var deltaTime = arguments.length > 5 ? arguments[5] : undefined;
97
- // Based on Game Programming Gems 4 Chapter 1.10
98
- smoothTime = Math.max(0.0001, smoothTime);
99
- var omega = 2 / smoothTime;
100
- var x = omega * deltaTime;
101
- var exp = 1 / (1 + x + 0.48 * x * x + 0.235 * x * x * x);
102
- var change = current - target;
103
- var originalTo = target;
104
- // Clamp maximum speed
105
- var maxChange = maxSpeed * smoothTime;
106
- change = clamp(change, -maxChange, maxChange);
107
- target = current - change;
108
- var temp = (currentVelocityRef.value + omega * change) * deltaTime;
109
- currentVelocityRef.value = (currentVelocityRef.value - omega * temp) * exp;
110
- var output = target + (change + temp) * exp;
111
- // Prevent overshooting
112
- if (originalTo - current > 0.0 === output > originalTo) {
113
- output = originalTo;
114
- currentVelocityRef.value = (output - originalTo) / deltaTime;
115
- }
116
- return output;
117
- }
118
- // https://docs.unity3d.com/ScriptReference/Vector3.SmoothDamp.html
119
- // https://github.com/Unity-Technologies/UnityCsReference/blob/a2bdfe9b3c4cd4476f44bf52f848063bfaf7b6b9/Runtime/Export/Math/Vector3.cs#L97
120
- function smoothDampVec3(current, target, currentVelocityRef, smoothTime) {
121
- var maxSpeed = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Infinity;
122
- var deltaTime = arguments.length > 5 ? arguments[5] : undefined;
123
- var out = arguments.length > 6 ? arguments[6] : undefined;
124
- // Based on Game Programming Gems 4 Chapter 1.10
125
- smoothTime = Math.max(0.0001, smoothTime);
126
- var omega = 2 / smoothTime;
127
- var x = omega * deltaTime;
128
- var exp = 1 / (1 + x + 0.48 * x * x + 0.235 * x * x * x);
129
- var targetX = target.x;
130
- var targetY = target.y;
131
- var targetZ = target.z;
132
- var changeX = current.x - targetX;
133
- var changeY = current.y - targetY;
134
- var changeZ = current.z - targetZ;
135
- var originalToX = targetX;
136
- var originalToY = targetY;
137
- var originalToZ = targetZ;
138
- // Clamp maximum speed
139
- var maxChange = maxSpeed * smoothTime;
140
- var maxChangeSq = maxChange * maxChange;
141
- var magnitudeSq = changeX * changeX + changeY * changeY + changeZ * changeZ;
142
- if (magnitudeSq > maxChangeSq) {
143
- var magnitude = Math.sqrt(magnitudeSq);
144
- changeX = changeX / magnitude * maxChange;
145
- changeY = changeY / magnitude * maxChange;
146
- changeZ = changeZ / magnitude * maxChange;
147
- }
148
- targetX = current.x - changeX;
149
- targetY = current.y - changeY;
150
- targetZ = current.z - changeZ;
151
- var tempX = (currentVelocityRef.x + omega * changeX) * deltaTime;
152
- var tempY = (currentVelocityRef.y + omega * changeY) * deltaTime;
153
- var tempZ = (currentVelocityRef.z + omega * changeZ) * deltaTime;
154
- currentVelocityRef.x = (currentVelocityRef.x - omega * tempX) * exp;
155
- currentVelocityRef.y = (currentVelocityRef.y - omega * tempY) * exp;
156
- currentVelocityRef.z = (currentVelocityRef.z - omega * tempZ) * exp;
157
- out.x = targetX + (changeX + tempX) * exp;
158
- out.y = targetY + (changeY + tempY) * exp;
159
- out.z = targetZ + (changeZ + tempZ) * exp;
160
- // Prevent overshooting
161
- var origMinusCurrentX = originalToX - current.x;
162
- var origMinusCurrentY = originalToY - current.y;
163
- var origMinusCurrentZ = originalToZ - current.z;
164
- var outMinusOrigX = out.x - originalToX;
165
- var outMinusOrigY = out.y - originalToY;
166
- var outMinusOrigZ = out.z - originalToZ;
167
- if (origMinusCurrentX * outMinusOrigX + origMinusCurrentY * outMinusOrigY + origMinusCurrentZ * outMinusOrigZ > 0) {
168
- out.x = originalToX;
169
- out.y = originalToY;
170
- out.z = originalToZ;
171
- currentVelocityRef.x = (out.x - originalToX) / deltaTime;
172
- currentVelocityRef.y = (out.y - originalToY) / deltaTime;
173
- currentVelocityRef.z = (out.z - originalToZ) / deltaTime;
174
- }
175
- return out;
176
- }
177
- function extractClientCoordFromEvent(pointers, out) {
178
- out.set(0, 0);
179
- pointers.forEach(function (pointer) {
180
- out.x += pointer.clientX;
181
- out.y += pointer.clientY;
182
- });
183
- out.x /= pointers.length;
184
- out.y /= pointers.length;
185
- }
186
- function notSupportedInOrthographicCamera(camera, message) {
187
- if (isOrthographicCamera(camera)) {
188
- console.warn("".concat(message, " is not supported in OrthographicCamera"));
189
- return true;
190
- }
191
- return false;
192
- }
193
- var EventDispatcher = exports.EventDispatcher = /*#__PURE__*/function () {
194
- function EventDispatcher() {
195
- _classCallCheck(this, EventDispatcher);
196
- this._listeners = {};
197
- }
198
- /**
199
- * Adds the specified event listener.
200
- * @param type event name
201
- * @param listener handler function
202
- * @category Methods
203
- */
204
- return _createClass(EventDispatcher, [{
205
- key: "addEventListener",
206
- value: function addEventListener(type, listener) {
207
- var listeners = this._listeners;
208
- if (listeners[type] === undefined) listeners[type] = [];
209
- if (listeners[type].indexOf(listener) === -1) listeners[type].push(listener);
210
- }
211
- /**
212
- * Presence of the specified event listener.
213
- * @param type event name
214
- * @param listener handler function
215
- * @category Methods
216
- */
217
- }, {
218
- key: "hasEventListener",
219
- value: function hasEventListener(type, listener) {
220
- var listeners = this._listeners;
221
- return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;
222
- }
223
- /**
224
- * Removes the specified event listener
225
- * @param type event name
226
- * @param listener handler function
227
- * @category Methods
228
- */
229
- }, {
230
- key: "removeEventListener",
231
- value: function removeEventListener(type, listener) {
232
- var listeners = this._listeners;
233
- var listenerArray = listeners[type];
234
- if (listenerArray !== undefined) {
235
- var index = listenerArray.indexOf(listener);
236
- if (index !== -1) listenerArray.splice(index, 1);
237
- }
238
- }
239
- /**
240
- * Removes all event listeners
241
- * @param type event name
242
- * @category Methods
243
- */
244
- }, {
245
- key: "removeAllEventListeners",
246
- value: function removeAllEventListeners(type) {
247
- if (!type) {
248
- this._listeners = {};
249
- return;
250
- }
251
- if (Array.isArray(this._listeners[type])) this._listeners[type].length = 0;
252
- }
253
- /**
254
- * Fire an event type.
255
- * @param event DispatcherEvent
256
- * @category Methods
257
- */
258
- }, {
259
- key: "dispatchEvent",
260
- value: function dispatchEvent(event) {
261
- var listeners = this._listeners;
262
- var listenerArray = listeners[event.type];
263
- if (listenerArray !== undefined) {
264
- event.target = this;
265
- var array = listenerArray.slice(0);
266
- for (var i = 0, l = array.length; i < l; i++) {
267
- array[i].call(this, event);
268
- }
269
- }
270
- }
271
- }]);
272
- }();
273
- var _a;
274
- var VERSION = '2.8.4'; // will be replaced with `version` in package.json during the build process.
275
- var TOUCH_DOLLY_FACTOR = 1 / 8;
276
- var isMac = /Mac/.test((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.platform);
277
- var THREE;
278
- var _ORIGIN;
279
- var _AXIS_Y;
280
- var _AXIS_Z;
281
- var _v2;
282
- var _v3A;
283
- var _v3B;
284
- var _v3C;
285
- var _cameraDirection;
286
- var _xColumn;
287
- var _yColumn;
288
- var _zColumn;
289
- var _deltaTarget;
290
- var _deltaOffset;
291
- var _sphericalA;
292
- var _sphericalB;
293
- var _box3A;
294
- var _box3B;
295
- var _sphere;
296
- var _quaternionA;
297
- var _quaternionB;
298
- var _rotationMatrix;
299
- var _raycaster;
300
- var CameraControls = exports["default"] = /*#__PURE__*/function (_EventDispatcher) {
301
- /**
302
- * Creates a `CameraControls` instance.
303
- *
304
- * Note:
305
- * You **must install** three.js before using camera-controls. see [#install](#install)
306
- * Not doing so will lead to runtime errors (`undefined` references to THREE).
307
- *
308
- * e.g.
309
- * ```
310
- * CameraControls.install( { THREE } );
311
- * const cameraControls = new CameraControls( camera, domElement );
312
- * ```
313
- *
314
- * @param camera A `THREE.PerspectiveCamera` or `THREE.OrthographicCamera` to be controlled.
315
- * @param domElement A `HTMLElement` for the draggable area, usually `renderer.domElement`.
316
- * @category Constructor
317
- */
318
- function CameraControls(camera, domElement) {
319
- var _this;
320
- _classCallCheck(this, CameraControls);
321
- _this = _callSuper(this, CameraControls);
322
- /**
323
- * Minimum vertical angle in radians.
324
- * The angle has to be between `0` and `.maxPolarAngle` inclusive.
325
- * The default value is `0`.
326
- *
327
- * e.g.
328
- * ```
329
- * cameraControls.maxPolarAngle = 0;
330
- * ```
331
- * @category Properties
332
- */
333
- _this.minPolarAngle = 0; // radians
334
- /**
335
- * Maximum vertical angle in radians.
336
- * The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
337
- * The default value is `Math.PI`.
338
- *
339
- * e.g.
340
- * ```
341
- * cameraControls.maxPolarAngle = Math.PI;
342
- * ```
343
- * @category Properties
344
- */
345
- _this.maxPolarAngle = Math.PI; // radians
346
- /**
347
- * Minimum horizontal angle in radians.
348
- * The angle has to be less than `.maxAzimuthAngle`.
349
- * The default value is `- Infinity`.
350
- *
351
- * e.g.
352
- * ```
353
- * cameraControls.minAzimuthAngle = - Infinity;
354
- * ```
355
- * @category Properties
356
- */
357
- _this.minAzimuthAngle = -Infinity; // radians
358
- /**
359
- * Maximum horizontal angle in radians.
360
- * The angle has to be greater than `.minAzimuthAngle`.
361
- * The default value is `Infinity`.
362
- *
363
- * e.g.
364
- * ```
365
- * cameraControls.maxAzimuthAngle = Infinity;
366
- * ```
367
- * @category Properties
368
- */
369
- _this.maxAzimuthAngle = Infinity; // radians
370
- // How far you can dolly in and out ( PerspectiveCamera only )
371
- /**
372
- * Minimum distance for dolly. The value must be higher than `0`. Default is `Number.EPSILON`.
373
- * PerspectiveCamera only.
374
- * @category Properties
375
- */
376
- _this.minDistance = Number.EPSILON;
377
- /**
378
- * Maximum distance for dolly. The value must be higher than `minDistance`. Default is `Infinity`.
379
- * PerspectiveCamera only.
380
- * @category Properties
381
- */
382
- _this.maxDistance = Infinity;
383
- /**
384
- * `true` to enable Infinity Dolly for wheel and pinch. Use this with `minDistance` and `maxDistance`
385
- * If the Dolly distance is less (or over) than the `minDistance` (or `maxDistance`), `infinityDolly` will keep the distance and pushes the target position instead.
386
- * @category Properties
387
- */
388
- _this.infinityDolly = false;
389
- /**
390
- * Minimum camera zoom.
391
- * @category Properties
392
- */
393
- _this.minZoom = 0.01;
394
- /**
395
- * Maximum camera zoom.
396
- * @category Properties
397
- */
398
- _this.maxZoom = Infinity;
399
- /**
400
- * Approximate time in seconds to reach the target. A smaller value will reach the target faster.
401
- * @category Properties
402
- */
403
- _this.smoothTime = 0.25;
404
- /**
405
- * the smoothTime while dragging
406
- * @category Properties
407
- */
408
- _this.draggingSmoothTime = 0.125;
409
- /**
410
- * Max transition speed in unit-per-seconds
411
- * @category Properties
412
- */
413
- _this.maxSpeed = Infinity;
414
- /**
415
- * Speed of azimuth (horizontal) rotation.
416
- * @category Properties
417
- */
418
- _this.azimuthRotateSpeed = 1.0;
419
- /**
420
- * Speed of polar (vertical) rotation.
421
- * @category Properties
422
- */
423
- _this.polarRotateSpeed = 1.0;
424
- /**
425
- * Speed of mouse-wheel dollying.
426
- * @category Properties
427
- */
428
- _this.dollySpeed = 1.0;
429
- /**
430
- * `true` to invert direction when dollying or zooming via drag
431
- * @category Properties
432
- */
433
- _this.dollyDragInverted = false;
434
- /**
435
- * Speed of drag for truck and pedestal.
436
- * @category Properties
437
- */
438
- _this.truckSpeed = 2.0;
439
- /**
440
- * `true` to enable Dolly-in to the mouse cursor coords.
441
- * @category Properties
442
- */
443
- _this.dollyToCursor = false;
444
- /**
445
- * @category Properties
446
- */
447
- _this.dragToOffset = false;
448
- /**
449
- * The same as `.screenSpacePanning` in three.js's OrbitControls.
450
- * @category Properties
451
- */
452
- _this.verticalDragToForward = false;
453
- /**
454
- * Friction ratio of the boundary.
455
- * @category Properties
456
- */
457
- _this.boundaryFriction = 0.0;
458
- /**
459
- * Controls how soon the `rest` event fires as the camera slows.
460
- * @category Properties
461
- */
462
- _this.restThreshold = 0.01;
463
- /**
464
- * An array of Meshes to collide with camera.
465
- * Be aware colliderMeshes may decrease performance. The collision test uses 4 raycasters from the camera since the near plane has 4 corners.
466
- * @category Properties
467
- */
468
- _this.colliderMeshes = [];
469
- /**
470
- * Force cancel user dragging.
471
- * @category Methods
472
- */
473
- // cancel will be overwritten in the constructor.
474
- _this.cancel = function () {};
475
- _this._enabled = true;
476
- _this._state = ACTION.NONE;
477
- _this._viewport = null;
478
- _this._changedDolly = 0;
479
- _this._changedZoom = 0;
480
- _this._hasRested = true;
481
- _this._boundaryEnclosesCamera = false;
482
- _this._needsUpdate = true;
483
- _this._updatedLastTime = false;
484
- _this._elementRect = new DOMRect();
485
- _this._isDragging = false;
486
- _this._dragNeedsUpdate = true;
487
- _this._activePointers = [];
488
- _this._lockedPointer = null;
489
- _this._interactiveArea = new DOMRect(0, 0, 1, 1);
490
- // Use draggingSmoothTime over smoothTime while true.
491
- // set automatically true on user-dragging start.
492
- // set automatically false on programmable methods call.
493
- _this._isUserControllingRotate = false;
494
- _this._isUserControllingDolly = false;
495
- _this._isUserControllingTruck = false;
496
- _this._isUserControllingOffset = false;
497
- _this._isUserControllingZoom = false;
498
- _this._lastDollyDirection = DOLLY_DIRECTION.NONE;
499
- // velocities for smoothDamp
500
- _this._thetaVelocity = {
501
- value: 0
502
- };
503
- _this._phiVelocity = {
504
- value: 0
505
- };
506
- _this._radiusVelocity = {
507
- value: 0
508
- };
509
- _this._targetVelocity = new THREE.Vector3();
510
- _this._focalOffsetVelocity = new THREE.Vector3();
511
- _this._zoomVelocity = {
512
- value: 0
513
- };
514
- _this._truckInternal = function (deltaX, deltaY, dragToOffset) {
515
- var truckX;
516
- var pedestalY;
517
- if (isPerspectiveCamera(_this._camera)) {
518
- var offset = _v3A.copy(_this._camera.position).sub(_this._target);
519
- // half of the fov is center to top of screen
520
- var fov = _this._camera.getEffectiveFOV() * DEG2RAD;
521
- var targetDistance = offset.length() * Math.tan(fov * 0.5);
522
- truckX = _this.truckSpeed * deltaX * targetDistance / _this._elementRect.height;
523
- pedestalY = _this.truckSpeed * deltaY * targetDistance / _this._elementRect.height;
524
- } else if (isOrthographicCamera(_this._camera)) {
525
- var _camera = _this._camera;
526
- truckX = deltaX * (_camera.right - _camera.left) / _camera.zoom / _this._elementRect.width;
527
- pedestalY = deltaY * (_camera.top - _camera.bottom) / _camera.zoom / _this._elementRect.height;
528
- } else {
529
- return;
530
- }
531
- if (_this.verticalDragToForward) {
532
- dragToOffset ? _this.setFocalOffset(_this._focalOffsetEnd.x + truckX, _this._focalOffsetEnd.y, _this._focalOffsetEnd.z, true) : _this.truck(truckX, 0, true);
533
- _this.forward(-pedestalY, true);
534
- } else {
535
- dragToOffset ? _this.setFocalOffset(_this._focalOffsetEnd.x + truckX, _this._focalOffsetEnd.y + pedestalY, _this._focalOffsetEnd.z, true) : _this.truck(truckX, pedestalY, true);
536
- }
537
- };
538
- _this._rotateInternal = function (deltaX, deltaY) {
539
- var theta = PI_2 * _this.azimuthRotateSpeed * deltaX / _this._elementRect.height; // divide by *height* to refer the resolution
540
- var phi = PI_2 * _this.polarRotateSpeed * deltaY / _this._elementRect.height;
541
- _this.rotate(theta, phi, true);
542
- };
543
- _this._dollyInternal = function (delta, x, y) {
544
- var dollyScale = Math.pow(0.95, -delta * _this.dollySpeed);
545
- var lastDistance = _this._sphericalEnd.radius;
546
- var distance = _this._sphericalEnd.radius * dollyScale;
547
- var clampedDistance = clamp(distance, _this.minDistance, _this.maxDistance);
548
- var overflowedDistance = clampedDistance - distance;
549
- if (_this.infinityDolly && _this.dollyToCursor) {
550
- _this._dollyToNoClamp(distance, true);
551
- } else if (_this.infinityDolly && !_this.dollyToCursor) {
552
- _this.dollyInFixed(overflowedDistance, true);
553
- _this._dollyToNoClamp(clampedDistance, true);
554
- } else {
555
- _this._dollyToNoClamp(clampedDistance, true);
556
- }
557
- if (_this.dollyToCursor) {
558
- _this._changedDolly += (_this.infinityDolly ? distance : clampedDistance) - lastDistance;
559
- _this._dollyControlCoord.set(x, y);
560
- }
561
- _this._lastDollyDirection = Math.sign(-delta);
562
- };
563
- _this._zoomInternal = function (delta, x, y) {
564
- var zoomScale = Math.pow(0.95, delta * _this.dollySpeed);
565
- var lastZoom = _this._zoom;
566
- var zoom = _this._zoom * zoomScale;
567
- // for both PerspectiveCamera and OrthographicCamera
568
- _this.zoomTo(zoom, true);
569
- if (_this.dollyToCursor) {
570
- _this._changedZoom += zoom - lastZoom;
571
- _this._dollyControlCoord.set(x, y);
572
- }
573
- };
574
- // Check if the user has installed THREE
575
- if (typeof THREE === 'undefined') {
576
- console.error('camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information.');
577
- }
578
- _this._camera = camera;
579
- _this._yAxisUpSpace = new THREE.Quaternion().setFromUnitVectors(_this._camera.up, _AXIS_Y);
580
- // this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert();
581
- _this._yAxisUpSpaceInverse = _this._yAxisUpSpace.clone();
582
- _this._state = ACTION.NONE;
583
- // the location
584
- _this._target = new THREE.Vector3();
585
- _this._targetEnd = _this._target.clone();
586
- _this._focalOffset = new THREE.Vector3();
587
- _this._focalOffsetEnd = _this._focalOffset.clone();
588
- // rotation
589
- _this._spherical = new THREE.Spherical().setFromVector3(_v3A.copy(_this._camera.position).applyQuaternion(_this._yAxisUpSpace));
590
- _this._sphericalEnd = _this._spherical.clone();
591
- _this._lastDistance = _this._spherical.radius;
592
- _this._zoom = _this._camera.zoom;
593
- _this._zoomEnd = _this._zoom;
594
- _this._lastZoom = _this._zoom;
595
- // collisionTest uses nearPlane.s
596
- _this._nearPlaneCorners = [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()];
597
- _this._updateNearPlaneCorners();
598
- // Target cannot move outside of this box
599
- _this._boundary = new THREE.Box3(new THREE.Vector3(-Infinity, -Infinity, -Infinity), new THREE.Vector3(Infinity, Infinity, Infinity));
600
- // reset
601
- _this._cameraUp0 = _this._camera.up.clone();
602
- _this._target0 = _this._target.clone();
603
- _this._position0 = _this._camera.position.clone();
604
- _this._zoom0 = _this._zoom;
605
- _this._focalOffset0 = _this._focalOffset.clone();
606
- _this._dollyControlCoord = new THREE.Vector2();
607
- // configs
608
- _this.mouseButtons = {
609
- left: ACTION.ROTATE,
610
- middle: ACTION.DOLLY,
611
- right: ACTION.TRUCK,
612
- wheel: isPerspectiveCamera(_this._camera) ? ACTION.DOLLY : isOrthographicCamera(_this._camera) ? ACTION.ZOOM : ACTION.NONE
613
- };
614
- _this.touches = {
615
- one: ACTION.TOUCH_ROTATE,
616
- two: isPerspectiveCamera(_this._camera) ? ACTION.TOUCH_DOLLY_TRUCK : isOrthographicCamera(_this._camera) ? ACTION.TOUCH_ZOOM_TRUCK : ACTION.NONE,
617
- three: ACTION.TOUCH_TRUCK
618
- };
619
- var dragStartPosition = new THREE.Vector2();
620
- var lastDragPosition = new THREE.Vector2();
621
- var dollyStart = new THREE.Vector2();
622
- var onPointerDown = function onPointerDown(event) {
623
- if (!_this._enabled || !_this._domElement) return;
624
- if (_this._interactiveArea.left !== 0 || _this._interactiveArea.top !== 0 || _this._interactiveArea.width !== 1 || _this._interactiveArea.height !== 1) {
625
- var elRect = _this._domElement.getBoundingClientRect();
626
- var left = event.clientX / elRect.width;
627
- var top = event.clientY / elRect.height;
628
- // check if the interactiveArea contains the drag start position.
629
- if (left < _this._interactiveArea.left || left > _this._interactiveArea.right || top < _this._interactiveArea.top || top > _this._interactiveArea.bottom) return;
630
- }
631
- // Don't call `event.preventDefault()` on the pointerdown event
632
- // to keep receiving pointermove evens outside dragging iframe
633
- // https://taye.me/blog/tips/2015/11/16/mouse-drag-outside-iframe/
634
- var mouseButton = event.pointerType !== 'mouse' ? null : (event.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT ? MOUSE_BUTTON.LEFT : (event.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE ? MOUSE_BUTTON.MIDDLE : (event.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT ? MOUSE_BUTTON.RIGHT : null;
635
- if (mouseButton !== null) {
636
- var zombiePointer = _this._findPointerByMouseButton(mouseButton);
637
- zombiePointer && _this._disposePointer(zombiePointer);
638
- }
639
- if ((event.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT && _this._lockedPointer) return;
640
- var pointer = {
641
- pointerId: event.pointerId,
642
- clientX: event.clientX,
643
- clientY: event.clientY,
644
- deltaX: 0,
645
- deltaY: 0,
646
- mouseButton: mouseButton
647
- };
648
- _this._activePointers.push(pointer);
649
- // eslint-disable-next-line no-undef
650
- _this._domElement.ownerDocument.removeEventListener('pointermove', onPointerMove, {
651
- passive: false
652
- });
653
- _this._domElement.ownerDocument.removeEventListener('pointerup', onPointerUp);
654
- _this._domElement.ownerDocument.addEventListener('pointermove', onPointerMove, {
655
- passive: false
656
- });
657
- _this._domElement.ownerDocument.addEventListener('pointerup', onPointerUp);
658
- _this._isDragging = true;
659
- startDragging(event);
660
- };
661
- var onPointerMove = function onPointerMove(event) {
662
- if (event.cancelable) event.preventDefault();
663
- var pointerId = event.pointerId;
664
- var pointer = _this._lockedPointer || _this._findPointerById(pointerId);
665
- if (!pointer) return;
666
- pointer.clientX = event.clientX;
667
- pointer.clientY = event.clientY;
668
- pointer.deltaX = event.movementX;
669
- pointer.deltaY = event.movementY;
670
- _this._state = 0;
671
- if (event.pointerType === 'touch') {
672
- switch (_this._activePointers.length) {
673
- case 1:
674
- _this._state = _this.touches.one;
675
- break;
676
- case 2:
677
- _this._state = _this.touches.two;
678
- break;
679
- case 3:
680
- _this._state = _this.touches.three;
681
- break;
682
- }
683
- } else {
684
- if (!_this._isDragging && _this._lockedPointer || _this._isDragging && (event.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT) {
685
- _this._state = _this._state | _this.mouseButtons.left;
686
- }
687
- if (_this._isDragging && (event.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE) {
688
- _this._state = _this._state | _this.mouseButtons.middle;
689
- }
690
- if (_this._isDragging && (event.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT) {
691
- _this._state = _this._state | _this.mouseButtons.right;
692
- }
693
- }
694
- dragging();
695
- };
696
- var onPointerUp = function onPointerUp(event) {
697
- var pointer = _this._findPointerById(event.pointerId);
698
- if (pointer && pointer === _this._lockedPointer) return;
699
- pointer && _this._disposePointer(pointer);
700
- if (event.pointerType === 'touch') {
701
- switch (_this._activePointers.length) {
702
- case 0:
703
- _this._state = ACTION.NONE;
704
- break;
705
- case 1:
706
- _this._state = _this.touches.one;
707
- break;
708
- case 2:
709
- _this._state = _this.touches.two;
710
- break;
711
- case 3:
712
- _this._state = _this.touches.three;
713
- break;
714
- }
715
- } else {
716
- _this._state = ACTION.NONE;
717
- }
718
- endDragging();
719
- };
720
- var lastScrollTimeStamp = -1;
721
- var onMouseWheel = function onMouseWheel(event) {
722
- if (!_this._domElement) return;
723
- if (!_this._enabled || _this.mouseButtons.wheel === ACTION.NONE) return;
724
- if (_this._interactiveArea.left !== 0 || _this._interactiveArea.top !== 0 || _this._interactiveArea.width !== 1 || _this._interactiveArea.height !== 1) {
725
- var elRect = _this._domElement.getBoundingClientRect();
726
- var left = event.clientX / elRect.width;
727
- var top = event.clientY / elRect.height;
728
- // check if the interactiveArea contains the drag start position.
729
- if (left < _this._interactiveArea.left || left > _this._interactiveArea.right || top < _this._interactiveArea.top || top > _this._interactiveArea.bottom) return;
730
- }
731
- event.preventDefault();
732
- if (_this.dollyToCursor || _this.mouseButtons.wheel === ACTION.ROTATE || _this.mouseButtons.wheel === ACTION.TRUCK) {
733
- var now = performance.now();
734
- // only need to fire this at scroll start.
735
- if (lastScrollTimeStamp - now < 1000) _this._getClientRect(_this._elementRect);
736
- lastScrollTimeStamp = now;
737
- }
738
- // Ref: https://github.com/cedricpinson/osgjs/blob/00e5a7e9d9206c06fdde0436e1d62ab7cb5ce853/sources/osgViewer/input/source/InputSourceMouse.js#L89-L103
739
- var deltaYFactor = isMac ? -1 : -3;
740
- var delta = event.deltaMode === 1 ? event.deltaY / deltaYFactor : event.deltaY / (deltaYFactor * 10);
741
- var x = _this.dollyToCursor ? (event.clientX - _this._elementRect.x) / _this._elementRect.width * 2 - 1 : 0;
742
- var y = _this.dollyToCursor ? (event.clientY - _this._elementRect.y) / _this._elementRect.height * -2 + 1 : 0;
743
- switch (_this.mouseButtons.wheel) {
744
- case ACTION.ROTATE:
745
- {
746
- _this._rotateInternal(event.deltaX, event.deltaY);
747
- _this._isUserControllingRotate = true;
748
- break;
749
- }
750
- case ACTION.TRUCK:
751
- {
752
- _this._truckInternal(event.deltaX, event.deltaY, false);
753
- _this._isUserControllingTruck = true;
754
- break;
755
- }
756
- case ACTION.OFFSET:
757
- {
758
- _this._truckInternal(event.deltaX, event.deltaY, true);
759
- _this._isUserControllingOffset = true;
760
- break;
761
- }
762
- case ACTION.DOLLY:
763
- {
764
- _this._dollyInternal(-delta, x, y);
765
- _this._isUserControllingDolly = true;
766
- break;
767
- }
768
- case ACTION.ZOOM:
769
- {
770
- _this._zoomInternal(-delta, x, y);
771
- _this._isUserControllingZoom = true;
772
- break;
773
- }
774
- }
775
- _this.dispatchEvent({
776
- type: 'control'
777
- });
778
- };
779
- var onContextMenu = function onContextMenu(event) {
780
- if (!_this._domElement || !_this._enabled) return;
781
- // contextmenu event is fired right after pointerdown
782
- // remove attached handlers and active pointer, if interrupted by contextmenu.
783
- if (_this.mouseButtons.right === CameraControls.ACTION.NONE) {
784
- var pointerId = event instanceof PointerEvent ? event.pointerId : 0;
785
- var pointer = _this._findPointerById(pointerId);
786
- pointer && _this._disposePointer(pointer);
787
- // eslint-disable-next-line no-undef
788
- _this._domElement.ownerDocument.removeEventListener('pointermove', onPointerMove, {
789
- passive: false
790
- });
791
- _this._domElement.ownerDocument.removeEventListener('pointerup', onPointerUp);
792
- return;
793
- }
794
- event.preventDefault();
795
- };
796
- var startDragging = function startDragging(event) {
797
- if (!_this._enabled) return;
798
- extractClientCoordFromEvent(_this._activePointers, _v2);
799
- _this._getClientRect(_this._elementRect);
800
- dragStartPosition.copy(_v2);
801
- lastDragPosition.copy(_v2);
802
- var isMultiTouch = _this._activePointers.length >= 2;
803
- if (isMultiTouch) {
804
- // 2 finger pinch
805
- var dx = _v2.x - _this._activePointers[1].clientX;
806
- var dy = _v2.y - _this._activePointers[1].clientY;
807
- var distance = Math.sqrt(dx * dx + dy * dy);
808
- dollyStart.set(0, distance);
809
- // center coords of 2 finger truck
810
- var x = (_this._activePointers[0].clientX + _this._activePointers[1].clientX) * 0.5;
811
- var y = (_this._activePointers[0].clientY + _this._activePointers[1].clientY) * 0.5;
812
- lastDragPosition.set(x, y);
813
- }
814
- _this._state = 0;
815
- if (!event) {
816
- if (_this._lockedPointer) _this._state = _this._state | _this.mouseButtons.left;
817
- } else if ('pointerType' in event && event.pointerType === 'touch') {
818
- switch (_this._activePointers.length) {
819
- case 1:
820
- _this._state = _this.touches.one;
821
- break;
822
- case 2:
823
- _this._state = _this.touches.two;
824
- break;
825
- case 3:
826
- _this._state = _this.touches.three;
827
- break;
828
- }
829
- } else {
830
- if (!_this._lockedPointer && (event.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT) {
831
- _this._state = _this._state | _this.mouseButtons.left;
832
- }
833
- if ((event.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE) {
834
- _this._state = _this._state | _this.mouseButtons.middle;
835
- }
836
- if ((event.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT) {
837
- _this._state = _this._state | _this.mouseButtons.right;
838
- }
839
- }
840
- // stop current movement on drag start
841
- if ((_this._state & ACTION.ROTATE) === ACTION.ROTATE || (_this._state & ACTION.TOUCH_ROTATE) === ACTION.TOUCH_ROTATE || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
842
- _this._sphericalEnd.theta = _this._spherical.theta;
843
- _this._sphericalEnd.phi = _this._spherical.phi;
844
- _this._thetaVelocity.value = 0;
845
- _this._phiVelocity.value = 0;
846
- }
847
- if ((_this._state & ACTION.TRUCK) === ACTION.TRUCK || (_this._state & ACTION.TOUCH_TRUCK) === ACTION.TOUCH_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK) {
848
- _this._targetEnd.copy(_this._target);
849
- _this._targetVelocity.set(0, 0, 0);
850
- }
851
- if ((_this._state & ACTION.DOLLY) === ACTION.DOLLY || (_this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE) {
852
- _this._sphericalEnd.radius = _this._spherical.radius;
853
- _this._radiusVelocity.value = 0;
854
- }
855
- if ((_this._state & ACTION.ZOOM) === ACTION.ZOOM || (_this._state & ACTION.TOUCH_ZOOM) === ACTION.TOUCH_ZOOM || (_this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK || (_this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
856
- _this._zoomEnd = _this._zoom;
857
- _this._zoomVelocity.value = 0;
858
- }
859
- if ((_this._state & ACTION.OFFSET) === ACTION.OFFSET || (_this._state & ACTION.TOUCH_OFFSET) === ACTION.TOUCH_OFFSET || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || (_this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET) {
860
- _this._focalOffsetEnd.copy(_this._focalOffset);
861
- _this._focalOffsetVelocity.set(0, 0, 0);
862
- }
863
- _this.dispatchEvent({
864
- type: 'controlstart'
865
- });
866
- };
867
- var dragging = function dragging() {
868
- if (!_this._enabled || !_this._dragNeedsUpdate) return;
869
- _this._dragNeedsUpdate = false;
870
- extractClientCoordFromEvent(_this._activePointers, _v2);
871
- // When pointer lock is enabled clientX, clientY, screenX, and screenY remain 0.
872
- // If pointer lock is enabled, use the Delta directory, and assume active-pointer is not multiple.
873
- var isPointerLockActive = _this._domElement && _this._domElement.ownerDocument.pointerLockElement === _this._domElement;
874
- var lockedPointer = isPointerLockActive ? _this._lockedPointer || _this._activePointers[0] : null;
875
- var deltaX = lockedPointer ? -lockedPointer.deltaX : lastDragPosition.x - _v2.x;
876
- var deltaY = lockedPointer ? -lockedPointer.deltaY : lastDragPosition.y - _v2.y;
877
- lastDragPosition.copy(_v2);
878
- if ((_this._state & ACTION.ROTATE) === ACTION.ROTATE || (_this._state & ACTION.TOUCH_ROTATE) === ACTION.TOUCH_ROTATE || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
879
- _this._rotateInternal(deltaX, deltaY);
880
- _this._isUserControllingRotate = true;
881
- }
882
- if ((_this._state & ACTION.DOLLY) === ACTION.DOLLY || (_this._state & ACTION.ZOOM) === ACTION.ZOOM) {
883
- var dollyX = _this.dollyToCursor ? (dragStartPosition.x - _this._elementRect.x) / _this._elementRect.width * 2 - 1 : 0;
884
- var dollyY = _this.dollyToCursor ? (dragStartPosition.y - _this._elementRect.y) / _this._elementRect.height * -2 + 1 : 0;
885
- var dollyDirection = _this.dollyDragInverted ? -1 : 1;
886
- if ((_this._state & ACTION.DOLLY) === ACTION.DOLLY) {
887
- _this._dollyInternal(dollyDirection * deltaY * TOUCH_DOLLY_FACTOR, dollyX, dollyY);
888
- _this._isUserControllingDolly = true;
889
- } else {
890
- _this._zoomInternal(dollyDirection * deltaY * TOUCH_DOLLY_FACTOR, dollyX, dollyY);
891
- _this._isUserControllingZoom = true;
892
- }
893
- }
894
- if ((_this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || (_this._state & ACTION.TOUCH_ZOOM) === ACTION.TOUCH_ZOOM || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || (_this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
895
- var dx = _v2.x - _this._activePointers[1].clientX;
896
- var dy = _v2.y - _this._activePointers[1].clientY;
897
- var distance = Math.sqrt(dx * dx + dy * dy);
898
- var dollyDelta = dollyStart.y - distance;
899
- dollyStart.set(0, distance);
900
- var _dollyX = _this.dollyToCursor ? (lastDragPosition.x - _this._elementRect.x) / _this._elementRect.width * 2 - 1 : 0;
901
- var _dollyY = _this.dollyToCursor ? (lastDragPosition.y - _this._elementRect.y) / _this._elementRect.height * -2 + 1 : 0;
902
- if ((_this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET) {
903
- _this._dollyInternal(dollyDelta * TOUCH_DOLLY_FACTOR, _dollyX, _dollyY);
904
- _this._isUserControllingDolly = true;
905
- } else {
906
- _this._zoomInternal(dollyDelta * TOUCH_DOLLY_FACTOR, _dollyX, _dollyY);
907
- _this._isUserControllingZoom = true;
908
- }
909
- }
910
- if ((_this._state & ACTION.TRUCK) === ACTION.TRUCK || (_this._state & ACTION.TOUCH_TRUCK) === ACTION.TOUCH_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK) {
911
- _this._truckInternal(deltaX, deltaY, false);
912
- _this._isUserControllingTruck = true;
913
- }
914
- if ((_this._state & ACTION.OFFSET) === ACTION.OFFSET || (_this._state & ACTION.TOUCH_OFFSET) === ACTION.TOUCH_OFFSET || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || (_this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET) {
915
- _this._truckInternal(deltaX, deltaY, true);
916
- _this._isUserControllingOffset = true;
917
- }
918
- _this.dispatchEvent({
919
- type: 'control'
920
- });
921
- };
922
- var endDragging = function endDragging() {
923
- extractClientCoordFromEvent(_this._activePointers, _v2);
924
- lastDragPosition.copy(_v2);
925
- _this._dragNeedsUpdate = false;
926
- if (_this._activePointers.length === 0 || _this._activePointers.length === 1 && _this._activePointers[0] === _this._lockedPointer) {
927
- _this._isDragging = false;
928
- }
929
- if (_this._activePointers.length === 0 && _this._domElement) {
930
- // eslint-disable-next-line no-undef
931
- _this._domElement.ownerDocument.removeEventListener('pointermove', onPointerMove, {
932
- passive: false
933
- });
934
- _this._domElement.ownerDocument.removeEventListener('pointerup', onPointerUp);
935
- _this.dispatchEvent({
936
- type: 'controlend'
937
- });
938
- }
939
- };
940
- _this.lockPointer = function () {
941
- if (!_this._enabled || !_this._domElement) return;
942
- _this.cancel();
943
- // Element.requestPointerLock is allowed to happen without any pointer active - create a faux one for compatibility with controls
944
- _this._lockedPointer = {
945
- pointerId: -1,
946
- clientX: 0,
947
- clientY: 0,
948
- deltaX: 0,
949
- deltaY: 0,
950
- mouseButton: null
951
- };
952
- _this._activePointers.push(_this._lockedPointer);
953
- // eslint-disable-next-line no-undef
954
- _this._domElement.ownerDocument.removeEventListener('pointermove', onPointerMove, {
955
- passive: false
956
- });
957
- _this._domElement.ownerDocument.removeEventListener('pointerup', onPointerUp);
958
- _this._domElement.requestPointerLock();
959
- _this._domElement.ownerDocument.addEventListener('pointerlockchange', onPointerLockChange);
960
- _this._domElement.ownerDocument.addEventListener('pointerlockerror', onPointerLockError);
961
- _this._domElement.ownerDocument.addEventListener('pointermove', onPointerMove, {
962
- passive: false
963
- });
964
- _this._domElement.ownerDocument.addEventListener('pointerup', onPointerUp);
965
- startDragging();
966
- };
967
- _this.unlockPointer = function () {
968
- var _a, _b, _c;
969
- if (_this._lockedPointer !== null) {
970
- _this._disposePointer(_this._lockedPointer);
971
- _this._lockedPointer = null;
972
- }
973
- (_a = _this._domElement) === null || _a === void 0 ? void 0 : _a.ownerDocument.exitPointerLock();
974
- (_b = _this._domElement) === null || _b === void 0 ? void 0 : _b.ownerDocument.removeEventListener('pointerlockchange', onPointerLockChange);
975
- (_c = _this._domElement) === null || _c === void 0 ? void 0 : _c.ownerDocument.removeEventListener('pointerlockerror', onPointerLockError);
976
- _this.cancel();
977
- };
978
- var onPointerLockChange = function onPointerLockChange() {
979
- var isPointerLockActive = _this._domElement && _this._domElement.ownerDocument.pointerLockElement === _this._domElement;
980
- if (!isPointerLockActive) _this.unlockPointer();
981
- };
982
- var onPointerLockError = function onPointerLockError() {
983
- _this.unlockPointer();
984
- };
985
- _this._addAllEventListeners = function (domElement) {
986
- _this._domElement = domElement;
987
- _this._domElement.style.touchAction = 'none';
988
- _this._domElement.style.userSelect = 'none';
989
- _this._domElement.style.webkitUserSelect = 'none';
990
- _this._domElement.addEventListener('pointerdown', onPointerDown);
991
- _this._domElement.addEventListener('pointercancel', onPointerUp);
992
- _this._domElement.addEventListener('wheel', onMouseWheel, {
993
- passive: false
994
- });
995
- _this._domElement.addEventListener('contextmenu', onContextMenu);
996
- };
997
- _this._removeAllEventListeners = function () {
998
- if (!_this._domElement) return;
999
- _this._domElement.style.touchAction = '';
1000
- _this._domElement.style.userSelect = '';
1001
- _this._domElement.style.webkitUserSelect = '';
1002
- _this._domElement.removeEventListener('pointerdown', onPointerDown);
1003
- _this._domElement.removeEventListener('pointercancel', onPointerUp);
1004
- // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener#matching_event_listeners_for_removal
1005
- // > it's probably wise to use the same values used for the call to `addEventListener()` when calling `removeEventListener()`
1006
- // see https://github.com/microsoft/TypeScript/issues/32912#issuecomment-522142969
1007
- // eslint-disable-next-line no-undef
1008
- _this._domElement.removeEventListener('wheel', onMouseWheel, {
1009
- passive: false
1010
- });
1011
- _this._domElement.removeEventListener('contextmenu', onContextMenu);
1012
- // eslint-disable-next-line no-undef
1013
- _this._domElement.ownerDocument.removeEventListener('pointermove', onPointerMove, {
1014
- passive: false
1015
- });
1016
- _this._domElement.ownerDocument.removeEventListener('pointerup', onPointerUp);
1017
- _this._domElement.ownerDocument.removeEventListener('pointerlockchange', onPointerLockChange);
1018
- _this._domElement.ownerDocument.removeEventListener('pointerlockerror', onPointerLockError);
1019
- };
1020
- _this.cancel = function () {
1021
- if (_this._state === ACTION.NONE) return;
1022
- _this._state = ACTION.NONE;
1023
- _this._activePointers.length = 0;
1024
- endDragging();
1025
- };
1026
- if (domElement) _this.connect(domElement);
1027
- _this.update(0);
1028
- return _this;
1029
- }
1030
- /**
1031
- * The camera to be controlled
1032
- * @category Properties
1033
- */
1034
- _inherits(CameraControls, _EventDispatcher);
1035
- return _createClass(CameraControls, [{
1036
- key: "camera",
1037
- get: function get() {
1038
- return this._camera;
1039
- },
1040
- set: function set(camera) {
1041
- this._camera = camera;
1042
- this.updateCameraUp();
1043
- this._camera.updateProjectionMatrix();
1044
- this._updateNearPlaneCorners();
1045
- this._needsUpdate = true;
1046
- }
1047
- /**
1048
- * Whether or not the controls are enabled.
1049
- * `false` to disable user dragging/touch-move, but all methods works.
1050
- * @category Properties
1051
- */
1052
- }, {
1053
- key: "enabled",
1054
- get: function get() {
1055
- return this._enabled;
1056
- },
1057
- set: function set(enabled) {
1058
- this._enabled = enabled;
1059
- if (!this._domElement) return;
1060
- if (enabled) {
1061
- this._domElement.style.touchAction = 'none';
1062
- this._domElement.style.userSelect = 'none';
1063
- this._domElement.style.webkitUserSelect = 'none';
1064
- } else {
1065
- this.cancel();
1066
- this._domElement.style.touchAction = '';
1067
- this._domElement.style.userSelect = '';
1068
- this._domElement.style.webkitUserSelect = '';
1069
- }
1070
- }
1071
- /**
1072
- * Returns `true` if the controls are active updating.
1073
- * readonly value.
1074
- * @category Properties
1075
- */
1076
- }, {
1077
- key: "active",
1078
- get: function get() {
1079
- return !this._hasRested;
1080
- }
1081
- /**
1082
- * Getter for the current `ACTION`.
1083
- * readonly value.
1084
- * @category Properties
1085
- */
1086
- }, {
1087
- key: "currentAction",
1088
- get: function get() {
1089
- return this._state;
1090
- }
1091
- /**
1092
- * get/set Current distance.
1093
- * @category Properties
1094
- */
1095
- }, {
1096
- key: "distance",
1097
- get: function get() {
1098
- return this._spherical.radius;
1099
- },
1100
- set: function set(distance) {
1101
- if (this._spherical.radius === distance && this._sphericalEnd.radius === distance) return;
1102
- this._spherical.radius = distance;
1103
- this._sphericalEnd.radius = distance;
1104
- this._needsUpdate = true;
1105
- }
1106
- // horizontal angle
1107
- /**
1108
- * get/set the azimuth angle (horizontal) in radians.
1109
- * Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative.
1110
- * @category Properties
1111
- */
1112
- }, {
1113
- key: "azimuthAngle",
1114
- get: function get() {
1115
- return this._spherical.theta;
1116
- },
1117
- set: function set(azimuthAngle) {
1118
- if (this._spherical.theta === azimuthAngle && this._sphericalEnd.theta === azimuthAngle) return;
1119
- this._spherical.theta = azimuthAngle;
1120
- this._sphericalEnd.theta = azimuthAngle;
1121
- this._needsUpdate = true;
1122
- }
1123
- // vertical angle
1124
- /**
1125
- * get/set the polar angle (vertical) in radians.
1126
- * @category Properties
1127
- */
1128
- }, {
1129
- key: "polarAngle",
1130
- get: function get() {
1131
- return this._spherical.phi;
1132
- },
1133
- set: function set(polarAngle) {
1134
- if (this._spherical.phi === polarAngle && this._sphericalEnd.phi === polarAngle) return;
1135
- this._spherical.phi = polarAngle;
1136
- this._sphericalEnd.phi = polarAngle;
1137
- this._needsUpdate = true;
1138
- }
1139
- /**
1140
- * Whether camera position should be enclosed in the boundary or not.
1141
- * @category Properties
1142
- */
1143
- }, {
1144
- key: "boundaryEnclosesCamera",
1145
- get: function get() {
1146
- return this._boundaryEnclosesCamera;
1147
- },
1148
- set: function set(boundaryEnclosesCamera) {
1149
- this._boundaryEnclosesCamera = boundaryEnclosesCamera;
1150
- this._needsUpdate = true;
1151
- }
1152
- /**
1153
- * Set drag-start, touches and wheel enable area in the domElement.
1154
- * each values are between `0` and `1` inclusive, where `0` is left/top and `1` is right/bottom of the screen.
1155
- * e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area.
1156
- * @category Properties
1157
- */
1158
- }, {
1159
- key: "interactiveArea",
1160
- set: function set(interactiveArea) {
1161
- this._interactiveArea.width = clamp(interactiveArea.width, 0, 1);
1162
- this._interactiveArea.height = clamp(interactiveArea.height, 0, 1);
1163
- this._interactiveArea.x = clamp(interactiveArea.x, 0, 1 - this._interactiveArea.width);
1164
- this._interactiveArea.y = clamp(interactiveArea.y, 0, 1 - this._interactiveArea.height);
1165
- }
1166
- /**
1167
- * Adds the specified event listener.
1168
- * Applicable event types (which is `K`) are:
1169
- * | Event name | Timing |
1170
- * | ------------------- | ------ |
1171
- * | `'controlstart'` | When the user starts to control the camera via mouse / touches. ¹ |
1172
- * | `'control'` | When the user controls the camera (dragging). |
1173
- * | `'controlend'` | When the user ends to control the camera. ¹ |
1174
- * | `'transitionstart'` | When any kind of transition starts, either user control or using a method with `enableTransition = true` |
1175
- * | `'update'` | When the camera position is updated. |
1176
- * | `'wake'` | When the camera starts moving. |
1177
- * | `'rest'` | When the camera movement is below `.restThreshold` ². |
1178
- * | `'sleep'` | When the camera end moving. |
1179
- *
1180
- * 1. `mouseButtons.wheel` (Mouse wheel control) does not emit `'controlstart'` and `'controlend'`. `mouseButtons.wheel` uses scroll-event internally, and scroll-event happens intermittently. That means "start" and "end" cannot be detected.
1181
- * 2. Due to damping, `sleep` will usually fire a few seconds after the camera _appears_ to have stopped moving. If you want to do something (e.g. enable UI, perform another transition) at the point when the camera has stopped, you probably want the `rest` event. This can be fine tuned using the `.restThreshold` parameter. See the [Rest and Sleep Example](https://yomotsu.github.io/camera-controls/examples/rest-and-sleep.html).
1182
- *
1183
- * e.g.
1184
- * ```
1185
- * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1186
- * ```
1187
- * @param type event name
1188
- * @param listener handler function
1189
- * @category Methods
1190
- */
1191
- }, {
1192
- key: "addEventListener",
1193
- value: function addEventListener(type, listener) {
1194
- _superPropGet(CameraControls, "addEventListener", this, 3)([type, listener]);
1195
- }
1196
- /**
1197
- * Removes the specified event listener
1198
- * e.g.
1199
- * ```
1200
- * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1201
- * ```
1202
- * @param type event name
1203
- * @param listener handler function
1204
- * @category Methods
1205
- */
1206
- }, {
1207
- key: "removeEventListener",
1208
- value: function removeEventListener(type, listener) {
1209
- _superPropGet(CameraControls, "removeEventListener", this, 3)([type, listener]);
1210
- }
1211
- /**
1212
- * Rotate azimuthal angle(horizontal) and polar angle(vertical).
1213
- * Every value is added to the current value.
1214
- * @param azimuthAngle Azimuth rotate angle. In radian.
1215
- * @param polarAngle Polar rotate angle. In radian.
1216
- * @param enableTransition Whether to move smoothly or immediately
1217
- * @category Methods
1218
- */
1219
- }, {
1220
- key: "rotate",
1221
- value: function rotate(azimuthAngle, polarAngle) {
1222
- var enableTransition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1223
- return this.rotateTo(this._sphericalEnd.theta + azimuthAngle, this._sphericalEnd.phi + polarAngle, enableTransition);
1224
- }
1225
- /**
1226
- * Rotate azimuthal angle(horizontal) to the given angle and keep the same polar angle(vertical) target.
1227
- *
1228
- * e.g.
1229
- * ```
1230
- * cameraControls.rotateAzimuthTo( 30 * THREE.MathUtils.DEG2RAD, true );
1231
- * ```
1232
- * @param azimuthAngle Azimuth rotate angle. In radian.
1233
- * @param enableTransition Whether to move smoothly or immediately
1234
- * @category Methods
1235
- */
1236
- }, {
1237
- key: "rotateAzimuthTo",
1238
- value: function rotateAzimuthTo(azimuthAngle) {
1239
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1240
- return this.rotateTo(azimuthAngle, this._sphericalEnd.phi, enableTransition);
1241
- }
1242
- /**
1243
- * Rotate polar angle(vertical) to the given angle and keep the same azimuthal angle(horizontal) target.
1244
- *
1245
- * e.g.
1246
- * ```
1247
- * cameraControls.rotatePolarTo( 30 * THREE.MathUtils.DEG2RAD, true );
1248
- * ```
1249
- * @param polarAngle Polar rotate angle. In radian.
1250
- * @param enableTransition Whether to move smoothly or immediately
1251
- * @category Methods
1252
- */
1253
- }, {
1254
- key: "rotatePolarTo",
1255
- value: function rotatePolarTo(polarAngle) {
1256
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1257
- return this.rotateTo(this._sphericalEnd.theta, polarAngle, enableTransition);
1258
- }
1259
- /**
1260
- * Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle.
1261
- * Camera view will rotate over the orbit pivot absolutely:
1262
- *
1263
- * azimuthAngle
1264
- * ```
1265
- * 0º
1266
- * \
1267
- * 90º -----+----- -90º
1268
- * \
1269
- * 180º
1270
- * ```
1271
- * | direction | angle |
1272
- * | --------- | ---------------------- |
1273
- * | front | 0º |
1274
- * | left | 90º (`Math.PI / 2`) |
1275
- * | right | -90º (`- Math.PI / 2`) |
1276
- * | back | 180º (`Math.PI`) |
1277
- *
1278
- * polarAngle
1279
- * ```
1280
- * 180º
1281
- * |
1282
- * 90º
1283
- * |
1284
- * 0º
1285
- * ```
1286
- * | direction | angle |
1287
- * | -------------------- | ---------------------- |
1288
- * | top/sky | 180º (`Math.PI`) |
1289
- * | horizontal from view | 90º (`Math.PI / 2`) |
1290
- * | bottom/floor | 0º |
1291
- *
1292
- * @param azimuthAngle Azimuth rotate angle to. In radian.
1293
- * @param polarAngle Polar rotate angle to. In radian.
1294
- * @param enableTransition Whether to move smoothly or immediately
1295
- * @category Methods
1296
- */
1297
- }, {
1298
- key: "rotateTo",
1299
- value: function rotateTo(azimuthAngle, polarAngle) {
1300
- var enableTransition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1301
- this._isUserControllingRotate = false;
1302
- var theta = clamp(azimuthAngle, this.minAzimuthAngle, this.maxAzimuthAngle);
1303
- var phi = clamp(polarAngle, this.minPolarAngle, this.maxPolarAngle);
1304
- this._sphericalEnd.theta = theta;
1305
- this._sphericalEnd.phi = phi;
1306
- this._sphericalEnd.makeSafe();
1307
- this._needsUpdate = true;
1308
- if (!enableTransition) {
1309
- this._spherical.theta = this._sphericalEnd.theta;
1310
- this._spherical.phi = this._sphericalEnd.phi;
1311
- }
1312
- var resolveImmediately = !enableTransition || approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
1313
- return this._createOnRestPromise(resolveImmediately);
1314
- }
1315
- /**
1316
- * Dolly in/out camera position.
1317
- * @param distance Distance of dollyIn. Negative number for dollyOut.
1318
- * @param enableTransition Whether to move smoothly or immediately.
1319
- * @category Methods
1320
- */
1321
- }, {
1322
- key: "dolly",
1323
- value: function dolly(distance) {
1324
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1325
- return this.dollyTo(this._sphericalEnd.radius - distance, enableTransition);
1326
- }
1327
- /**
1328
- * Dolly in/out camera position to given distance.
1329
- * @param distance Distance of dolly.
1330
- * @param enableTransition Whether to move smoothly or immediately.
1331
- * @category Methods
1332
- */
1333
- }, {
1334
- key: "dollyTo",
1335
- value: function dollyTo(distance) {
1336
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1337
- this._isUserControllingDolly = false;
1338
- this._lastDollyDirection = DOLLY_DIRECTION.NONE;
1339
- this._changedDolly = 0;
1340
- return this._dollyToNoClamp(clamp(distance, this.minDistance, this.maxDistance), enableTransition);
1341
- }
1342
- }, {
1343
- key: "_dollyToNoClamp",
1344
- value: function _dollyToNoClamp(distance) {
1345
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1346
- var lastRadius = this._sphericalEnd.radius;
1347
- var hasCollider = this.colliderMeshes.length >= 1;
1348
- if (hasCollider) {
1349
- var maxDistanceByCollisionTest = this._collisionTest();
1350
- var isCollided = approxEquals(maxDistanceByCollisionTest, this._spherical.radius);
1351
- var isDollyIn = lastRadius > distance;
1352
- if (!isDollyIn && isCollided) return Promise.resolve();
1353
- this._sphericalEnd.radius = Math.min(distance, maxDistanceByCollisionTest);
1354
- } else {
1355
- this._sphericalEnd.radius = distance;
1356
- }
1357
- this._needsUpdate = true;
1358
- if (!enableTransition) {
1359
- this._spherical.radius = this._sphericalEnd.radius;
1360
- }
1361
- var resolveImmediately = !enableTransition || approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1362
- return this._createOnRestPromise(resolveImmediately);
1363
- }
1364
- /**
1365
- * Dolly in, but does not change the distance between the target and the camera, and moves the target position instead.
1366
- * Specify a negative value for dolly out.
1367
- * @param distance Distance of dolly.
1368
- * @param enableTransition Whether to move smoothly or immediately.
1369
- * @category Methods
1370
- */
1371
- }, {
1372
- key: "dollyInFixed",
1373
- value: function dollyInFixed(distance) {
1374
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1375
- this._targetEnd.add(this._getCameraDirection(_cameraDirection).multiplyScalar(distance));
1376
- if (!enableTransition) {
1377
- this._target.copy(this._targetEnd);
1378
- }
1379
- var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold);
1380
- return this._createOnRestPromise(resolveImmediately);
1381
- }
1382
- /**
1383
- * Zoom in/out camera. The value is added to camera zoom.
1384
- * Limits set with `.minZoom` and `.maxZoom`
1385
- * @param zoomStep zoom scale
1386
- * @param enableTransition Whether to move smoothly or immediately
1387
- * @category Methods
1388
- */
1389
- }, {
1390
- key: "zoom",
1391
- value: function zoom(zoomStep) {
1392
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1393
- return this.zoomTo(this._zoomEnd + zoomStep, enableTransition);
1394
- }
1395
- /**
1396
- * Zoom in/out camera to given scale. The value overwrites camera zoom.
1397
- * Limits set with .minZoom and .maxZoom
1398
- * @param zoom
1399
- * @param enableTransition
1400
- * @category Methods
1401
- */
1402
- }, {
1403
- key: "zoomTo",
1404
- value: function zoomTo(zoom) {
1405
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1406
- this._isUserControllingZoom = false;
1407
- this._zoomEnd = clamp(zoom, this.minZoom, this.maxZoom);
1408
- this._needsUpdate = true;
1409
- if (!enableTransition) {
1410
- this._zoom = this._zoomEnd;
1411
- }
1412
- var resolveImmediately = !enableTransition || approxEquals(this._zoom, this._zoomEnd, this.restThreshold);
1413
- this._changedZoom = 0;
1414
- return this._createOnRestPromise(resolveImmediately);
1415
- }
1416
- /**
1417
- * @deprecated `pan()` has been renamed to `truck()`
1418
- * @category Methods
1419
- */
1420
- }, {
1421
- key: "pan",
1422
- value: function pan(x, y) {
1423
- var enableTransition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1424
- console.warn('`pan` has been renamed to `truck`');
1425
- return this.truck(x, y, enableTransition);
1426
- }
1427
- /**
1428
- * Truck and pedestal camera using current azimuthal angle
1429
- * @param x Horizontal translate amount
1430
- * @param y Vertical translate amount
1431
- * @param enableTransition Whether to move smoothly or immediately
1432
- * @category Methods
1433
- */
1434
- }, {
1435
- key: "truck",
1436
- value: function truck(x, y) {
1437
- var enableTransition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1438
- this._camera.updateMatrix();
1439
- _xColumn.setFromMatrixColumn(this._camera.matrix, 0);
1440
- _yColumn.setFromMatrixColumn(this._camera.matrix, 1);
1441
- _xColumn.multiplyScalar(x);
1442
- _yColumn.multiplyScalar(-y);
1443
- var offset = _v3A.copy(_xColumn).add(_yColumn);
1444
- var to = _v3B.copy(this._targetEnd).add(offset);
1445
- return this.moveTo(to.x, to.y, to.z, enableTransition);
1446
- }
1447
- /**
1448
- * Move forward / backward.
1449
- * @param distance Amount to move forward / backward. Negative value to move backward
1450
- * @param enableTransition Whether to move smoothly or immediately
1451
- * @category Methods
1452
- */
1453
- }, {
1454
- key: "forward",
1455
- value: function forward(distance) {
1456
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1457
- _v3A.setFromMatrixColumn(this._camera.matrix, 0);
1458
- _v3A.crossVectors(this._camera.up, _v3A);
1459
- _v3A.multiplyScalar(distance);
1460
- var to = _v3B.copy(this._targetEnd).add(_v3A);
1461
- return this.moveTo(to.x, to.y, to.z, enableTransition);
1462
- }
1463
- /**
1464
- * Move up / down.
1465
- * @param height Amount to move up / down. Negative value to move down
1466
- * @param enableTransition Whether to move smoothly or immediately
1467
- * @category Methods
1468
- */
1469
- }, {
1470
- key: "elevate",
1471
- value: function elevate(height) {
1472
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1473
- _v3A.copy(this._camera.up).multiplyScalar(height);
1474
- return this.moveTo(this._targetEnd.x + _v3A.x, this._targetEnd.y + _v3A.y, this._targetEnd.z + _v3A.z, enableTransition);
1475
- }
1476
- /**
1477
- * Move target position to given point.
1478
- * @param x x coord to move center position
1479
- * @param y y coord to move center position
1480
- * @param z z coord to move center position
1481
- * @param enableTransition Whether to move smoothly or immediately
1482
- * @category Methods
1483
- */
1484
- }, {
1485
- key: "moveTo",
1486
- value: function moveTo(x, y, z) {
1487
- var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1488
- this._isUserControllingTruck = false;
1489
- var offset = _v3A.set(x, y, z).sub(this._targetEnd);
1490
- this._encloseToBoundary(this._targetEnd, offset, this.boundaryFriction);
1491
- this._needsUpdate = true;
1492
- if (!enableTransition) {
1493
- this._target.copy(this._targetEnd);
1494
- }
1495
- var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold);
1496
- return this._createOnRestPromise(resolveImmediately);
1497
- }
1498
- /**
1499
- * Look in the given point direction.
1500
- * @param x point x.
1501
- * @param y point y.
1502
- * @param z point z.
1503
- * @param enableTransition Whether to move smoothly or immediately.
1504
- * @returns Transition end promise
1505
- * @category Methods
1506
- */
1507
- }, {
1508
- key: "lookInDirectionOf",
1509
- value: function lookInDirectionOf(x, y, z) {
1510
- var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1511
- var point = _v3A.set(x, y, z);
1512
- var direction = point.sub(this._targetEnd).normalize();
1513
- var position = direction.multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);
1514
- return this.setPosition(position.x, position.y, position.z, enableTransition);
1515
- }
1516
- /**
1517
- * Fit the viewport to the box or the bounding box of the object, using the nearest axis. paddings are in unit.
1518
- * set `cover: true` to fill enter screen.
1519
- * e.g.
1520
- * ```
1521
- * cameraControls.fitToBox( myMesh );
1522
- * ```
1523
- * @param box3OrObject Axis aligned bounding box to fit the view.
1524
- * @param enableTransition Whether to move smoothly or immediately.
1525
- * @param options | `<object>` { cover: boolean, paddingTop: number, paddingLeft: number, paddingBottom: number, paddingRight: number }
1526
- * @returns Transition end promise
1527
- * @category Methods
1528
- */
1529
- }, {
1530
- key: "fitToBox",
1531
- value: function fitToBox(box3OrObject, enableTransition) {
1532
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
1533
- _ref$cover = _ref.cover,
1534
- cover = _ref$cover === void 0 ? false : _ref$cover,
1535
- _ref$paddingLeft = _ref.paddingLeft,
1536
- paddingLeft = _ref$paddingLeft === void 0 ? 0 : _ref$paddingLeft,
1537
- _ref$paddingRight = _ref.paddingRight,
1538
- paddingRight = _ref$paddingRight === void 0 ? 0 : _ref$paddingRight,
1539
- _ref$paddingBottom = _ref.paddingBottom,
1540
- paddingBottom = _ref$paddingBottom === void 0 ? 0 : _ref$paddingBottom,
1541
- _ref$paddingTop = _ref.paddingTop,
1542
- paddingTop = _ref$paddingTop === void 0 ? 0 : _ref$paddingTop;
1543
- var promises = [];
1544
- var aabb = box3OrObject.isBox3 ? _box3A.copy(box3OrObject) : _box3A.setFromObject(box3OrObject);
1545
- if (aabb.isEmpty()) {
1546
- console.warn('camera-controls: fitTo() cannot be used with an empty box. Aborting');
1547
- Promise.resolve();
1548
- }
1549
- // round to closest axis ( forward | backward | right | left | top | bottom )
1550
- var theta = roundToStep(this._sphericalEnd.theta, PI_HALF);
1551
- var phi = roundToStep(this._sphericalEnd.phi, PI_HALF);
1552
- promises.push(this.rotateTo(theta, phi, enableTransition));
1553
- var normal = _v3A.setFromSpherical(this._sphericalEnd).normalize();
1554
- var rotation = _quaternionA.setFromUnitVectors(normal, _AXIS_Z);
1555
- var viewFromPolar = approxEquals(Math.abs(normal.y), 1);
1556
- if (viewFromPolar) {
1557
- rotation.multiply(_quaternionB.setFromAxisAngle(_AXIS_Y, theta));
1558
- }
1559
- rotation.multiply(this._yAxisUpSpaceInverse);
1560
- // make oriented bounding box
1561
- var bb = _box3B.makeEmpty();
1562
- // left bottom back corner
1563
- _v3B.copy(aabb.min).applyQuaternion(rotation);
1564
- bb.expandByPoint(_v3B);
1565
- // right bottom back corner
1566
- _v3B.copy(aabb.min).setX(aabb.max.x).applyQuaternion(rotation);
1567
- bb.expandByPoint(_v3B);
1568
- // left top back corner
1569
- _v3B.copy(aabb.min).setY(aabb.max.y).applyQuaternion(rotation);
1570
- bb.expandByPoint(_v3B);
1571
- // right top back corner
1572
- _v3B.copy(aabb.max).setZ(aabb.min.z).applyQuaternion(rotation);
1573
- bb.expandByPoint(_v3B);
1574
- // left bottom front corner
1575
- _v3B.copy(aabb.min).setZ(aabb.max.z).applyQuaternion(rotation);
1576
- bb.expandByPoint(_v3B);
1577
- // right bottom front corner
1578
- _v3B.copy(aabb.max).setY(aabb.min.y).applyQuaternion(rotation);
1579
- bb.expandByPoint(_v3B);
1580
- // left top front corner
1581
- _v3B.copy(aabb.max).setX(aabb.min.x).applyQuaternion(rotation);
1582
- bb.expandByPoint(_v3B);
1583
- // right top front corner
1584
- _v3B.copy(aabb.max).applyQuaternion(rotation);
1585
- bb.expandByPoint(_v3B);
1586
- // add padding
1587
- bb.min.x -= paddingLeft;
1588
- bb.min.y -= paddingBottom;
1589
- bb.max.x += paddingRight;
1590
- bb.max.y += paddingTop;
1591
- rotation.setFromUnitVectors(_AXIS_Z, normal);
1592
- if (viewFromPolar) {
1593
- rotation.premultiply(_quaternionB.invert());
1594
- }
1595
- rotation.premultiply(this._yAxisUpSpace);
1596
- var bbSize = bb.getSize(_v3A);
1597
- var center = bb.getCenter(_v3B).applyQuaternion(rotation);
1598
- if (isPerspectiveCamera(this._camera)) {
1599
- var distance = this.getDistanceToFitBox(bbSize.x, bbSize.y, bbSize.z, cover);
1600
- promises.push(this.moveTo(center.x, center.y, center.z, enableTransition));
1601
- promises.push(this.dollyTo(distance, enableTransition));
1602
- promises.push(this.setFocalOffset(0, 0, 0, enableTransition));
1603
- } else if (isOrthographicCamera(this._camera)) {
1604
- var camera = this._camera;
1605
- var width = camera.right - camera.left;
1606
- var height = camera.top - camera.bottom;
1607
- var zoom = cover ? Math.max(width / bbSize.x, height / bbSize.y) : Math.min(width / bbSize.x, height / bbSize.y);
1608
- promises.push(this.moveTo(center.x, center.y, center.z, enableTransition));
1609
- promises.push(this.zoomTo(zoom, enableTransition));
1610
- promises.push(this.setFocalOffset(0, 0, 0, enableTransition));
1611
- }
1612
- return Promise.all(promises);
1613
- }
1614
- /**
1615
- * Fit the viewport to the sphere or the bounding sphere of the object.
1616
- * @param sphereOrMesh
1617
- * @param enableTransition
1618
- * @category Methods
1619
- */
1620
- }, {
1621
- key: "fitToSphere",
1622
- value: function fitToSphere(sphereOrMesh, enableTransition) {
1623
- var promises = [];
1624
- var isSphere = 'isSphere' in sphereOrMesh;
1625
- var boundingSphere = isSphere ? _sphere.copy(sphereOrMesh) : CameraControls.createBoundingSphere(sphereOrMesh, _sphere);
1626
- promises.push(this.moveTo(boundingSphere.center.x, boundingSphere.center.y, boundingSphere.center.z, enableTransition));
1627
- if (isPerspectiveCamera(this._camera)) {
1628
- var distanceToFit = this.getDistanceToFitSphere(boundingSphere.radius);
1629
- promises.push(this.dollyTo(distanceToFit, enableTransition));
1630
- } else if (isOrthographicCamera(this._camera)) {
1631
- var width = this._camera.right - this._camera.left;
1632
- var height = this._camera.top - this._camera.bottom;
1633
- var diameter = 2 * boundingSphere.radius;
1634
- var zoom = Math.min(width / diameter, height / diameter);
1635
- promises.push(this.zoomTo(zoom, enableTransition));
1636
- }
1637
- promises.push(this.setFocalOffset(0, 0, 0, enableTransition));
1638
- return Promise.all(promises);
1639
- }
1640
- /**
1641
- * Look at the `target` from the `position`.
1642
- * @param positionX
1643
- * @param positionY
1644
- * @param positionZ
1645
- * @param targetX
1646
- * @param targetY
1647
- * @param targetZ
1648
- * @param enableTransition
1649
- * @category Methods
1650
- */
1651
- }, {
1652
- key: "setLookAt",
1653
- value: function setLookAt(positionX, positionY, positionZ, targetX, targetY, targetZ) {
1654
- var enableTransition = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
1655
- this._isUserControllingRotate = false;
1656
- this._isUserControllingDolly = false;
1657
- this._isUserControllingTruck = false;
1658
- this._lastDollyDirection = DOLLY_DIRECTION.NONE;
1659
- this._changedDolly = 0;
1660
- var target = _v3B.set(targetX, targetY, targetZ);
1661
- var position = _v3A.set(positionX, positionY, positionZ);
1662
- this._targetEnd.copy(target);
1663
- this._sphericalEnd.setFromVector3(position.sub(target).applyQuaternion(this._yAxisUpSpace));
1664
- this.normalizeRotations();
1665
- this._needsUpdate = true;
1666
- if (!enableTransition) {
1667
- this._target.copy(this._targetEnd);
1668
- this._spherical.copy(this._sphericalEnd);
1669
- }
1670
- var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1671
- return this._createOnRestPromise(resolveImmediately);
1672
- }
1673
- /**
1674
- * Similar to setLookAt, but it interpolates between two states.
1675
- * @param positionAX
1676
- * @param positionAY
1677
- * @param positionAZ
1678
- * @param targetAX
1679
- * @param targetAY
1680
- * @param targetAZ
1681
- * @param positionBX
1682
- * @param positionBY
1683
- * @param positionBZ
1684
- * @param targetBX
1685
- * @param targetBY
1686
- * @param targetBZ
1687
- * @param t
1688
- * @param enableTransition
1689
- * @category Methods
1690
- */
1691
- }, {
1692
- key: "lerpLookAt",
1693
- value: function lerpLookAt(positionAX, positionAY, positionAZ, targetAX, targetAY, targetAZ, positionBX, positionBY, positionBZ, targetBX, targetBY, targetBZ, t) {
1694
- var enableTransition = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : false;
1695
- this._isUserControllingRotate = false;
1696
- this._isUserControllingDolly = false;
1697
- this._isUserControllingTruck = false;
1698
- this._lastDollyDirection = DOLLY_DIRECTION.NONE;
1699
- this._changedDolly = 0;
1700
- var targetA = _v3A.set(targetAX, targetAY, targetAZ);
1701
- var positionA = _v3B.set(positionAX, positionAY, positionAZ);
1702
- _sphericalA.setFromVector3(positionA.sub(targetA).applyQuaternion(this._yAxisUpSpace));
1703
- var targetB = _v3C.set(targetBX, targetBY, targetBZ);
1704
- var positionB = _v3B.set(positionBX, positionBY, positionBZ);
1705
- _sphericalB.setFromVector3(positionB.sub(targetB).applyQuaternion(this._yAxisUpSpace));
1706
- this._targetEnd.copy(targetA.lerp(targetB, t)); // tricky
1707
- var deltaTheta = _sphericalB.theta - _sphericalA.theta;
1708
- var deltaPhi = _sphericalB.phi - _sphericalA.phi;
1709
- var deltaRadius = _sphericalB.radius - _sphericalA.radius;
1710
- this._sphericalEnd.set(_sphericalA.radius + deltaRadius * t, _sphericalA.phi + deltaPhi * t, _sphericalA.theta + deltaTheta * t);
1711
- this.normalizeRotations();
1712
- this._needsUpdate = true;
1713
- if (!enableTransition) {
1714
- this._target.copy(this._targetEnd);
1715
- this._spherical.copy(this._sphericalEnd);
1716
- }
1717
- var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1718
- return this._createOnRestPromise(resolveImmediately);
1719
- }
1720
- /**
1721
- * Set angle and distance by given position.
1722
- * An alias of `setLookAt()`, without target change. Thus keep gazing at the current target
1723
- * @param positionX
1724
- * @param positionY
1725
- * @param positionZ
1726
- * @param enableTransition
1727
- * @category Methods
1728
- */
1729
- }, {
1730
- key: "setPosition",
1731
- value: function setPosition(positionX, positionY, positionZ) {
1732
- var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1733
- return this.setLookAt(positionX, positionY, positionZ, this._targetEnd.x, this._targetEnd.y, this._targetEnd.z, enableTransition);
1734
- }
1735
- /**
1736
- * Set the target position where gaze at.
1737
- * An alias of `setLookAt()`, without position change. Thus keep the same position.
1738
- * @param targetX
1739
- * @param targetY
1740
- * @param targetZ
1741
- * @param enableTransition
1742
- * @category Methods
1743
- */
1744
- }, {
1745
- key: "setTarget",
1746
- value: function setTarget(targetX, targetY, targetZ) {
1747
- var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1748
- var pos = this.getPosition(_v3A);
1749
- var promise = this.setLookAt(pos.x, pos.y, pos.z, targetX, targetY, targetZ, enableTransition);
1750
- // see https://github.com/yomotsu/camera-controls/issues/335
1751
- this._sphericalEnd.phi = clamp(this._sphericalEnd.phi, this.minPolarAngle, this.maxPolarAngle);
1752
- return promise;
1753
- }
1754
- /**
1755
- * Set focal offset using the screen parallel coordinates. z doesn't affect in Orthographic as with Dolly.
1756
- * @param x
1757
- * @param y
1758
- * @param z
1759
- * @param enableTransition
1760
- * @category Methods
1761
- */
1762
- }, {
1763
- key: "setFocalOffset",
1764
- value: function setFocalOffset(x, y, z) {
1765
- var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1766
- this._isUserControllingOffset = false;
1767
- this._focalOffsetEnd.set(x, y, z);
1768
- this._needsUpdate = true;
1769
- if (!enableTransition) this._focalOffset.copy(this._focalOffsetEnd);
1770
- var resolveImmediately = !enableTransition || approxEquals(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && approxEquals(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && approxEquals(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
1771
- return this._createOnRestPromise(resolveImmediately);
1772
- }
1773
- /**
1774
- * Set orbit point without moving the camera.
1775
- * SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
1776
- * @param targetX
1777
- * @param targetY
1778
- * @param targetZ
1779
- * @category Methods
1780
- */
1781
- }, {
1782
- key: "setOrbitPoint",
1783
- value: function setOrbitPoint(targetX, targetY, targetZ) {
1784
- this._camera.updateMatrixWorld();
1785
- _xColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 0);
1786
- _yColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 1);
1787
- _zColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
1788
- var position = _v3A.set(targetX, targetY, targetZ);
1789
- var distance = position.distanceTo(this._camera.position);
1790
- var cameraToPoint = position.sub(this._camera.position);
1791
- _xColumn.multiplyScalar(cameraToPoint.x);
1792
- _yColumn.multiplyScalar(cameraToPoint.y);
1793
- _zColumn.multiplyScalar(cameraToPoint.z);
1794
- _v3A.copy(_xColumn).add(_yColumn).add(_zColumn);
1795
- _v3A.z = _v3A.z + distance;
1796
- this.dollyTo(distance, false);
1797
- this.setFocalOffset(-_v3A.x, _v3A.y, -_v3A.z, false);
1798
- this.moveTo(targetX, targetY, targetZ, false);
1799
- }
1800
- /**
1801
- * Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
1802
- * @param box3
1803
- * @category Methods
1804
- */
1805
- }, {
1806
- key: "setBoundary",
1807
- value: function setBoundary(box3) {
1808
- if (!box3) {
1809
- this._boundary.min.set(-Infinity, -Infinity, -Infinity);
1810
- this._boundary.max.set(Infinity, Infinity, Infinity);
1811
- this._needsUpdate = true;
1812
- return;
1813
- }
1814
- this._boundary.copy(box3);
1815
- this._boundary.clampPoint(this._targetEnd, this._targetEnd);
1816
- this._needsUpdate = true;
1817
- }
1818
- /**
1819
- * Set (or unset) the current viewport.
1820
- * Set this when you want to use renderer viewport and .dollyToCursor feature at the same time.
1821
- * @param viewportOrX
1822
- * @param y
1823
- * @param width
1824
- * @param height
1825
- * @category Methods
1826
- */
1827
- }, {
1828
- key: "setViewport",
1829
- value: function setViewport(viewportOrX, y, width, height) {
1830
- if (viewportOrX === null) {
1831
- // null
1832
- this._viewport = null;
1833
- return;
1834
- }
1835
- this._viewport = this._viewport || new THREE.Vector4();
1836
- if (typeof viewportOrX === 'number') {
1837
- // number
1838
- this._viewport.set(viewportOrX, y, width, height);
1839
- } else {
1840
- // Vector4
1841
- this._viewport.copy(viewportOrX);
1842
- }
1843
- }
1844
- /**
1845
- * Calculate the distance to fit the box.
1846
- * @param width box width
1847
- * @param height box height
1848
- * @param depth box depth
1849
- * @returns distance
1850
- * @category Methods
1851
- */
1852
- }, {
1853
- key: "getDistanceToFitBox",
1854
- value: function getDistanceToFitBox(width, height, depth) {
1855
- var cover = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1856
- if (notSupportedInOrthographicCamera(this._camera, 'getDistanceToFitBox')) return this._spherical.radius;
1857
- var boundingRectAspect = width / height;
1858
- var fov = this._camera.getEffectiveFOV() * DEG2RAD;
1859
- var aspect = this._camera.aspect;
1860
- var heightToFit = (cover ? boundingRectAspect > aspect : boundingRectAspect < aspect) ? height : width / aspect;
1861
- return heightToFit * 0.5 / Math.tan(fov * 0.5) + depth * 0.5;
1862
- }
1863
- /**
1864
- * Calculate the distance to fit the sphere.
1865
- * @param radius sphere radius
1866
- * @returns distance
1867
- * @category Methods
1868
- */
1869
- }, {
1870
- key: "getDistanceToFitSphere",
1871
- value: function getDistanceToFitSphere(radius) {
1872
- if (notSupportedInOrthographicCamera(this._camera, 'getDistanceToFitSphere')) return this._spherical.radius;
1873
- // https://stackoverflow.com/a/44849975
1874
- var vFOV = this._camera.getEffectiveFOV() * DEG2RAD;
1875
- var hFOV = Math.atan(Math.tan(vFOV * 0.5) * this._camera.aspect) * 2;
1876
- var fov = 1 < this._camera.aspect ? vFOV : hFOV;
1877
- return radius / Math.sin(fov * 0.5);
1878
- }
1879
- /**
1880
- * Returns the orbit center position, where the camera looking at.
1881
- * @param out The receiving Vector3 instance to copy the result
1882
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1883
- * @category Methods
1884
- */
1885
- }, {
1886
- key: "getTarget",
1887
- value: function getTarget(out) {
1888
- var receiveEndValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1889
- var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1890
- return _out.copy(receiveEndValue ? this._targetEnd : this._target);
1891
- }
1892
- /**
1893
- * Returns the camera position.
1894
- * @param out The receiving Vector3 instance to copy the result
1895
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1896
- * @category Methods
1897
- */
1898
- }, {
1899
- key: "getPosition",
1900
- value: function getPosition(out) {
1901
- var receiveEndValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1902
- var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1903
- return _out.setFromSpherical(receiveEndValue ? this._sphericalEnd : this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(receiveEndValue ? this._targetEnd : this._target);
1904
- }
1905
- /**
1906
- * Returns the spherical coordinates of the orbit.
1907
- * @param out The receiving Spherical instance to copy the result
1908
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1909
- * @category Methods
1910
- */
1911
- }, {
1912
- key: "getSpherical",
1913
- value: function getSpherical(out) {
1914
- var receiveEndValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1915
- var _out = out || new THREE.Spherical();
1916
- return _out.copy(receiveEndValue ? this._sphericalEnd : this._spherical);
1917
- }
1918
- /**
1919
- * Returns the focal offset, which is how much the camera appears to be translated in screen parallel coordinates.
1920
- * @param out The receiving Vector3 instance to copy the result
1921
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1922
- * @category Methods
1923
- */
1924
- }, {
1925
- key: "getFocalOffset",
1926
- value: function getFocalOffset(out) {
1927
- var receiveEndValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1928
- var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1929
- return _out.copy(receiveEndValue ? this._focalOffsetEnd : this._focalOffset);
1930
- }
1931
- /**
1932
- * Normalize camera azimuth angle rotation between 0 and 360 degrees.
1933
- * @category Methods
1934
- */
1935
- }, {
1936
- key: "normalizeRotations",
1937
- value: function normalizeRotations() {
1938
- this._sphericalEnd.theta = this._sphericalEnd.theta % PI_2;
1939
- if (this._sphericalEnd.theta < 0) this._sphericalEnd.theta += PI_2;
1940
- this._spherical.theta += PI_2 * Math.round((this._sphericalEnd.theta - this._spherical.theta) / PI_2);
1941
- }
1942
- /**
1943
- * Reset all rotation and position to defaults.
1944
- * @param enableTransition
1945
- * @category Methods
1946
- */
1947
- }, {
1948
- key: "reset",
1949
- value: function reset() {
1950
- var enableTransition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1951
- if (!approxEquals(this._camera.up.x, this._cameraUp0.x) || !approxEquals(this._camera.up.y, this._cameraUp0.y) || !approxEquals(this._camera.up.z, this._cameraUp0.z)) {
1952
- this._camera.up.copy(this._cameraUp0);
1953
- var position = this.getPosition(_v3A);
1954
- this.updateCameraUp();
1955
- this.setPosition(position.x, position.y, position.z);
1956
- }
1957
- var promises = [this.setLookAt(this._position0.x, this._position0.y, this._position0.z, this._target0.x, this._target0.y, this._target0.z, enableTransition), this.setFocalOffset(this._focalOffset0.x, this._focalOffset0.y, this._focalOffset0.z, enableTransition), this.zoomTo(this._zoom0, enableTransition)];
1958
- return Promise.all(promises);
1959
- }
1960
- /**
1961
- * Set current camera position as the default position.
1962
- * @category Methods
1963
- */
1964
- }, {
1965
- key: "saveState",
1966
- value: function saveState() {
1967
- this._cameraUp0.copy(this._camera.up);
1968
- this.getTarget(this._target0);
1969
- this.getPosition(this._position0);
1970
- this._zoom0 = this._zoom;
1971
- this._focalOffset0.copy(this._focalOffset);
1972
- }
1973
- /**
1974
- * Sync camera-up direction.
1975
- * When camera-up vector is changed, `.updateCameraUp()` must be called.
1976
- * @category Methods
1977
- */
1978
- }, {
1979
- key: "updateCameraUp",
1980
- value: function updateCameraUp() {
1981
- this._yAxisUpSpace.setFromUnitVectors(this._camera.up, _AXIS_Y);
1982
- this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
1983
- }
1984
- /**
1985
- * Apply current camera-up direction to the camera.
1986
- * The orbit system will be re-initialized with the current position.
1987
- * @category Methods
1988
- */
1989
- }, {
1990
- key: "applyCameraUp",
1991
- value: function applyCameraUp() {
1992
- var cameraDirection = _v3A.subVectors(this._target, this._camera.position).normalize();
1993
- // So first find the vector off to the side, orthogonal to both this.object.up and
1994
- // the "view" vector.
1995
- var side = _v3B.crossVectors(cameraDirection, this._camera.up);
1996
- // Then find the vector orthogonal to both this "side" vector and the "view" vector.
1997
- // This vector will be the new "up" vector.
1998
- this._camera.up.crossVectors(side, cameraDirection).normalize();
1999
- this._camera.updateMatrixWorld();
2000
- var position = this.getPosition(_v3A);
2001
- this.updateCameraUp();
2002
- this.setPosition(position.x, position.y, position.z);
2003
- }
2004
- /**
2005
- * Update camera position and directions.
2006
- * This should be called in your tick loop every time, and returns true if re-rendering is needed.
2007
- * @param delta
2008
- * @returns updated
2009
- * @category Methods
2010
- */
2011
- }, {
2012
- key: "update",
2013
- value: function update(delta) {
2014
- var deltaTheta = this._sphericalEnd.theta - this._spherical.theta;
2015
- var deltaPhi = this._sphericalEnd.phi - this._spherical.phi;
2016
- var deltaRadius = this._sphericalEnd.radius - this._spherical.radius;
2017
- var deltaTarget = _deltaTarget.subVectors(this._targetEnd, this._target);
2018
- var deltaOffset = _deltaOffset.subVectors(this._focalOffsetEnd, this._focalOffset);
2019
- var deltaZoom = this._zoomEnd - this._zoom;
2020
- // update theta
2021
- if (approxZero(deltaTheta)) {
2022
- this._thetaVelocity.value = 0;
2023
- this._spherical.theta = this._sphericalEnd.theta;
2024
- } else {
2025
- var smoothTime = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
2026
- this._spherical.theta = smoothDamp(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, smoothTime, Infinity, delta);
2027
- this._needsUpdate = true;
2028
- }
2029
- // update phi
2030
- if (approxZero(deltaPhi)) {
2031
- this._phiVelocity.value = 0;
2032
- this._spherical.phi = this._sphericalEnd.phi;
2033
- } else {
2034
- var _smoothTime = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
2035
- this._spherical.phi = smoothDamp(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, _smoothTime, Infinity, delta);
2036
- this._needsUpdate = true;
2037
- }
2038
- // update distance
2039
- if (approxZero(deltaRadius)) {
2040
- this._radiusVelocity.value = 0;
2041
- this._spherical.radius = this._sphericalEnd.radius;
2042
- } else {
2043
- var _smoothTime2 = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
2044
- this._spherical.radius = smoothDamp(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, _smoothTime2, this.maxSpeed, delta);
2045
- this._needsUpdate = true;
2046
- }
2047
- // update target position
2048
- if (approxZero(deltaTarget.x) && approxZero(deltaTarget.y) && approxZero(deltaTarget.z)) {
2049
- this._targetVelocity.set(0, 0, 0);
2050
- this._target.copy(this._targetEnd);
2051
- } else {
2052
- var _smoothTime3 = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
2053
- smoothDampVec3(this._target, this._targetEnd, this._targetVelocity, _smoothTime3, this.maxSpeed, delta, this._target);
2054
- this._needsUpdate = true;
2055
- }
2056
- // update focalOffset
2057
- if (approxZero(deltaOffset.x) && approxZero(deltaOffset.y) && approxZero(deltaOffset.z)) {
2058
- this._focalOffsetVelocity.set(0, 0, 0);
2059
- this._focalOffset.copy(this._focalOffsetEnd);
2060
- } else {
2061
- var _smoothTime4 = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
2062
- smoothDampVec3(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, _smoothTime4, this.maxSpeed, delta, this._focalOffset);
2063
- this._needsUpdate = true;
2064
- }
2065
- // update zoom
2066
- if (approxZero(deltaZoom)) {
2067
- this._zoomVelocity.value = 0;
2068
- this._zoom = this._zoomEnd;
2069
- } else {
2070
- var _smoothTime5 = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
2071
- this._zoom = smoothDamp(this._zoom, this._zoomEnd, this._zoomVelocity, _smoothTime5, Infinity, delta);
2072
- }
2073
- if (this.dollyToCursor) {
2074
- if (isPerspectiveCamera(this._camera) && this._changedDolly !== 0) {
2075
- var dollyControlAmount = this._spherical.radius - this._lastDistance;
2076
- var camera = this._camera;
2077
- var cameraDirection = this._getCameraDirection(_cameraDirection);
2078
- var planeX = _v3A.copy(cameraDirection).cross(camera.up).normalize();
2079
- if (planeX.lengthSq() === 0) planeX.x = 1.0;
2080
- var planeY = _v3B.crossVectors(planeX, cameraDirection);
2081
- var worldToScreen = this._sphericalEnd.radius * Math.tan(camera.getEffectiveFOV() * DEG2RAD * 0.5);
2082
- var prevRadius = this._sphericalEnd.radius - dollyControlAmount;
2083
- var lerpRatio = (prevRadius - this._sphericalEnd.radius) / this._sphericalEnd.radius;
2084
- var cursor = _v3C.copy(this._targetEnd).add(planeX.multiplyScalar(this._dollyControlCoord.x * worldToScreen * camera.aspect)).add(planeY.multiplyScalar(this._dollyControlCoord.y * worldToScreen));
2085
- var newTargetEnd = _v3A.copy(this._targetEnd).lerp(cursor, lerpRatio);
2086
- var isMin = this._lastDollyDirection === DOLLY_DIRECTION.IN && this._spherical.radius <= this.minDistance;
2087
- var isMax = this._lastDollyDirection === DOLLY_DIRECTION.OUT && this.maxDistance <= this._spherical.radius;
2088
- if (this.infinityDolly && (isMin || isMax)) {
2089
- this._sphericalEnd.radius -= dollyControlAmount;
2090
- this._spherical.radius -= dollyControlAmount;
2091
- var dollyAmount = _v3B.copy(cameraDirection).multiplyScalar(-dollyControlAmount);
2092
- newTargetEnd.add(dollyAmount);
2093
- }
2094
- // target position may be moved beyond boundary.
2095
- this._boundary.clampPoint(newTargetEnd, newTargetEnd);
2096
- var targetEndDiff = _v3B.subVectors(newTargetEnd, this._targetEnd);
2097
- this._targetEnd.copy(newTargetEnd);
2098
- this._target.add(targetEndDiff);
2099
- this._changedDolly -= dollyControlAmount;
2100
- if (approxZero(this._changedDolly)) this._changedDolly = 0;
2101
- } else if (isOrthographicCamera(this._camera) && this._changedZoom !== 0) {
2102
- var _dollyControlAmount = this._zoom - this._lastZoom;
2103
- var _camera2 = this._camera;
2104
- var worldCursorPosition = _v3A.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (_camera2.near + _camera2.far) / (_camera2.near - _camera2.far)).unproject(_camera2);
2105
- var quaternion = _v3B.set(0, 0, -1).applyQuaternion(_camera2.quaternion);
2106
- var _cursor = _v3C.copy(worldCursorPosition).add(quaternion.multiplyScalar(-worldCursorPosition.dot(_camera2.up)));
2107
- var prevZoom = this._zoom - _dollyControlAmount;
2108
- var _lerpRatio = -(prevZoom - this._zoom) / this._zoom;
2109
- // find the "distance" (aka plane constant in three.js) of Plane
2110
- // from a given position (this._targetEnd) and normal vector (cameraDirection)
2111
- // https://www.maplesoft.com/support/help/maple/view.aspx?path=MathApps%2FEquationOfAPlaneNormal#bkmrk0
2112
- var _cameraDirection2 = this._getCameraDirection(_cameraDirection);
2113
- var prevPlaneConstant = this._targetEnd.dot(_cameraDirection2);
2114
- var _newTargetEnd = _v3A.copy(this._targetEnd).lerp(_cursor, _lerpRatio);
2115
- var newPlaneConstant = _newTargetEnd.dot(_cameraDirection2);
2116
- // Pull back the camera depth that has moved, to be the camera stationary as zoom
2117
- var pullBack = _cameraDirection2.multiplyScalar(newPlaneConstant - prevPlaneConstant);
2118
- _newTargetEnd.sub(pullBack);
2119
- // target position may be moved beyond boundary.
2120
- this._boundary.clampPoint(_newTargetEnd, _newTargetEnd);
2121
- var _targetEndDiff = _v3B.subVectors(_newTargetEnd, this._targetEnd);
2122
- this._targetEnd.copy(_newTargetEnd);
2123
- this._target.add(_targetEndDiff);
2124
- // this._target.copy( this._targetEnd );
2125
- this._changedZoom -= _dollyControlAmount;
2126
- if (approxZero(this._changedZoom)) this._changedZoom = 0;
2127
- }
2128
- }
2129
- if (this._camera.zoom !== this._zoom) {
2130
- this._camera.zoom = this._zoom;
2131
- this._camera.updateProjectionMatrix();
2132
- this._updateNearPlaneCorners();
2133
- this._needsUpdate = true;
2134
- }
2135
- this._dragNeedsUpdate = true;
2136
- // collision detection
2137
- var maxDistance = this._collisionTest();
2138
- this._spherical.radius = Math.min(this._spherical.radius, maxDistance);
2139
- // decompose spherical to the camera position
2140
- this._spherical.makeSafe();
2141
- this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target);
2142
- this._camera.lookAt(this._target);
2143
- // set offset after the orbit movement
2144
- var affectOffset = !approxZero(this._focalOffset.x) || !approxZero(this._focalOffset.y) || !approxZero(this._focalOffset.z);
2145
- if (affectOffset) {
2146
- this._camera.updateMatrixWorld();
2147
- _xColumn.setFromMatrixColumn(this._camera.matrix, 0);
2148
- _yColumn.setFromMatrixColumn(this._camera.matrix, 1);
2149
- _zColumn.setFromMatrixColumn(this._camera.matrix, 2);
2150
- _xColumn.multiplyScalar(this._focalOffset.x);
2151
- _yColumn.multiplyScalar(-this._focalOffset.y);
2152
- _zColumn.multiplyScalar(this._focalOffset.z); // notice: z-offset will not affect in Orthographic.
2153
- _v3A.copy(_xColumn).add(_yColumn).add(_zColumn);
2154
- this._camera.position.add(_v3A);
2155
- }
2156
- if (this._boundaryEnclosesCamera) {
2157
- this._encloseToBoundary(this._camera.position.copy(this._target), _v3A.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1.0);
2158
- }
2159
- var updated = this._needsUpdate;
2160
- if (updated && !this._updatedLastTime) {
2161
- this._hasRested = false;
2162
- this.dispatchEvent({
2163
- type: 'wake'
2164
- });
2165
- this.dispatchEvent({
2166
- type: 'update'
2167
- });
2168
- } else if (updated) {
2169
- this.dispatchEvent({
2170
- type: 'update'
2171
- });
2172
- if (approxZero(deltaTheta, this.restThreshold) && approxZero(deltaPhi, this.restThreshold) && approxZero(deltaRadius, this.restThreshold) && approxZero(deltaTarget.x, this.restThreshold) && approxZero(deltaTarget.y, this.restThreshold) && approxZero(deltaTarget.z, this.restThreshold) && approxZero(deltaOffset.x, this.restThreshold) && approxZero(deltaOffset.y, this.restThreshold) && approxZero(deltaOffset.z, this.restThreshold) && approxZero(deltaZoom, this.restThreshold) && !this._hasRested) {
2173
- this._hasRested = true;
2174
- this.dispatchEvent({
2175
- type: 'rest'
2176
- });
2177
- }
2178
- } else if (!updated && this._updatedLastTime) {
2179
- this.dispatchEvent({
2180
- type: 'sleep'
2181
- });
2182
- }
2183
- this._lastDistance = this._spherical.radius;
2184
- this._lastZoom = this._zoom;
2185
- this._updatedLastTime = updated;
2186
- this._needsUpdate = false;
2187
- return updated;
2188
- }
2189
- /**
2190
- * Get all state in JSON string
2191
- * @category Methods
2192
- */
2193
- }, {
2194
- key: "toJSON",
2195
- value: function toJSON() {
2196
- return JSON.stringify({
2197
- enabled: this._enabled,
2198
- minDistance: this.minDistance,
2199
- maxDistance: infinityToMaxNumber(this.maxDistance),
2200
- minZoom: this.minZoom,
2201
- maxZoom: infinityToMaxNumber(this.maxZoom),
2202
- minPolarAngle: this.minPolarAngle,
2203
- maxPolarAngle: infinityToMaxNumber(this.maxPolarAngle),
2204
- minAzimuthAngle: infinityToMaxNumber(this.minAzimuthAngle),
2205
- maxAzimuthAngle: infinityToMaxNumber(this.maxAzimuthAngle),
2206
- smoothTime: this.smoothTime,
2207
- draggingSmoothTime: this.draggingSmoothTime,
2208
- dollySpeed: this.dollySpeed,
2209
- truckSpeed: this.truckSpeed,
2210
- dollyToCursor: this.dollyToCursor,
2211
- verticalDragToForward: this.verticalDragToForward,
2212
- target: this._targetEnd.toArray(),
2213
- position: _v3A.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),
2214
- zoom: this._zoomEnd,
2215
- focalOffset: this._focalOffsetEnd.toArray(),
2216
- target0: this._target0.toArray(),
2217
- position0: this._position0.toArray(),
2218
- zoom0: this._zoom0,
2219
- focalOffset0: this._focalOffset0.toArray()
2220
- });
2221
- }
2222
- /**
2223
- * Reproduce the control state with JSON. enableTransition is where anim or not in a boolean.
2224
- * @param json
2225
- * @param enableTransition
2226
- * @category Methods
2227
- */
2228
- }, {
2229
- key: "fromJSON",
2230
- value: function fromJSON(json) {
2231
- var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2232
- var obj = JSON.parse(json);
2233
- this.enabled = obj.enabled;
2234
- this.minDistance = obj.minDistance;
2235
- this.maxDistance = maxNumberToInfinity(obj.maxDistance);
2236
- this.minZoom = obj.minZoom;
2237
- this.maxZoom = maxNumberToInfinity(obj.maxZoom);
2238
- this.minPolarAngle = obj.minPolarAngle;
2239
- this.maxPolarAngle = maxNumberToInfinity(obj.maxPolarAngle);
2240
- this.minAzimuthAngle = maxNumberToInfinity(obj.minAzimuthAngle);
2241
- this.maxAzimuthAngle = maxNumberToInfinity(obj.maxAzimuthAngle);
2242
- this.smoothTime = obj.smoothTime;
2243
- this.draggingSmoothTime = obj.draggingSmoothTime;
2244
- this.dollySpeed = obj.dollySpeed;
2245
- this.truckSpeed = obj.truckSpeed;
2246
- this.dollyToCursor = obj.dollyToCursor;
2247
- this.verticalDragToForward = obj.verticalDragToForward;
2248
- this._target0.fromArray(obj.target0);
2249
- this._position0.fromArray(obj.position0);
2250
- this._zoom0 = obj.zoom0;
2251
- this._focalOffset0.fromArray(obj.focalOffset0);
2252
- this.moveTo(obj.target[0], obj.target[1], obj.target[2], enableTransition);
2253
- _sphericalA.setFromVector3(_v3A.fromArray(obj.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace));
2254
- this.rotateTo(_sphericalA.theta, _sphericalA.phi, enableTransition);
2255
- this.dollyTo(_sphericalA.radius, enableTransition);
2256
- this.zoomTo(obj.zoom, enableTransition);
2257
- this.setFocalOffset(obj.focalOffset[0], obj.focalOffset[1], obj.focalOffset[2], enableTransition);
2258
- this._needsUpdate = true;
2259
- }
2260
- /**
2261
- * Attach all internal event handlers to enable drag control.
2262
- * @category Methods
2263
- */
2264
- }, {
2265
- key: "connect",
2266
- value: function connect(domElement) {
2267
- if (this._domElement) {
2268
- console.warn('camera-controls is already connected.');
2269
- return;
2270
- }
2271
- domElement.setAttribute('data-camera-controls-version', VERSION);
2272
- this._addAllEventListeners(domElement);
2273
- this._getClientRect(this._elementRect);
2274
- }
2275
- /**
2276
- * Detach all internal event handlers to disable drag control.
2277
- */
2278
- }, {
2279
- key: "disconnect",
2280
- value: function disconnect() {
2281
- this.cancel();
2282
- this._removeAllEventListeners();
2283
- if (this._domElement) {
2284
- this._domElement.removeAttribute('data-camera-controls-version');
2285
- this._domElement = undefined;
2286
- }
2287
- }
2288
- /**
2289
- * Dispose the cameraControls instance itself, remove all eventListeners.
2290
- * @category Methods
2291
- */
2292
- }, {
2293
- key: "dispose",
2294
- value: function dispose() {
2295
- // remove all user event listeners
2296
- this.removeAllEventListeners();
2297
- // remove all internal event listeners
2298
- this.disconnect();
2299
- }
2300
- // it's okay to expose public though
2301
- }, {
2302
- key: "_getTargetDirection",
2303
- value: function _getTargetDirection(out) {
2304
- // divide by distance to normalize, lighter than `Vector3.prototype.normalize()`
2305
- return out.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse);
2306
- }
2307
- // it's okay to expose public though
2308
- }, {
2309
- key: "_getCameraDirection",
2310
- value: function _getCameraDirection(out) {
2311
- return this._getTargetDirection(out).negate();
2312
- }
2313
- }, {
2314
- key: "_findPointerById",
2315
- value: function _findPointerById(pointerId) {
2316
- return this._activePointers.find(function (activePointer) {
2317
- return activePointer.pointerId === pointerId;
2318
- });
2319
- }
2320
- }, {
2321
- key: "_findPointerByMouseButton",
2322
- value: function _findPointerByMouseButton(mouseButton) {
2323
- return this._activePointers.find(function (activePointer) {
2324
- return activePointer.mouseButton === mouseButton;
2325
- });
2326
- }
2327
- }, {
2328
- key: "_disposePointer",
2329
- value: function _disposePointer(pointer) {
2330
- this._activePointers.splice(this._activePointers.indexOf(pointer), 1);
2331
- }
2332
- }, {
2333
- key: "_encloseToBoundary",
2334
- value: function _encloseToBoundary(position, offset, friction) {
2335
- var offsetLength2 = offset.lengthSq();
2336
- if (offsetLength2 === 0.0) {
2337
- // sanity check
2338
- return position;
2339
- }
2340
- // See: https://twitter.com/FMS_Cat/status/1106508958640988161
2341
- var newTarget = _v3B.copy(offset).add(position); // target
2342
- var clampedTarget = this._boundary.clampPoint(newTarget, _v3C); // clamped target
2343
- var deltaClampedTarget = clampedTarget.sub(newTarget); // newTarget -> clampedTarget
2344
- var deltaClampedTargetLength2 = deltaClampedTarget.lengthSq(); // squared length of deltaClampedTarget
2345
- if (deltaClampedTargetLength2 === 0.0) {
2346
- // when the position doesn't have to be clamped
2347
- return position.add(offset);
2348
- } else if (deltaClampedTargetLength2 === offsetLength2) {
2349
- // when the position is completely stuck
2350
- return position;
2351
- } else if (friction === 0.0) {
2352
- return position.add(offset).add(deltaClampedTarget);
2353
- } else {
2354
- var offsetFactor = 1.0 + friction * deltaClampedTargetLength2 / offset.dot(deltaClampedTarget);
2355
- return position.add(_v3B.copy(offset).multiplyScalar(offsetFactor)).add(deltaClampedTarget.multiplyScalar(1.0 - friction));
2356
- }
2357
- }
2358
- }, {
2359
- key: "_updateNearPlaneCorners",
2360
- value: function _updateNearPlaneCorners() {
2361
- if (isPerspectiveCamera(this._camera)) {
2362
- var camera = this._camera;
2363
- var near = camera.near;
2364
- var fov = camera.getEffectiveFOV() * DEG2RAD;
2365
- var heightHalf = Math.tan(fov * 0.5) * near; // near plain half height
2366
- var widthHalf = heightHalf * camera.aspect; // near plain half width
2367
- this._nearPlaneCorners[0].set(-widthHalf, -heightHalf, 0);
2368
- this._nearPlaneCorners[1].set(widthHalf, -heightHalf, 0);
2369
- this._nearPlaneCorners[2].set(widthHalf, heightHalf, 0);
2370
- this._nearPlaneCorners[3].set(-widthHalf, heightHalf, 0);
2371
- } else if (isOrthographicCamera(this._camera)) {
2372
- var _camera3 = this._camera;
2373
- var zoomInv = 1 / _camera3.zoom;
2374
- var left = _camera3.left * zoomInv;
2375
- var right = _camera3.right * zoomInv;
2376
- var top = _camera3.top * zoomInv;
2377
- var bottom = _camera3.bottom * zoomInv;
2378
- this._nearPlaneCorners[0].set(left, top, 0);
2379
- this._nearPlaneCorners[1].set(right, top, 0);
2380
- this._nearPlaneCorners[2].set(right, bottom, 0);
2381
- this._nearPlaneCorners[3].set(left, bottom, 0);
2382
- }
2383
- }
2384
- // lateUpdate
2385
- }, {
2386
- key: "_collisionTest",
2387
- value: function _collisionTest() {
2388
- var distance = Infinity;
2389
- var hasCollider = this.colliderMeshes.length >= 1;
2390
- if (!hasCollider) return distance;
2391
- if (notSupportedInOrthographicCamera(this._camera, '_collisionTest')) return distance;
2392
- var rayDirection = this._getTargetDirection(_cameraDirection);
2393
- _rotationMatrix.lookAt(_ORIGIN, rayDirection, this._camera.up);
2394
- for (var i = 0; i < 4; i++) {
2395
- var nearPlaneCorner = _v3B.copy(this._nearPlaneCorners[i]);
2396
- nearPlaneCorner.applyMatrix4(_rotationMatrix);
2397
- var origin = _v3C.addVectors(this._target, nearPlaneCorner);
2398
- _raycaster.set(origin, rayDirection);
2399
- _raycaster.far = this._spherical.radius + 1;
2400
- var intersects = _raycaster.intersectObjects(this.colliderMeshes);
2401
- if (intersects.length !== 0 && intersects[0].distance < distance) {
2402
- distance = intersects[0].distance;
2403
- }
2404
- }
2405
- return distance;
2406
- }
2407
- /**
2408
- * Get its client rect and package into given `DOMRect` .
2409
- */
2410
- }, {
2411
- key: "_getClientRect",
2412
- value: function _getClientRect(target) {
2413
- if (!this._domElement) return;
2414
- var rect = this._domElement.getBoundingClientRect();
2415
- target.x = rect.left;
2416
- target.y = rect.top;
2417
- if (this._viewport) {
2418
- target.x += this._viewport.x;
2419
- target.y += rect.height - this._viewport.w - this._viewport.y;
2420
- target.width = this._viewport.z;
2421
- target.height = this._viewport.w;
2422
- } else {
2423
- target.width = rect.width;
2424
- target.height = rect.height;
2425
- }
2426
- return target;
2427
- }
2428
- }, {
2429
- key: "_createOnRestPromise",
2430
- value: function _createOnRestPromise(resolveImmediately) {
2431
- var _this2 = this;
2432
- if (resolveImmediately) return Promise.resolve();
2433
- this._hasRested = false;
2434
- this.dispatchEvent({
2435
- type: 'transitionstart'
2436
- });
2437
- return new Promise(function (resolve) {
2438
- var _onResolve = function onResolve() {
2439
- _this2.removeEventListener('rest', _onResolve);
2440
- resolve();
2441
- };
2442
- _this2.addEventListener('rest', _onResolve);
2443
- });
2444
- }
2445
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2446
- }, {
2447
- key: "_addAllEventListeners",
2448
- value: function _addAllEventListeners(_domElement) {}
2449
- }, {
2450
- key: "_removeAllEventListeners",
2451
- value: function _removeAllEventListeners() {}
2452
- /**
2453
- * backward compatible
2454
- * @deprecated use smoothTime (in seconds) instead
2455
- * @category Properties
2456
- */
2457
- }, {
2458
- key: "dampingFactor",
2459
- get: function get() {
2460
- console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.');
2461
- return 0;
2462
- }
2463
- /**
2464
- * backward compatible
2465
- * @deprecated use smoothTime (in seconds) instead
2466
- * @category Properties
2467
- */,
2468
- set: function set(_) {
2469
- console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.');
2470
- }
2471
- /**
2472
- * backward compatible
2473
- * @deprecated use draggingSmoothTime (in seconds) instead
2474
- * @category Properties
2475
- */
2476
- }, {
2477
- key: "draggingDampingFactor",
2478
- get: function get() {
2479
- console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.');
2480
- return 0;
2481
- }
2482
- /**
2483
- * backward compatible
2484
- * @deprecated use draggingSmoothTime (in seconds) instead
2485
- * @category Properties
2486
- */,
2487
- set: function set(_) {
2488
- console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.');
2489
- }
2490
- }], [{
2491
- key: "install",
2492
- value:
2493
- /**
2494
- * Injects THREE as the dependency. You can then proceed to use CameraControls.
2495
- *
2496
- * e.g
2497
- * ```javascript
2498
- * CameraControls.install( { THREE: THREE } );
2499
- * ```
2500
- *
2501
- * Note: If you do not wish to use enter three.js to reduce file size(tree-shaking for example), make a subset to install.
2502
- *
2503
- * ```js
2504
- * import {
2505
- * Vector2,
2506
- * Vector3,
2507
- * Vector4,
2508
- * Quaternion,
2509
- * Matrix4,
2510
- * Spherical,
2511
- * Box3,
2512
- * Sphere,
2513
- * Raycaster,
2514
- * MathUtils,
2515
- * } from 'three';
2516
- *
2517
- * const subsetOfTHREE = {
2518
- * Vector2 : Vector2,
2519
- * Vector3 : Vector3,
2520
- * Vector4 : Vector4,
2521
- * Quaternion: Quaternion,
2522
- * Matrix4 : Matrix4,
2523
- * Spherical : Spherical,
2524
- * Box3 : Box3,
2525
- * Sphere : Sphere,
2526
- * Raycaster : Raycaster,
2527
- * };
2528
- * CameraControls.install( { THREE: subsetOfTHREE } );
2529
- * ```
2530
- * @category Statics
2531
- */
2532
- function install(libs) {
2533
- THREE = libs.THREE;
2534
- _ORIGIN = Object.freeze(new THREE.Vector3(0, 0, 0));
2535
- _AXIS_Y = Object.freeze(new THREE.Vector3(0, 1, 0));
2536
- _AXIS_Z = Object.freeze(new THREE.Vector3(0, 0, 1));
2537
- _v2 = new THREE.Vector2();
2538
- _v3A = new THREE.Vector3();
2539
- _v3B = new THREE.Vector3();
2540
- _v3C = new THREE.Vector3();
2541
- _cameraDirection = new THREE.Vector3();
2542
- _xColumn = new THREE.Vector3();
2543
- _yColumn = new THREE.Vector3();
2544
- _zColumn = new THREE.Vector3();
2545
- _deltaTarget = new THREE.Vector3();
2546
- _deltaOffset = new THREE.Vector3();
2547
- _sphericalA = new THREE.Spherical();
2548
- _sphericalB = new THREE.Spherical();
2549
- _box3A = new THREE.Box3();
2550
- _box3B = new THREE.Box3();
2551
- _sphere = new THREE.Sphere();
2552
- _quaternionA = new THREE.Quaternion();
2553
- _quaternionB = new THREE.Quaternion();
2554
- _rotationMatrix = new THREE.Matrix4();
2555
- _raycaster = new THREE.Raycaster();
2556
- }
2557
- /**
2558
- * list all ACTIONs
2559
- * @category Statics
2560
- */
2561
- }, {
2562
- key: "ACTION",
2563
- get: function get() {
2564
- return ACTION;
2565
- }
2566
- }, {
2567
- key: "createBoundingSphere",
2568
- value: function createBoundingSphere(object3d) {
2569
- var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new THREE.Sphere();
2570
- var boundingSphere = out;
2571
- var center = boundingSphere.center;
2572
- _box3A.makeEmpty();
2573
- // find the center
2574
- object3d.traverseVisible(function (object) {
2575
- if (!object.isMesh) return;
2576
- _box3A.expandByObject(object);
2577
- });
2578
- _box3A.getCenter(center);
2579
- // find the radius
2580
- var maxRadiusSq = 0;
2581
- object3d.traverseVisible(function (object) {
2582
- if (!object.isMesh) return;
2583
- var mesh = object;
2584
- var geometry = mesh.geometry.clone();
2585
- geometry.applyMatrix4(mesh.matrixWorld);
2586
- var bufferGeometry = geometry;
2587
- var position = bufferGeometry.attributes.position;
2588
- for (var i = 0, l = position.count; i < l; i++) {
2589
- _v3A.fromBufferAttribute(position, i);
2590
- maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_v3A));
2591
- }
2592
- });
2593
- boundingSphere.radius = Math.sqrt(maxRadiusSq);
2594
- return boundingSphere;
2595
- }
2596
- }]);
2597
- }(EventDispatcher);
2598
- //# sourceMappingURL=camera-controls.module.js.map