kitchen-simulator 5.0.0-test.3 → 5.0.0-test.5

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 (1098) hide show
  1. package/es/KitchenConfigurator.js +1 -1
  2. package/es/KitchenConfigurator.js.map +1 -1
  3. package/package.json +8 -13
  4. package/lib/@history.js +0 -11
  5. package/lib/@history.js.map +0 -1
  6. package/lib/AppContext.js +0 -11
  7. package/lib/AppContext.js.map +0 -1
  8. package/lib/KitchenConfigurator.js +0 -1353
  9. package/lib/KitchenConfigurator.js.map +0 -1
  10. package/lib/KitchenConfiguratorApp.js +0 -539
  11. package/lib/KitchenConfiguratorApp.js.map +0 -1
  12. package/lib/actions/area-actions.js +0 -22
  13. package/lib/actions/area-actions.js.map +0 -1
  14. package/lib/actions/export.js +0 -44
  15. package/lib/actions/export.js.map +0 -1
  16. package/lib/actions/groups-actions.js +0 -108
  17. package/lib/actions/groups-actions.js.map +0 -1
  18. package/lib/actions/holes-actions.js +0 -141
  19. package/lib/actions/holes-actions.js.map +0 -1
  20. package/lib/actions/items-actions.js +0 -365
  21. package/lib/actions/items-actions.js.map +0 -1
  22. package/lib/actions/lines-actions.js +0 -98
  23. package/lib/actions/lines-actions.js.map +0 -1
  24. package/lib/actions/project-actions.js +0 -333
  25. package/lib/actions/project-actions.js.map +0 -1
  26. package/lib/actions/scene-actions.js +0 -44
  27. package/lib/actions/scene-actions.js.map +0 -1
  28. package/lib/actions/user-actions.js +0 -69
  29. package/lib/actions/user-actions.js.map +0 -1
  30. package/lib/actions/vertices-actions.js +0 -36
  31. package/lib/actions/vertices-actions.js.map +0 -1
  32. package/lib/actions/viewer2d-actions.js +0 -74
  33. package/lib/actions/viewer2d-actions.js.map +0 -1
  34. package/lib/actions/viewer3d-actions.js +0 -33
  35. package/lib/actions/viewer3d-actions.js.map +0 -1
  36. package/lib/catalog/areas/area/planner-element.js +0 -47
  37. package/lib/catalog/areas/area/planner-element.js.map +0 -1
  38. package/lib/catalog/catalog.js +0 -283
  39. package/lib/catalog/catalog.js.map +0 -1
  40. package/lib/catalog/factories/area-factory-3d.js +0 -192
  41. package/lib/catalog/factories/area-factory-3d.js.map +0 -1
  42. package/lib/catalog/factories/area-factory.js +0 -90
  43. package/lib/catalog/factories/area-factory.js.map +0 -1
  44. package/lib/catalog/factories/export.js +0 -26
  45. package/lib/catalog/factories/export.js.map +0 -1
  46. package/lib/catalog/factories/wall-factory-3d.js +0 -213
  47. package/lib/catalog/factories/wall-factory-3d.js.map +0 -1
  48. package/lib/catalog/factories/wall-factory.js +0 -279
  49. package/lib/catalog/factories/wall-factory.js.map +0 -1
  50. package/lib/catalog/holes/door-closet/planner-element.js +0 -232
  51. package/lib/catalog/holes/door-closet/planner-element.js.map +0 -1
  52. package/lib/catalog/holes/door-double/planner-element.js +0 -325
  53. package/lib/catalog/holes/door-double/planner-element.js.map +0 -1
  54. package/lib/catalog/holes/door-exterior/planner-element.js +0 -225
  55. package/lib/catalog/holes/door-exterior/planner-element.js.map +0 -1
  56. package/lib/catalog/holes/door-interior/planner-element.js +0 -237
  57. package/lib/catalog/holes/door-interior/planner-element.js.map +0 -1
  58. package/lib/catalog/holes/door-panic/planner-element.js +0 -513
  59. package/lib/catalog/holes/door-panic/planner-element.js.map +0 -1
  60. package/lib/catalog/holes/door-panic-double/planner-element.js +0 -473
  61. package/lib/catalog/holes/door-panic-double/planner-element.js.map +0 -1
  62. package/lib/catalog/holes/door-sliding/planner-element.js +0 -235
  63. package/lib/catalog/holes/door-sliding/planner-element.js.map +0 -1
  64. package/lib/catalog/holes/doorway-framed/planner-element.js +0 -155
  65. package/lib/catalog/holes/doorway-framed/planner-element.js.map +0 -1
  66. package/lib/catalog/holes/doorway-frameless/planner-element.js +0 -114
  67. package/lib/catalog/holes/doorway-frameless/planner-element.js.map +0 -1
  68. package/lib/catalog/holes/window-clear/planner-element.js +0 -176
  69. package/lib/catalog/holes/window-clear/planner-element.js.map +0 -1
  70. package/lib/catalog/holes/window-cross/planner-element.js +0 -175
  71. package/lib/catalog/holes/window-cross/planner-element.js.map +0 -1
  72. package/lib/catalog/holes/window-double-hung/planner-element.js +0 -313
  73. package/lib/catalog/holes/window-double-hung/planner-element.js.map +0 -1
  74. package/lib/catalog/holes/window-vertical/planner-element.js +0 -286
  75. package/lib/catalog/holes/window-vertical/planner-element.js.map +0 -1
  76. package/lib/catalog/lines/wall/planner-element.js +0 -77
  77. package/lib/catalog/lines/wall/planner-element.js.map +0 -1
  78. package/lib/catalog/molding/molding-dcm/planner-element.js +0 -39
  79. package/lib/catalog/molding/molding-dcm/planner-element.js.map +0 -1
  80. package/lib/catalog/molding/molding-fbm/planner-element.js +0 -39
  81. package/lib/catalog/molding/molding-fbm/planner-element.js.map +0 -1
  82. package/lib/catalog/molding/molding-lrm/planner-element.js +0 -39
  83. package/lib/catalog/molding/molding-lrm/planner-element.js.map +0 -1
  84. package/lib/catalog/properties/export.js +0 -82
  85. package/lib/catalog/properties/export.js.map +0 -1
  86. package/lib/catalog/properties/property-checkbox.js +0 -79
  87. package/lib/catalog/properties/property-checkbox.js.map +0 -1
  88. package/lib/catalog/properties/property-color.js +0 -47
  89. package/lib/catalog/properties/property-color.js.map +0 -1
  90. package/lib/catalog/properties/property-enum.js +0 -63
  91. package/lib/catalog/properties/property-enum.js.map +0 -1
  92. package/lib/catalog/properties/property-hidden.js +0 -27
  93. package/lib/catalog/properties/property-hidden.js.map +0 -1
  94. package/lib/catalog/properties/property-lenght-measure.js +0 -109
  95. package/lib/catalog/properties/property-lenght-measure.js.map +0 -1
  96. package/lib/catalog/properties/property-length-measure.js +0 -93
  97. package/lib/catalog/properties/property-length-measure.js.map +0 -1
  98. package/lib/catalog/properties/property-length-measure_hole.js +0 -109
  99. package/lib/catalog/properties/property-length-measure_hole.js.map +0 -1
  100. package/lib/catalog/properties/property-number.js +0 -56
  101. package/lib/catalog/properties/property-number.js.map +0 -1
  102. package/lib/catalog/properties/property-read-only.js +0 -34
  103. package/lib/catalog/properties/property-read-only.js.map +0 -1
  104. package/lib/catalog/properties/property-string.js +0 -56
  105. package/lib/catalog/properties/property-string.js.map +0 -1
  106. package/lib/catalog/properties/property-toggle.js +0 -47
  107. package/lib/catalog/properties/property-toggle.js.map +0 -1
  108. package/lib/catalog/properties/shared-property-style.js +0 -21
  109. package/lib/catalog/properties/shared-property-style.js.map +0 -1
  110. package/lib/catalog/utils/FuseUtils.js +0 -89
  111. package/lib/catalog/utils/FuseUtils.js.map +0 -1
  112. package/lib/catalog/utils/exporter.js +0 -156
  113. package/lib/catalog/utils/exporter.js.map +0 -1
  114. package/lib/catalog/utils/geom-utils.js +0 -206
  115. package/lib/catalog/utils/geom-utils.js.map +0 -1
  116. package/lib/catalog/utils/item-loader.js +0 -1534
  117. package/lib/catalog/utils/item-loader.js.map +0 -1
  118. package/lib/catalog/utils/load-obj.js +0 -100
  119. package/lib/catalog/utils/load-obj.js.map +0 -1
  120. package/lib/catalog/utils/mtl-loader.js +0 -360
  121. package/lib/catalog/utils/mtl-loader.js.map +0 -1
  122. package/lib/catalog/utils/obj-loader.js +0 -479
  123. package/lib/catalog/utils/obj-loader.js.map +0 -1
  124. package/lib/class/FuseUtils.js +0 -89
  125. package/lib/class/FuseUtils.js.map +0 -1
  126. package/lib/class/area.js +0 -151
  127. package/lib/class/area.js.map +0 -1
  128. package/lib/class/export.js +0 -97
  129. package/lib/class/export.js.map +0 -1
  130. package/lib/class/group.js +0 -446
  131. package/lib/class/group.js.map +0 -1
  132. package/lib/class/guide.js +0 -68
  133. package/lib/class/guide.js.map +0 -1
  134. package/lib/class/hole.js +0 -935
  135. package/lib/class/hole.js.map +0 -1
  136. package/lib/class/item.js +0 -1894
  137. package/lib/class/item.js.map +0 -1
  138. package/lib/class/layer.js +0 -673
  139. package/lib/class/layer.js.map +0 -1
  140. package/lib/class/line.js +0 -1296
  141. package/lib/class/line.js.map +0 -1
  142. package/lib/class/project.js +0 -829
  143. package/lib/class/project.js.map +0 -1
  144. package/lib/class/vertex.js +0 -272
  145. package/lib/class/vertex.js.map +0 -1
  146. package/lib/components/atoms/Snackbar/index.js +0 -57
  147. package/lib/components/atoms/Snackbar/index.js.map +0 -1
  148. package/lib/components/atoms/radio-button/index.js +0 -33
  149. package/lib/components/atoms/radio-button/index.js.map +0 -1
  150. package/lib/components/atoms/radio-button/styles.js +0 -12
  151. package/lib/components/atoms/radio-button/styles.js.map +0 -1
  152. package/lib/components/button/MainButton.js +0 -98
  153. package/lib/components/button/MainButton.js.map +0 -1
  154. package/lib/components/button/ToggleMeasureButton.js +0 -63
  155. package/lib/components/button/ToggleMeasureButton.js.map +0 -1
  156. package/lib/components/catalog-view/catalog-breadcrumb.js +0 -61
  157. package/lib/components/catalog-view/catalog-breadcrumb.js.map +0 -1
  158. package/lib/components/catalog-view/catalog-item.js +0 -233
  159. package/lib/components/catalog-view/catalog-item.js.map +0 -1
  160. package/lib/components/catalog-view/catalog-list.js +0 -189
  161. package/lib/components/catalog-view/catalog-list.js.map +0 -1
  162. package/lib/components/catalog-view/catalog-page-item.js +0 -137
  163. package/lib/components/catalog-view/catalog-page-item.js.map +0 -1
  164. package/lib/components/catalog-view/catalog-turn-back-page-item.js +0 -113
  165. package/lib/components/catalog-view/catalog-turn-back-page-item.js.map +0 -1
  166. package/lib/components/configurator/custom-configurator.js +0 -101
  167. package/lib/components/configurator/custom-configurator.js.map +0 -1
  168. package/lib/components/configurator/project-configurator.js +0 -138
  169. package/lib/components/configurator/project-configurator.js.map +0 -1
  170. package/lib/components/content.js +0 -132
  171. package/lib/components/content.js.map +0 -1
  172. package/lib/components/export.js +0 -90
  173. package/lib/components/export.js.map +0 -1
  174. package/lib/components/firstsetting/button/styles.js +0 -34
  175. package/lib/components/firstsetting/button/styles.js.map +0 -1
  176. package/lib/components/firstsetting/export.js +0 -16
  177. package/lib/components/firstsetting/export.js.map +0 -1
  178. package/lib/components/firstsetting/firstsetting-content-button.js +0 -224
  179. package/lib/components/firstsetting/firstsetting-content-button.js.map +0 -1
  180. package/lib/components/firstsetting/firstsetting-toggle-button.js +0 -133
  181. package/lib/components/firstsetting/firstsetting-toggle-button.js.map +0 -1
  182. package/lib/components/firstsetting/firstsetting.js +0 -633
  183. package/lib/components/firstsetting/firstsetting.js.map +0 -1
  184. package/lib/components/footerbar/button/ControlButton.js +0 -79
  185. package/lib/components/footerbar/button/ControlButton.js.map +0 -1
  186. package/lib/components/footerbar/button/DirectionButton.js +0 -76
  187. package/lib/components/footerbar/button/DirectionButton.js.map +0 -1
  188. package/lib/components/footerbar/button/DirectionPanSpinButton.js +0 -57
  189. package/lib/components/footerbar/button/DirectionPanSpinButton.js.map +0 -1
  190. package/lib/components/footerbar/button/ToggleButton.js +0 -83
  191. package/lib/components/footerbar/button/ToggleButton.js.map +0 -1
  192. package/lib/components/footerbar/button/ToggleConvertButton.js +0 -80
  193. package/lib/components/footerbar/button/ToggleConvertButton.js.map +0 -1
  194. package/lib/components/footerbar/button/ToggleMeasureButton.js +0 -59
  195. package/lib/components/footerbar/button/ToggleMeasureButton.js.map +0 -1
  196. package/lib/components/footerbar/button/styles.js +0 -29
  197. package/lib/components/footerbar/button/styles.js.map +0 -1
  198. package/lib/components/footerbar/export.js +0 -16
  199. package/lib/components/footerbar/export.js.map +0 -1
  200. package/lib/components/footerbar/footer-content-button.js +0 -224
  201. package/lib/components/footerbar/footer-content-button.js.map +0 -1
  202. package/lib/components/footerbar/footer-toggle-button.js +0 -133
  203. package/lib/components/footerbar/footer-toggle-button.js.map +0 -1
  204. package/lib/components/footerbar/footerbar.js +0 -808
  205. package/lib/components/footerbar/footerbar.js.map +0 -1
  206. package/lib/components/footerbar/styles.js +0 -41
  207. package/lib/components/footerbar/styles.js.map +0 -1
  208. package/lib/components/header/button/MenuButton.js +0 -77
  209. package/lib/components/header/button/MenuButton.js.map +0 -1
  210. package/lib/components/header/button/SaveButton.js +0 -57
  211. package/lib/components/header/button/SaveButton.js.map +0 -1
  212. package/lib/components/header/button/styles.js +0 -68
  213. package/lib/components/header/button/styles.js.map +0 -1
  214. package/lib/components/header/export.js +0 -12
  215. package/lib/components/header/export.js.map +0 -1
  216. package/lib/components/header/header.js +0 -556
  217. package/lib/components/header/header.js.map +0 -1
  218. package/lib/components/header/styles.js +0 -47
  219. package/lib/components/header/styles.js.map +0 -1
  220. package/lib/components/login/Login.js +0 -94
  221. package/lib/components/login/Login.js.map +0 -1
  222. package/lib/components/login/LoginForm/index.js +0 -140
  223. package/lib/components/login/LoginForm/index.js.map +0 -1
  224. package/lib/components/login/Register.js +0 -104
  225. package/lib/components/login/Register.js.map +0 -1
  226. package/lib/components/login/RegisterForm/index.js +0 -237
  227. package/lib/components/login/RegisterForm/index.js.map +0 -1
  228. package/lib/components/login/jwtService.js +0 -239
  229. package/lib/components/login/jwtService.js.map +0 -1
  230. package/lib/components/molecules/slider/index.js +0 -22
  231. package/lib/components/molecules/slider/index.js.map +0 -1
  232. package/lib/components/molecules/slider/styles.js +0 -2
  233. package/lib/components/molecules/slider/styles.js.map +0 -1
  234. package/lib/components/myprojects/export.js +0 -12
  235. package/lib/components/myprojects/export.js.map +0 -1
  236. package/lib/components/myprojects/index.js +0 -453
  237. package/lib/components/myprojects/index.js.map +0 -1
  238. package/lib/components/myprojects/styles.js +0 -31
  239. package/lib/components/myprojects/styles.js.map +0 -1
  240. package/lib/components/sidebar/custom-accordion.js +0 -45
  241. package/lib/components/sidebar/custom-accordion.js.map +0 -1
  242. package/lib/components/sidebar/export.js +0 -50
  243. package/lib/components/sidebar/export.js.map +0 -1
  244. package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js +0 -74
  245. package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js.map +0 -1
  246. package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js +0 -124
  247. package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js.map +0 -1
  248. package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js +0 -135
  249. package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js.map +0 -1
  250. package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js +0 -260
  251. package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js.map +0 -1
  252. package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js +0 -84
  253. package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js.map +0 -1
  254. package/lib/components/sidebar/panel-element-editor/element-editor.js +0 -884
  255. package/lib/components/sidebar/panel-element-editor/element-editor.js.map +0 -1
  256. package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js +0 -2
  257. package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js.map +0 -1
  258. package/lib/components/sidebar/panel-element-editor/panel-element-editor.js +0 -56
  259. package/lib/components/sidebar/panel-element-editor/panel-element-editor.js.map +0 -1
  260. package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js +0 -125
  261. package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js.map +0 -1
  262. package/lib/components/sidebar/panel-group-editor.js +0 -218
  263. package/lib/components/sidebar/panel-group-editor.js.map +0 -1
  264. package/lib/components/sidebar/panel-groups.js +0 -274
  265. package/lib/components/sidebar/panel-groups.js.map +0 -1
  266. package/lib/components/sidebar/panel-guides.js +0 -192
  267. package/lib/components/sidebar/panel-guides.js.map +0 -1
  268. package/lib/components/sidebar/panel-layer-elements.js +0 -258
  269. package/lib/components/sidebar/panel-layer-elements.js.map +0 -1
  270. package/lib/components/sidebar/panel-layers.js +0 -347
  271. package/lib/components/sidebar/panel-layers.js.map +0 -1
  272. package/lib/components/sidebar/panel.js +0 -110
  273. package/lib/components/sidebar/panel.js.map +0 -1
  274. package/lib/components/sidebar/sidebar.js +0 -117
  275. package/lib/components/sidebar/sidebar.js.map +0 -1
  276. package/lib/components/sidebar/toolbar-panel.js +0 -171
  277. package/lib/components/sidebar/toolbar-panel.js.map +0 -1
  278. package/lib/components/sign/export.js +0 -18
  279. package/lib/components/sign/export.js.map +0 -1
  280. package/lib/components/sign/main/index.js +0 -567
  281. package/lib/components/sign/main/index.js.map +0 -1
  282. package/lib/components/sign/main/styles.js +0 -27
  283. package/lib/components/sign/main/styles.js.map +0 -1
  284. package/lib/components/style/button.js +0 -121
  285. package/lib/components/style/button.js.map +0 -1
  286. package/lib/components/style/cancel-button.js +0 -30
  287. package/lib/components/style/cancel-button.js.map +0 -1
  288. package/lib/components/style/content-container.js +0 -41
  289. package/lib/components/style/content-container.js.map +0 -1
  290. package/lib/components/style/content-title.js +0 -38
  291. package/lib/components/style/content-title.js.map +0 -1
  292. package/lib/components/style/delete-button.js +0 -35
  293. package/lib/components/style/delete-button.js.map +0 -1
  294. package/lib/components/style/export.js +0 -122
  295. package/lib/components/style/export.js.map +0 -1
  296. package/lib/components/style/form-block.js +0 -32
  297. package/lib/components/style/form-block.js.map +0 -1
  298. package/lib/components/style/form-color-input.js +0 -35
  299. package/lib/components/style/form-color-input.js.map +0 -1
  300. package/lib/components/style/form-label.js +0 -34
  301. package/lib/components/style/form-label.js.map +0 -1
  302. package/lib/components/style/form-number-input.js +0 -197
  303. package/lib/components/style/form-number-input.js.map +0 -1
  304. package/lib/components/style/form-number-input_2.js +0 -214
  305. package/lib/components/style/form-number-input_2.js.map +0 -1
  306. package/lib/components/style/form-select.js +0 -30
  307. package/lib/components/style/form-select.js.map +0 -1
  308. package/lib/components/style/form-slider.js +0 -53
  309. package/lib/components/style/form-slider.js.map +0 -1
  310. package/lib/components/style/form-submit-button.js +0 -36
  311. package/lib/components/style/form-submit-button.js.map +0 -1
  312. package/lib/components/style/form-text-input.js +0 -84
  313. package/lib/components/style/form-text-input.js.map +0 -1
  314. package/lib/components/toolbar/button/ControlButton.js +0 -76
  315. package/lib/components/toolbar/button/ControlButton.js.map +0 -1
  316. package/lib/components/toolbar/button/DirectionButton.js +0 -57
  317. package/lib/components/toolbar/button/DirectionButton.js.map +0 -1
  318. package/lib/components/toolbar/button/RightButton.js +0 -140
  319. package/lib/components/toolbar/button/RightButton.js.map +0 -1
  320. package/lib/components/toolbar/button/ToggleButton.js +0 -66
  321. package/lib/components/toolbar/button/ToggleButton.js.map +0 -1
  322. package/lib/components/toolbar/button/index.js +0 -94
  323. package/lib/components/toolbar/button/index.js.map +0 -1
  324. package/lib/components/toolbar/button/styles.js +0 -21
  325. package/lib/components/toolbar/button/styles.js.map +0 -1
  326. package/lib/components/toolbar/components/DoorStyleMenu.js +0 -112
  327. package/lib/components/toolbar/components/DoorStyleMenu.js.map +0 -1
  328. package/lib/components/toolbar/components/Pricing.js +0 -110
  329. package/lib/components/toolbar/components/Pricing.js.map +0 -1
  330. package/lib/components/toolbar/components/ReviewForQuote.js +0 -485
  331. package/lib/components/toolbar/components/ReviewForQuote.js.map +0 -1
  332. package/lib/components/toolbar/export.js +0 -50
  333. package/lib/components/toolbar/export.js.map +0 -1
  334. package/lib/components/toolbar/main/Alert.js +0 -132
  335. package/lib/components/toolbar/main/Alert.js.map +0 -1
  336. package/lib/components/toolbar/main/TakePictureModal.js +0 -109
  337. package/lib/components/toolbar/main/TakePictureModal.js.map +0 -1
  338. package/lib/components/toolbar/main/confirm-popup.js +0 -95
  339. package/lib/components/toolbar/main/confirm-popup.js.map +0 -1
  340. package/lib/components/toolbar/main/index.js +0 -4619
  341. package/lib/components/toolbar/main/index.js.map +0 -1
  342. package/lib/components/toolbar/main/myComponents.js +0 -125
  343. package/lib/components/toolbar/main/myComponents.js.map +0 -1
  344. package/lib/components/toolbar/main/styles.js +0 -73
  345. package/lib/components/toolbar/main/styles.js.map +0 -1
  346. package/lib/components/toolbar/plugin-item.js +0 -156
  347. package/lib/components/toolbar/plugin-item.js.map +0 -1
  348. package/lib/components/toolbar/popup/appliance/appliance-category/index.js +0 -86
  349. package/lib/components/toolbar/popup/appliance/appliance-category/index.js.map +0 -1
  350. package/lib/components/toolbar/popup/appliance/choose-appliance/index.js +0 -85
  351. package/lib/components/toolbar/popup/appliance/choose-appliance/index.js.map +0 -1
  352. package/lib/components/toolbar/popup/appliance/index.js +0 -89
  353. package/lib/components/toolbar/popup/appliance/index.js.map +0 -1
  354. package/lib/components/toolbar/popup/autosaveprompt/index.js +0 -99
  355. package/lib/components/toolbar/popup/autosaveprompt/index.js.map +0 -1
  356. package/lib/components/toolbar/popup/autosaveprompt/styles.js +0 -16
  357. package/lib/components/toolbar/popup/autosaveprompt/styles.js.map +0 -1
  358. package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js +0 -86
  359. package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js.map +0 -1
  360. package/lib/components/toolbar/popup/cabinet/choose-product/index.js +0 -107
  361. package/lib/components/toolbar/popup/cabinet/choose-product/index.js.map +0 -1
  362. package/lib/components/toolbar/popup/cabinet/index.js +0 -91
  363. package/lib/components/toolbar/popup/cabinet/index.js.map +0 -1
  364. package/lib/components/toolbar/popup/doorStyle/choose-style/index.js +0 -59
  365. package/lib/components/toolbar/popup/doorStyle/choose-style/index.js.map +0 -1
  366. package/lib/components/toolbar/popup/doorStyle/index.js +0 -68
  367. package/lib/components/toolbar/popup/doorStyle/index.js.map +0 -1
  368. package/lib/components/toolbar/popup/doorStyle/style-category/index.js +0 -152
  369. package/lib/components/toolbar/popup/doorStyle/style-category/index.js.map +0 -1
  370. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -9
  371. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js.map +0 -1
  372. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js +0 -128
  373. package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js.map +0 -1
  374. package/lib/components/toolbar/popup/downloadsummary/index.js +0 -572
  375. package/lib/components/toolbar/popup/downloadsummary/index.js.map +0 -1
  376. package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js +0 -60
  377. package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js.map +0 -1
  378. package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js +0 -200
  379. package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js.map +0 -1
  380. package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js +0 -254
  381. package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js.map +0 -1
  382. package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js +0 -1762
  383. package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js.map +0 -1
  384. package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -96
  385. package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js.map +0 -1
  386. package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js +0 -125
  387. package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js.map +0 -1
  388. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js +0 -1713
  389. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js.map +0 -1
  390. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js +0 -184
  391. package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js.map +0 -1
  392. package/lib/components/toolbar/popup/downloadsummary/showWarranty.js +0 -115
  393. package/lib/components/toolbar/popup/downloadsummary/showWarranty.js.map +0 -1
  394. package/lib/components/toolbar/popup/downloadsummary/styles.js +0 -47
  395. package/lib/components/toolbar/popup/downloadsummary/styles.js.map +0 -1
  396. package/lib/components/toolbar/popup/finishingtouch/category/index.js +0 -44
  397. package/lib/components/toolbar/popup/finishingtouch/category/index.js.map +0 -1
  398. package/lib/components/toolbar/popup/finishingtouch/index.js +0 -54
  399. package/lib/components/toolbar/popup/finishingtouch/index.js.map +0 -1
  400. package/lib/components/toolbar/popup/finishingtouch/material-edit.js +0 -163
  401. package/lib/components/toolbar/popup/finishingtouch/material-edit.js.map +0 -1
  402. package/lib/components/toolbar/popup/finishingtouch/product/index.js +0 -65
  403. package/lib/components/toolbar/popup/finishingtouch/product/index.js.map +0 -1
  404. package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js +0 -124
  405. package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js.map +0 -1
  406. package/lib/components/toolbar/popup/floorplan/choose-floor/index.js +0 -255
  407. package/lib/components/toolbar/popup/floorplan/choose-floor/index.js.map +0 -1
  408. package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -20
  409. package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js.map +0 -1
  410. package/lib/components/toolbar/popup/floorplan/floor-category/index.js +0 -99
  411. package/lib/components/toolbar/popup/floorplan/floor-category/index.js.map +0 -1
  412. package/lib/components/toolbar/popup/floorplan/index.js +0 -56
  413. package/lib/components/toolbar/popup/floorplan/index.js.map +0 -1
  414. package/lib/components/toolbar/popup/index.js +0 -195
  415. package/lib/components/toolbar/popup/index.js.map +0 -1
  416. package/lib/components/toolbar/popup/newproject/index.js +0 -75
  417. package/lib/components/toolbar/popup/newproject/index.js.map +0 -1
  418. package/lib/components/toolbar/popup/newproject/styles.js +0 -16
  419. package/lib/components/toolbar/popup/newproject/styles.js.map +0 -1
  420. package/lib/components/toolbar/popup/product/appliance.js +0 -73
  421. package/lib/components/toolbar/popup/product/appliance.js.map +0 -1
  422. package/lib/components/toolbar/popup/product/cabinetproduct.js +0 -33
  423. package/lib/components/toolbar/popup/product/cabinetproduct.js.map +0 -1
  424. package/lib/components/toolbar/popup/product/doorstyle.js +0 -59
  425. package/lib/components/toolbar/popup/product/doorstyle.js.map +0 -1
  426. package/lib/components/toolbar/popup/product/doorstyleproduct.js +0 -59
  427. package/lib/components/toolbar/popup/product/doorstyleproduct.js.map +0 -1
  428. package/lib/components/toolbar/popup/product/floor.js +0 -59
  429. package/lib/components/toolbar/popup/product/floor.js.map +0 -1
  430. package/lib/components/toolbar/popup/product/floorproduct.js +0 -68
  431. package/lib/components/toolbar/popup/product/floorproduct.js.map +0 -1
  432. package/lib/components/toolbar/popup/product/index.js +0 -59
  433. package/lib/components/toolbar/popup/product/index.js.map +0 -1
  434. package/lib/components/toolbar/popup/product/primary.js +0 -71
  435. package/lib/components/toolbar/popup/product/primary.js.map +0 -1
  436. package/lib/components/toolbar/popup/product/productline.js +0 -128
  437. package/lib/components/toolbar/popup/product/productline.js.map +0 -1
  438. package/lib/components/toolbar/popup/product/reviewItem.js +0 -346
  439. package/lib/components/toolbar/popup/product/reviewItem.js.map +0 -1
  440. package/lib/components/toolbar/popup/product/reviewMolding.js +0 -291
  441. package/lib/components/toolbar/popup/product/reviewMolding.js.map +0 -1
  442. package/lib/components/toolbar/popup/product/styles.js +0 -79
  443. package/lib/components/toolbar/popup/product/styles.js.map +0 -1
  444. package/lib/components/toolbar/popup/savedesign/FullPictureForm.js +0 -169
  445. package/lib/components/toolbar/popup/savedesign/FullPictureForm.js.map +0 -1
  446. package/lib/components/toolbar/popup/savedesign/index.js +0 -516
  447. package/lib/components/toolbar/popup/savedesign/index.js.map +0 -1
  448. package/lib/components/toolbar/popup/savedesign/styles.js +0 -26
  449. package/lib/components/toolbar/popup/savedesign/styles.js.map +0 -1
  450. package/lib/components/toolbar/popup/setDoorStyleOption/index.js +0 -64
  451. package/lib/components/toolbar/popup/setDoorStyleOption/index.js.map +0 -1
  452. package/lib/components/toolbar/popup/styles.js +0 -104
  453. package/lib/components/toolbar/popup/styles.js.map +0 -1
  454. package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js +0 -166
  455. package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js.map +0 -1
  456. package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js +0 -93
  457. package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js.map +0 -1
  458. package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js +0 -45
  459. package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js.map +0 -1
  460. package/lib/components/toolbar/popup/submitforquote/StepDots.js +0 -40
  461. package/lib/components/toolbar/popup/submitforquote/StepDots.js.map +0 -1
  462. package/lib/components/toolbar/popup/submitforquote/cart-choice.js +0 -141
  463. package/lib/components/toolbar/popup/submitforquote/cart-choice.js.map +0 -1
  464. package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -50
  465. package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js.map +0 -1
  466. package/lib/components/toolbar/popup/submitforquote/index.js +0 -698
  467. package/lib/components/toolbar/popup/submitforquote/index.js.map +0 -1
  468. package/lib/components/toolbar/popup/submitforquote/styles.js +0 -38
  469. package/lib/components/toolbar/popup/submitforquote/styles.js.map +0 -1
  470. package/lib/components/toolbar/popup/submitprompt/index.js +0 -79
  471. package/lib/components/toolbar/popup/submitprompt/index.js.map +0 -1
  472. package/lib/components/toolbar/popup/submitprompt/styles.js +0 -16
  473. package/lib/components/toolbar/popup/submitprompt/styles.js.map +0 -1
  474. package/lib/components/toolbar/toolbar-button.js +0 -111
  475. package/lib/components/toolbar/toolbar-button.js.map +0 -1
  476. package/lib/components/toolbar/toolbar-load-button.js +0 -36
  477. package/lib/components/toolbar/toolbar-load-button.js.map +0 -1
  478. package/lib/components/toolbar/toolbar-save-button.js +0 -34
  479. package/lib/components/toolbar/toolbar-save-button.js.map +0 -1
  480. package/lib/components/tutorial-view/Modal.js +0 -503
  481. package/lib/components/tutorial-view/Modal.js.map +0 -1
  482. package/lib/components/tutorial-view/styles.js +0 -13
  483. package/lib/components/tutorial-view/styles.js.map +0 -1
  484. package/lib/components/viewer2d/area.js +0 -90
  485. package/lib/components/viewer2d/area.js.map +0 -1
  486. package/lib/components/viewer2d/export.js +0 -122
  487. package/lib/components/viewer2d/export.js.map +0 -1
  488. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -45
  489. package/lib/components/viewer2d/grids/grid-horizontal-streak.js.map +0 -1
  490. package/lib/components/viewer2d/grids/grid-streak.js +0 -45
  491. package/lib/components/viewer2d/grids/grid-streak.js.map +0 -1
  492. package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -45
  493. package/lib/components/viewer2d/grids/grid-vertical-streak.js.map +0 -1
  494. package/lib/components/viewer2d/grids/grids.js +0 -45
  495. package/lib/components/viewer2d/grids/grids.js.map +0 -1
  496. package/lib/components/viewer2d/group.js +0 -63
  497. package/lib/components/viewer2d/group.js.map +0 -1
  498. package/lib/components/viewer2d/item.js +0 -522
  499. package/lib/components/viewer2d/item.js.map +0 -1
  500. package/lib/components/viewer2d/layer.js +0 -172
  501. package/lib/components/viewer2d/layer.js.map +0 -1
  502. package/lib/components/viewer2d/line.js +0 -899
  503. package/lib/components/viewer2d/line.js.map +0 -1
  504. package/lib/components/viewer2d/ruler.js +0 -108
  505. package/lib/components/viewer2d/ruler.js.map +0 -1
  506. package/lib/components/viewer2d/rulerDist.js +0 -154
  507. package/lib/components/viewer2d/rulerDist.js.map +0 -1
  508. package/lib/components/viewer2d/rulerX.js +0 -159
  509. package/lib/components/viewer2d/rulerX.js.map +0 -1
  510. package/lib/components/viewer2d/rulerY.js +0 -161
  511. package/lib/components/viewer2d/rulerY.js.map +0 -1
  512. package/lib/components/viewer2d/scene.js +0 -148
  513. package/lib/components/viewer2d/scene.js.map +0 -1
  514. package/lib/components/viewer2d/snap.js +0 -84
  515. package/lib/components/viewer2d/snap.js.map +0 -1
  516. package/lib/components/viewer2d/state.js +0 -88
  517. package/lib/components/viewer2d/state.js.map +0 -1
  518. package/lib/components/viewer2d/utils.js +0 -174
  519. package/lib/components/viewer2d/utils.js.map +0 -1
  520. package/lib/components/viewer2d/vertex.js +0 -76
  521. package/lib/components/viewer2d/vertex.js.map +0 -1
  522. package/lib/components/viewer2d/viewer2d.js +0 -1409
  523. package/lib/components/viewer2d/viewer2d.js.map +0 -1
  524. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2598
  525. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js.map +0 -1
  526. package/lib/components/viewer3d/dcm.js +0 -408
  527. package/lib/components/viewer3d/dcm.js.map +0 -1
  528. package/lib/components/viewer3d/fbm.js +0 -421
  529. package/lib/components/viewer3d/fbm.js.map +0 -1
  530. package/lib/components/viewer3d/front3D.js +0 -76
  531. package/lib/components/viewer3d/front3D.js.map +0 -1
  532. package/lib/components/viewer3d/grid-creator.js +0 -35
  533. package/lib/components/viewer3d/grid-creator.js.map +0 -1
  534. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +0 -45
  535. package/lib/components/viewer3d/grids/grid-horizontal-streak.js.map +0 -1
  536. package/lib/components/viewer3d/grids/grid-streak.js +0 -36
  537. package/lib/components/viewer3d/grids/grid-streak.js.map +0 -1
  538. package/lib/components/viewer3d/grids/grid-vertical-streak.js +0 -45
  539. package/lib/components/viewer3d/grids/grid-vertical-streak.js.map +0 -1
  540. package/lib/components/viewer3d/libs/first-person-controls.js +0 -75
  541. package/lib/components/viewer3d/libs/first-person-controls.js.map +0 -1
  542. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1288
  543. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js.map +0 -1
  544. package/lib/components/viewer3d/libs/mtl-loader.js +0 -360
  545. package/lib/components/viewer3d/libs/mtl-loader.js.map +0 -1
  546. package/lib/components/viewer3d/libs/obj-loader.js +0 -465
  547. package/lib/components/viewer3d/libs/obj-loader.js.map +0 -1
  548. package/lib/components/viewer3d/libs/orbit-controls.js +0 -701
  549. package/lib/components/viewer3d/libs/orbit-controls.js.map +0 -1
  550. package/lib/components/viewer3d/libs/pointer-lock-controls.js +0 -48
  551. package/lib/components/viewer3d/libs/pointer-lock-controls.js.map +0 -1
  552. package/lib/components/viewer3d/lrm.js +0 -312
  553. package/lib/components/viewer3d/lrm.js.map +0 -1
  554. package/lib/components/viewer3d/model.js +0 -715
  555. package/lib/components/viewer3d/model.js.map +0 -1
  556. package/lib/components/viewer3d/pointer-lock-navigation.js +0 -123
  557. package/lib/components/viewer3d/pointer-lock-navigation.js.map +0 -1
  558. package/lib/components/viewer3d/ruler-utils/itemRect.js +0 -69
  559. package/lib/components/viewer3d/ruler-utils/itemRect.js.map +0 -1
  560. package/lib/components/viewer3d/ruler-utils/layer3D.js +0 -503
  561. package/lib/components/viewer3d/ruler-utils/layer3D.js.map +0 -1
  562. package/lib/components/viewer3d/ruler-utils/ruler3D.js +0 -235
  563. package/lib/components/viewer3d/ruler-utils/ruler3D.js.map +0 -1
  564. package/lib/components/viewer3d/ruler-utils/scene3D.js +0 -70
  565. package/lib/components/viewer3d/ruler-utils/scene3D.js.map +0 -1
  566. package/lib/components/viewer3d/ruler-utils/state3D.js +0 -26
  567. package/lib/components/viewer3d/ruler-utils/state3D.js.map +0 -1
  568. package/lib/components/viewer3d/scene-creator.js +0 -3641
  569. package/lib/components/viewer3d/scene-creator.js.map +0 -1
  570. package/lib/components/viewer3d/three-memory-cleaner.js +0 -61
  571. package/lib/components/viewer3d/three-memory-cleaner.js.map +0 -1
  572. package/lib/components/viewer3d/viewer3d-first-person.js +0 -321
  573. package/lib/components/viewer3d/viewer3d-first-person.js.map +0 -1
  574. package/lib/components/viewer3d/viewer3d.js +0 -2508
  575. package/lib/components/viewer3d/viewer3d.js.map +0 -1
  576. package/lib/components/wizardstep/button/styles.js +0 -67
  577. package/lib/components/wizardstep/button/styles.js.map +0 -1
  578. package/lib/components/wizardstep/export.js +0 -12
  579. package/lib/components/wizardstep/export.js.map +0 -1
  580. package/lib/components/wizardstep/index.js +0 -978
  581. package/lib/components/wizardstep/index.js.map +0 -1
  582. package/lib/components/wizardstep/styles.js +0 -68
  583. package/lib/components/wizardstep/styles.js.map +0 -1
  584. package/lib/components/wizardstep/wizardstep-content-button.js +0 -224
  585. package/lib/components/wizardstep/wizardstep-content-button.js.map +0 -1
  586. package/lib/components/wizardstep/wizardstep-toggle-button.js +0 -133
  587. package/lib/components/wizardstep/wizardstep-toggle-button.js.map +0 -1
  588. package/lib/constants.js +0 -646
  589. package/lib/constants.js.map +0 -1
  590. package/lib/hooks/useCheckCart.js +0 -60
  591. package/lib/hooks/useCheckCart.js.map +0 -1
  592. package/lib/hooks/useGetPricesBySku.js +0 -81
  593. package/lib/hooks/useGetPricesBySku.js.map +0 -1
  594. package/lib/hooks/useValidateToken.js +0 -207
  595. package/lib/hooks/useValidateToken.js.map +0 -1
  596. package/lib/index.js +0 -102
  597. package/lib/index.js.map +0 -1
  598. package/lib/models.js +0 -518
  599. package/lib/models.js.map +0 -1
  600. package/lib/plugins/SVGLoader.js +0 -1418
  601. package/lib/plugins/SVGLoader.js.map +0 -1
  602. package/lib/plugins/autosave.js +0 -40
  603. package/lib/plugins/autosave.js.map +0 -1
  604. package/lib/plugins/console-debugger.js +0 -45
  605. package/lib/plugins/console-debugger.js.map +0 -1
  606. package/lib/plugins/export.js +0 -34
  607. package/lib/plugins/export.js.map +0 -1
  608. package/lib/plugins/keyboard.js +0 -108
  609. package/lib/plugins/keyboard.js.map +0 -1
  610. package/lib/reducers/areas-reducer.js +0 -19
  611. package/lib/reducers/areas-reducer.js.map +0 -1
  612. package/lib/reducers/export.js +0 -98
  613. package/lib/reducers/export.js.map +0 -1
  614. package/lib/reducers/groups-reducer.js +0 -45
  615. package/lib/reducers/groups-reducer.js.map +0 -1
  616. package/lib/reducers/holes-reducer.js +0 -69
  617. package/lib/reducers/holes-reducer.js.map +0 -1
  618. package/lib/reducers/items-reducer.js +0 -147
  619. package/lib/reducers/items-reducer.js.map +0 -1
  620. package/lib/reducers/lines-reducer.js +0 -52
  621. package/lib/reducers/lines-reducer.js.map +0 -1
  622. package/lib/reducers/project-reducer.js +0 -136
  623. package/lib/reducers/project-reducer.js.map +0 -1
  624. package/lib/reducers/reducer.js +0 -27
  625. package/lib/reducers/reducer.js.map +0 -1
  626. package/lib/reducers/scene-reducer.js +0 -35
  627. package/lib/reducers/scene-reducer.js.map +0 -1
  628. package/lib/reducers/user-reducer.js +0 -48
  629. package/lib/reducers/user-reducer.js.map +0 -1
  630. package/lib/reducers/vertices-reducer.js +0 -26
  631. package/lib/reducers/vertices-reducer.js.map +0 -1
  632. package/lib/reducers/viewer2d-reducer.js +0 -83
  633. package/lib/reducers/viewer2d-reducer.js.map +0 -1
  634. package/lib/reducers/viewer3d-reducer.js +0 -64
  635. package/lib/reducers/viewer3d-reducer.js.map +0 -1
  636. package/lib/shared-style.js +0 -73
  637. package/lib/shared-style.js.map +0 -1
  638. package/lib/styles/export.js +0 -14
  639. package/lib/styles/export.js.map +0 -1
  640. package/lib/translator/en.js +0 -111
  641. package/lib/translator/en.js.map +0 -1
  642. package/lib/translator/it.js +0 -86
  643. package/lib/translator/it.js.map +0 -1
  644. package/lib/translator/ru.js +0 -86
  645. package/lib/translator/ru.js.map +0 -1
  646. package/lib/translator/translator.js +0 -91
  647. package/lib/translator/translator.js.map +0 -1
  648. package/lib/utils/browser.js +0 -41
  649. package/lib/utils/browser.js.map +0 -1
  650. package/lib/utils/email-validator.js +0 -11
  651. package/lib/utils/email-validator.js.map +0 -1
  652. package/lib/utils/export.js +0 -57
  653. package/lib/utils/export.js.map +0 -1
  654. package/lib/utils/geometry.js +0 -2329
  655. package/lib/utils/geometry.js.map +0 -1
  656. package/lib/utils/get-edges-of-subgraphs.js +0 -29
  657. package/lib/utils/get-edges-of-subgraphs.js.map +0 -1
  658. package/lib/utils/graph-cycles.js +0 -241
  659. package/lib/utils/graph-cycles.js.map +0 -1
  660. package/lib/utils/graph-inner-cycles.js +0 -55
  661. package/lib/utils/graph-inner-cycles.js.map +0 -1
  662. package/lib/utils/graph.js +0 -152
  663. package/lib/utils/graph.js.map +0 -1
  664. package/lib/utils/helper.js +0 -360
  665. package/lib/utils/helper.js.map +0 -1
  666. package/lib/utils/history.js +0 -37
  667. package/lib/utils/history.js.map +0 -1
  668. package/lib/utils/id-broker.js +0 -26
  669. package/lib/utils/id-broker.js.map +0 -1
  670. package/lib/utils/logger.js +0 -15
  671. package/lib/utils/logger.js.map +0 -1
  672. package/lib/utils/math.js +0 -58
  673. package/lib/utils/math.js.map +0 -1
  674. package/lib/utils/molding.js +0 -864
  675. package/lib/utils/molding.js.map +0 -1
  676. package/lib/utils/name-generator.js +0 -24
  677. package/lib/utils/name-generator.js.map +0 -1
  678. package/lib/utils/objects-utils.js +0 -61
  679. package/lib/utils/objects-utils.js.map +0 -1
  680. package/lib/utils/phone-validator.js +0 -11
  681. package/lib/utils/phone-validator.js.map +0 -1
  682. package/lib/utils/process-black-list.js +0 -25
  683. package/lib/utils/process-black-list.js.map +0 -1
  684. package/lib/utils/react-if.js +0 -25
  685. package/lib/utils/react-if.js.map +0 -1
  686. package/lib/utils/snap-scene.js +0 -106
  687. package/lib/utils/snap-scene.js.map +0 -1
  688. package/lib/utils/snap.js +0 -250
  689. package/lib/utils/snap.js.map +0 -1
  690. package/lib/utils/threeCSG.es6.js +0 -504
  691. package/lib/utils/threeCSG.es6.js.map +0 -1
  692. package/lib/version.js +0 -8
  693. package/lib/version.js.map +0 -1
  694. package/src/@history.js +0 -3
  695. package/src/AppContext.js +0 -5
  696. package/src/KitchenConfigurator.jsx +0 -1517
  697. package/src/KitchenConfiguratorApp.jsx +0 -443
  698. package/src/actions/area-actions.js +0 -15
  699. package/src/actions/export.js +0 -38
  700. package/src/actions/groups-actions.js +0 -102
  701. package/src/actions/holes-actions.js +0 -152
  702. package/src/actions/items-actions.js +0 -393
  703. package/src/actions/lines-actions.js +0 -103
  704. package/src/actions/project-actions.js +0 -391
  705. package/src/actions/scene-actions.js +0 -44
  706. package/src/actions/user-actions.js +0 -75
  707. package/src/actions/vertices-actions.js +0 -34
  708. package/src/actions/viewer2d-actions.js +0 -79
  709. package/src/actions/viewer3d-actions.js +0 -32
  710. package/src/catalog/areas/area/planner-element.jsx +0 -43
  711. package/src/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  712. package/src/catalog/areas/area/textures/grass.jpg +0 -0
  713. package/src/catalog/areas/area/textures/parquet.jpg +0 -0
  714. package/src/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  715. package/src/catalog/areas/area/textures/tile1.jpg +0 -0
  716. package/src/catalog/back.png +0 -0
  717. package/src/catalog/catalog.js +0 -258
  718. package/src/catalog/doors.png +0 -0
  719. package/src/catalog/doorways.png +0 -0
  720. package/src/catalog/envMap/nx.hdr +0 -0
  721. package/src/catalog/envMap/ny.hdr +0 -0
  722. package/src/catalog/envMap/nz.hdr +0 -0
  723. package/src/catalog/envMap/px.hdr +0 -0
  724. package/src/catalog/envMap/py.hdr +0 -0
  725. package/src/catalog/envMap/pz.hdr +0 -0
  726. package/src/catalog/factories/area-factory-3d.js +0 -252
  727. package/src/catalog/factories/area-factory.jsx +0 -102
  728. package/src/catalog/factories/export.js +0 -9
  729. package/src/catalog/factories/wall-factory-3d.js +0 -296
  730. package/src/catalog/factories/wall-factory.jsx +0 -321
  731. package/src/catalog/holes/door-closet/planner-element.jsx +0 -251
  732. package/src/catalog/holes/door-double/door_double.png +0 -0
  733. package/src/catalog/holes/door-double/planner-element.jsx +0 -391
  734. package/src/catalog/holes/door-exterior/planner-element.jsx +0 -245
  735. package/src/catalog/holes/door-interior/planner-element.jsx +0 -256
  736. package/src/catalog/holes/door-panic/panicDoor.png +0 -0
  737. package/src/catalog/holes/door-panic/planner-element.jsx +0 -594
  738. package/src/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  739. package/src/catalog/holes/door-panic-double/planner-element.jsx +0 -574
  740. package/src/catalog/holes/door-sliding/planner-element.jsx +0 -256
  741. package/src/catalog/holes/doorway-framed/planner-element.jsx +0 -169
  742. package/src/catalog/holes/doorway-frameless/planner-element.jsx +0 -116
  743. package/src/catalog/holes/gate/gate.jpg +0 -0
  744. package/src/catalog/holes/window-clear/planner-element.jsx +0 -181
  745. package/src/catalog/holes/window-clear/texture.png +0 -0
  746. package/src/catalog/holes/window-cross/planner-element.jsx +0 -180
  747. package/src/catalog/holes/window-cross/texture.png +0 -0
  748. package/src/catalog/holes/window-double-hung/planner-element.jsx +0 -366
  749. package/src/catalog/holes/window-double-hung/texture.png +0 -0
  750. package/src/catalog/holes/window-vertical/planner-element.jsx +0 -290
  751. package/src/catalog/holes/window-vertical/texture.png +0 -0
  752. package/src/catalog/lines/wall/planner-element.jsx +0 -73
  753. package/src/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  754. package/src/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  755. package/src/catalog/lines/wall/textures/bricks.jpg +0 -0
  756. package/src/catalog/lines/wall/textures/bricks2.jpg +0 -0
  757. package/src/catalog/lines/wall/textures/bricks3.jpg +0 -0
  758. package/src/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  759. package/src/catalog/lines/wall/textures/morden.jpg +0 -0
  760. package/src/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  761. package/src/catalog/lines/wall/textures/painted.jpg +0 -0
  762. package/src/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  763. package/src/catalog/lines/wall/textures/plaster.jpg +0 -0
  764. package/src/catalog/lines/wall/wall.png +0 -0
  765. package/src/catalog/molding/molding-dcm/planner-element.jsx +0 -35
  766. package/src/catalog/molding/molding-dcm/texture.png +0 -0
  767. package/src/catalog/molding/molding-fbm/planner-element.jsx +0 -35
  768. package/src/catalog/molding/molding-fbm/texture.png +0 -0
  769. package/src/catalog/molding/molding-lrm/planner-element.jsx +0 -35
  770. package/src/catalog/molding/molding-lrm/texture.png +0 -0
  771. package/src/catalog/properties/export.js +0 -33
  772. package/src/catalog/properties/property-checkbox.jsx +0 -123
  773. package/src/catalog/properties/property-color.jsx +0 -52
  774. package/src/catalog/properties/property-enum.jsx +0 -87
  775. package/src/catalog/properties/property-hidden.jsx +0 -22
  776. package/src/catalog/properties/property-lenght-measure.jsx +0 -113
  777. package/src/catalog/properties/property-length-measure.jsx +0 -129
  778. package/src/catalog/properties/property-length-measure_hole.jsx +0 -110
  779. package/src/catalog/properties/property-number.jsx +0 -63
  780. package/src/catalog/properties/property-read-only.jsx +0 -37
  781. package/src/catalog/properties/property-string.jsx +0 -59
  782. package/src/catalog/properties/property-toggle.jsx +0 -51
  783. package/src/catalog/properties/shared-property-style.js +0 -13
  784. package/src/catalog/utils/FuseUtils.js +0 -61
  785. package/src/catalog/utils/exporter.js +0 -173
  786. package/src/catalog/utils/geom-utils.js +0 -301
  787. package/src/catalog/utils/item-loader.jsx +0 -2122
  788. package/src/catalog/utils/load-obj.js +0 -113
  789. package/src/catalog/utils/mtl-loader.js +0 -462
  790. package/src/catalog/utils/obj-loader.js +0 -544
  791. package/src/catalog/windows.png +0 -0
  792. package/src/class/FuseUtils.js +0 -61
  793. package/src/class/area.js +0 -159
  794. package/src/class/export.js +0 -37
  795. package/src/class/group.js +0 -565
  796. package/src/class/guide.js +0 -44
  797. package/src/class/hole.js +0 -1359
  798. package/src/class/item.js +0 -2050
  799. package/src/class/layer.js +0 -926
  800. package/src/class/line.js +0 -1780
  801. package/src/class/project.js +0 -875
  802. package/src/class/vertex.js +0 -409
  803. package/src/components/atoms/Snackbar/index.jsx +0 -43
  804. package/src/components/atoms/radio-button/index.jsx +0 -20
  805. package/src/components/atoms/radio-button/styles.js +0 -56
  806. package/src/components/button/MainButton.jsx +0 -157
  807. package/src/components/button/ToggleMeasureButton.jsx +0 -65
  808. package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
  809. package/src/components/catalog-view/catalog-item.jsx +0 -229
  810. package/src/components/catalog-view/catalog-list.jsx +0 -173
  811. package/src/components/catalog-view/catalog-page-item.jsx +0 -110
  812. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
  813. package/src/components/configurator/custom-configurator.jsx +0 -77
  814. package/src/components/configurator/project-configurator.jsx +0 -120
  815. package/src/components/content.jsx +0 -136
  816. package/src/components/export.js +0 -36
  817. package/src/components/firstsetting/button/styles.js +0 -223
  818. package/src/components/firstsetting/export.js +0 -9
  819. package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
  820. package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
  821. package/src/components/firstsetting/firstsetting.jsx +0 -814
  822. package/src/components/footerbar/button/ControlButton.jsx +0 -43
  823. package/src/components/footerbar/button/DirectionButton.jsx +0 -54
  824. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
  825. package/src/components/footerbar/button/ToggleButton.jsx +0 -58
  826. package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
  827. package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
  828. package/src/components/footerbar/button/styles.js +0 -217
  829. package/src/components/footerbar/export.js +0 -9
  830. package/src/components/footerbar/footer-content-button.jsx +0 -198
  831. package/src/components/footerbar/footer-toggle-button.jsx +0 -101
  832. package/src/components/footerbar/footerbar.jsx +0 -1103
  833. package/src/components/footerbar/styles.js +0 -263
  834. package/src/components/header/button/MenuButton.jsx +0 -46
  835. package/src/components/header/button/SaveButton.jsx +0 -54
  836. package/src/components/header/button/styles.js +0 -181
  837. package/src/components/header/export.js +0 -5
  838. package/src/components/header/header.jsx +0 -631
  839. package/src/components/header/header.style.css +0 -47
  840. package/src/components/header/styles.js +0 -320
  841. package/src/components/login/Login.js +0 -77
  842. package/src/components/login/LoginForm/index.js +0 -108
  843. package/src/components/login/Register.js +0 -83
  844. package/src/components/login/RegisterForm/index.js +0 -171
  845. package/src/components/login/jwtService.js +0 -201
  846. package/src/components/login/style.css +0 -158
  847. package/src/components/login/style.scss +0 -260
  848. package/src/components/molecules/slider/index.jsx +0 -15
  849. package/src/components/molecules/slider/styles.js +0 -0
  850. package/src/components/molecules/slider/styles.scss +0 -3
  851. package/src/components/myprojects/export.js +0 -5
  852. package/src/components/myprojects/index.jsx +0 -445
  853. package/src/components/myprojects/styles.js +0 -241
  854. package/src/components/sidebar/custom-accordion.jsx +0 -48
  855. package/src/components/sidebar/export.js +0 -15
  856. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
  857. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
  858. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
  859. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
  860. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
  861. package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
  862. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  863. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
  864. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
  865. package/src/components/sidebar/panel-group-editor.jsx +0 -272
  866. package/src/components/sidebar/panel-groups.jsx +0 -310
  867. package/src/components/sidebar/panel-guides.jsx +0 -192
  868. package/src/components/sidebar/panel-layer-elements.jsx +0 -298
  869. package/src/components/sidebar/panel-layers.jsx +0 -381
  870. package/src/components/sidebar/panel.jsx +0 -71
  871. package/src/components/sidebar/sidebar.jsx +0 -106
  872. package/src/components/sidebar/toolbar-panel.jsx +0 -139
  873. package/src/components/sign/export.js +0 -7
  874. package/src/components/sign/main/index.jsx +0 -523
  875. package/src/components/sign/main/styles.js +0 -163
  876. package/src/components/style/button.jsx +0 -95
  877. package/src/components/style/cancel-button.jsx +0 -20
  878. package/src/components/style/content-container.jsx +0 -29
  879. package/src/components/style/content-title.jsx +0 -20
  880. package/src/components/style/delete-button.jsx +0 -23
  881. package/src/components/style/export.jsx +0 -48
  882. package/src/components/style/form-block.jsx +0 -13
  883. package/src/components/style/form-color-input.jsx +0 -27
  884. package/src/components/style/form-label.jsx +0 -15
  885. package/src/components/style/form-number-input.jsx +0 -196
  886. package/src/components/style/form-number-input_2.jsx +0 -191
  887. package/src/components/style/form-select.jsx +0 -38
  888. package/src/components/style/form-slider.jsx +0 -36
  889. package/src/components/style/form-submit-button.jsx +0 -23
  890. package/src/components/style/form-text-input.jsx +0 -65
  891. package/src/components/toolbar/button/ControlButton.jsx +0 -41
  892. package/src/components/toolbar/button/DirectionButton.jsx +0 -34
  893. package/src/components/toolbar/button/RightButton.jsx +0 -103
  894. package/src/components/toolbar/button/ToggleButton.jsx +0 -41
  895. package/src/components/toolbar/button/index.jsx +0 -55
  896. package/src/components/toolbar/button/styles.js +0 -127
  897. package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
  898. package/src/components/toolbar/components/Pricing.jsx +0 -126
  899. package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
  900. package/src/components/toolbar/export.js +0 -21
  901. package/src/components/toolbar/main/Alert.js +0 -122
  902. package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
  903. package/src/components/toolbar/main/confirm-popup.jsx +0 -99
  904. package/src/components/toolbar/main/index.jsx +0 -5687
  905. package/src/components/toolbar/main/lShaped.json +0 -311
  906. package/src/components/toolbar/main/longNarrow.json +0 -238
  907. package/src/components/toolbar/main/myComponents.js +0 -123
  908. package/src/components/toolbar/main/oRectangle.json +0 -220
  909. package/src/components/toolbar/main/rectangle.json +0 -238
  910. package/src/components/toolbar/main/style.css +0 -107
  911. package/src/components/toolbar/main/styles.js +0 -696
  912. package/src/components/toolbar/plugin-item.jsx +0 -123
  913. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
  914. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
  915. package/src/components/toolbar/popup/appliance/index.jsx +0 -83
  916. package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
  917. package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
  918. package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
  919. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
  920. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
  921. package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
  922. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
  923. package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
  924. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
  925. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
  926. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
  927. package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
  928. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
  929. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
  930. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
  931. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
  932. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
  933. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
  934. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
  935. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
  936. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
  937. package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
  938. package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
  939. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
  940. package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
  941. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
  942. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
  943. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
  944. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
  945. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
  946. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
  947. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
  948. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
  949. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
  950. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
  951. package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
  952. package/src/components/toolbar/popup/index.jsx +0 -241
  953. package/src/components/toolbar/popup/newproject/index.jsx +0 -59
  954. package/src/components/toolbar/popup/newproject/styles.css +0 -64
  955. package/src/components/toolbar/popup/newproject/styles.js +0 -41
  956. package/src/components/toolbar/popup/product/appliance.jsx +0 -54
  957. package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
  958. package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
  959. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
  960. package/src/components/toolbar/popup/product/floor.jsx +0 -36
  961. package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
  962. package/src/components/toolbar/popup/product/index.jsx +0 -36
  963. package/src/components/toolbar/popup/product/primary.jsx +0 -77
  964. package/src/components/toolbar/popup/product/productline.jsx +0 -93
  965. package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
  966. package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
  967. package/src/components/toolbar/popup/product/style.css +0 -54
  968. package/src/components/toolbar/popup/product/styles.js +0 -260
  969. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
  970. package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
  971. package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
  972. package/src/components/toolbar/popup/savedesign/styles.js +0 -151
  973. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
  974. package/src/components/toolbar/popup/styles.js +0 -909
  975. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
  976. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
  977. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
  978. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
  979. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
  980. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
  981. package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
  982. package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
  983. package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
  984. package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
  985. package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
  986. package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
  987. package/src/components/toolbar/toolbar-button.jsx +0 -90
  988. package/src/components/toolbar/toolbar-load-button.jsx +0 -36
  989. package/src/components/toolbar/toolbar-save-button.jsx +0 -32
  990. package/src/components/tutorial-view/Modal.jsx +0 -584
  991. package/src/components/tutorial-view/style.css +0 -111
  992. package/src/components/tutorial-view/styles.js +0 -65
  993. package/src/components/viewer2d/area.jsx +0 -98
  994. package/src/components/viewer2d/export.js +0 -48
  995. package/src/components/viewer2d/grids/grid-horizontal-streak.jsx +0 -40
  996. package/src/components/viewer2d/grids/grid-streak.jsx +0 -32
  997. package/src/components/viewer2d/grids/grid-vertical-streak.jsx +0 -41
  998. package/src/components/viewer2d/grids/grids.jsx +0 -30
  999. package/src/components/viewer2d/group.jsx +0 -57
  1000. package/src/components/viewer2d/item.jsx +0 -618
  1001. package/src/components/viewer2d/layer.jsx +0 -214
  1002. package/src/components/viewer2d/line.jsx +0 -1358
  1003. package/src/components/viewer2d/ruler.jsx +0 -136
  1004. package/src/components/viewer2d/rulerDist.jsx +0 -192
  1005. package/src/components/viewer2d/rulerX.jsx +0 -141
  1006. package/src/components/viewer2d/rulerY.jsx +0 -138
  1007. package/src/components/viewer2d/scene.jsx +0 -94
  1008. package/src/components/viewer2d/snap.jsx +0 -118
  1009. package/src/components/viewer2d/state.jsx +0 -77
  1010. package/src/components/viewer2d/utils.js +0 -195
  1011. package/src/components/viewer2d/vertex.jsx +0 -76
  1012. package/src/components/viewer2d/viewer2d.jsx +0 -1830
  1013. package/src/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -3078
  1014. package/src/components/viewer3d/dcm.js +0 -226
  1015. package/src/components/viewer3d/fbm.js +0 -383
  1016. package/src/components/viewer3d/front3D.jsx +0 -63
  1017. package/src/components/viewer3d/grid-creator.js +0 -25
  1018. package/src/components/viewer3d/grids/grid-horizontal-streak.js +0 -41
  1019. package/src/components/viewer3d/grids/grid-streak.js +0 -34
  1020. package/src/components/viewer3d/grids/grid-vertical-streak.js +0 -42
  1021. package/src/components/viewer3d/libs/first-person-controls.js +0 -70
  1022. package/src/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1265
  1023. package/src/components/viewer3d/libs/mtl-loader.js +0 -462
  1024. package/src/components/viewer3d/libs/obj-loader.js +0 -653
  1025. package/src/components/viewer3d/libs/orbit-controls.js +0 -945
  1026. package/src/components/viewer3d/libs/pointer-lock-controls.js +0 -67
  1027. package/src/components/viewer3d/lrm.js +0 -358
  1028. package/src/components/viewer3d/model.js +0 -830
  1029. package/src/components/viewer3d/pointer-lock-navigation.js +0 -140
  1030. package/src/components/viewer3d/ruler-utils/itemRect.jsx +0 -91
  1031. package/src/components/viewer3d/ruler-utils/layer3D.jsx +0 -528
  1032. package/src/components/viewer3d/ruler-utils/ruler3D.jsx +0 -218
  1033. package/src/components/viewer3d/ruler-utils/scene3D.jsx +0 -87
  1034. package/src/components/viewer3d/ruler-utils/state3D.jsx +0 -25
  1035. package/src/components/viewer3d/scene-creator.js +0 -5172
  1036. package/src/components/viewer3d/three-memory-cleaner.js +0 -65
  1037. package/src/components/viewer3d/viewer3d-first-person.js +0 -395
  1038. package/src/components/viewer3d/viewer3d.js +0 -3376
  1039. package/src/components/wizardstep/button/styles.js +0 -677
  1040. package/src/components/wizardstep/export.js +0 -5
  1041. package/src/components/wizardstep/index.jsx +0 -1372
  1042. package/src/components/wizardstep/styles.js +0 -688
  1043. package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
  1044. package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
  1045. package/src/constants.js +0 -731
  1046. package/src/hooks/useCheckCart.js +0 -38
  1047. package/src/hooks/useGetPricesBySku.js +0 -59
  1048. package/src/hooks/useValidateToken.js +0 -181
  1049. package/src/index.js +0 -32
  1050. package/src/models.js +0 -541
  1051. package/src/plugins/SVGLoader.js +0 -1991
  1052. package/src/plugins/autosave.js +0 -39
  1053. package/src/plugins/console-debugger.js +0 -36
  1054. package/src/plugins/export.js +0 -11
  1055. package/src/plugins/keyboard.js +0 -194
  1056. package/src/reducers/areas-reducer.js +0 -13
  1057. package/src/reducers/export.js +0 -39
  1058. package/src/reducers/groups-reducer.js +0 -73
  1059. package/src/reducers/holes-reducer.js +0 -125
  1060. package/src/reducers/items-reducer.js +0 -286
  1061. package/src/reducers/lines-reducer.js +0 -96
  1062. package/src/reducers/project-reducer.js +0 -239
  1063. package/src/reducers/reducer.js +0 -59
  1064. package/src/reducers/scene-reducer.js +0 -41
  1065. package/src/reducers/user-reducer.js +0 -30
  1066. package/src/reducers/vertices-reducer.js +0 -34
  1067. package/src/reducers/viewer2d-reducer.js +0 -81
  1068. package/src/reducers/viewer3d-reducer.js +0 -65
  1069. package/src/shared-style.js +0 -72
  1070. package/src/styles/export.js +0 -7
  1071. package/src/styles/tabs.css +0 -40
  1072. package/src/translator/en.js +0 -106
  1073. package/src/translator/it.js +0 -80
  1074. package/src/translator/ru.js +0 -80
  1075. package/src/translator/translator.js +0 -81
  1076. package/src/utils/browser.js +0 -36
  1077. package/src/utils/email-validator.js +0 -5
  1078. package/src/utils/export.js +0 -39
  1079. package/src/utils/geometry.js +0 -2572
  1080. package/src/utils/get-edges-of-subgraphs.js +0 -29
  1081. package/src/utils/graph-cycles.js +0 -259
  1082. package/src/utils/graph-inner-cycles.js +0 -49
  1083. package/src/utils/graph.js +0 -147
  1084. package/src/utils/helper.js +0 -431
  1085. package/src/utils/history.js +0 -37
  1086. package/src/utils/id-broker.js +0 -9
  1087. package/src/utils/logger.js +0 -8
  1088. package/src/utils/math.js +0 -51
  1089. package/src/utils/molding.js +0 -973
  1090. package/src/utils/name-generator.js +0 -5
  1091. package/src/utils/objects-utils.js +0 -56
  1092. package/src/utils/phone-validator.js +0 -4
  1093. package/src/utils/process-black-list.js +0 -10
  1094. package/src/utils/react-if.jsx +0 -20
  1095. package/src/utils/snap-scene.js +0 -102
  1096. package/src/utils/snap.js +0 -184
  1097. package/src/utils/threeCSG.es6.js +0 -578
  1098. package/src/version.js +0 -1
@@ -1,2122 +0,0 @@
1
- import convert from 'convert-units';
2
- import { fromJS, Map } from 'immutable';
3
- import React, { useState } from 'react';
4
- import * as Three from 'three';
5
- import * as SceneCreator from '../../../src/components/viewer3d/scene-creator';
6
- import {
7
- ARROW_COLOR,
8
- BASE_CABINET_LAYOUTPOS,
9
- OBJTYPE_GROUP,
10
- OBJTYPE_MESH,
11
- SHADE_DARK_PURPLE_COLOR,
12
- SHAPE_SVG_DEPTH,
13
- SHAPE_SVG_PADDING,
14
- SHAPE_SVG_WIDTH,
15
- STATUS_WARNING_COLOR,
16
- STATUS_WARNING_LIGHT_COLOR,
17
- TALL_CABINET_LAYOUTPOS,
18
- UNIT_CENTIMETER,
19
- UNIT_INCH,
20
- WALL_CABINET_LAYOUTPOS
21
- } from '../../../src/constants';
22
- import { Item } from '../../../src/models';
23
- import * as GeomUtils from './geom-utils';
24
- import { loadGLTF } from './load-obj';
25
- import { animateDoor, translateDrawer } from '../../../src/utils/helper';
26
-
27
- // env Map ///////////////
28
- const paramsCounter = {
29
- envMap: 'HDR',
30
- roughness: 0.6,
31
- metalness: 0.3,
32
- exposure: 1
33
- // debug: true
34
- };
35
- const params = {
36
- envMap: 'HDR',
37
- roughness: 0.9,
38
- metalness: 0.1,
39
- metalness_glossy: 0.2,
40
- exposure: 1.0
41
- // debug: false
42
- };
43
-
44
- const paramsModel = {
45
- envMap: 'HDR',
46
- roughness: 0.9,
47
- metalness: 0.2,
48
- exposure: 1.0
49
- // debug: false
50
- };
51
-
52
- // /////////////////////////
53
-
54
- let cachedObject = {}; // cached Object for quickly load-3d
55
-
56
- // render 2d function//////
57
- export function render2DItem(
58
- element,
59
- layer,
60
- scene,
61
- sizeinfo,
62
- layoutpos,
63
- is_corner,
64
- shape_svg
65
- ) {
66
- const [hover, setHover] = useState(false);
67
- let { x, y, rotation } = element;
68
- let el_DSN = 'el_DSN',
69
- doorStylesKeys = [];
70
- let _element = element.toJS();
71
- if (_element.doorStyle !== undefined) {
72
- if (_element.doorStyle.doorStyles !== undefined) {
73
- doorStylesKeys = Object.keys(_element.doorStyle.doorStyles);
74
- }
75
- }
76
- if (
77
- (doorStylesKeys.includes('euro_length') ||
78
- doorStylesKeys.includes('euro_width') ||
79
- doorStylesKeys.includes('euro_shape_svg')) &&
80
- _element.doorStyle.doorStyles.is_euro_cds
81
- ) {
82
- el_DSN = _element.doorStyle.door_style_name;
83
- } else {
84
- el_DSN = 'el_DSN';
85
- }
86
- let width,
87
- depth,
88
- el_euro_length,
89
- el_euro_width,
90
- el_euro_length_unit,
91
- el_euro_width_unit,
92
- el_is_euro_cds,
93
- el_euro_shape_svg;
94
- if (doorStylesKeys.length > 0) {
95
- el_euro_length = _element.doorStyle.doorStyles.euro_length;
96
- el_euro_width = _element.doorStyle.doorStyles.euro_width;
97
- el_is_euro_cds = _element.doorStyle.doorStyles.is_euro_cds;
98
- el_euro_shape_svg = _element.doorStyle.doorStyles.euro_shape_svg;
99
- }
100
- if (el_euro_length === undefined && el_euro_width === undefined) {
101
- el_DSN = 'el_DSN';
102
- }
103
- if (el_DSN === 'Euro & Frameless') {
104
- // sizeinfo["depth"] = el_euro_length;
105
- // sizeinfo["width"] = el_euro_width;
106
- }
107
- let tempWidth = element.properties.get('width');
108
- let tempDepth = element.properties.get('depth');
109
- width = tempWidth && {
110
- length: tempWidth.get('_length'),
111
- unit: tempWidth.get('_unit')
112
- };
113
- depth = tempDepth && {
114
- length: tempDepth.get('_length'),
115
- unit: tempDepth.get('_unit')
116
- };
117
- let originalWidth = convert(sizeinfo.width).from('in').to('cm');
118
- let originalDepth = convert(sizeinfo.depth).from('in').to('cm');
119
- let newWidth = convert(width.length).from(width.unit).to('cm');
120
- let newDepth = convert(depth.length).from(depth.unit).to('cm');
121
- let padding = convert(SHAPE_SVG_PADDING).from(UNIT_INCH).to(UNIT_CENTIMETER);
122
- let angle = element.rotation + 90;
123
- let textRotation = 0;
124
- if (Math.sin((angle * Math.PI) / 180) < 0) {
125
- textRotation = 180;
126
- }
127
- let color = '#eee';
128
- if (layoutpos == BASE_CABINET_LAYOUTPOS) {
129
- color = '#3f8db3';
130
- }
131
- if (layoutpos == TALL_CABINET_LAYOUTPOS) {
132
- color = '#93b3be';
133
- }
134
- if (layoutpos == WALL_CABINET_LAYOUTPOS) {
135
- color = '#48b08dcc';
136
- }
137
-
138
- const splitStr = [];
139
- const txtContent = [];
140
- const lineCount = 0; //parseInt(((newWidth) / 8 - 0.51).toFixed(), 10) - 1;
141
- const rowCount = 0; //parseInt((element.type.length / lineCount - 0.51).toFixed(), 10);
142
-
143
- // Get type
144
- let type = element.type;
145
- let objSKU = this.obj.sku_number;
146
- if (objSKU.length !== 0) {
147
- let dcId,
148
- doorStyle = element.doorStyle;
149
- if (doorStyle instanceof Map) {
150
- dcId = doorStyle.get('id');
151
- } else {
152
- dcId = doorStyle.id;
153
- }
154
- let skuItem = this.obj.skuArray.find(el => el.door_color_id === dcId);
155
- if (skuItem !== undefined) {
156
- type = skuItem.sku;
157
- }
158
- }
159
-
160
- if (rowCount > 0) {
161
- for (let x = 0; x < rowCount; x++) {
162
- splitStr.push(type.slice(lineCount * x, lineCount * (x + 1)));
163
- }
164
- }
165
- splitStr.push(type.slice(lineCount * rowCount));
166
- splitStr.forEach((el, key) => {
167
- txtContent.push(
168
- <text
169
- key={'text' + key}
170
- x="0"
171
- y={newDepth / 2 - 12}
172
- dy={16 * key}
173
- transform={`translate(${newWidth / 2}, ${
174
- newDepth / 2 + 5
175
- }) scale(1,-1) rotate(${textRotation})`}
176
- // textLength={newWidth - 10}
177
- // lengthAdjust="spacingAndGlyphs"
178
- style={{
179
- fontWeight: 500,
180
- fontSize: '7px',
181
- textAnchor: 'middle',
182
- fill: '#FFF',
183
- display: 'block'
184
- }}
185
- >
186
- {el}
187
- </text>
188
- );
189
- });
190
- let style = {
191
- stroke: element.selected ? '#565658' : '#565658',
192
- strokeWidth: '2px',
193
- fill: color
194
- };
195
- // let arrow_style = { stroke: element.selected ? '#0096fd' : null, strokeWidth: "2px", fill: "#84e1ce" };
196
-
197
- let rendered = null;
198
-
199
- if (shape_svg || el_euro_shape_svg) {
200
- let svg_url, svg_width, svg_depth;
201
- if (typeof shape_svg == 'string' || typeof el_euro_shape_svg == 'string') {
202
- if (el_DSN === 'Euro & Frameless' && el_is_euro_cds) {
203
- svg_url = el_euro_shape_svg;
204
- svg_width = newWidth;
205
- svg_depth = newDepth;
206
- } else {
207
- svg_url = shape_svg;
208
- svg_width = originalWidth;
209
- svg_depth = originalDepth;
210
- }
211
- } else {
212
- // if (el_DSN === "Euro & Frameless" && el_is_euro_cds) {
213
- // // svg_url = el_euro_shape_svg.url;
214
- // } else {
215
- // }
216
- svg_url = shape_svg.url;
217
- svg_width = convert(SHAPE_SVG_WIDTH).from(UNIT_INCH).to(UNIT_CENTIMETER);
218
- svg_depth = convert(SHAPE_SVG_DEPTH).from(UNIT_INCH).to(UNIT_CENTIMETER);
219
- }
220
-
221
- let padding_width = (padding * newWidth) / svg_width;
222
- let padding_depth = (padding * newDepth) / svg_depth;
223
-
224
- rendered = (
225
- <g
226
- onMouseOver={event => {
227
- setHover(true);
228
- }}
229
- onMouseOut={event => {
230
- setHover(false);
231
- }}
232
- transform={`translate(${x},${y})`}
233
- >
234
- <g transform={`rotate(${rotation})`}>
235
- <g
236
- transform={`translate(${-newWidth / 2 - padding_width},${
237
- -newDepth / 2 - padding_depth
238
- })`}
239
- >
240
- <image
241
- preserveAspectRatio="none"
242
- style={{ pointerEvents: 'none' }}
243
- href={svg_url}
244
- width={`${newWidth + 2 * padding_width}`}
245
- height={`${newDepth + 2 * padding_depth}`}
246
- transform={`scale(1, -1)`}
247
- x="0"
248
- y={`${-newDepth - 2 * padding_depth}`}
249
- />
250
- <rect
251
- x={`${padding_width}`}
252
- y={`${padding_depth}`}
253
- width={`${newWidth}`}
254
- height={`${newDepth}`}
255
- visibility={
256
- element.toJS().doorStyle.doorStyles !== undefined
257
- ? element.toJS().doorStyle.doorStyles &&
258
- element.toJS().doorStyle.doorStyles.cds &&
259
- element.toJS().doorStyle.doorStyles.cds.length != 0 &&
260
- element
261
- .toJS()
262
- .doorStyle.doorStyles.cds.filter(
263
- cd => cd.itemID == element.getIn(['itemID'])
264
- )
265
- ? 'hidden'
266
- : 'visible'
267
- : 'hidden'
268
- }
269
- style={{
270
- pointerEvents: 'all',
271
- opacity: 0.7,
272
- postion: 'relative'
273
- }}
274
- fill={STATUS_WARNING_LIGHT_COLOR}
275
- stroke={STATUS_WARNING_COLOR}
276
- strokeWidth="2px"
277
- ></rect>
278
- <g transform={`translate(${padding_width},${padding_depth})`}>
279
- {txtContent}
280
- </g>
281
- </g>
282
- </g>
283
- </g>
284
- );
285
- } else {
286
- rendered = (
287
- <g
288
- onMouseOver={event => {
289
- setHover(true);
290
- }}
291
- onMouseOut={event => {
292
- setHover(false);
293
- }}
294
- transform={`translate(${x},${y})`}
295
- >
296
- <g transform={`rotate(${rotation})`}>
297
- <g transform={`translate(${-newWidth / 2},${-newDepth / 2})`}>
298
- {newDepth > 15 ? (
299
- [
300
- <rect
301
- key="base"
302
- x="0"
303
- y="12"
304
- width={newWidth}
305
- height={newDepth - 12}
306
- style={style}
307
- />,
308
- <polygon
309
- key="door"
310
- style={style}
311
- points={`0,9 ${newWidth},9 ${newWidth},6 ${newWidth - 5},6 ${
312
- newWidth - 5
313
- },3 ${newWidth - 2},3 ${newWidth - 2} 0 ${newWidth - 10} 0 ${
314
- newWidth - 10
315
- },3 ${newWidth - 7},3 ${newWidth - 7},6 0 6`}
316
- />
317
- ]
318
- ) : (
319
- <rect
320
- key="base"
321
- x="0"
322
- y="0"
323
- width={newWidth}
324
- height={newDepth}
325
- style={style}
326
- />
327
- )}
328
- {/* {<text key="text"
329
- x="0"
330
- y="0"
331
- // dx="10"
332
- // dy="10"
333
- transform={`translate(${newWidth / 2}, ${newDepth / 2 + 5}) scale(1,-1) rotate(${textRotation})`}
334
- // textLength={newWidth - 10}
335
- // lengthAdjust="spacingAndGlyphs"
336
- style={{ fontWeight:800, fontSize:'16px', textAnchor: "middle", fill:'#FFF', display: hover || element.selected? 'block' : 'none'}}>
337
- {element.type}
338
- </text>} */}
339
- {txtContent}
340
- {/* { element.selected &&
341
- (<g key="duplicated" style={{cursor:'pointer'}}>
342
- <image transform={`scale(1,-1)`} href="/assets/img/svg/duplicate_object_left.svg" x={-10} y={-newDepth/2 - 15} height="20" width="20" />
343
- <image transform={`scale(1,-1)`} href="/assets/img/svg/duplicate_object_right.svg" x={newWidth - 10} y={-newDepth / 2 - 15} height="20" width="20" />
344
- </g>)
345
- } */}
346
- </g>
347
- </g>
348
- {/* { element.selected &&
349
- (
350
- <g key="action" transform={`translate(${-newWidth / 2},${newDepth / 2})`} style={{cursor:'pointer'}}>
351
- <image transform={`rotate(180, 10 ,15) `} href="/assets/img/svg/2d_delete_object1.svg" x="0" y="5" height="20" width="20" data-part='remove'/>
352
- <image transform={`rotate(180, ${newWidth - 10} ,15)`} href="/assets/img/svg/duplicate_object_right.svg" x={newWidth-20} y="5" height="20" width="20" data-part='duplicate'/>
353
- </g>
354
- )
355
- } */}
356
- </g>
357
- );
358
- }
359
-
360
- return rendered;
361
- }
362
- // end of render 2d function /////////////////////////
363
-
364
- export function loadTexture(url) {
365
- let texture = new Three.TextureLoader().load(url);
366
- texture.colorSpace = Three.SRGBColorSpace;
367
- texture.wrapS = Three.MirroredRepeatWrapping;
368
- texture.wrapT = Three.MirroredRepeatWrapping;
369
- return texture;
370
- }
371
-
372
- const applyTexture = (material, texture, length, height) => {
373
- if (texture) {
374
- material.map = texture;
375
- material.needsUpdate = true;
376
- material.map.wrapS = Three.RepeatWrapping;
377
- material.map.wrapT = Three.RepeatWrapping;
378
- material.map.repeat.set(length * 0.01, height * 0.01);
379
-
380
- if (texture.normal) {
381
- material.normalMap = loadTexture(texture.normal.uri);
382
- material.normalScale = new Vector2(
383
- texture.normal.normalScaleX,
384
- texture.normal.normalScaleY
385
- );
386
- material.normalMap.wrapS = Three.RepeatWrapping;
387
- material.normalMap.wrapT = Three.RepeatWrapping;
388
- material.normalMap.repeat.set(
389
- length * texture.normal.lengthRepeatScale,
390
- height * texture.normal.heightRepeatScale
391
- );
392
- }
393
- }
394
- };
395
-
396
- const assignUVs = geometry => {
397
- geometry.computeBoundingBox();
398
-
399
- let { min, max } = geometry.boundingBox;
400
-
401
- let offset = new Three.Vector3(0 - min.x, 0 - min.y, 0 - min.z);
402
- let range = new Three.Vector3(max.x - min.x, max.y - min.y, max.z - min.z);
403
- geometry.faceVertexUvs[0] = geometry.faces.map(face => {
404
- let v1 = geometry.vertices[face.a];
405
- let v2 = geometry.vertices[face.b];
406
- let v3 = geometry.vertices[face.c];
407
-
408
- return [
409
- new Three.Vector3(
410
- (v1.x + offset.x) / range.x,
411
- (v1.y + offset.y) / range.y,
412
- (v1.z + offset.z) / range.z
413
- ),
414
- new Three.Vector3(
415
- (v2.x + offset.x) / range.x,
416
- (v2.y + offset.y) / range.y,
417
- (v1.z + offset.z) / range.z
418
- ),
419
- new Three.Vector3(
420
- (v3.x + offset.x) / range.x,
421
- (v3.y + offset.y) / range.y,
422
- (v1.z + offset.z) / range.z
423
- )
424
- ];
425
- });
426
-
427
- geometry.uvsNeedUpdate = true;
428
- };
429
-
430
- /**
431
- * Render 3D Item
432
- * @param {Item} element Rendering item
433
- * @param sizeinfo Dimesion of the item
434
- * @param structure_json Structure of the item such as place holders and meshes, etc
435
- */
436
- export function render3DItem(
437
- element,
438
- layer,
439
- scene,
440
- sizeinfo,
441
- structure_json,
442
- is_corner,
443
- mode = null
444
- ) {
445
- if (element.doorStyle.constructor !== Map) {
446
- element = element.set('doorStyle', fromJS(element.doorStyle));
447
- }
448
-
449
- if (element.doorStyle.toJS().handle_gltf !== '') {
450
- // Check element has doorHandle
451
- for (var i = 1; i < 10; i++) {
452
- element = element.setIn(
453
- ['doorStyle', 'doorStyles', 'door_handle_' + i + '_gltf'],
454
- element.doorStyle.toJS().handle_gltf
455
- );
456
- element = element.setIn(
457
- ['doorStyle', 'doorStyles', 'fixed_drawer_door_handle_' + i + '_gltf'],
458
- element.doorStyle.toJS().handle_gltf
459
- );
460
- element = element.setIn(
461
- ['doorStyle', 'doorStyles', 'drawer_door_handle_' + i + '_gltf'],
462
- element.doorStyle.toJS().handle_gltf
463
- );
464
- }
465
- }
466
- let width = { length: sizeinfo.width, unit: 'in' };
467
- let depth = { length: sizeinfo.depth, unit: 'in' };
468
- let height = { length: sizeinfo.height, unit: 'in' };
469
- let newWidth = convert(width.length).from(width.unit).to('in');
470
- let newDepth = convert(depth.length).from(depth.unit).to('in');
471
- let newHeight = convert(height.length).from(height.unit).to('in');
472
- let mainName = ''; // to get name structure//
473
- if (element.properties.get('width'))
474
- newWidth = element.getIn(['properties', 'width', '_length']);
475
- if (element.properties.get('depth'))
476
- newDepth = element.getIn(['properties', 'depth', '_length']);
477
- if (element.properties.get('height'))
478
- newHeight = element.getIn(['properties', 'height', '_length']);
479
-
480
- var structure = structure_json;
481
- // structure.push({name:'model', url: '/assets/model/DCM.gltf'});
482
- structure.model = '/assets/model/DCM.gltf';
483
- var placeholders = structure.placeholders;
484
- let doorStyles = null;
485
- let color = 0xffffff,
486
- glossness = 1,
487
- handleMaterial = {};
488
- let counterTop = element.counterTop;
489
- if (layer.toJS().counterTop.uri) {
490
- counterTop.uri = layer.toJS().counterTop.uri;
491
- }
492
-
493
- if ('name' in element.doorStyle) {
494
- doorStyles = new Map(element.doorStyle.doorStyles);
495
- color = element.doorStyle.color;
496
- glossness = element.doorStyle.glossness;
497
- handleMaterial.metalness = element.doorStyle.metalness;
498
- handleMaterial.roughness = element.doorStyle.roughness;
499
- } else if (element.doorStyle != null && element.doorStyle) {
500
- doorStyles = element.doorStyle.get('doorStyles');
501
- color = element.doorStyle.get('color');
502
- glossness = element.doorStyle.get('glossness');
503
- handleMaterial.metalness = element.doorStyle.get('metalness');
504
- handleMaterial.roughness = element.doorStyle.get('roughness');
505
- }
506
- if (color === undefined) color = '#ffffff';
507
- if (glossness === undefined) glossness = 1;
508
- const tempDoorStyles = doorStyles.toJS();
509
- let tempPlaceholders = structure.tempPlaceholders;
510
- var tPlaceholders = tempPlaceholders.find(el => {
511
- return el.id === tempDoorStyles.cabinet_door_style_id;
512
- });
513
- if (tPlaceholders !== undefined) {
514
- placeholders = tPlaceholders.placeholders;
515
- const tempStructure = {
516
- ...tPlaceholders.structure,
517
- animation: structure.animation,
518
- placeholders: structure.placeholders,
519
- tempPlaceholders: structure.tempPlaceholders,
520
- model: structure.model
521
- };
522
- structure = tempStructure;
523
- }
524
- let userData = structure.animation;
525
- // ///////////////////////////
526
- let onLoadItem = object => {
527
- var areaMaterial = new Three.MeshStandardMaterial();
528
- areaMaterial.side = Three.DoubleSide;
529
- // areaMaterial.envMap = textureCube;
530
- if (doorStyles != null)
531
- if (doorStyles.get('base') != undefined) {
532
- let normalMap = doorStyles.get('base');
533
- let interiortexture = loadTexture(normalMap);
534
- applyTexture(areaMaterial, interiortexture, 100, 100);
535
- }
536
- let object1 = object;
537
- let newAltitude = element.properties.get('altitude').get('_length');
538
- let newUnit = element.properties.get('altitude').get('_unit') || 'in';
539
- newAltitude = convert(newAltitude).from(newUnit).to(scene.unit);
540
- let _element = element.toJS();
541
- if (!_element.doorStyle.doorStyles.is_euro_cds) {
542
- object1.scale.set(
543
- (100 * newWidth) / sizeinfo.width,
544
- (100 * newHeight) / sizeinfo.height,
545
- (100 * newDepth) / sizeinfo.depth
546
- );
547
- } else {
548
- object1.scale.set(100, 100, 100);
549
- }
550
- // Normalize the origin of the object
551
- let boundingBox = GeomUtils.baseBox3FromObject(object1);
552
- object1.userData = boundingBox;
553
- let door_animate_offset = {};
554
- const matchStr = /\d_(door[^LR1-9]*)(_[LR])?(_[1-9])?$/;
555
- object1.children.forEach(child => {
556
- let door_match = child.name.match(matchStr);
557
- if (door_match && door_match.length > 2) {
558
- let rotate_match_text = element.properties.toJS().flip_doorhandle
559
- ? 'rotate_L'
560
- : 'rotate_R';
561
- if (door_match[2] === '_L') {
562
- rotate_match_text = element.properties.toJS().flip_doorhandle
563
- ? 'rotate_R'
564
- : 'rotate_L';
565
- }
566
- let isDoubleDoor = door_match && door_match[2] !== undefined;
567
- child.children[0]?.children.forEach(it => {
568
- if (
569
- it?.name?.includes('handle') &&
570
- it.children?.length &&
571
- is_corner === 1 &&
572
- isDoubleDoor
573
- ) {
574
- const tname = child?.name?.endsWith('_L')
575
- ? child.name.replace('_L', '_R')
576
- : child?.name?.replace('_R', '_L');
577
-
578
- const tmp =
579
- object1?.children?.filter(item => item?.name === tname) || [];
580
- const t0 = tmp[0];
581
- const filterStr = t0?.name?.endsWith('_L')
582
- ? 'rotate_L'
583
- : 'rotate_R';
584
-
585
- const tposArr =
586
- t0?.children?.[0]?.children?.filter(item =>
587
- item?.name?.endsWith(filterStr)
588
- ) || [];
589
- const tpos0 = tposArr[0];
590
-
591
- if (it.name.includes('base_end')) {
592
- door_animate_offset[child.name] = {
593
- x: -2 * (it.position?.x ?? 0) - 0.12,
594
- y: it.position?.y ?? 0,
595
- z: -(tpos0?.position?.x ?? 0) + 0.12,
596
- isCorner: true
597
- };
598
- } else {
599
- door_animate_offset[child.name] = {
600
- x: -(it.position?.x ?? 0) - 0.04,
601
- y: it.position?.y ?? 0,
602
- z: 2 * (tpos0?.position?.x ?? 0) - 0.01,
603
- isCorner: true
604
- };
605
- }
606
- } else if (
607
- it.name.endsWith(rotate_match_text) &&
608
- door_animate_offset[child.name] == undefined
609
- ) {
610
- door_animate_offset[child.name] = {
611
- x: it.position.x,
612
- y: it.position.y,
613
- z: it.position.z,
614
- isCorner: false
615
- };
616
- }
617
- });
618
- }
619
- });
620
- object1.userData.door_animate_offset = door_animate_offset;
621
- object1.userData.animation = userData;
622
-
623
- let center = [
624
- (boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x,
625
- (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y,
626
- (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z
627
- ];
628
- object1.position.x -= center[0];
629
- object1.position.y -=
630
- center[1] - (boundingBox.max.y - boundingBox.min.y) / 2;
631
- object1.position.z -= center[2];
632
- object1.position.y += newAltitude;
633
-
634
- if (element.selected) {
635
- // if object is selected
636
- // save object transform info///
637
- let scalevec = new Three.Vector3(
638
- object1.scale.x,
639
- object1.scale.y,
640
- object1.scale.z
641
- );
642
- let posVec = new Three.Vector3(
643
- object1.position.x,
644
- object1.position.y,
645
- object1.position.z
646
- );
647
-
648
- object.scale.set(
649
- (1 * newWidth) / sizeinfo.width,
650
- (1 * newHeight) / sizeinfo.height,
651
- (1 * newDepth) / sizeinfo.depth
652
- );
653
- object1.position.set(0, 0, 0);
654
- object1.rotation.set(0, 0, 0);
655
-
656
- //let box = new Three.BoxHelper(object, 0xffffff);
657
- //box.material.lineWidth = 5;
658
- //box.renderOrder = 1000;
659
- //box.material.depthTest = false;
660
- //object.add(box);
661
- let boundingBox = GeomUtils.baseBox3FromObject(object);
662
- let max = boundingBox.max;
663
- let min = boundingBox.min;
664
- let radius =
665
- Math.sqrt(
666
- (boundingBox.max.x - boundingBox.min.x) *
667
- (boundingBox.max.x - boundingBox.min.x) +
668
- (boundingBox.max.z - boundingBox.min.z) *
669
- (boundingBox.max.z - boundingBox.min.z)
670
- ) / 2;
671
- let moveBox = new Three.BoxGeometry(
672
- max.x - min.x,
673
- max.y - min.y,
674
- max.z - min.z
675
- );
676
-
677
- // translate Object
678
- let controlGeom = GeomUtils.controlGeom();
679
-
680
- // rotate Object //////////
681
- let rotGeom = GeomUtils.rotGeoms(radius + 0.05);
682
- // //////////////////////////////////
683
-
684
- // upwards Geometry/////////// Move up Object
685
- let upwardsGeom = GeomUtils.upwardsGeom();
686
-
687
- // vertical line - 4 lines around object//////////////////////////
688
- let vLineGeom = new Three.BufferGeometry();
689
-
690
- let vertices = [
691
- (max.x - min.x) / 2 + min.x,
692
- 0,
693
- max.z,
694
- (max.x - min.x) / 2 + min.x,
695
- 0,
696
- max.z + 1.3
697
- ];
698
-
699
- vLineGeom.setAttribute(
700
- 'position',
701
- new Three.BufferAttribute(new Float32Array(vertices), 3)
702
- );
703
-
704
- let vLineGeom1 = new Three.BufferGeometry();
705
-
706
- let vertices1 = [
707
- (max.x - min.x) / 2 + min.x,
708
- 0,
709
- min.z,
710
- (max.x - min.x) / 2 + min.x,
711
- 0,
712
- min.z - 1.3
713
- ];
714
-
715
- vLineGeom1.setAttribute(
716
- 'position',
717
- new Three.BufferAttribute(new Float32Array(vertices1), 3)
718
- );
719
-
720
- let vLineGeom2 = new Three.BufferGeometry();
721
-
722
- let vertices2 = [
723
- max.x,
724
- 0,
725
- max.z - (max.z - min.z) / 2,
726
- max.x + 1.3,
727
- 0,
728
- max.z - (max.z - min.z) / 2
729
- ];
730
-
731
- vLineGeom2.setAttribute(
732
- 'position',
733
- new Three.BufferAttribute(new Float32Array(vertices2), 3)
734
- );
735
-
736
- let vLineGeom3 = new Three.BufferGeometry();
737
-
738
- let vertices3 = [
739
- min.x,
740
- 0,
741
- max.z - (max.z - min.z) / 2,
742
- min.x - 1.3,
743
- 0,
744
- max.z - (max.z - min.z) / 2
745
- ];
746
-
747
- vLineGeom3.setAttribute(
748
- 'position',
749
- new Three.BufferAttribute(new Float32Array(vertices3), 3)
750
- );
751
- // ///////////////////////////////////////
752
-
753
- // set names of transform object
754
- let rotFillObj = new Three.Mesh(
755
- rotGeom.rotFill,
756
- new Three.MeshPhongMaterial({
757
- color: new Three.Color(0x000000).convertLinearToSRGB(),
758
- side: Three.DoubleSide,
759
- colorWrite: true
760
- })
761
- );
762
- let rotStrokeObj = new Three.Line(
763
- rotGeom.rotStroke,
764
- new Three.LineBasicMaterial({
765
- color: new Three.Color(0xffffff).convertLinearToSRGB(),
766
- colorWrite: true
767
- })
768
- );
769
- rotFillObj.name = 'rotate';
770
-
771
- let upObj = new Three.Mesh(
772
- upwardsGeom,
773
- new Three.MeshBasicMaterial({
774
- color: new Three.Color(0xffffff).convertLinearToSRGB(),
775
- side: Three.DoubleSide
776
- })
777
- );
778
- upObj.name = 'transUp';
779
-
780
- let mBox = new Three.Mesh(
781
- moveBox,
782
- new Three.MeshBasicMaterial({
783
- color: new Three.Color(0xdd6699).convertLinearToSRGB(),
784
- side: Three.DoubleSide,
785
- transparent: true,
786
- opacity: 0.4
787
- })
788
- );
789
-
790
- let color = new Three.Color(
791
- SHADE_DARK_PURPLE_COLOR
792
- ).convertLinearToSRGB();
793
- let vLine = new Three.Line(
794
- vLineGeom,
795
- new Three.LineBasicMaterial({ color })
796
- );
797
- let vLine1 = new Three.Line(
798
- vLineGeom1,
799
- new Three.LineBasicMaterial({ color })
800
- );
801
- let vLine2 = new Three.Line(
802
- vLineGeom2,
803
- new Three.LineBasicMaterial({ color })
804
- );
805
- let vLine3 = new Three.Line(
806
- vLineGeom3,
807
- new Three.LineBasicMaterial({ color })
808
- );
809
- vLine.renderOrder = 1;
810
- vLine1.renderOrder = 1;
811
- vLine2.renderOrder = 1;
812
- vLine3.renderOrder = 1;
813
- vLine.material.transparent = true;
814
- vLine1.material.transparent = true;
815
- vLine2.material.transparent = true;
816
- vLine3.material.transparent = true;
817
- vLine.material.depthTest = false;
818
- vLine1.material.depthTest = false;
819
- vLine2.material.depthTest = false;
820
- vLine3.material.depthTest = false;
821
- // translate vector to center of object
822
- let uVec = new Three.Vector3(
823
- -posVec.x / scalevec.x,
824
- -posVec.y / scalevec.y,
825
- -posVec.z / scalevec.z
826
- );
827
-
828
- vLine.translateY(0.1);
829
- vLine1.translateY(0.1);
830
- vLine2.translateY(0.1);
831
- vLine3.translateY(0.1);
832
-
833
- //rotObj.translateOnAxis(uVec, 1);
834
- upObj.translateOnAxis(uVec, 1);
835
- upObj.translateY(max.y - min.y);
836
-
837
- mBox.name = 'TransformBox';
838
- mBox.translateOnAxis(
839
- new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z),
840
- 1
841
- );
842
- mBox.scale.set(1.01, 1.01, 1.01);
843
-
844
- // other side rotate object
845
- let rotFillObj1 = rotFillObj.clone();
846
- let rotStrokeObj1 = rotStrokeObj.clone();
847
- rotFillObj1.rotateY(Math.PI);
848
- rotStrokeObj1.rotateY(Math.PI);
849
- rotFillObj.translateY(0.1);
850
- rotFillObj1.translateY(0.1);
851
- rotStrokeObj.translateY(0.1);
852
- rotStrokeObj1.translateY(0.1);
853
-
854
- // assets Objects group includes rotate objects...
855
- let asrtObj = new Three.Group();
856
- // asrtObj.add(rotFillObj);
857
- // asrtObj.add(rotFillObj1);
858
- // asrtObj.add(rotStrokeObj);
859
- // asrtObj.add(rotStrokeObj1);
860
- //asrtObj.add(upObj);
861
- asrtObj.add(vLine);
862
- asrtObj.add(vLine1);
863
- asrtObj.add(vLine2);
864
- asrtObj.add(vLine3);
865
- mBox.visible = false;
866
- asrtObj.add(mBox);
867
- asrtObj.scale.set(1 / object.scale.x, object.scale.y, 1 / object.scale.z);
868
- //asrtObj.translateY(newAltitude / scalevec.y);
869
- asrtObj.name = 'TransformGizmo';
870
- // add assets Objects Group
871
- object1.add(asrtObj);
872
-
873
- // recover objects transform
874
- object1.position.x = posVec.x;
875
- object1.position.y = posVec.y;
876
- object1.position.z = posVec.z;
877
- object1.scale.set(scalevec.x, scalevec.y, scalevec.z);
878
- setTimeout(() => {
879
- SceneCreator.getDistances(layer);
880
- }, 100);
881
- }
882
-
883
- let flip_doorhandle = element.properties.get('flip_doorhandle');
884
- if (flip_doorhandle) {
885
- SceneCreator.updateDoorHandleMesh(element, object1, true);
886
- }
887
-
888
- object1.traverse(obj => {
889
- if (obj.type === OBJTYPE_MESH) {
890
- const { name } = obj;
891
- if (name.match(/_door_.*_glass_/)) {
892
- let material = new Three.MeshPhysicalMaterial({
893
- roughness: 0,
894
- transmission: 1,
895
- thickness: 0.5, // Add refraction!
896
- transparency: 0.8
897
- });
898
- obj.material = material;
899
- } else if (name.startsWith('sink_')) {
900
- // texture = loadTexture('/assets/img/texture/steel.jpg');
901
-
902
- let material;
903
- // Get color from name
904
- if (name.includes('black') || name.includes('white')) {
905
- let color;
906
- if (name.includes('black')) {
907
- color = new Three.Color(0x555555).convertLinearToSRGB();
908
- } else {
909
- color = 0xffffff;
910
- }
911
- material = new Three.MeshPhysicalMaterial({
912
- roughness: 0.5,
913
- metalness: 0,
914
- // transmission: 1,
915
- transparent: true,
916
- opacity: 1,
917
- thickness: 0.5, // Add refraction!
918
- // transparency: 0.8,
919
- color: color,
920
- side: Three.DoubleSide
921
- });
922
- } else {
923
- // if (name.includes('chrome')) {
924
- material = new Three.MeshPhysicalMaterial({
925
- roughness: 0.2,
926
- metalness: 1,
927
- reflectivity: 0.5,
928
- color: new Three.Color(0xdddddd).convertLinearToSRGB()
929
- });
930
- }
931
- obj.material = material;
932
- }
933
- }
934
- if (element.toJS().properties.open_doors) {
935
- let open_doors = element.toJS().properties.open_doors;
936
- let object_match =
937
- obj.name.match(/\d_(interior_drawer[^LR1-9]*)(_[LR1-9])?$/) ||
938
- obj.name.match(matchStr);
939
- if (object_match && object_match.length > 2) {
940
- const isDoor = object_match[1] === 'door';
941
- if (isDoor) {
942
- const offsetData = object1.userData.door_animate_offset[obj.name];
943
- // Open Door
944
- animateDoor(
945
- offsetData,
946
- obj,
947
- open_doors,
948
- element.toJS(),
949
- is_corner,
950
- 'Opened2D'
951
- );
952
- } else {
953
- // Open Drawer
954
- translateDrawer(element.toJS(), obj, open_doors, 'Opened2D');
955
- }
956
- }
957
- }
958
- });
959
-
960
- return object1;
961
- };
962
- // keys in structure
963
- let keys = Object.keys(structure);
964
- // if exist in cached Objects
965
- if (
966
- element.type +
967
- color +
968
- 'doorStyle' +
969
- JSON.stringify(doorStyles.toJS()) +
970
- element.counterTop.uri in
971
- cachedObject
972
- ) {
973
- let objGroup =
974
- cachedObject[
975
- element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())
976
- ].clone();
977
- return Promise.resolve(onLoadItem(objGroup.clone()));
978
- }
979
-
980
- // base Object/////
981
- let objGroup = null;
982
-
983
- let loadGLTFs = function (i) {
984
- if (keys[i] === 'animation') {
985
- // if animation info
986
- i++;
987
- return loadGLTFs(i);
988
- }
989
- if (keys[i] === 'placeholders') {
990
- // if placeholders group
991
- i++;
992
- return loadGLTFs(i);
993
- }
994
- if (i === keys.length) {
995
- // if end of keys
996
- cachedObject[
997
- element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())
998
- ] = objGroup.clone(); //register to cachedObject
999
- return onLoadItem(
1000
- cachedObject[
1001
- element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())
1002
- ].clone()
1003
- );
1004
- }
1005
- if (keys[i] === 'base') {
1006
- // if base Objects
1007
- i++;
1008
- return loadGLTFs(i);
1009
- }
1010
-
1011
- let phsArray = [];
1012
- let placeholderStructure = placeholders[keys[i]];
1013
- if (placeholderStructure == undefined || placeholderStructure.length == 0) {
1014
- i++;
1015
- return loadGLTFs(i);
1016
- }
1017
-
1018
- for (let j = 0; j < placeholderStructure.length; j++) {
1019
- let phData = placeholderStructure[j];
1020
- let phs = phData.split('/');
1021
-
1022
- let temp = phData.split('/');
1023
- // placeholder remake////////////////
1024
- for (let k = 0; k < phs.length; k++) {
1025
- if (phs[k] in placeholders) {
1026
- let placeholderphs = placeholders[phs[k]];
1027
- let key = placeholderStructure.length / placeholderphs.length;
1028
- phs[k] = placeholderphs[Math.floor(j / key)];
1029
- let splitedData = phs[k].split('/');
1030
-
1031
- if (splitedData.length > 1) {
1032
- phs[k] = splitedData[splitedData.length - 1];
1033
-
1034
- for (let m = splitedData.length - 2; m >= 0; m--) {
1035
- phs.unshift(splitedData[m]);
1036
- temp.unshift(splitedData[m]);
1037
- }
1038
- }
1039
-
1040
- k = -1;
1041
- continue;
1042
- }
1043
- if (phs[k].indexOf('ph') == -1) {
1044
- let url = structure[temp[k - 1]];
1045
-
1046
- if (
1047
- temp[k - 1] +
1048
- '_doorStyle' +
1049
- element.type +
1050
- 'doorStyle' +
1051
- JSON.stringify(doorStyles.toJS()) in
1052
- structure
1053
- ) {
1054
- if (
1055
- structure[
1056
- temp[k - 1] +
1057
- '_doorStyle' +
1058
- element.type +
1059
- 'doorStyle' +
1060
- JSON.stringify(doorStyles.toJS())
1061
- ] != null
1062
- ) {
1063
- url =
1064
- structure[
1065
- temp[k - 1] +
1066
- '_doorStyle' +
1067
- element.type +
1068
- 'doorStyle' +
1069
- JSON.stringify(doorStyles.toJS())
1070
- ];
1071
- }
1072
- }
1073
- if (typeof url == Array) url = url[0];
1074
-
1075
- let uData = url.split('/');
1076
- uData = uData[uData.length - 1];
1077
- uData = uData.slice(0, -5);
1078
- let datas = uData.split('_');
1079
- uData = datas[1];
1080
-
1081
- for (let i = 2; i < datas.length; i++) {
1082
- uData += '_';
1083
- uData += datas[i];
1084
- }
1085
-
1086
- uData = mainName.replace('main', uData);
1087
- phs[k] = 'ph_' + uData + '_' + phs[k];
1088
- }
1089
- }
1090
- phsArray.push(phs);
1091
- }
1092
- let url = structure[keys[i]];
1093
- let normalMap = '';
1094
- let urlData = url.split('/');
1095
- for (let j = 0; j < element.submodule.size; j++) {
1096
- let replaceUrlData = element.submodule.get(j).split('/');
1097
- if (urlData.includes(replaceUrlData[replaceUrlData.length - 2])) {
1098
- url = element.submodule.get(j);
1099
- break;
1100
- }
1101
- }
1102
-
1103
- for (let j = 0; j < element.normalMap.size; j++) {
1104
- let normalMapData = element.normalMap.get(j).split('/');
1105
- if (urlData.includes(normalMapData[normalMapData.length - 2])) {
1106
- normalMap = element.normalMap.get(j);
1107
- break;
1108
- }
1109
- }
1110
-
1111
- // replace submodule gltf file
1112
- // if (placeholderTree.length > 0) {
1113
- if (phsArray.length > 0) {
1114
- // let loadUrl = dirName + url;
1115
- let loadUrl = url;
1116
-
1117
- if (doorStyles.get(keys[i] + '_gltf') != undefined) {
1118
- loadUrl = doorStyles.get(keys[i] + '_gltf');
1119
- structure[
1120
- keys[i] +
1121
- '_doorStyle' +
1122
- element.type +
1123
- 'doorStyle' +
1124
- JSON.stringify(doorStyles.toJS())
1125
- ] = loadUrl;
1126
- } else {
1127
- structure[
1128
- keys[i] +
1129
- '_doorStyle' +
1130
- element.type +
1131
- 'doorStyle' +
1132
- JSON.stringify(doorStyles.toJS())
1133
- ] = null;
1134
- }
1135
- return loadGLTF(loadUrl)
1136
- .then(
1137
- object => {
1138
- if (normalMap !== '') {
1139
- let normalUrl =
1140
- normalMap.split('.')[0] + '-normal.' + normalMap.split('.')[1];
1141
- let t = loadTexture(normalMap);
1142
- let m = loadTexture(normalUrl);
1143
- let mat2 = new Three.MeshStandardMaterial({
1144
- metalness:
1145
- glossness === 1 ? params.metalness : params.metalness_glossy,
1146
- roughness: glossness || params.roughness
1147
- });
1148
- mat2.map = t;
1149
- mat2.normalMap = m;
1150
- // mat2.envMap = textureCube;
1151
- for (let j = 0; j < object.children.length; j++) {
1152
- if (object.children[j].type === OBJTYPE_MESH) {
1153
- object.children[j].material = mat2;
1154
- object.children[j].receiveShadow = true;
1155
- }
1156
- }
1157
- }
1158
-
1159
- // set Door Style////
1160
- if (doorStyles != null)
1161
- if (doorStyles.get(keys[i]) != undefined) {
1162
- // let normalMap = "catalog/items/doorstyle/" + doorStyles.get(keys[i]);
1163
- let normalMap = doorStyles.get(keys[i]);
1164
- let mat2;
1165
- if (normalMap === '') {
1166
- const examplecolor = new Three.Color(
1167
- parseInt(color.slice(1), 16)
1168
- ).convertLinearToSRGB();
1169
- mat2 = new Three.MeshStandardMaterial({
1170
- color: examplecolor,
1171
- metalness:
1172
- glossness === 1
1173
- ? params.metalness
1174
- : params.metalness_glossy,
1175
- roughness: glossness || params.roughness
1176
- });
1177
- } else {
1178
- let t = loadTexture(normalMap);
1179
- mat2 = new Three.MeshStandardMaterial({
1180
- // NOTE : this is for cabinets (wood) frontface
1181
- metalness: 0.1,
1182
- roughness: 0.5
1183
- // metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
1184
- // roughness: glossness || params.roughness
1185
- });
1186
- mat2.map = t;
1187
- }
1188
- // mat2.envMap = textureCube;
1189
- for (let j = 0; j < object.children.length; j++) {
1190
- if (object.children[j].type === OBJTYPE_MESH) {
1191
- object.children[j].material = mat2;
1192
- object.children[j].receiveShadow = true;
1193
- object.children[j].castShadow = true;
1194
- !object.children[j].name.includes('handle') &&
1195
- addEdgesToMesh(object.children[j]);
1196
- } else if (
1197
- !object.children[j].name.startsWith('ph_') &&
1198
- object.children[j].type === OBJTYPE_GROUP
1199
- ) {
1200
- object.children[j].traverse(prim => {
1201
- prim.material = mat2;
1202
- prim.receiveShadow = true;
1203
- });
1204
- }
1205
- }
1206
- } else {
1207
- let mat2 = new Three.MeshStandardMaterial({
1208
- metalness:
1209
- glossness === 1
1210
- ? params.metalness
1211
- : params.metalness_glossy,
1212
- roughness: glossness || params.roughness
1213
- });
1214
- // mat2.envMap = textureCube;
1215
- for (let j = 0; j < object.children.length; j++) {
1216
- if (object.children[j].type === OBJTYPE_MESH) {
1217
- object.children[j].material = mat2;
1218
- object.children[j].receiveShadow = true;
1219
- }
1220
- }
1221
- }
1222
-
1223
- for (let i = 0; i < phsArray.length; i++) {
1224
- let phs = phsArray[i];
1225
- let parent = objGroup;
1226
- for (let j = 0; j < phs.length; j++) {
1227
- let placeholder = phs[j];
1228
- for (let k = 0; k < parent?.children.length; k++) {
1229
- if (j != phs.length - 1) {
1230
- if (parent.children[k].name == placeholder) {
1231
- parent = parent.children[k].children[0];
1232
- break;
1233
- }
1234
- } else {
1235
- if (parent.children[k].name == placeholder) {
1236
- var tmp = object.clone();
1237
- if (
1238
- placeholder.includes('drawer_door') &&
1239
- placeholder.includes('_handle')
1240
- ) {
1241
- tmp.rotateZ(Math.PI / 2);
1242
- }
1243
- if (
1244
- placeholder.includes('_handle') &&
1245
- tmp.children[0].type === OBJTYPE_MESH
1246
- ) {
1247
- // NOTE: change metalness of handle
1248
- tmp.children[0].material.metalness = 1;
1249
- // handleMaterial.metalness || 0.2;
1250
- tmp.children[0].material.roughness =
1251
- handleMaterial.roughness || 0.1;
1252
- //tmp.children[0].material.map = loadTexture('catalog/areas/area/textures/grass.jpg');
1253
- }
1254
- parent.children[k].add(tmp);
1255
- }
1256
- }
1257
- }
1258
- }
1259
- }
1260
- },
1261
- reason => {
1262
- console.log('loadGLTF failed for reason:', reason);
1263
- }
1264
- )
1265
- .then(() => {
1266
- i++;
1267
- return loadGLTFs(i);
1268
- });
1269
- }
1270
- };
1271
- return loadGLTF(structure['base'])
1272
- .then(
1273
- object => {
1274
- object.name = 'MainObject';
1275
- object.receiveShadow = true;
1276
- objGroup = object;
1277
- if (doorStyles != null)
1278
- if (doorStyles.get('base') != undefined) {
1279
- let normalMap = doorStyles.get('base');
1280
- if (counterTop.uri === undefined) {
1281
- try {
1282
- counterTop = counterTop.toJS();
1283
- } catch (error) {
1284
- console.log(error);
1285
- }
1286
- }
1287
- if (
1288
- counterTop.uri === undefined &&
1289
- layer.toJS().counterTop.uri !== undefined
1290
- ) {
1291
- counterTop.uri = layer.toJS().counterTop.uri;
1292
- }
1293
- let countTopMap = counterTop.uri;
1294
- let interiorMap = doorStyles.get('interior');
1295
- let countT = loadTexture(countTopMap);
1296
- countT.wrapS = Three.RepeatWrapping;
1297
- countT.wrapT = Three.RepeatWrapping;
1298
- countT.repeat.set(1, 1);
1299
- const examplecolor = new Three.Color(
1300
- parseInt(color.slice(1), 16)
1301
- ).convertLinearToSRGB();
1302
- let mat2 = null,
1303
- mat3 = null,
1304
- mat4 = null;
1305
-
1306
- if (normalMap === '') {
1307
- mat2 = new Three.MeshStandardMaterial({
1308
- color: examplecolor,
1309
- metalness:
1310
- glossness === 1 ? params.metalness : params.metalness_glossy,
1311
- roughness: glossness || params.roughness
1312
- });
1313
- } else {
1314
- mat2 = new Three.MeshStandardMaterial({
1315
- // TODO: changes in metalness and roughness of base_main (cabinet wood)
1316
- metalness: 0.1,
1317
- roughness: 0.5
1318
- // metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
1319
- // roughness: glossness || params.roughness
1320
- });
1321
- }
1322
- // mat2.envMap = textureCube;
1323
-
1324
- if (normalMap !== '') {
1325
- let t = loadTexture(normalMap);
1326
- mat2.map = t;
1327
- }
1328
-
1329
- if (normalMap === '') {
1330
- mat3 = new Three.MeshStandardMaterial({
1331
- // color: examplecolor,
1332
- metalness: counterTop.metalness,
1333
- roughness: counterTop.roughness
1334
- });
1335
- } else {
1336
- mat3 = new Three.MeshStandardMaterial({
1337
- // metalness: counterTop.metalness,
1338
- // roughness: counterTop.roughness
1339
- metalness: 0.3,
1340
- roughness: 0.8
1341
- });
1342
- }
1343
- mat3.map = countT;
1344
- // mat3.envMap = textureCube;
1345
- mat4 = new Three.MeshStandardMaterial({
1346
- metalness: params.metalness,
1347
- roughness: params.roughness
1348
- });
1349
- mat4.map = loadTexture(interiorMap);
1350
- for (let j = 0; j < object.children.length; j++) {
1351
- if (object.children[j].name.includes('main')) {
1352
- }
1353
- if (object.children[j].name.includes('countertop')) {
1354
- object.children[j].material = mat3;
1355
- object.children[j].receiveShadow = true;
1356
- object.children[j].castShadow = true;
1357
- addEdgesToMesh(object.children[j]);
1358
- } else if (object.children[j].name.includes('_interior_')) {
1359
- object.children[j].material = mat4;
1360
- } else if (object.children[j].type === OBJTYPE_MESH) {
1361
- object.children[j].material = mat2;
1362
- object.children[j].receiveShadow = true;
1363
- object.children[j].castShadow = true;
1364
- }
1365
- }
1366
- }
1367
- },
1368
- reason => {
1369
- console.log('loadGLTF failed for reason:', reason);
1370
- objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
1371
- }
1372
- )
1373
- .then(() => {
1374
- return loadGLTFs(0);
1375
- });
1376
- }
1377
-
1378
- // render 3d appliance function ////////////////////////////////
1379
- export function render3DApplianceItem(
1380
- element,
1381
- layer,
1382
- scene,
1383
- sizeinfo,
1384
- structure_json,
1385
- mode = null
1386
- ) {
1387
- let structure = structure_json;
1388
- let { applianceMaterial } = element;
1389
- if (applianceMaterial.metalness == undefined)
1390
- applianceMaterial = applianceMaterial.toJS();
1391
- let onLoadItem = object => {
1392
- let newAltitude = element.properties.get('altitude').get('_length');
1393
- let newUnit = element.properties.get('altitude').get('_unit') || 'in';
1394
- newAltitude = convert(newAltitude).from(newUnit).to(scene.unit);
1395
-
1396
- let newWidth = element.properties.get('width').get('_length');
1397
- let newWidthUnit = element.properties.get('width').get('_unit') || 'in';
1398
- newWidth = convert(newWidth).from(newWidthUnit).to('in');
1399
-
1400
- let newHeight = element.properties.get('height').get('_length');
1401
- let newHeightUnit = element.properties.get('height').get('_unit') || 'in';
1402
- newHeight = convert(newHeight).from(newHeightUnit).to('in');
1403
-
1404
- let newDepth = element.properties.get('depth').get('_length');
1405
- let newDepthUnit = element.properties.get('depth').get('_unit') || 'in';
1406
- newDepth = convert(newDepth).from(newDepthUnit).to('in');
1407
-
1408
- object.scale.set(
1409
- (100 * newWidth) / sizeinfo.width,
1410
- (100 * newHeight) / sizeinfo.height,
1411
- (100 * newDepth) / sizeinfo.depth
1412
- );
1413
- // Normalize the origin of the object
1414
- let boundingBox = new Three.Box3().setFromObject(object);
1415
- object.userData = boundingBox;
1416
-
1417
- let center = [
1418
- (boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x,
1419
- (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y,
1420
- (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z
1421
- ];
1422
- object.position.x -= center[0];
1423
- object.position.y -=
1424
- center[1] - (boundingBox.max.y - boundingBox.min.y) / 2;
1425
- object.position.z -= center[2];
1426
- object.position.y += newAltitude;
1427
-
1428
- object.traverse(obj => {
1429
- if (obj.type === OBJTYPE_MESH) {
1430
- const { name } = obj;
1431
- let texture,
1432
- textureLoader = new Three.TextureLoader();
1433
- if (name.includes('_black')) {
1434
- obj.material.roughness = 0.4;
1435
- obj.material.metalness = 1.0;
1436
- obj.material.color = new Three.Color(0, 0, 0);
1437
- obj.castShadow = true;
1438
- obj.receiveShadow = true;
1439
- return object;
1440
- } else if (name.includes('_wood')) {
1441
- texture = loadTexture('/assets/img/texture/wood.jpg');
1442
- } else if (name.includes('_glass')) {
1443
- // texture = loadTexture('/assets/img/texture/glass.jpg');
1444
- const material = new Three.MeshPhysicalMaterial({
1445
- transparent: true,
1446
- opacity: 0.5,
1447
- roughness: 0,
1448
- transmission: 1,
1449
- thickness: 0.5, // Add refraction!
1450
- transparency: 0.8
1451
- });
1452
- obj.material = material;
1453
- obj.castShadow = true;
1454
- obj.receiveShadow = true;
1455
- return object;
1456
- } else if (name.includes('_steel')) {
1457
- // texture = loadTexture('/assets/img/texture/steel.jpg');
1458
- const material = new Three.MeshPhysicalMaterial({
1459
- roughness: 0.2,
1460
- metalness: 0.5,
1461
- reflectivity: 0.5,
1462
- color: new Three.Color(0xdddddd).convertLinearToSRGB()
1463
- });
1464
- obj.material = material;
1465
- obj.castShadow = true;
1466
- obj.receiveShadow = true;
1467
- return object;
1468
- }
1469
-
1470
- let mat = new Three.MeshStandardMaterial({
1471
- metalness: 0.1,
1472
- roughness: 0.9,
1473
- map: texture
1474
- });
1475
- obj.material = mat;
1476
- }
1477
- });
1478
-
1479
- if (element.selected) {
1480
- // if object is selected
1481
- // save object transform info///
1482
- let scalevec = new Three.Vector3(
1483
- object.scale.x,
1484
- object.scale.y,
1485
- object.scale.z
1486
- );
1487
- let posVec = new Three.Vector3(
1488
- object.position.x,
1489
- object.position.y,
1490
- object.position.z
1491
- );
1492
-
1493
- object.scale.set(
1494
- (1 * newWidth) / sizeinfo.width,
1495
- (1 * newHeight) / sizeinfo.height,
1496
- (1 * newDepth) / sizeinfo.depth
1497
- );
1498
- object.position.set(0, 0, 0);
1499
- object.rotation.set(0, 0, 0);
1500
- let boundingBox = new Three.Box3().setFromObject(object);
1501
- let max = boundingBox.max;
1502
- let min = boundingBox.min;
1503
- let radius =
1504
- Math.sqrt(
1505
- (boundingBox.max.x - boundingBox.min.x) *
1506
- (boundingBox.max.x - boundingBox.min.x) +
1507
- (boundingBox.max.z - boundingBox.min.z) *
1508
- (boundingBox.max.z - boundingBox.min.z)
1509
- ) / 2;
1510
- let moveBox = new Three.BoxGeometry(
1511
- max.x - min.x,
1512
- max.y - min.y,
1513
- max.z - min.z
1514
- );
1515
-
1516
- // translate Object
1517
- let controlGeom = GeomUtils.controlGeom();
1518
- // ////////////////////////
1519
-
1520
- // rotate Object //////////
1521
- let rotGeom = GeomUtils.rotGeoms(radius + 0.05);
1522
- // //////////////////////////////////
1523
-
1524
- // upwards Geometry/////////// Move up Object
1525
- let upwardsGeom = GeomUtils.upwardsGeom();
1526
- // ///////////////////////////////////////
1527
-
1528
- // vertical line - 4 lines around object//////////////////////////
1529
- let vLineGeom = new Three.BufferGeometry();
1530
- let vertices = [
1531
- (max.x - min.x) / 2 + min.x,
1532
- 0,
1533
- min.z,
1534
- (max.x - min.x) / 2 + min.x,
1535
- 0,
1536
- min.z + 1.3
1537
- ];
1538
-
1539
- vLineGeom.setAttribute(
1540
- 'position',
1541
- new Three.BufferAttribute(new Float32Array(vertices), 3)
1542
- );
1543
-
1544
- let vLineGeom1 = new Three.BufferGeometry();
1545
-
1546
- let vertices1 = [
1547
- (max.x - min.x) / 2 + min.x,
1548
- 0,
1549
- min.z,
1550
- (max.x - min.x) / 2 + min.x,
1551
- 0,
1552
- min.z - 1.3
1553
- ];
1554
-
1555
- vLineGeom1.setAttribute(
1556
- 'position',
1557
- new Three.BufferAttribute(new Float32Array(vertices1), 3)
1558
- );
1559
-
1560
- let vLineGeom2 = new Three.BufferGeometry();
1561
- let vertices2 = [
1562
- max.x,
1563
- 0,
1564
- max.z - (max.z - min.z) / 2,
1565
- max.x + 1.3,
1566
- 0,
1567
- max.z - (max.z - min.z) / 2
1568
- ];
1569
-
1570
- vLineGeom1.setAttribute(
1571
- 'position',
1572
- new Three.BufferAttribute(new Float32Array(vertices2), 3)
1573
- );
1574
-
1575
- let vLineGeom3 = new Three.BufferGeometry();
1576
- let vertices3 = [
1577
- min.x,
1578
- 0,
1579
- max.z - (max.z - min.z) / 2,
1580
- min.x - 1.3,
1581
- 0,
1582
- max.z - (max.z - min.z) / 2
1583
- ];
1584
-
1585
- vLineGeom1.setAttribute(
1586
- 'position',
1587
- new Three.BufferAttribute(new Float32Array(vertices3), 3)
1588
- );
1589
- // ///////////////////////////////////////
1590
-
1591
- // set names of transform object
1592
- let rotFillObj = new Three.Mesh(
1593
- rotGeom.rotFill,
1594
- new Three.MeshPhongMaterial({
1595
- color: 0x000000,
1596
- side: Three.DoubleSide,
1597
- colorWrite: true
1598
- })
1599
- );
1600
- let rotStrokeObj = new Three.Line(
1601
- rotGeom.rotStroke,
1602
- new Three.LineBasicMaterial({ color: 0xffffff, colorWrite: true })
1603
- );
1604
- rotFillObj.name = 'rotate';
1605
-
1606
- let upObj = new Three.Mesh(
1607
- upwardsGeom,
1608
- new Three.MeshBasicMaterial({ color: 0xffffff, side: Three.DoubleSide })
1609
- );
1610
- upObj.name = 'transUp';
1611
-
1612
- let mBox = new Three.Mesh(
1613
- moveBox,
1614
- new Three.MeshBasicMaterial({
1615
- color: new Three.Color(0xdd6699).convertLinearToSRGB(),
1616
- side: Three.DoubleSide,
1617
- transparent: true,
1618
- opacity: 0.4
1619
- })
1620
- );
1621
-
1622
- let color = new Three.Color(ARROW_COLOR).convertLinearToSRGB();
1623
- let vLine = new Three.Line(
1624
- vLineGeom,
1625
- new Three.LineBasicMaterial({ color })
1626
- );
1627
- let vLine1 = new Three.Line(
1628
- vLineGeom1,
1629
- new Three.LineBasicMaterial({ color })
1630
- );
1631
- let vLine2 = new Three.Line(
1632
- vLineGeom2,
1633
- new Three.LineBasicMaterial({ color })
1634
- );
1635
- let vLine3 = new Three.Line(
1636
- vLineGeom3,
1637
- new Three.LineBasicMaterial({ color })
1638
- );
1639
-
1640
- vLine.renderOrder = 1;
1641
- vLine1.renderOrder = 1;
1642
- vLine2.renderOrder = 1;
1643
- vLine3.renderOrder = 1;
1644
- vLine.material.transparent = true;
1645
- vLine1.material.transparent = true;
1646
- vLine2.material.transparent = true;
1647
- vLine3.material.transparent = true;
1648
- vLine.material.depthTest = false;
1649
- vLine1.material.depthTest = false;
1650
- vLine2.material.depthTest = false;
1651
- vLine3.material.depthTest = false;
1652
- // translate vector to center of object
1653
- let uVec = new Three.Vector3(
1654
- -posVec.x / scalevec.x,
1655
- -posVec.y / scalevec.y,
1656
- -posVec.z / scalevec.z
1657
- );
1658
-
1659
- vLine.translateY(0.1);
1660
- vLine1.translateY(0.1);
1661
- vLine2.translateY(0.1);
1662
- vLine3.translateY(0.1);
1663
-
1664
- upObj.translateOnAxis(uVec, 1);
1665
- upObj.translateY(max.y - min.y + 0.05);
1666
-
1667
- mBox.name = 'TransformBox';
1668
- mBox.translateOnAxis(
1669
- new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z),
1670
- 1
1671
- );
1672
- mBox.scale.set(1.01, 1.01, 1.01);
1673
-
1674
- // other side rotate object
1675
- let rotFillObj1 = rotFillObj.clone();
1676
- let rotStrokeObj1 = rotStrokeObj.clone();
1677
- rotFillObj1.rotateY(Math.PI);
1678
- rotStrokeObj1.rotateY(Math.PI);
1679
- rotFillObj.translateY(0.1);
1680
- rotFillObj1.translateY(0.1);
1681
- rotStrokeObj.translateY(0.1);
1682
- rotStrokeObj1.translateY(0.1);
1683
-
1684
- // assets Objects group includes rotate objects...
1685
- let asrtObj = new Three.Group();
1686
- // asrtObj.add(rotFillObj);
1687
- // asrtObj.add(rotFillObj1);
1688
- // asrtObj.add(rotStrokeObj);
1689
- // asrtObj.add(rotStrokeObj1);
1690
- asrtObj.add(vLine);
1691
- asrtObj.add(vLine1);
1692
- asrtObj.add(vLine2);
1693
- asrtObj.add(vLine3);
1694
- mBox.visible = false;
1695
- asrtObj.add(mBox);
1696
- asrtObj.scale.set(1 / object.scale.x, object.scale.y, 1 / object.scale.z);
1697
- // asrtObj.translateY(newAltitude / scalevec.y);
1698
- asrtObj.name = 'TransformGizmo';
1699
- // add assets Objects Group
1700
- object.add(asrtObj);
1701
-
1702
- // recover objects transform
1703
- object.position.x = posVec.x;
1704
- object.position.y = posVec.y;
1705
- object.position.z = posVec.z;
1706
- object.scale.set(scalevec.x, scalevec.y, scalevec.z);
1707
- }
1708
-
1709
- return object;
1710
- };
1711
-
1712
- // keys in structure
1713
- let keys = Object.keys(structure);
1714
-
1715
- // if exist in cached Objects
1716
- if (element.type in cachedObject) {
1717
- let objGroup = cachedObject[element.type].clone();
1718
- return Promise.resolve(onLoadItem(objGroup.clone()));
1719
- }
1720
-
1721
- // base Object/////
1722
- let objGroup = null;
1723
-
1724
- let loadGLTFs = function (i) {
1725
- if (i === keys.length) {
1726
- // if end of keys
1727
- cachedObject[element.type] = objGroup.clone(); //register to cachedObject
1728
- return onLoadItem(cachedObject[element.type].clone());
1729
- }
1730
- if (keys[i] === 'base') {
1731
- // if base Objects
1732
- i++;
1733
- return loadGLTFs(i);
1734
- }
1735
- };
1736
-
1737
- // load base to start //
1738
- // return loadGLTF(dirName + structure["base"])
1739
- return loadGLTF(structure['base'])
1740
- .then(
1741
- object => {
1742
- // let textureURL = `${API_SERVER_URL}/uploads/assets/default/steel.jpg`;
1743
- // let texture = loadTexture(textureURL);
1744
- // texture.wrapS = Three.MirroredRepeatWrapping;
1745
- // texture.wrapT = Three.MirroredRepeatWrapping;
1746
-
1747
- object.name = 'MainObject';
1748
- // NOTE: changed appliance emissive color to black
1749
- let mat2 = new Three.MeshStandardMaterial({
1750
- emissive: new Three.Color(0x0d0d0d).convertLinearToSRGB(),
1751
- metalness: applianceMaterial.metalness,
1752
- roughness: applianceMaterial.roughness
1753
- });
1754
- // mat2.envMap = textureCube;
1755
- object.material = mat2;
1756
-
1757
- for (let j = 0; j < object.children.length; j++) {
1758
- if (object.children[j].type === OBJTYPE_MESH) {
1759
- object.children[j].material = mat2;
1760
- object.children[j].receiveShadow = true;
1761
- object.children[j].castShadow = true; // change
1762
- }
1763
- }
1764
- objGroup = object;
1765
- },
1766
- reason => {
1767
- console.log('loadGLTF failed for reason:', reason);
1768
- objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
1769
- }
1770
- )
1771
- .then(() => {
1772
- return loadGLTFs(0);
1773
- });
1774
- }
1775
- // render 3d appliance function ////////////////////////////////
1776
- export function render3DLightingItem(
1777
- element,
1778
- layer,
1779
- scene,
1780
- sizeinfo,
1781
- structure_json,
1782
- mode = null
1783
- ) {
1784
- let structure = structure_json;
1785
- let onLoadItem = object => {
1786
- let width = { length: sizeinfo.width, unit: 'in' };
1787
- let depth = { length: sizeinfo.depth, unit: 'in' };
1788
- let height = { length: sizeinfo.height, unit: 'in' };
1789
- let newWidth = convert(width.length).from(width.unit).to('cm');
1790
- let newDepth = convert(depth.length).from(depth.unit).to('cm');
1791
- let newHeight = convert(height.length).from(height.unit).to('cm');
1792
-
1793
- let newAltitude = element.properties.get('altitude').get('_length');
1794
- let newUnit = element.properties.get('altitude').get('_unit') || 'in';
1795
- newAltitude = convert(newAltitude).from(newUnit).to(scene.unit);
1796
-
1797
- //object.scale.set(newWidth, newHeight, newDepth);
1798
- object.scale.set(100, 100, 100);
1799
- // Normalize the origin of the object
1800
- let boundingBox = new Three.Box3().setFromObject(object);
1801
- object.userData = boundingBox;
1802
-
1803
- let objectHeight = boundingBox.max.y - boundingBox.min.y;
1804
- let objectYPos = boundingBox.min.y;
1805
-
1806
- let center = [
1807
- (boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x,
1808
- (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y,
1809
- (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z
1810
- ];
1811
-
1812
- object.position.x = center[0];
1813
- object.position.y = newHeight + newAltitude - boundingBox.max.y;
1814
- object.position.z = center[2];
1815
-
1816
- if (element.selected) {
1817
- // if object is selected
1818
- // save object transform info///
1819
- let scalevec = new Three.Vector3(
1820
- object.scale.x,
1821
- object.scale.y,
1822
- object.scale.z
1823
- );
1824
- let posVec = new Three.Vector3(
1825
- object.position.x,
1826
- object.position.y,
1827
- object.position.z
1828
- );
1829
-
1830
- object.scale.set(1, 1, 1);
1831
- object.position.set(0, 0, 0);
1832
- object.rotation.set(0, 0, 0);
1833
-
1834
- //let box = new Three.BoxHelper(object, 0xffffff);
1835
- //box.material.lineWidth = 5;
1836
- //box.renderOrder = 1000;
1837
- //box.material.depthTest = false;
1838
- //object.add(box);
1839
- let boundingBox = new Three.Box3().setFromObject(object);
1840
- let max = boundingBox.max;
1841
- let min = boundingBox.min;
1842
- let radius =
1843
- Math.sqrt(
1844
- (boundingBox.max.x - boundingBox.min.x) *
1845
- (boundingBox.max.x - boundingBox.min.x) +
1846
- (boundingBox.max.z - boundingBox.min.z) *
1847
- (boundingBox.max.z - boundingBox.min.z)
1848
- ) / 2;
1849
- let moveBox = new Three.BoxGeometry(
1850
- max.x - min.x,
1851
- max.y - min.y,
1852
- max.z - min.z
1853
- );
1854
-
1855
- // translate Object
1856
- let controlGeom = GeomUtils.controlGeom();
1857
-
1858
- // rotate Object //////////
1859
- let rotGeom = GeomUtils.rotGeoms(radius + 0.05);
1860
- // //////////////////////////////////
1861
-
1862
- // upwards Geometry/////////// Move up Object
1863
- let upwardsGeom = GeomUtils.upwardsGeom();
1864
-
1865
- // vertical line - 4 lines around object//////////////////////////
1866
- let vLineGeom = new Three.BufferGeometry();
1867
- let vertices = [
1868
- (max.x - min.x) / 2 + min.x,
1869
- 0,
1870
- min.z,
1871
- (max.x - min.x) / 2 + min.x,
1872
- 0,
1873
- min.z + 1.3
1874
- ];
1875
-
1876
- vLineGeom.setAttribute(
1877
- 'position',
1878
- new Three.BufferAttribute(new Float32Array(vertices), 3)
1879
- );
1880
-
1881
- let vLineGeom1 = new Three.BufferGeometry();
1882
- let vertices1 = [
1883
- (max.x - min.x) / 2 + min.x,
1884
- 0,
1885
- min.z,
1886
- (max.x - min.x) / 2 + min.x,
1887
- 0,
1888
- min.z - 1.3
1889
- ];
1890
-
1891
- vLineGeom1.setAttribute(
1892
- 'position',
1893
- new Three.BufferAttribute(new Float32Array(vertices1), 3)
1894
- );
1895
-
1896
- let vLineGeom2 = new Three.BufferGeometry();
1897
- let vertices2 = [
1898
- min.x,
1899
- 0,
1900
- max.z - (max.z - min.z) / 2,
1901
- min.x + 1.3,
1902
- 0,
1903
- max.z - (max.z - min.z) / 2
1904
- ];
1905
-
1906
- vLineGeom2.setAttribute(
1907
- 'position',
1908
- new Three.BufferAttribute(new Float32Array(vertices2), 3)
1909
- );
1910
-
1911
- let vLineGeom3 = new Three.BufferGeometry();
1912
- let vertices3 = [
1913
- min.x,
1914
- 0,
1915
- max.z - (max.z - min.z) / 2,
1916
- min.x - 1.3,
1917
- 0,
1918
- max.z - (max.z - min.z) / 2
1919
- ];
1920
-
1921
- vLineGeom3.setAttribute(
1922
- 'position',
1923
- new Three.BufferAttribute(new Float32Array(vertices3), 3)
1924
- );
1925
- // ///////////////////////////////////////
1926
-
1927
- // set names of transform object
1928
- let rotFillObj = new Three.Mesh(
1929
- rotGeom.rotFill,
1930
- new Three.MeshPhongMaterial({
1931
- color: 0x000000,
1932
- side: Three.DoubleSide,
1933
- colorWrite: true
1934
- })
1935
- );
1936
- let rotStrokeObj = new Three.Line(
1937
- rotGeom.rotStroke,
1938
- new Three.LineBasicMaterial({ color: 0xffffff, colorWrite: true })
1939
- );
1940
- rotFillObj.name = 'rotate';
1941
-
1942
- let upObj = new Three.Mesh(
1943
- upwardsGeom,
1944
- new Three.MeshBasicMaterial({ color: 0xffffff, side: Three.DoubleSide })
1945
- );
1946
- upObj.name = 'transUp';
1947
-
1948
- let mBox = new Three.Mesh(
1949
- moveBox,
1950
- new Three.MeshBasicMaterial({
1951
- color: 0xdd6699,
1952
- side: Three.DoubleSide,
1953
- transparent: true,
1954
- opacity: 0.4
1955
- })
1956
- );
1957
-
1958
- let color = new Three.Color(ARROW_COLOR).convertLinearToSRGB();
1959
- let vLine = new Three.Line(
1960
- vLineGeom,
1961
- new Three.LineBasicMaterial({ color })
1962
- );
1963
- let vLine1 = new Three.Line(
1964
- vLineGeom1,
1965
- new Three.LineBasicMaterial({ color })
1966
- );
1967
- let vLine2 = new Three.Line(
1968
- vLineGeom2,
1969
- new Three.LineBasicMaterial({ color })
1970
- );
1971
- let vLine3 = new Three.Line(
1972
- vLineGeom3,
1973
- new Three.LineBasicMaterial({ color })
1974
- );
1975
- vLine.renderOrder = 1;
1976
- vLine1.renderOrder = 1;
1977
- vLine2.renderOrder = 1;
1978
- vLine3.renderOrder = 1;
1979
- vLine.material.transparent = true;
1980
- vLine1.material.transparent = true;
1981
- vLine2.material.transparent = true;
1982
- vLine3.material.transparent = true;
1983
- vLine.material.depthTest = false;
1984
- vLine1.material.depthTest = false;
1985
- vLine2.material.depthTest = false;
1986
- vLine3.material.depthTest = false;
1987
- // translate vector to center of object
1988
- let uVec = new Three.Vector3(
1989
- -posVec.x / scalevec.x,
1990
- -posVec.y / scalevec.y,
1991
- -posVec.z / scalevec.z
1992
- );
1993
-
1994
- vLine.translateY(1.6);
1995
- vLine1.translateY(1.6);
1996
- vLine2.translateY(1.6);
1997
- vLine3.translateY(1.6);
1998
-
1999
- //rotObj.translateOnAxis(uVec, 1);
2000
- upObj.translateOnAxis(uVec, 1);
2001
- upObj.translateY(max.y - min.y);
2002
-
2003
- mBox.name = 'TransformBox';
2004
- mBox.translateOnAxis(
2005
- new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z),
2006
- 1
2007
- );
2008
- mBox.scale.set(1.01, 1.01, 1.01);
2009
-
2010
- // other side rotate object
2011
- let rotFillObj1 = rotFillObj.clone();
2012
- let rotStrokeObj1 = rotStrokeObj.clone();
2013
- rotFillObj1.rotateY(Math.PI);
2014
- rotStrokeObj1.rotateY(Math.PI);
2015
- rotFillObj.translateY(1.6);
2016
- rotFillObj1.translateY(1.6);
2017
- rotStrokeObj.translateY(1.6);
2018
- rotStrokeObj1.translateY(1.6);
2019
-
2020
- // assets Objects group includes rotate objects...
2021
- let asrtObj = new Three.Group();
2022
- // asrtObj.add(rotFillObj);
2023
- // asrtObj.add(rotFillObj1);
2024
- // asrtObj.add(rotStrokeObj);
2025
- // asrtObj.add(rotStrokeObj1);
2026
- //asrtObj.add(upObj);
2027
- asrtObj.add(vLine);
2028
- asrtObj.add(vLine1);
2029
- asrtObj.add(vLine2);
2030
- asrtObj.add(vLine3);
2031
- mBox.visible = false;
2032
- asrtObj.add(mBox);
2033
- asrtObj.scale.set(1, 1, 1);
2034
- //asrtObj.translateY(newAltitude / scalevec.y);
2035
- asrtObj.name = 'TransformGizmo';
2036
- // add assets Objects Group
2037
- object.add(asrtObj);
2038
-
2039
- // recover objects transform
2040
- object.position.x = posVec.x;
2041
- object.position.y = posVec.y;
2042
- object.position.z = posVec.z;
2043
- object.scale.set(scalevec.x, scalevec.y, scalevec.z);
2044
- setTimeout(() => {
2045
- SceneCreator.getDistances(layer);
2046
- }, 100);
2047
- }
2048
- return object;
2049
- };
2050
-
2051
- // keys in structure
2052
- let keys = Object.keys(structure);
2053
-
2054
- // if exist in cached Objects
2055
- if (element.type in cachedObject) {
2056
- let objGroup = cachedObject[element.type].clone();
2057
- return Promise.resolve(onLoadItem(objGroup.clone()));
2058
- }
2059
-
2060
- // base Object/////
2061
- let objGroup = null;
2062
-
2063
- let loadGLTFs = function (i) {
2064
- if (i === keys.length) {
2065
- // if end of keys
2066
- cachedObject[element.type] = objGroup.clone(); //register to cachedObject
2067
- return onLoadItem(cachedObject[element.type].clone());
2068
- }
2069
- if (keys[i] === 'base') {
2070
- // if base Objects
2071
- i++;
2072
- return loadGLTFs(i);
2073
- }
2074
- };
2075
-
2076
- // load base to start //
2077
- // return loadGLTF(dirName + structure["base"])
2078
- return loadGLTF(structure['base'])
2079
- .then(
2080
- object => {
2081
- // let textureURL = `${API_SERVER_URL}/uploads/assets/default/steel.jpg`;
2082
- // let texture = loadTexture(textureURL);
2083
- // texture.wrapS = Three.MirroredRepeatWrapping;
2084
- // texture.wrapT = Three.MirroredRepeatWrapping;
2085
-
2086
- object.name = 'MainObject';
2087
- let mat2 = new Three.MeshStandardMaterial({
2088
- emissive: new Three.Color(0x666666).convertLinearToSRGB(),
2089
- metalness: 0.7,
2090
- roughness: 0.3
2091
- });
2092
- // mat2.envMap = textureCube;
2093
- object.material = mat2;
2094
-
2095
- for (let j = 0; j < object.children.length; j++) {
2096
- if (object.children[j].type === OBJTYPE_MESH) {
2097
- object.children[j].material = mat2;
2098
- object.children[j].receiveShadow = true;
2099
- }
2100
- }
2101
- objGroup = object;
2102
- },
2103
- reason => {
2104
- console.log('loadGLTF failed for reason:', reason);
2105
- objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
2106
- }
2107
- )
2108
- .then(() => {
2109
- return loadGLTFs(0);
2110
- });
2111
- }
2112
-
2113
- export function addEdgesToMesh(inChild) {
2114
- let boxEdge = new Three.EdgesGeometry(inChild.geometry, 10);
2115
- let boxEdgeMaterial = new Three.LineBasicMaterial({
2116
- color: 0x000000,
2117
- transparent: true,
2118
- opacity: 0.09
2119
- });
2120
- let boxEdgeLine = new Three.LineSegments(boxEdge, boxEdgeMaterial);
2121
- // inChild.add(boxEdgeLine);
2122
- }