kitchen-simulator 2.0.0 → 2.0.1

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 (1165) hide show
  1. package/README.md +24 -1
  2. package/es/@history.js +2 -0
  3. package/es/AppContext.js +3 -0
  4. package/es/LiteKitchenConfigurator.js +480 -0
  5. package/es/LiteRenderer.js +503 -0
  6. package/es/actions/area-actions.js +14 -0
  7. package/es/actions/export.js +36 -0
  8. package/es/actions/groups-actions.js +89 -0
  9. package/es/actions/holes-actions.js +119 -0
  10. package/es/actions/items-actions.js +318 -0
  11. package/es/actions/lines-actions.js +81 -0
  12. package/es/actions/project-actions.js +286 -0
  13. package/es/actions/scene-actions.js +33 -0
  14. package/es/actions/vertices-actions.js +27 -0
  15. package/es/actions/viewer2d-actions.js +58 -0
  16. package/es/actions/viewer3d-actions.js +23 -0
  17. package/es/analytics/ga4.js +188 -0
  18. package/es/analytics/posthog.js +60 -0
  19. package/es/assets/Window.hdr +2100 -0
  20. package/es/assets/brown_photostudio_02_1k.hdr +0 -0
  21. package/es/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  22. package/es/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  23. package/es/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  24. package/es/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  25. package/es/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  26. package/es/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  27. package/es/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  28. package/es/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  29. package/es/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  30. package/es/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  31. package/es/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  32. package/es/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  33. package/es/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  34. package/es/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  35. package/es/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  36. package/es/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  37. package/es/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  38. package/es/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  39. package/es/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  40. package/es/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  41. package/es/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  42. package/es/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  43. package/es/assets/fonts/style.css +177 -0
  44. package/es/assets/gltf/door_closet.bin +0 -0
  45. package/es/assets/gltf/door_closet.fbx +0 -0
  46. package/es/assets/gltf/door_closet.gltf +1 -0
  47. package/es/assets/gltf/door_exterior.bin +0 -0
  48. package/es/assets/gltf/door_exterior.fbx +0 -0
  49. package/es/assets/gltf/door_exterior.gltf +1 -0
  50. package/es/assets/gltf/door_interior.bin +0 -0
  51. package/es/assets/gltf/door_interior.fbx +0 -0
  52. package/es/assets/gltf/door_interior.gltf +1 -0
  53. package/es/assets/gltf/door_sliding.bin +0 -0
  54. package/es/assets/gltf/door_sliding.fbx +0 -0
  55. package/es/assets/gltf/door_sliding.gltf +1 -0
  56. package/es/assets/gltf/doorway_framed.bin +0 -0
  57. package/es/assets/gltf/doorway_framed.fbx +0 -0
  58. package/es/assets/gltf/doorway_framed.gltf +1 -0
  59. package/es/assets/gltf/window_clear.bin +0 -0
  60. package/es/assets/gltf/window_clear.fbx +0 -0
  61. package/es/assets/gltf/window_clear.gltf +1 -0
  62. package/es/assets/gltf/window_cross.bin +0 -0
  63. package/es/assets/gltf/window_cross.fbx +0 -0
  64. package/es/assets/gltf/window_cross.gltf +1 -0
  65. package/es/assets/gltf/window_double_hung.bin +0 -0
  66. package/es/assets/gltf/window_double_hung.fbx +0 -0
  67. package/es/assets/gltf/window_double_hung.gltf +1 -0
  68. package/es/assets/gltf/window_vertical.bin +0 -0
  69. package/es/assets/gltf/window_vertical.fbx +0 -0
  70. package/es/assets/gltf/window_vertical.gltf +1 -0
  71. package/es/assets/img/1.jpg +0 -0
  72. package/es/assets/img/TKC_thumbnail.png +0 -0
  73. package/es/assets/img/Toggle.png +0 -0
  74. package/es/assets/img/loading/loading.gif +0 -0
  75. package/es/assets/img/loading/loading_1.svg +11 -0
  76. package/es/assets/img/loading_large.gif +0 -0
  77. package/es/assets/img/png/door/closet.png +0 -0
  78. package/es/assets/img/png/door/doorwaysframed.png +0 -0
  79. package/es/assets/img/png/door/doorwaysframeles.png +0 -0
  80. package/es/assets/img/png/door/doorwaysframeless.png +0 -0
  81. package/es/assets/img/png/door/exterior.png +0 -0
  82. package/es/assets/img/png/door/interior.png +0 -0
  83. package/es/assets/img/png/door/sliding.png +0 -0
  84. package/es/assets/img/png/helper/outcome.png +0 -0
  85. package/es/assets/img/png/helper/video_preview_3d.png +0 -0
  86. package/es/assets/img/png/helper/video_preview_start.png +0 -0
  87. package/es/assets/img/project_img.png +0 -0
  88. package/es/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  89. package/es/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  90. package/es/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  91. package/es/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  92. package/es/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  93. package/es/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  94. package/es/assets/img/rta/rta_logo_box_maroon.png +0 -0
  95. package/es/assets/img/rta/rta_logo_box_white.png +0 -0
  96. package/es/assets/img/rta_menu.png +0 -0
  97. package/es/assets/img/step2.jpg +0 -0
  98. package/es/assets/img/step3.jpg +0 -0
  99. package/es/assets/img/step4.jpg +0 -0
  100. package/es/assets/img/step5.jpg +0 -0
  101. package/es/assets/img/step6.jpg +0 -0
  102. package/es/assets/img/step7.jpg +0 -0
  103. package/es/assets/img/step8.jpg +0 -0
  104. package/es/assets/img/svg/2d_delete_object.svg +33 -0
  105. package/es/assets/img/svg/2d_delete_object1.svg +33 -0
  106. package/es/assets/img/svg/2d_lock_object.svg +33 -0
  107. package/es/assets/img/svg/3d_item_move.svg +106 -0
  108. package/es/assets/img/svg/3d_item_rotation.svg +76 -0
  109. package/es/assets/img/svg/3d_item_warning_edit.svg +77 -0
  110. package/es/assets/img/svg/3d_item_warning_info.svg +81 -0
  111. package/es/assets/img/svg/accessories.svg +4 -0
  112. package/es/assets/img/svg/angle_icon.svg +39 -0
  113. package/es/assets/img/svg/blank_div.svg +14 -0
  114. package/es/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  115. package/es/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  116. package/es/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  117. package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  118. package/es/assets/img/svg/bottombar/arrow-down.svg +3 -0
  119. package/es/assets/img/svg/bottombar/arrow-left.svg +3 -0
  120. package/es/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  121. package/es/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  122. package/es/assets/img/svg/bottombar/arrow-right.svg +3 -0
  123. package/es/assets/img/svg/bottombar/arrow-up.svg +3 -0
  124. package/es/assets/img/svg/bottombar/collapse.svg +3 -0
  125. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -0
  126. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -0
  127. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -0
  128. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -0
  129. package/es/assets/img/svg/bottombar/elevation.svg +6 -0
  130. package/es/assets/img/svg/bottombar/expand.svg +3 -0
  131. package/es/assets/img/svg/bottombar/help.svg +72 -0
  132. package/es/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  133. package/es/assets/img/svg/bottombar/pan_1.svg +57 -0
  134. package/es/assets/img/svg/bottombar/pan_2.svg +27 -0
  135. package/es/assets/img/svg/bottombar/pan_3.svg +27 -0
  136. package/es/assets/img/svg/bottombar/pan_4.svg +27 -0
  137. package/es/assets/img/svg/bottombar/pan_5.svg +27 -0
  138. package/es/assets/img/svg/bottombar/settings.svg +23 -0
  139. package/es/assets/img/svg/bottombar/spin-down.svg +76 -0
  140. package/es/assets/img/svg/bottombar/spin-left.svg +75 -0
  141. package/es/assets/img/svg/bottombar/spin-right.svg +75 -0
  142. package/es/assets/img/svg/bottombar/spin-up.svg +76 -0
  143. package/es/assets/img/svg/bottombar/spin_1.svg +48 -0
  144. package/es/assets/img/svg/bottombar/spin_2.svg +31 -0
  145. package/es/assets/img/svg/bottombar/spin_3.svg +31 -0
  146. package/es/assets/img/svg/bottombar/spin_4.svg +31 -0
  147. package/es/assets/img/svg/bottombar/spin_5.svg +31 -0
  148. package/es/assets/img/svg/bottombar/zoomin.svg +29 -0
  149. package/es/assets/img/svg/bottombar/zoomout.svg +26 -0
  150. package/es/assets/img/svg/check.svg +10 -0
  151. package/es/assets/img/svg/close.svg +11 -0
  152. package/es/assets/img/svg/color/Black.svg +3 -0
  153. package/es/assets/img/svg/color/Blue.svg +3 -0
  154. package/es/assets/img/svg/color/Brown.svg +9 -0
  155. package/es/assets/img/svg/color/Cream.svg +3 -0
  156. package/es/assets/img/svg/color/Dark.svg +9 -0
  157. package/es/assets/img/svg/color/Gray.svg +3 -0
  158. package/es/assets/img/svg/color/Green.svg +3 -0
  159. package/es/assets/img/svg/color/Light.svg +9 -0
  160. package/es/assets/img/svg/color/Medium.svg +9 -0
  161. package/es/assets/img/svg/color/Unfinished.svg +9 -0
  162. package/es/assets/img/svg/color/White.svg +3 -0
  163. package/es/assets/img/svg/color/White.svg.bak +3 -0
  164. package/es/assets/img/svg/color/stone2.jpg +0 -0
  165. package/es/assets/img/svg/color/wood2.jpg +0 -0
  166. package/es/assets/img/svg/copy.svg +11 -0
  167. package/es/assets/img/svg/delete.svg +3 -0
  168. package/es/assets/img/svg/detail.svg +77 -0
  169. package/es/assets/img/svg/disclaimer/background.svg +758 -0
  170. package/es/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  171. package/es/assets/img/svg/door/Closet.svg +11 -0
  172. package/es/assets/img/svg/door/Exterior.svg +5 -0
  173. package/es/assets/img/svg/door/Framed_dorway.svg +5 -0
  174. package/es/assets/img/svg/door/Frameless_dorway.svg +5 -0
  175. package/es/assets/img/svg/door/Interior.svg +7 -0
  176. package/es/assets/img/svg/door/Sliding.svg +5 -0
  177. package/es/assets/img/svg/doors_closet.svg +47 -0
  178. package/es/assets/img/svg/doors_exterior.svg +25 -0
  179. package/es/assets/img/svg/doors_interior.svg +29 -0
  180. package/es/assets/img/svg/doors_patio.svg +26 -0
  181. package/es/assets/img/svg/duplicate.svg +11 -0
  182. package/es/assets/img/svg/duplicate_object_left.svg +32 -0
  183. package/es/assets/img/svg/duplicate_object_right.svg +32 -0
  184. package/es/assets/img/svg/filtersActive.svg +19 -0
  185. package/es/assets/img/svg/firstsetting/L.svg +3 -0
  186. package/es/assets/img/svg/firstsetting/L2.svg +3 -0
  187. package/es/assets/img/svg/firstsetting/Open.svg +3 -0
  188. package/es/assets/img/svg/firstsetting/Square.svg +3 -0
  189. package/es/assets/img/svg/firstsetting/bar-active.svg +9 -0
  190. package/es/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  191. package/es/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  192. package/es/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  193. package/es/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  194. package/es/assets/img/svg/firstsetting/check-active.svg +3 -0
  195. package/es/assets/img/svg/firstsetting/check-normal.svg +3 -0
  196. package/es/assets/img/svg/firstsetting/pencil.svg +11 -0
  197. package/es/assets/img/svg/green_checkmark.svg +27 -0
  198. package/es/assets/img/svg/headerbar/assist.svg +3 -0
  199. package/es/assets/img/svg/headerbar/cart.svg +3 -0
  200. package/es/assets/img/svg/headerbar/check.svg +10 -0
  201. package/es/assets/img/svg/headerbar/consult_designer.svg +45 -0
  202. package/es/assets/img/svg/headerbar/edit_name.svg +26 -0
  203. package/es/assets/img/svg/headerbar/file-dollar.svg +13 -0
  204. package/es/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  205. package/es/assets/img/svg/headerbar/plus.svg +11 -0
  206. package/es/assets/img/svg/headerbar/review_quote.svg +44 -0
  207. package/es/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  208. package/es/assets/img/svg/headerbar/save.svg +3 -0
  209. package/es/assets/img/svg/headerbar/setting.svg +75 -0
  210. package/es/assets/img/svg/help/check.svg +10 -0
  211. package/es/assets/img/svg/help/search.svg +76 -0
  212. package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  213. package/es/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  214. package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  215. package/es/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  216. package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  217. package/es/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  218. package/es/assets/img/svg/invert.svg +127 -0
  219. package/es/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  220. package/es/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  221. package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  222. package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  223. package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  224. package/es/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  225. package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  226. package/es/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  227. package/es/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  228. package/es/assets/img/svg/lefttoolbar/door.svg +12 -0
  229. package/es/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  230. package/es/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  231. package/es/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  232. package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  233. package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  234. package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  235. package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  236. package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  237. package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  238. package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  239. package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  240. package/es/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  241. package/es/assets/img/svg/lefttoolbar/search.svg +76 -0
  242. package/es/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  243. package/es/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  244. package/es/assets/img/svg/lefttoolbar/window.svg +12 -0
  245. package/es/assets/img/svg/logo.svg +11 -0
  246. package/es/assets/img/svg/logo_with_text.svg +25 -0
  247. package/es/assets/img/svg/menubar/login.svg +84 -0
  248. package/es/assets/img/svg/menubar/my_projects.svg +85 -0
  249. package/es/assets/img/svg/menubar/new_project.svg +110 -0
  250. package/es/assets/img/svg/menubar/save_project.svg +84 -0
  251. package/es/assets/img/svg/options.svg +3 -0
  252. package/es/assets/img/svg/positioning.svg +3 -0
  253. package/es/assets/img/svg/rotate.png +0 -0
  254. package/es/assets/img/svg/rotate.svg +17 -0
  255. package/es/assets/img/svg/rotate_object_clockwise.svg +26 -0
  256. package/es/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  257. package/es/assets/img/svg/toggleFilters.svg +19 -0
  258. package/es/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  259. package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  260. package/es/assets/img/svg/toolbar/add_button.svg +36 -0
  261. package/es/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  262. package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  263. package/es/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  264. package/es/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  265. package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  266. package/es/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  267. package/es/assets/img/svg/toolbar/apply_button.svg +38 -0
  268. package/es/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  269. package/es/assets/img/svg/toolbar/backsplash.svg +8 -0
  270. package/es/assets/img/svg/toolbar/cancel_button.svg +37 -0
  271. package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  272. package/es/assets/img/svg/toolbar/countertop.svg +7 -0
  273. package/es/assets/img/svg/toolbar/dcm.png +0 -0
  274. package/es/assets/img/svg/toolbar/dcm_off.svg +12 -0
  275. package/es/assets/img/svg/toolbar/dcm_on.svg +474 -0
  276. package/es/assets/img/svg/toolbar/delete_button.svg +37 -0
  277. package/es/assets/img/svg/toolbar/download.svg +77 -0
  278. package/es/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  279. package/es/assets/img/svg/toolbar/edit_button.svg +75 -0
  280. package/es/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  281. package/es/assets/img/svg/toolbar/fbm.png +0 -0
  282. package/es/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  283. package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  284. package/es/assets/img/svg/toolbar/floorstyle.svg +9 -0
  285. package/es/assets/img/svg/toolbar/fmb.png +0 -0
  286. package/es/assets/img/svg/toolbar/fmb_off.svg +12 -0
  287. package/es/assets/img/svg/toolbar/fmb_on.svg +489 -0
  288. package/es/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  289. package/es/assets/img/svg/toolbar/get_started_button.svg +41 -0
  290. package/es/assets/img/svg/toolbar/handles.svg +5 -0
  291. package/es/assets/img/svg/toolbar/lighting.svg +7 -0
  292. package/es/assets/img/svg/toolbar/lrm.png +0 -0
  293. package/es/assets/img/svg/toolbar/lrm_off.svg +12 -0
  294. package/es/assets/img/svg/toolbar/lrm_on.svg +470 -0
  295. package/es/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  296. package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  297. package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  298. package/es/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  299. package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  300. package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  301. package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  302. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  303. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  304. package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  305. package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  306. package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  307. package/es/assets/img/svg/toolbar/redo_button.svg +75 -0
  308. package/es/assets/img/svg/toolbar/redo_button1.svg +75 -0
  309. package/es/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  310. package/es/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  311. package/es/assets/img/svg/toolbar/save_project_button.svg +44 -0
  312. package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  313. package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  314. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  315. package/es/assets/img/svg/toolbar/style_change_button.svg +47 -0
  316. package/es/assets/img/svg/toolbar/take_picture.svg +75 -0
  317. package/es/assets/img/svg/toolbar/undo_button.svg +76 -0
  318. package/es/assets/img/svg/toolbar/undo_button1.svg +76 -0
  319. package/es/assets/img/svg/toolbar/use_button.svg +37 -0
  320. package/es/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  321. package/es/assets/img/svg/topbar/edit_active.svg +10 -0
  322. package/es/assets/img/svg/topbar/edit_inactive.svg +10 -0
  323. package/es/assets/img/svg/topbar/redo_active.svg +42 -0
  324. package/es/assets/img/svg/topbar/redo_inactive.svg +23 -0
  325. package/es/assets/img/svg/topbar/select_all_active.svg +50 -0
  326. package/es/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  327. package/es/assets/img/svg/topbar/take_picture_active.svg +51 -0
  328. package/es/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  329. package/es/assets/img/svg/topbar/undo_active.svg +42 -0
  330. package/es/assets/img/svg/topbar/undo_inactive.svg +23 -0
  331. package/es/assets/img/svg/warning_info_2d.svg +81 -0
  332. package/es/assets/img/svg/window/Clear.svg +3 -0
  333. package/es/assets/img/svg/window/Cross.svg +5 -0
  334. package/es/assets/img/svg/window/Double_hung.svg +4 -0
  335. package/es/assets/img/svg/window/Vertical.svg +4 -0
  336. package/es/assets/img/svg/windows_clear.svg +23 -0
  337. package/es/assets/img/svg/windows_cross.svg +28 -0
  338. package/es/assets/img/svg/windows_double_hung.svg +24 -0
  339. package/es/assets/img/svg/windows_vertical.svg +24 -0
  340. package/es/assets/img/svg/wizardstep/Custom.svg +3 -0
  341. package/es/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  342. package/es/assets/img/svg/wizardstep/L.svg +3 -0
  343. package/es/assets/img/svg/wizardstep/L2.svg +3 -0
  344. package/es/assets/img/svg/wizardstep/Open.svg +3 -0
  345. package/es/assets/img/svg/wizardstep/Square.svg +3 -0
  346. package/es/assets/img/svg/wizardstep/bar-active.svg +9 -0
  347. package/es/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  348. package/es/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  349. package/es/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  350. package/es/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  351. package/es/assets/img/svg/wizardstep/check-active.svg +3 -0
  352. package/es/assets/img/svg/wizardstep/check-normal.svg +3 -0
  353. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -0
  354. package/es/assets/img/svg/wizardstep/pencil.svg +11 -0
  355. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -0
  356. package/es/assets/img/texture/glass.jpg +0 -0
  357. package/es/assets/img/texture/steel.jpg +0 -0
  358. package/es/assets/img/texture/white1px.jpg +0 -0
  359. package/es/assets/img/texture/wood.jpg +0 -0
  360. package/es/assets/model/DCM.bin +0 -0
  361. package/es/assets/model/DCM.fbx +0 -0
  362. package/es/assets/model/DCM.gltf +1 -0
  363. package/es/assets/model/FBM.bin +0 -0
  364. package/es/assets/model/FBM.fbx +0 -0
  365. package/es/assets/model/FBM.gltf +1 -0
  366. package/es/assets/model/LRM.bin +0 -0
  367. package/es/assets/model/LRM.fbx +0 -0
  368. package/es/assets/model/LRM.gltf +1 -0
  369. package/es/assets/rtastore_logo.png +0 -0
  370. package/es/catalog/areas/area/planner-element.js +45 -0
  371. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  372. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  373. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  374. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  375. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  376. package/es/catalog/back.png +0 -0
  377. package/es/catalog/catalog.js +265 -0
  378. package/es/catalog/doors.png +0 -0
  379. package/es/catalog/doorways.png +0 -0
  380. package/es/catalog/envMap/nx.hdr +0 -0
  381. package/es/catalog/envMap/ny.hdr +0 -0
  382. package/es/catalog/envMap/nz.hdr +0 -0
  383. package/es/catalog/envMap/px.hdr +0 -0
  384. package/es/catalog/envMap/py.hdr +0 -0
  385. package/es/catalog/envMap/pz.hdr +0 -0
  386. package/es/catalog/export.js +0 -0
  387. package/es/catalog/factories/area-factory-3d.js +181 -0
  388. package/es/catalog/factories/area-factory.js +78 -0
  389. package/es/catalog/factories/export.js +7 -0
  390. package/es/catalog/factories/wall-factory-3d.js +202 -0
  391. package/es/catalog/factories/wall-factory.js +267 -0
  392. package/es/catalog/holes/door-closet/planner-element.js +222 -0
  393. package/es/catalog/holes/door-double/door_double.png +0 -0
  394. package/es/catalog/holes/door-double/planner-element.js +315 -0
  395. package/es/catalog/holes/door-exterior/planner-element.js +215 -0
  396. package/es/catalog/holes/door-interior/planner-element.js +227 -0
  397. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  398. package/es/catalog/holes/door-panic/planner-element.js +503 -0
  399. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  400. package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
  401. package/es/catalog/holes/door-sliding/planner-element.js +225 -0
  402. package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
  403. package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
  404. package/es/catalog/holes/export.js +13 -0
  405. package/es/catalog/holes/gate/gate.jpg +0 -0
  406. package/es/catalog/holes/window-clear/planner-element.js +166 -0
  407. package/es/catalog/holes/window-clear/texture.png +0 -0
  408. package/es/catalog/holes/window-cross/planner-element.js +165 -0
  409. package/es/catalog/holes/window-cross/texture.png +0 -0
  410. package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
  411. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  412. package/es/catalog/holes/window-vertical/planner-element.js +276 -0
  413. package/es/catalog/holes/window-vertical/texture.png +0 -0
  414. package/es/catalog/lines/wall/planner-element.js +79 -0
  415. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  416. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  417. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  418. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  419. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  420. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  421. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  422. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  423. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  424. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  425. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  426. package/es/catalog/lines/wall/wall.png +0 -0
  427. package/es/catalog/molding/molding-dcm/planner-element.js +26 -0
  428. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  429. package/es/catalog/molding/molding-fbm/planner-element.js +26 -0
  430. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  431. package/es/catalog/molding/molding-lrm/planner-element.js +26 -0
  432. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  433. package/es/catalog/properties/export.js +21 -0
  434. package/es/catalog/properties/property-checkbox.js +68 -0
  435. package/es/catalog/properties/property-color.js +39 -0
  436. package/es/catalog/properties/property-enum.js +50 -0
  437. package/es/catalog/properties/property-hidden.js +19 -0
  438. package/es/catalog/properties/property-lenght-measure.js +100 -0
  439. package/es/catalog/properties/property-length-measure.js +84 -0
  440. package/es/catalog/properties/property-length-measure_hole.js +100 -0
  441. package/es/catalog/properties/property-number.js +48 -0
  442. package/es/catalog/properties/property-read-only.js +26 -0
  443. package/es/catalog/properties/property-string.js +48 -0
  444. package/es/catalog/properties/property-toggle.js +39 -0
  445. package/es/catalog/properties/shared-property-style.js +14 -0
  446. package/es/catalog/utils/FuseUtils.js +79 -0
  447. package/es/catalog/utils/exporter.js +149 -0
  448. package/es/catalog/utils/geom-utils.js +189 -0
  449. package/es/catalog/utils/item-loader.js +1594 -0
  450. package/es/catalog/utils/load-obj.js +91 -0
  451. package/es/catalog/utils/mtl-loader.js +357 -0
  452. package/es/catalog/utils/obj-loader.js +476 -0
  453. package/es/catalog/windows.png +0 -0
  454. package/es/class/FuseUtils.js +79 -0
  455. package/es/class/area.js +141 -0
  456. package/es/class/export.js +24 -0
  457. package/es/class/group.js +431 -0
  458. package/es/class/guide.js +58 -0
  459. package/es/class/hole.js +926 -0
  460. package/es/class/item.js +1845 -0
  461. package/es/class/layer.js +663 -0
  462. package/es/class/line.js +1221 -0
  463. package/es/class/project.js +795 -0
  464. package/es/class/vertex.js +198 -0
  465. package/es/components/content.js +131 -0
  466. package/es/components/export.js +7 -0
  467. package/es/components/style/button.js +106 -0
  468. package/es/components/style/cancel-button.js +21 -0
  469. package/es/components/style/content-container.js +30 -0
  470. package/es/components/style/content-title.js +25 -0
  471. package/es/components/style/delete-button.js +24 -0
  472. package/es/components/style/export.js +31 -0
  473. package/es/components/style/form-block.js +20 -0
  474. package/es/components/style/form-color-input.js +26 -0
  475. package/es/components/style/form-label.js +22 -0
  476. package/es/components/style/form-number-input.js +183 -0
  477. package/es/components/style/form-number-input_2.js +200 -0
  478. package/es/components/style/form-select.js +19 -0
  479. package/es/components/style/form-slider.js +60 -0
  480. package/es/components/style/form-submit-button.js +25 -0
  481. package/es/components/style/form-text-input.js +69 -0
  482. package/es/components/viewer2d/area.js +81 -0
  483. package/es/components/viewer2d/export.js +31 -0
  484. package/es/components/viewer2d/grids/grid-horizontal-streak.js +36 -0
  485. package/es/components/viewer2d/grids/grid-streak.js +36 -0
  486. package/es/components/viewer2d/grids/grid-vertical-streak.js +36 -0
  487. package/es/components/viewer2d/grids/grids.js +30 -0
  488. package/es/components/viewer2d/group.js +53 -0
  489. package/es/components/viewer2d/item.js +447 -0
  490. package/es/components/viewer2d/layer.js +164 -0
  491. package/es/components/viewer2d/line.js +964 -0
  492. package/es/components/viewer2d/ruler.js +79 -0
  493. package/es/components/viewer2d/rulerDist.js +132 -0
  494. package/es/components/viewer2d/rulerX.js +145 -0
  495. package/es/components/viewer2d/rulerY.js +147 -0
  496. package/es/components/viewer2d/scene.js +128 -0
  497. package/es/components/viewer2d/snap.js +74 -0
  498. package/es/components/viewer2d/state.js +73 -0
  499. package/es/components/viewer2d/utils.js +187 -0
  500. package/es/components/viewer2d/vertex.js +65 -0
  501. package/es/components/viewer2d/viewer2d.js +1433 -0
  502. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2585 -0
  503. package/es/components/viewer3d/dcm.js +401 -0
  504. package/es/components/viewer3d/fbm.js +414 -0
  505. package/es/components/viewer3d/front3D.js +61 -0
  506. package/es/components/viewer3d/grid-creator.js +25 -0
  507. package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
  508. package/es/components/viewer3d/grids/grid-streak.js +27 -0
  509. package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
  510. package/es/components/viewer3d/libs/first-person-controls.js +67 -0
  511. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
  512. package/es/components/viewer3d/libs/mtl-loader.js +357 -0
  513. package/es/components/viewer3d/libs/obj-loader.js +462 -0
  514. package/es/components/viewer3d/libs/orbit-controls.js +697 -0
  515. package/es/components/viewer3d/libs/pointer-lock-controls.js +44 -0
  516. package/es/components/viewer3d/lrm.js +305 -0
  517. package/es/components/viewer3d/model.js +708 -0
  518. package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
  519. package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
  520. package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
  521. package/es/components/viewer3d/ruler-utils/ruler3D.js +224 -0
  522. package/es/components/viewer3d/ruler-utils/scene3D.js +59 -0
  523. package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
  524. package/es/components/viewer3d/scene-creator.js +3617 -0
  525. package/es/components/viewer3d/three-memory-cleaner.js +51 -0
  526. package/es/components/viewer3d/viewer3d-first-person.js +309 -0
  527. package/es/components/viewer3d/viewer3d.js +2654 -0
  528. package/es/constants.js +688 -0
  529. package/es/devLiteRenderer.js +316 -0
  530. package/es/index.js +56 -0
  531. package/es/models.js +506 -0
  532. package/es/plugins/SVGLoader.js +1412 -0
  533. package/es/plugins/console-debugger.js +34 -0
  534. package/es/plugins/export.js +7 -0
  535. package/es/plugins/keyboard.js +101 -0
  536. package/es/reducers/areas-reducer.js +12 -0
  537. package/es/reducers/export.js +25 -0
  538. package/es/reducers/groups-reducer.js +38 -0
  539. package/es/reducers/holes-reducer.js +62 -0
  540. package/es/reducers/items-reducer.js +147 -0
  541. package/es/reducers/lines-reducer.js +45 -0
  542. package/es/reducers/project-reducer.js +131 -0
  543. package/es/reducers/reducer.js +19 -0
  544. package/es/reducers/scene-reducer.js +28 -0
  545. package/es/reducers/user-reducer.js +41 -0
  546. package/es/reducers/vertices-reducer.js +19 -0
  547. package/es/reducers/viewer2d-reducer.js +75 -0
  548. package/es/reducers/viewer3d-reducer.js +56 -0
  549. package/es/shared-style.js +66 -0
  550. package/es/styles/export.js +5 -0
  551. package/es/styles/tabs.css +40 -0
  552. package/es/translator/en.js +104 -0
  553. package/es/translator/it.js +79 -0
  554. package/es/translator/ru.js +79 -0
  555. package/es/translator/translator.js +80 -0
  556. package/es/utils/browser.js +33 -0
  557. package/es/utils/convert-units-lite.js +29 -0
  558. package/es/utils/email-validator.js +4 -0
  559. package/es/utils/export.js +25 -0
  560. package/es/utils/geometry.js +2446 -0
  561. package/es/utils/get-edges-of-subgraphs.js +26 -0
  562. package/es/utils/graph-cycles.js +238 -0
  563. package/es/utils/graph-inner-cycles.js +46 -0
  564. package/es/utils/graph.js +145 -0
  565. package/es/utils/helper.js +334 -0
  566. package/es/utils/history.js +29 -0
  567. package/es/utils/id-broker.js +15 -0
  568. package/es/utils/isolate-event-handler.js +683 -0
  569. package/es/utils/logger.js +8 -0
  570. package/es/utils/math.js +50 -0
  571. package/es/utils/molding.js +865 -0
  572. package/es/utils/name-generator.js +14 -0
  573. package/es/utils/objects-utils.js +50 -0
  574. package/es/utils/phone-validator.js +4 -0
  575. package/es/utils/process-black-list.js +15 -0
  576. package/es/utils/react-if.js +18 -0
  577. package/es/utils/snap-scene.js +94 -0
  578. package/es/utils/snap.js +231 -0
  579. package/es/utils/summarizeCart.js +24 -0
  580. package/es/utils/threeCSG.es6.js +494 -0
  581. package/es/version.js +1 -0
  582. package/lib/@history.js +11 -0
  583. package/lib/AppContext.js +11 -0
  584. package/lib/LiteKitchenConfigurator.js +490 -0
  585. package/lib/LiteRenderer.js +513 -0
  586. package/lib/actions/area-actions.js +21 -0
  587. package/lib/actions/export.js +36 -0
  588. package/lib/actions/groups-actions.js +107 -0
  589. package/lib/actions/holes-actions.js +140 -0
  590. package/lib/actions/items-actions.js +370 -0
  591. package/lib/actions/lines-actions.js +96 -0
  592. package/lib/actions/project-actions.js +338 -0
  593. package/lib/actions/scene-actions.js +43 -0
  594. package/lib/actions/vertices-actions.js +35 -0
  595. package/lib/actions/viewer2d-actions.js +73 -0
  596. package/lib/actions/viewer3d-actions.js +32 -0
  597. package/lib/analytics/ga4.js +194 -0
  598. package/lib/analytics/posthog.js +68 -0
  599. package/lib/assets/Window.hdr +2100 -0
  600. package/lib/assets/brown_photostudio_02_1k.hdr +0 -0
  601. package/lib/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  602. package/lib/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  603. package/lib/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  604. package/lib/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  605. package/lib/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  606. package/lib/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  607. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  608. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  609. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  610. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  611. package/lib/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  612. package/lib/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  613. package/lib/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  614. package/lib/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  615. package/lib/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  616. package/lib/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  617. package/lib/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  618. package/lib/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  619. package/lib/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  620. package/lib/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  621. package/lib/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  622. package/lib/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  623. package/lib/assets/fonts/style.css +177 -0
  624. package/lib/assets/gltf/door_closet.bin +0 -0
  625. package/lib/assets/gltf/door_closet.fbx +0 -0
  626. package/lib/assets/gltf/door_closet.gltf +1 -0
  627. package/lib/assets/gltf/door_exterior.bin +0 -0
  628. package/lib/assets/gltf/door_exterior.fbx +0 -0
  629. package/lib/assets/gltf/door_exterior.gltf +1 -0
  630. package/lib/assets/gltf/door_interior.bin +0 -0
  631. package/lib/assets/gltf/door_interior.fbx +0 -0
  632. package/lib/assets/gltf/door_interior.gltf +1 -0
  633. package/lib/assets/gltf/door_sliding.bin +0 -0
  634. package/lib/assets/gltf/door_sliding.fbx +0 -0
  635. package/lib/assets/gltf/door_sliding.gltf +1 -0
  636. package/lib/assets/gltf/doorway_framed.bin +0 -0
  637. package/lib/assets/gltf/doorway_framed.fbx +0 -0
  638. package/lib/assets/gltf/doorway_framed.gltf +1 -0
  639. package/lib/assets/gltf/window_clear.bin +0 -0
  640. package/lib/assets/gltf/window_clear.fbx +0 -0
  641. package/lib/assets/gltf/window_clear.gltf +1 -0
  642. package/lib/assets/gltf/window_cross.bin +0 -0
  643. package/lib/assets/gltf/window_cross.fbx +0 -0
  644. package/lib/assets/gltf/window_cross.gltf +1 -0
  645. package/lib/assets/gltf/window_double_hung.bin +0 -0
  646. package/lib/assets/gltf/window_double_hung.fbx +0 -0
  647. package/lib/assets/gltf/window_double_hung.gltf +1 -0
  648. package/lib/assets/gltf/window_vertical.bin +0 -0
  649. package/lib/assets/gltf/window_vertical.fbx +0 -0
  650. package/lib/assets/gltf/window_vertical.gltf +1 -0
  651. package/lib/assets/img/1.jpg +0 -0
  652. package/lib/assets/img/TKC_thumbnail.png +0 -0
  653. package/lib/assets/img/Toggle.png +0 -0
  654. package/lib/assets/img/loading/loading.gif +0 -0
  655. package/lib/assets/img/loading/loading_1.svg +11 -0
  656. package/lib/assets/img/loading_large.gif +0 -0
  657. package/lib/assets/img/png/door/closet.png +0 -0
  658. package/lib/assets/img/png/door/doorwaysframed.png +0 -0
  659. package/lib/assets/img/png/door/doorwaysframeles.png +0 -0
  660. package/lib/assets/img/png/door/doorwaysframeless.png +0 -0
  661. package/lib/assets/img/png/door/exterior.png +0 -0
  662. package/lib/assets/img/png/door/interior.png +0 -0
  663. package/lib/assets/img/png/door/sliding.png +0 -0
  664. package/lib/assets/img/png/helper/outcome.png +0 -0
  665. package/lib/assets/img/png/helper/video_preview_3d.png +0 -0
  666. package/lib/assets/img/png/helper/video_preview_start.png +0 -0
  667. package/lib/assets/img/project_img.png +0 -0
  668. package/lib/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  669. package/lib/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  670. package/lib/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  671. package/lib/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  672. package/lib/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  673. package/lib/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  674. package/lib/assets/img/rta/rta_logo_box_maroon.png +0 -0
  675. package/lib/assets/img/rta/rta_logo_box_white.png +0 -0
  676. package/lib/assets/img/rta_menu.png +0 -0
  677. package/lib/assets/img/step2.jpg +0 -0
  678. package/lib/assets/img/step3.jpg +0 -0
  679. package/lib/assets/img/step4.jpg +0 -0
  680. package/lib/assets/img/step5.jpg +0 -0
  681. package/lib/assets/img/step6.jpg +0 -0
  682. package/lib/assets/img/step7.jpg +0 -0
  683. package/lib/assets/img/step8.jpg +0 -0
  684. package/lib/assets/img/svg/2d_delete_object.svg +33 -0
  685. package/lib/assets/img/svg/2d_delete_object1.svg +33 -0
  686. package/lib/assets/img/svg/2d_lock_object.svg +33 -0
  687. package/lib/assets/img/svg/3d_item_move.svg +106 -0
  688. package/lib/assets/img/svg/3d_item_rotation.svg +76 -0
  689. package/lib/assets/img/svg/3d_item_warning_edit.svg +77 -0
  690. package/lib/assets/img/svg/3d_item_warning_info.svg +81 -0
  691. package/lib/assets/img/svg/accessories.svg +4 -0
  692. package/lib/assets/img/svg/angle_icon.svg +39 -0
  693. package/lib/assets/img/svg/blank_div.svg +14 -0
  694. package/lib/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  695. package/lib/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  696. package/lib/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  697. package/lib/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  698. package/lib/assets/img/svg/bottombar/arrow-down.svg +3 -0
  699. package/lib/assets/img/svg/bottombar/arrow-left.svg +3 -0
  700. package/lib/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  701. package/lib/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  702. package/lib/assets/img/svg/bottombar/arrow-right.svg +3 -0
  703. package/lib/assets/img/svg/bottombar/arrow-up.svg +3 -0
  704. package/lib/assets/img/svg/bottombar/collapse.svg +3 -0
  705. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -0
  706. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -0
  707. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -0
  708. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -0
  709. package/lib/assets/img/svg/bottombar/elevation.svg +6 -0
  710. package/lib/assets/img/svg/bottombar/expand.svg +3 -0
  711. package/lib/assets/img/svg/bottombar/help.svg +72 -0
  712. package/lib/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  713. package/lib/assets/img/svg/bottombar/pan_1.svg +57 -0
  714. package/lib/assets/img/svg/bottombar/pan_2.svg +27 -0
  715. package/lib/assets/img/svg/bottombar/pan_3.svg +27 -0
  716. package/lib/assets/img/svg/bottombar/pan_4.svg +27 -0
  717. package/lib/assets/img/svg/bottombar/pan_5.svg +27 -0
  718. package/lib/assets/img/svg/bottombar/settings.svg +23 -0
  719. package/lib/assets/img/svg/bottombar/spin-down.svg +76 -0
  720. package/lib/assets/img/svg/bottombar/spin-left.svg +75 -0
  721. package/lib/assets/img/svg/bottombar/spin-right.svg +75 -0
  722. package/lib/assets/img/svg/bottombar/spin-up.svg +76 -0
  723. package/lib/assets/img/svg/bottombar/spin_1.svg +48 -0
  724. package/lib/assets/img/svg/bottombar/spin_2.svg +31 -0
  725. package/lib/assets/img/svg/bottombar/spin_3.svg +31 -0
  726. package/lib/assets/img/svg/bottombar/spin_4.svg +31 -0
  727. package/lib/assets/img/svg/bottombar/spin_5.svg +31 -0
  728. package/lib/assets/img/svg/bottombar/zoomin.svg +29 -0
  729. package/lib/assets/img/svg/bottombar/zoomout.svg +26 -0
  730. package/lib/assets/img/svg/check.svg +10 -0
  731. package/lib/assets/img/svg/close.svg +11 -0
  732. package/lib/assets/img/svg/color/Black.svg +3 -0
  733. package/lib/assets/img/svg/color/Blue.svg +3 -0
  734. package/lib/assets/img/svg/color/Brown.svg +9 -0
  735. package/lib/assets/img/svg/color/Cream.svg +3 -0
  736. package/lib/assets/img/svg/color/Dark.svg +9 -0
  737. package/lib/assets/img/svg/color/Gray.svg +3 -0
  738. package/lib/assets/img/svg/color/Green.svg +3 -0
  739. package/lib/assets/img/svg/color/Light.svg +9 -0
  740. package/lib/assets/img/svg/color/Medium.svg +9 -0
  741. package/lib/assets/img/svg/color/Unfinished.svg +9 -0
  742. package/lib/assets/img/svg/color/White.svg +3 -0
  743. package/lib/assets/img/svg/color/White.svg.bak +3 -0
  744. package/lib/assets/img/svg/color/stone2.jpg +0 -0
  745. package/lib/assets/img/svg/color/wood2.jpg +0 -0
  746. package/lib/assets/img/svg/copy.svg +11 -0
  747. package/lib/assets/img/svg/delete.svg +3 -0
  748. package/lib/assets/img/svg/detail.svg +77 -0
  749. package/lib/assets/img/svg/disclaimer/background.svg +758 -0
  750. package/lib/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  751. package/lib/assets/img/svg/door/Closet.svg +11 -0
  752. package/lib/assets/img/svg/door/Exterior.svg +5 -0
  753. package/lib/assets/img/svg/door/Framed_dorway.svg +5 -0
  754. package/lib/assets/img/svg/door/Frameless_dorway.svg +5 -0
  755. package/lib/assets/img/svg/door/Interior.svg +7 -0
  756. package/lib/assets/img/svg/door/Sliding.svg +5 -0
  757. package/lib/assets/img/svg/doors_closet.svg +47 -0
  758. package/lib/assets/img/svg/doors_exterior.svg +25 -0
  759. package/lib/assets/img/svg/doors_interior.svg +29 -0
  760. package/lib/assets/img/svg/doors_patio.svg +26 -0
  761. package/lib/assets/img/svg/duplicate.svg +11 -0
  762. package/lib/assets/img/svg/duplicate_object_left.svg +32 -0
  763. package/lib/assets/img/svg/duplicate_object_right.svg +32 -0
  764. package/lib/assets/img/svg/filtersActive.svg +19 -0
  765. package/lib/assets/img/svg/firstsetting/L.svg +3 -0
  766. package/lib/assets/img/svg/firstsetting/L2.svg +3 -0
  767. package/lib/assets/img/svg/firstsetting/Open.svg +3 -0
  768. package/lib/assets/img/svg/firstsetting/Square.svg +3 -0
  769. package/lib/assets/img/svg/firstsetting/bar-active.svg +9 -0
  770. package/lib/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  771. package/lib/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  772. package/lib/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  773. package/lib/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  774. package/lib/assets/img/svg/firstsetting/check-active.svg +3 -0
  775. package/lib/assets/img/svg/firstsetting/check-normal.svg +3 -0
  776. package/lib/assets/img/svg/firstsetting/pencil.svg +11 -0
  777. package/lib/assets/img/svg/green_checkmark.svg +27 -0
  778. package/lib/assets/img/svg/headerbar/assist.svg +3 -0
  779. package/lib/assets/img/svg/headerbar/cart.svg +3 -0
  780. package/lib/assets/img/svg/headerbar/check.svg +10 -0
  781. package/lib/assets/img/svg/headerbar/consult_designer.svg +45 -0
  782. package/lib/assets/img/svg/headerbar/edit_name.svg +26 -0
  783. package/lib/assets/img/svg/headerbar/file-dollar.svg +13 -0
  784. package/lib/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  785. package/lib/assets/img/svg/headerbar/plus.svg +11 -0
  786. package/lib/assets/img/svg/headerbar/review_quote.svg +44 -0
  787. package/lib/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  788. package/lib/assets/img/svg/headerbar/save.svg +3 -0
  789. package/lib/assets/img/svg/headerbar/setting.svg +75 -0
  790. package/lib/assets/img/svg/help/check.svg +10 -0
  791. package/lib/assets/img/svg/help/search.svg +76 -0
  792. package/lib/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  793. package/lib/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  794. package/lib/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  795. package/lib/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  796. package/lib/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  797. package/lib/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  798. package/lib/assets/img/svg/invert.svg +127 -0
  799. package/lib/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  800. package/lib/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  801. package/lib/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  802. package/lib/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  803. package/lib/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  804. package/lib/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  805. package/lib/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  806. package/lib/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  807. package/lib/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  808. package/lib/assets/img/svg/lefttoolbar/door.svg +12 -0
  809. package/lib/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  810. package/lib/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  811. package/lib/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  812. package/lib/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  813. package/lib/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  814. package/lib/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  815. package/lib/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  816. package/lib/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  817. package/lib/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  818. package/lib/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  819. package/lib/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  820. package/lib/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  821. package/lib/assets/img/svg/lefttoolbar/search.svg +76 -0
  822. package/lib/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  823. package/lib/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  824. package/lib/assets/img/svg/lefttoolbar/window.svg +12 -0
  825. package/lib/assets/img/svg/logo.svg +11 -0
  826. package/lib/assets/img/svg/logo_with_text.svg +25 -0
  827. package/lib/assets/img/svg/menubar/login.svg +84 -0
  828. package/lib/assets/img/svg/menubar/my_projects.svg +85 -0
  829. package/lib/assets/img/svg/menubar/new_project.svg +110 -0
  830. package/lib/assets/img/svg/menubar/save_project.svg +84 -0
  831. package/lib/assets/img/svg/options.svg +3 -0
  832. package/lib/assets/img/svg/positioning.svg +3 -0
  833. package/lib/assets/img/svg/rotate.png +0 -0
  834. package/lib/assets/img/svg/rotate.svg +17 -0
  835. package/lib/assets/img/svg/rotate_object_clockwise.svg +26 -0
  836. package/lib/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  837. package/lib/assets/img/svg/toggleFilters.svg +19 -0
  838. package/lib/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  839. package/lib/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  840. package/lib/assets/img/svg/toolbar/add_button.svg +36 -0
  841. package/lib/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  842. package/lib/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  843. package/lib/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  844. package/lib/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  845. package/lib/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  846. package/lib/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  847. package/lib/assets/img/svg/toolbar/apply_button.svg +38 -0
  848. package/lib/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  849. package/lib/assets/img/svg/toolbar/backsplash.svg +8 -0
  850. package/lib/assets/img/svg/toolbar/cancel_button.svg +37 -0
  851. package/lib/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  852. package/lib/assets/img/svg/toolbar/countertop.svg +7 -0
  853. package/lib/assets/img/svg/toolbar/dcm.png +0 -0
  854. package/lib/assets/img/svg/toolbar/dcm_off.svg +12 -0
  855. package/lib/assets/img/svg/toolbar/dcm_on.svg +474 -0
  856. package/lib/assets/img/svg/toolbar/delete_button.svg +37 -0
  857. package/lib/assets/img/svg/toolbar/download.svg +77 -0
  858. package/lib/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  859. package/lib/assets/img/svg/toolbar/edit_button.svg +75 -0
  860. package/lib/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  861. package/lib/assets/img/svg/toolbar/fbm.png +0 -0
  862. package/lib/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  863. package/lib/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  864. package/lib/assets/img/svg/toolbar/floorstyle.svg +9 -0
  865. package/lib/assets/img/svg/toolbar/fmb.png +0 -0
  866. package/lib/assets/img/svg/toolbar/fmb_off.svg +12 -0
  867. package/lib/assets/img/svg/toolbar/fmb_on.svg +489 -0
  868. package/lib/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  869. package/lib/assets/img/svg/toolbar/get_started_button.svg +41 -0
  870. package/lib/assets/img/svg/toolbar/handles.svg +5 -0
  871. package/lib/assets/img/svg/toolbar/lighting.svg +7 -0
  872. package/lib/assets/img/svg/toolbar/lrm.png +0 -0
  873. package/lib/assets/img/svg/toolbar/lrm_off.svg +12 -0
  874. package/lib/assets/img/svg/toolbar/lrm_on.svg +470 -0
  875. package/lib/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  876. package/lib/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  877. package/lib/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  878. package/lib/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  879. package/lib/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  880. package/lib/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  881. package/lib/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  882. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  883. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  884. package/lib/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  885. package/lib/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  886. package/lib/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  887. package/lib/assets/img/svg/toolbar/redo_button.svg +75 -0
  888. package/lib/assets/img/svg/toolbar/redo_button1.svg +75 -0
  889. package/lib/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  890. package/lib/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  891. package/lib/assets/img/svg/toolbar/save_project_button.svg +44 -0
  892. package/lib/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  893. package/lib/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  894. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  895. package/lib/assets/img/svg/toolbar/style_change_button.svg +47 -0
  896. package/lib/assets/img/svg/toolbar/take_picture.svg +75 -0
  897. package/lib/assets/img/svg/toolbar/undo_button.svg +76 -0
  898. package/lib/assets/img/svg/toolbar/undo_button1.svg +76 -0
  899. package/lib/assets/img/svg/toolbar/use_button.svg +37 -0
  900. package/lib/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  901. package/lib/assets/img/svg/topbar/edit_active.svg +10 -0
  902. package/lib/assets/img/svg/topbar/edit_inactive.svg +10 -0
  903. package/lib/assets/img/svg/topbar/redo_active.svg +42 -0
  904. package/lib/assets/img/svg/topbar/redo_inactive.svg +23 -0
  905. package/lib/assets/img/svg/topbar/select_all_active.svg +50 -0
  906. package/lib/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  907. package/lib/assets/img/svg/topbar/take_picture_active.svg +51 -0
  908. package/lib/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  909. package/lib/assets/img/svg/topbar/undo_active.svg +42 -0
  910. package/lib/assets/img/svg/topbar/undo_inactive.svg +23 -0
  911. package/lib/assets/img/svg/warning_info_2d.svg +81 -0
  912. package/lib/assets/img/svg/window/Clear.svg +3 -0
  913. package/lib/assets/img/svg/window/Cross.svg +5 -0
  914. package/lib/assets/img/svg/window/Double_hung.svg +4 -0
  915. package/lib/assets/img/svg/window/Vertical.svg +4 -0
  916. package/lib/assets/img/svg/windows_clear.svg +23 -0
  917. package/lib/assets/img/svg/windows_cross.svg +28 -0
  918. package/lib/assets/img/svg/windows_double_hung.svg +24 -0
  919. package/lib/assets/img/svg/windows_vertical.svg +24 -0
  920. package/lib/assets/img/svg/wizardstep/Custom.svg +3 -0
  921. package/lib/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  922. package/lib/assets/img/svg/wizardstep/L.svg +3 -0
  923. package/lib/assets/img/svg/wizardstep/L2.svg +3 -0
  924. package/lib/assets/img/svg/wizardstep/Open.svg +3 -0
  925. package/lib/assets/img/svg/wizardstep/Square.svg +3 -0
  926. package/lib/assets/img/svg/wizardstep/bar-active.svg +9 -0
  927. package/lib/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  928. package/lib/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  929. package/lib/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  930. package/lib/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  931. package/lib/assets/img/svg/wizardstep/check-active.svg +3 -0
  932. package/lib/assets/img/svg/wizardstep/check-normal.svg +3 -0
  933. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -0
  934. package/lib/assets/img/svg/wizardstep/pencil.svg +11 -0
  935. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -0
  936. package/lib/assets/img/texture/glass.jpg +0 -0
  937. package/lib/assets/img/texture/steel.jpg +0 -0
  938. package/lib/assets/img/texture/white1px.jpg +0 -0
  939. package/lib/assets/img/texture/wood.jpg +0 -0
  940. package/lib/assets/model/DCM.bin +0 -0
  941. package/lib/assets/model/DCM.fbx +0 -0
  942. package/lib/assets/model/DCM.gltf +1 -0
  943. package/lib/assets/model/FBM.bin +0 -0
  944. package/lib/assets/model/FBM.fbx +0 -0
  945. package/lib/assets/model/FBM.gltf +1 -0
  946. package/lib/assets/model/LRM.bin +0 -0
  947. package/lib/assets/model/LRM.fbx +0 -0
  948. package/lib/assets/model/LRM.gltf +1 -0
  949. package/lib/assets/rtastore_logo.png +0 -0
  950. package/lib/catalog/areas/area/planner-element.js +53 -0
  951. package/lib/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  952. package/lib/catalog/areas/area/textures/grass.jpg +0 -0
  953. package/lib/catalog/areas/area/textures/parquet.jpg +0 -0
  954. package/lib/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  955. package/lib/catalog/areas/area/textures/tile1.jpg +0 -0
  956. package/lib/catalog/back.png +0 -0
  957. package/lib/catalog/catalog.js +272 -0
  958. package/lib/catalog/doors.png +0 -0
  959. package/lib/catalog/doorways.png +0 -0
  960. package/lib/catalog/envMap/nx.hdr +0 -0
  961. package/lib/catalog/envMap/ny.hdr +0 -0
  962. package/lib/catalog/envMap/nz.hdr +0 -0
  963. package/lib/catalog/envMap/px.hdr +0 -0
  964. package/lib/catalog/envMap/py.hdr +0 -0
  965. package/lib/catalog/envMap/pz.hdr +0 -0
  966. package/lib/catalog/export.js +1 -0
  967. package/lib/catalog/factories/area-factory-3d.js +190 -0
  968. package/lib/catalog/factories/area-factory.js +88 -0
  969. package/lib/catalog/factories/export.js +25 -0
  970. package/lib/catalog/factories/wall-factory-3d.js +212 -0
  971. package/lib/catalog/factories/wall-factory.js +279 -0
  972. package/lib/catalog/holes/door-closet/planner-element.js +232 -0
  973. package/lib/catalog/holes/door-double/door_double.png +0 -0
  974. package/lib/catalog/holes/door-double/planner-element.js +325 -0
  975. package/lib/catalog/holes/door-exterior/planner-element.js +225 -0
  976. package/lib/catalog/holes/door-interior/planner-element.js +237 -0
  977. package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
  978. package/lib/catalog/holes/door-panic/planner-element.js +513 -0
  979. package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  980. package/lib/catalog/holes/door-panic-double/planner-element.js +473 -0
  981. package/lib/catalog/holes/door-sliding/planner-element.js +235 -0
  982. package/lib/catalog/holes/doorway-framed/planner-element.js +155 -0
  983. package/lib/catalog/holes/doorway-frameless/planner-element.js +114 -0
  984. package/lib/catalog/holes/export.js +97 -0
  985. package/lib/catalog/holes/gate/gate.jpg +0 -0
  986. package/lib/catalog/holes/window-clear/planner-element.js +176 -0
  987. package/lib/catalog/holes/window-clear/texture.png +0 -0
  988. package/lib/catalog/holes/window-cross/planner-element.js +175 -0
  989. package/lib/catalog/holes/window-cross/texture.png +0 -0
  990. package/lib/catalog/holes/window-double-hung/planner-element.js +313 -0
  991. package/lib/catalog/holes/window-double-hung/texture.png +0 -0
  992. package/lib/catalog/holes/window-vertical/planner-element.js +286 -0
  993. package/lib/catalog/holes/window-vertical/texture.png +0 -0
  994. package/lib/catalog/lines/wall/planner-element.js +87 -0
  995. package/lib/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  996. package/lib/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  997. package/lib/catalog/lines/wall/textures/bricks.jpg +0 -0
  998. package/lib/catalog/lines/wall/textures/bricks2.jpg +0 -0
  999. package/lib/catalog/lines/wall/textures/bricks3.jpg +0 -0
  1000. package/lib/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  1001. package/lib/catalog/lines/wall/textures/morden.jpg +0 -0
  1002. package/lib/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  1003. package/lib/catalog/lines/wall/textures/painted.jpg +0 -0
  1004. package/lib/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  1005. package/lib/catalog/lines/wall/textures/plaster.jpg +0 -0
  1006. package/lib/catalog/lines/wall/wall.png +0 -0
  1007. package/lib/catalog/molding/molding-dcm/planner-element.js +33 -0
  1008. package/lib/catalog/molding/molding-dcm/texture.png +0 -0
  1009. package/lib/catalog/molding/molding-fbm/planner-element.js +33 -0
  1010. package/lib/catalog/molding/molding-fbm/texture.png +0 -0
  1011. package/lib/catalog/molding/molding-lrm/planner-element.js +33 -0
  1012. package/lib/catalog/molding/molding-lrm/texture.png +0 -0
  1013. package/lib/catalog/properties/export.js +81 -0
  1014. package/lib/catalog/properties/property-checkbox.js +76 -0
  1015. package/lib/catalog/properties/property-color.js +47 -0
  1016. package/lib/catalog/properties/property-enum.js +58 -0
  1017. package/lib/catalog/properties/property-hidden.js +27 -0
  1018. package/lib/catalog/properties/property-lenght-measure.js +108 -0
  1019. package/lib/catalog/properties/property-length-measure.js +92 -0
  1020. package/lib/catalog/properties/property-length-measure_hole.js +108 -0
  1021. package/lib/catalog/properties/property-number.js +56 -0
  1022. package/lib/catalog/properties/property-read-only.js +34 -0
  1023. package/lib/catalog/properties/property-string.js +56 -0
  1024. package/lib/catalog/properties/property-toggle.js +47 -0
  1025. package/lib/catalog/properties/shared-property-style.js +21 -0
  1026. package/lib/catalog/utils/FuseUtils.js +87 -0
  1027. package/lib/catalog/utils/exporter.js +157 -0
  1028. package/lib/catalog/utils/geom-utils.js +205 -0
  1029. package/lib/catalog/utils/item-loader.js +1608 -0
  1030. package/lib/catalog/utils/load-obj.js +99 -0
  1031. package/lib/catalog/utils/mtl-loader.js +366 -0
  1032. package/lib/catalog/utils/obj-loader.js +486 -0
  1033. package/lib/catalog/windows.png +0 -0
  1034. package/lib/class/FuseUtils.js +87 -0
  1035. package/lib/class/area.js +148 -0
  1036. package/lib/class/export.js +96 -0
  1037. package/lib/class/group.js +438 -0
  1038. package/lib/class/guide.js +64 -0
  1039. package/lib/class/hole.js +932 -0
  1040. package/lib/class/item.js +1852 -0
  1041. package/lib/class/layer.js +670 -0
  1042. package/lib/class/line.js +1230 -0
  1043. package/lib/class/project.js +804 -0
  1044. package/lib/class/vertex.js +205 -0
  1045. package/lib/components/content.js +142 -0
  1046. package/lib/components/export.js +7 -0
  1047. package/lib/components/style/button.js +115 -0
  1048. package/lib/components/style/cancel-button.js +29 -0
  1049. package/lib/components/style/content-container.js +38 -0
  1050. package/lib/components/style/content-title.js +35 -0
  1051. package/lib/components/style/delete-button.js +34 -0
  1052. package/lib/components/style/export.js +121 -0
  1053. package/lib/components/style/form-block.js +28 -0
  1054. package/lib/components/style/form-color-input.js +34 -0
  1055. package/lib/components/style/form-label.js +30 -0
  1056. package/lib/components/style/form-number-input.js +192 -0
  1057. package/lib/components/style/form-number-input_2.js +209 -0
  1058. package/lib/components/style/form-select.js +29 -0
  1059. package/lib/components/style/form-slider.js +68 -0
  1060. package/lib/components/style/form-submit-button.js +35 -0
  1061. package/lib/components/style/form-text-input.js +78 -0
  1062. package/lib/components/viewer2d/area.js +89 -0
  1063. package/lib/components/viewer2d/export.js +121 -0
  1064. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +44 -0
  1065. package/lib/components/viewer2d/grids/grid-streak.js +44 -0
  1066. package/lib/components/viewer2d/grids/grid-vertical-streak.js +44 -0
  1067. package/lib/components/viewer2d/grids/grids.js +40 -0
  1068. package/lib/components/viewer2d/group.js +63 -0
  1069. package/lib/components/viewer2d/item.js +457 -0
  1070. package/lib/components/viewer2d/layer.js +172 -0
  1071. package/lib/components/viewer2d/line.js +975 -0
  1072. package/lib/components/viewer2d/ruler.js +87 -0
  1073. package/lib/components/viewer2d/rulerDist.js +140 -0
  1074. package/lib/components/viewer2d/rulerX.js +154 -0
  1075. package/lib/components/viewer2d/rulerY.js +156 -0
  1076. package/lib/components/viewer2d/scene.js +137 -0
  1077. package/lib/components/viewer2d/snap.js +84 -0
  1078. package/lib/components/viewer2d/state.js +83 -0
  1079. package/lib/components/viewer2d/utils.js +200 -0
  1080. package/lib/components/viewer2d/vertex.js +75 -0
  1081. package/lib/components/viewer2d/viewer2d.js +1444 -0
  1082. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +2591 -0
  1083. package/lib/components/viewer3d/dcm.js +408 -0
  1084. package/lib/components/viewer3d/fbm.js +421 -0
  1085. package/lib/components/viewer3d/front3D.js +71 -0
  1086. package/lib/components/viewer3d/grid-creator.js +35 -0
  1087. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +45 -0
  1088. package/lib/components/viewer3d/grids/grid-streak.js +36 -0
  1089. package/lib/components/viewer3d/grids/grid-vertical-streak.js +45 -0
  1090. package/lib/components/viewer3d/libs/first-person-controls.js +74 -0
  1091. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +1287 -0
  1092. package/lib/components/viewer3d/libs/mtl-loader.js +366 -0
  1093. package/lib/components/viewer3d/libs/obj-loader.js +471 -0
  1094. package/lib/components/viewer3d/libs/orbit-controls.js +706 -0
  1095. package/lib/components/viewer3d/libs/pointer-lock-controls.js +53 -0
  1096. package/lib/components/viewer3d/lrm.js +312 -0
  1097. package/lib/components/viewer3d/model.js +714 -0
  1098. package/lib/components/viewer3d/pointer-lock-navigation.js +122 -0
  1099. package/lib/components/viewer3d/ruler-utils/itemRect.js +69 -0
  1100. package/lib/components/viewer3d/ruler-utils/layer3D.js +503 -0
  1101. package/lib/components/viewer3d/ruler-utils/ruler3D.js +232 -0
  1102. package/lib/components/viewer3d/ruler-utils/scene3D.js +67 -0
  1103. package/lib/components/viewer3d/ruler-utils/state3D.js +26 -0
  1104. package/lib/components/viewer3d/scene-creator.js +3652 -0
  1105. package/lib/components/viewer3d/three-memory-cleaner.js +60 -0
  1106. package/lib/components/viewer3d/viewer3d-first-person.js +316 -0
  1107. package/lib/components/viewer3d/viewer3d.js +2661 -0
  1108. package/lib/constants.js +697 -0
  1109. package/lib/devLiteRenderer.js +320 -0
  1110. package/lib/index.js +64 -0
  1111. package/lib/models.js +513 -0
  1112. package/lib/plugins/SVGLoader.js +1417 -0
  1113. package/lib/plugins/console-debugger.js +42 -0
  1114. package/lib/plugins/export.js +25 -0
  1115. package/lib/plugins/keyboard.js +108 -0
  1116. package/lib/reducers/areas-reducer.js +19 -0
  1117. package/lib/reducers/export.js +97 -0
  1118. package/lib/reducers/groups-reducer.js +45 -0
  1119. package/lib/reducers/holes-reducer.js +69 -0
  1120. package/lib/reducers/items-reducer.js +151 -0
  1121. package/lib/reducers/lines-reducer.js +52 -0
  1122. package/lib/reducers/project-reducer.js +138 -0
  1123. package/lib/reducers/reducer.js +26 -0
  1124. package/lib/reducers/scene-reducer.js +35 -0
  1125. package/lib/reducers/user-reducer.js +48 -0
  1126. package/lib/reducers/vertices-reducer.js +26 -0
  1127. package/lib/reducers/viewer2d-reducer.js +82 -0
  1128. package/lib/reducers/viewer3d-reducer.js +63 -0
  1129. package/lib/shared-style.js +72 -0
  1130. package/lib/styles/export.js +13 -0
  1131. package/lib/styles/tabs.css +40 -0
  1132. package/lib/translator/en.js +111 -0
  1133. package/lib/translator/it.js +86 -0
  1134. package/lib/translator/ru.js +86 -0
  1135. package/lib/translator/translator.js +87 -0
  1136. package/lib/utils/browser.js +40 -0
  1137. package/lib/utils/convert-units-lite.js +35 -0
  1138. package/lib/utils/email-validator.js +10 -0
  1139. package/lib/utils/export.js +56 -0
  1140. package/lib/utils/geometry.js +2545 -0
  1141. package/lib/utils/get-edges-of-subgraphs.js +33 -0
  1142. package/lib/utils/graph-cycles.js +239 -0
  1143. package/lib/utils/graph-inner-cycles.js +54 -0
  1144. package/lib/utils/graph.js +153 -0
  1145. package/lib/utils/helper.js +358 -0
  1146. package/lib/utils/history.js +36 -0
  1147. package/lib/utils/id-broker.js +22 -0
  1148. package/lib/utils/isolate-event-handler.js +691 -0
  1149. package/lib/utils/logger.js +14 -0
  1150. package/lib/utils/math.js +57 -0
  1151. package/lib/utils/molding.js +890 -0
  1152. package/lib/utils/name-generator.js +21 -0
  1153. package/lib/utils/objects-utils.js +62 -0
  1154. package/lib/utils/phone-validator.js +10 -0
  1155. package/lib/utils/process-black-list.js +22 -0
  1156. package/lib/utils/react-if.js +25 -0
  1157. package/lib/utils/snap-scene.js +101 -0
  1158. package/lib/utils/snap.js +245 -0
  1159. package/lib/utils/summarizeCart.js +30 -0
  1160. package/lib/utils/threeCSG.es6.js +504 -0
  1161. package/lib/version.js +7 -0
  1162. package/package.json +93 -86
  1163. package/dist/index.js +0 -3
  1164. package/dist/index.js.LICENSE.txt +0 -55
  1165. package/dist/index.js.map +0 -1
@@ -0,0 +1,1412 @@
1
+ import { BufferGeometry, FileLoader, Float32BufferAttribute, Loader, Matrix3, Path, ShapePath, Vector2, Vector3 } from 'three';
2
+ var SVGLoader = function SVGLoader(manager) {
3
+ Loader.call(this, manager);
4
+
5
+ // Default dots per inch
6
+ this.defaultDPI = 90;
7
+
8
+ // Accepted units: 'mm', 'cm', 'in', 'pt', 'pc', 'px'
9
+ this.defaultUnit = 'px';
10
+ };
11
+ SVGLoader.prototype = Object.assign(Object.create(Loader.prototype), {
12
+ constructor: SVGLoader,
13
+ load: function load(url, onLoad, onProgress, onError) {
14
+ var scope = this;
15
+ var loader = new FileLoader(scope.manager);
16
+ loader.setPath(scope.path);
17
+ loader.setRequestHeader(scope.requestHeader);
18
+ loader.setWithCredentials(scope.withCredentials);
19
+ loader.load(url, function (text) {
20
+ try {
21
+ onLoad(scope.parse(text));
22
+ } catch (e) {
23
+ if (onError) {
24
+ onError(e);
25
+ } else {
26
+ console.error(e);
27
+ }
28
+ scope.manager.itemError(url);
29
+ }
30
+ }, onProgress, onError);
31
+ },
32
+ parse: function parse(text) {
33
+ var scope = this;
34
+ function parseNode(node, style) {
35
+ if (node.nodeType !== 1) return;
36
+ var transform = getNodeTransform(node);
37
+ var traverseChildNodes = true;
38
+ var path = null;
39
+ switch (node.nodeName) {
40
+ case 'svg':
41
+ break;
42
+ case 'style':
43
+ parseCSSStylesheet(node);
44
+ break;
45
+ case 'g':
46
+ style = parseStyle(node, style);
47
+ break;
48
+ case 'path':
49
+ style = parseStyle(node, style);
50
+ if (node.hasAttribute('d')) path = parsePathNode(node);
51
+ break;
52
+ case 'rect':
53
+ style = parseStyle(node, style);
54
+ path = parseRectNode(node);
55
+ break;
56
+ case 'polygon':
57
+ style = parseStyle(node, style);
58
+ path = parsePolygonNode(node);
59
+ break;
60
+ case 'polyline':
61
+ style = parseStyle(node, style);
62
+ path = parsePolylineNode(node);
63
+ break;
64
+ case 'circle':
65
+ style = parseStyle(node, style);
66
+ path = parseCircleNode(node);
67
+ break;
68
+ case 'ellipse':
69
+ style = parseStyle(node, style);
70
+ path = parseEllipseNode(node);
71
+ break;
72
+ case 'line':
73
+ style = parseStyle(node, style);
74
+ path = parseLineNode(node);
75
+ break;
76
+ case 'defs':
77
+ traverseChildNodes = false;
78
+ break;
79
+ case 'use':
80
+ style = parseStyle(node, style);
81
+ var usedNodeId = node.href.baseVal.substring(1);
82
+ var usedNode = node.viewportElement.getElementById(usedNodeId);
83
+ if (usedNode) {
84
+ parseNode(usedNode, style);
85
+ } else {
86
+ console.warn("SVGLoader: 'use node' references non-existent node id: " + usedNodeId);
87
+ }
88
+ break;
89
+ default:
90
+ // console.log( node );
91
+ }
92
+ if (path) {
93
+ if (style.fill !== undefined && style.fill !== 'none') {
94
+ path.color.setStyle(style.fill);
95
+ }
96
+ transformPath(path, currentTransform);
97
+ paths.push(path);
98
+ path.userData = {
99
+ node: node,
100
+ style: style
101
+ };
102
+ }
103
+ if (traverseChildNodes) {
104
+ var nodes = node.childNodes;
105
+ for (var i = 0; i < nodes.length; i++) {
106
+ parseNode(nodes[i], style);
107
+ }
108
+ }
109
+ if (transform) {
110
+ transformStack.pop();
111
+ if (transformStack.length > 0) {
112
+ currentTransform.copy(transformStack[transformStack.length - 1]);
113
+ } else {
114
+ currentTransform.identity();
115
+ }
116
+ }
117
+ }
118
+ function parsePathNode(node) {
119
+ var path = new ShapePath();
120
+ var point = new Vector2();
121
+ var control = new Vector2();
122
+ var firstPoint = new Vector2();
123
+ var isFirstPoint = true;
124
+ var doSetFirstPoint = false;
125
+ var d = node.getAttribute('d');
126
+
127
+ // console.log( d );
128
+
129
+ var commands = d.match(/[a-df-z][^a-df-z]*/gi);
130
+ for (var i = 0, l = commands.length; i < l; i++) {
131
+ var command = commands[i];
132
+ var type = command.charAt(0);
133
+ var data = command.substr(1).trim();
134
+ if (isFirstPoint === true) {
135
+ doSetFirstPoint = true;
136
+ isFirstPoint = false;
137
+ }
138
+ switch (type) {
139
+ case 'M':
140
+ var numbers = parseFloats(data);
141
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
142
+ point.x = numbers[j + 0];
143
+ point.y = numbers[j + 1];
144
+ control.x = point.x;
145
+ control.y = point.y;
146
+ if (j === 0) {
147
+ path.moveTo(point.x, point.y);
148
+ } else {
149
+ path.lineTo(point.x, point.y);
150
+ }
151
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
152
+ }
153
+ break;
154
+ case 'H':
155
+ var numbers = parseFloats(data);
156
+ for (var j = 0, jl = numbers.length; j < jl; j++) {
157
+ point.x = numbers[j];
158
+ control.x = point.x;
159
+ control.y = point.y;
160
+ path.lineTo(point.x, point.y);
161
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
162
+ }
163
+ break;
164
+ case 'V':
165
+ var numbers = parseFloats(data);
166
+ for (var j = 0, jl = numbers.length; j < jl; j++) {
167
+ point.y = numbers[j];
168
+ control.x = point.x;
169
+ control.y = point.y;
170
+ path.lineTo(point.x, point.y);
171
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
172
+ }
173
+ break;
174
+ case 'L':
175
+ var numbers = parseFloats(data);
176
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
177
+ point.x = numbers[j + 0];
178
+ point.y = numbers[j + 1];
179
+ control.x = point.x;
180
+ control.y = point.y;
181
+ path.lineTo(point.x, point.y);
182
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
183
+ }
184
+ break;
185
+ case 'C':
186
+ var numbers = parseFloats(data);
187
+ for (var j = 0, jl = numbers.length; j < jl; j += 6) {
188
+ path.bezierCurveTo(numbers[j + 0], numbers[j + 1], numbers[j + 2], numbers[j + 3], numbers[j + 4], numbers[j + 5]);
189
+ control.x = numbers[j + 2];
190
+ control.y = numbers[j + 3];
191
+ point.x = numbers[j + 4];
192
+ point.y = numbers[j + 5];
193
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
194
+ }
195
+ break;
196
+ case 'S':
197
+ var numbers = parseFloats(data);
198
+ for (var j = 0, jl = numbers.length; j < jl; j += 4) {
199
+ path.bezierCurveTo(getReflection(point.x, control.x), getReflection(point.y, control.y), numbers[j + 0], numbers[j + 1], numbers[j + 2], numbers[j + 3]);
200
+ control.x = numbers[j + 0];
201
+ control.y = numbers[j + 1];
202
+ point.x = numbers[j + 2];
203
+ point.y = numbers[j + 3];
204
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
205
+ }
206
+ break;
207
+ case 'Q':
208
+ var numbers = parseFloats(data);
209
+ for (var j = 0, jl = numbers.length; j < jl; j += 4) {
210
+ path.quadraticCurveTo(numbers[j + 0], numbers[j + 1], numbers[j + 2], numbers[j + 3]);
211
+ control.x = numbers[j + 0];
212
+ control.y = numbers[j + 1];
213
+ point.x = numbers[j + 2];
214
+ point.y = numbers[j + 3];
215
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
216
+ }
217
+ break;
218
+ case 'T':
219
+ var numbers = parseFloats(data);
220
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
221
+ var rx = getReflection(point.x, control.x);
222
+ var ry = getReflection(point.y, control.y);
223
+ path.quadraticCurveTo(rx, ry, numbers[j + 0], numbers[j + 1]);
224
+ control.x = rx;
225
+ control.y = ry;
226
+ point.x = numbers[j + 0];
227
+ point.y = numbers[j + 1];
228
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
229
+ }
230
+ break;
231
+ case 'A':
232
+ var numbers = parseFloats(data);
233
+ for (var j = 0, jl = numbers.length; j < jl; j += 7) {
234
+ var start = point.clone();
235
+ point.x = numbers[j + 5];
236
+ point.y = numbers[j + 6];
237
+ control.x = point.x;
238
+ control.y = point.y;
239
+ parseArcCommand(path, numbers[j], numbers[j + 1], numbers[j + 2], numbers[j + 3], numbers[j + 4], start, point);
240
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
241
+ }
242
+ break;
243
+ case 'm':
244
+ var numbers = parseFloats(data);
245
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
246
+ point.x += numbers[j + 0];
247
+ point.y += numbers[j + 1];
248
+ control.x = point.x;
249
+ control.y = point.y;
250
+ if (j === 0) {
251
+ path.moveTo(point.x, point.y);
252
+ } else {
253
+ path.lineTo(point.x, point.y);
254
+ }
255
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
256
+ }
257
+ break;
258
+ case 'h':
259
+ var numbers = parseFloats(data);
260
+ for (var j = 0, jl = numbers.length; j < jl; j++) {
261
+ point.x += numbers[j];
262
+ control.x = point.x;
263
+ control.y = point.y;
264
+ path.lineTo(point.x, point.y);
265
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
266
+ }
267
+ break;
268
+ case 'v':
269
+ var numbers = parseFloats(data);
270
+ for (var j = 0, jl = numbers.length; j < jl; j++) {
271
+ point.y += numbers[j];
272
+ control.x = point.x;
273
+ control.y = point.y;
274
+ path.lineTo(point.x, point.y);
275
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
276
+ }
277
+ break;
278
+ case 'l':
279
+ var numbers = parseFloats(data);
280
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
281
+ point.x += numbers[j + 0];
282
+ point.y += numbers[j + 1];
283
+ control.x = point.x;
284
+ control.y = point.y;
285
+ path.lineTo(point.x, point.y);
286
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
287
+ }
288
+ break;
289
+ case 'c':
290
+ var numbers = parseFloats(data);
291
+ for (var j = 0, jl = numbers.length; j < jl; j += 6) {
292
+ path.bezierCurveTo(point.x + numbers[j + 0], point.y + numbers[j + 1], point.x + numbers[j + 2], point.y + numbers[j + 3], point.x + numbers[j + 4], point.y + numbers[j + 5]);
293
+ control.x = point.x + numbers[j + 2];
294
+ control.y = point.y + numbers[j + 3];
295
+ point.x += numbers[j + 4];
296
+ point.y += numbers[j + 5];
297
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
298
+ }
299
+ break;
300
+ case 's':
301
+ var numbers = parseFloats(data);
302
+ for (var j = 0, jl = numbers.length; j < jl; j += 4) {
303
+ path.bezierCurveTo(getReflection(point.x, control.x), getReflection(point.y, control.y), point.x + numbers[j + 0], point.y + numbers[j + 1], point.x + numbers[j + 2], point.y + numbers[j + 3]);
304
+ control.x = point.x + numbers[j + 0];
305
+ control.y = point.y + numbers[j + 1];
306
+ point.x += numbers[j + 2];
307
+ point.y += numbers[j + 3];
308
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
309
+ }
310
+ break;
311
+ case 'q':
312
+ var numbers = parseFloats(data);
313
+ for (var j = 0, jl = numbers.length; j < jl; j += 4) {
314
+ path.quadraticCurveTo(point.x + numbers[j + 0], point.y + numbers[j + 1], point.x + numbers[j + 2], point.y + numbers[j + 3]);
315
+ control.x = point.x + numbers[j + 0];
316
+ control.y = point.y + numbers[j + 1];
317
+ point.x += numbers[j + 2];
318
+ point.y += numbers[j + 3];
319
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
320
+ }
321
+ break;
322
+ case 't':
323
+ var numbers = parseFloats(data);
324
+ for (var j = 0, jl = numbers.length; j < jl; j += 2) {
325
+ var rx = getReflection(point.x, control.x);
326
+ var ry = getReflection(point.y, control.y);
327
+ path.quadraticCurveTo(rx, ry, point.x + numbers[j + 0], point.y + numbers[j + 1]);
328
+ control.x = rx;
329
+ control.y = ry;
330
+ point.x = point.x + numbers[j + 0];
331
+ point.y = point.y + numbers[j + 1];
332
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
333
+ }
334
+ break;
335
+ case 'a':
336
+ var numbers = parseFloats(data);
337
+ for (var j = 0, jl = numbers.length; j < jl; j += 7) {
338
+ var start = point.clone();
339
+ point.x += numbers[j + 5];
340
+ point.y += numbers[j + 6];
341
+ control.x = point.x;
342
+ control.y = point.y;
343
+ parseArcCommand(path, numbers[j], numbers[j + 1], numbers[j + 2], numbers[j + 3], numbers[j + 4], start, point);
344
+ if (j === 0 && doSetFirstPoint === true) firstPoint.copy(point);
345
+ }
346
+ break;
347
+ case 'Z':
348
+ case 'z':
349
+ path.currentPath.autoClose = true;
350
+ if (path.currentPath.curves.length > 0) {
351
+ // Reset point to beginning of Path
352
+ point.copy(firstPoint);
353
+ path.currentPath.currentPoint.copy(point);
354
+ isFirstPoint = true;
355
+ }
356
+ break;
357
+ default:
358
+ console.warn(command);
359
+ }
360
+
361
+ // console.log( type, parseFloats( data ), parseFloats( data ).length )
362
+
363
+ doSetFirstPoint = false;
364
+ }
365
+ return path;
366
+ }
367
+ function parseCSSStylesheet(node) {
368
+ if (!node.sheet || !node.sheet.cssRules || !node.sheet.cssRules.length) return;
369
+ for (var i = 0; i < node.sheet.cssRules.length; i++) {
370
+ var stylesheet = node.sheet.cssRules[i];
371
+ if (stylesheet.type !== 1) continue;
372
+ var selectorList = stylesheet.selectorText.split(/,/gm).filter(Boolean).map(function (i) {
373
+ return i.trim();
374
+ });
375
+ for (var j = 0; j < selectorList.length; j++) {
376
+ stylesheets[selectorList[j]] = Object.assign(stylesheets[selectorList[j]] || {}, stylesheet.style);
377
+ }
378
+ }
379
+ }
380
+
381
+ /**
382
+ * https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes
383
+ * https://mortoray.com/2017/02/16/rendering-an-svg-elliptical-arc-as-bezier-curves/ Appendix: Endpoint to center arc conversion
384
+ * From
385
+ * rx ry x-axis-rotation large-arc-flag sweep-flag x y
386
+ * To
387
+ * aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation
388
+ */
389
+
390
+ function parseArcCommand(path, rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, start, end) {
391
+ x_axis_rotation = x_axis_rotation * Math.PI / 180;
392
+
393
+ // Ensure radii are positive
394
+ rx = Math.abs(rx);
395
+ ry = Math.abs(ry);
396
+
397
+ // Compute (x1', y1')
398
+ var dx2 = (start.x - end.x) / 2.0;
399
+ var dy2 = (start.y - end.y) / 2.0;
400
+ var x1p = Math.cos(x_axis_rotation) * dx2 + Math.sin(x_axis_rotation) * dy2;
401
+ var y1p = -Math.sin(x_axis_rotation) * dx2 + Math.cos(x_axis_rotation) * dy2;
402
+
403
+ // Compute (cx', cy')
404
+ var rxs = rx * rx;
405
+ var rys = ry * ry;
406
+ var x1ps = x1p * x1p;
407
+ var y1ps = y1p * y1p;
408
+
409
+ // Ensure radii are large enough
410
+ var cr = x1ps / rxs + y1ps / rys;
411
+ if (cr > 1) {
412
+ // scale up rx,ry equally so cr == 1
413
+ var s = Math.sqrt(cr);
414
+ rx = s * rx;
415
+ ry = s * ry;
416
+ rxs = rx * rx;
417
+ rys = ry * ry;
418
+ }
419
+ var dq = rxs * y1ps + rys * x1ps;
420
+ var pq = (rxs * rys - dq) / dq;
421
+ var q = Math.sqrt(Math.max(0, pq));
422
+ if (large_arc_flag === sweep_flag) q = -q;
423
+ var cxp = q * rx * y1p / ry;
424
+ var cyp = -q * ry * x1p / rx;
425
+
426
+ // Step 3: Compute (cx, cy) from (cx', cy')
427
+ var cx = Math.cos(x_axis_rotation) * cxp - Math.sin(x_axis_rotation) * cyp + (start.x + end.x) / 2;
428
+ var cy = Math.sin(x_axis_rotation) * cxp + Math.cos(x_axis_rotation) * cyp + (start.y + end.y) / 2;
429
+
430
+ // Step 4: Compute ��1 and ����
431
+ var theta = svgAngle(1, 0, (x1p - cxp) / rx, (y1p - cyp) / ry);
432
+ var delta = svgAngle((x1p - cxp) / rx, (y1p - cyp) / ry, (-x1p - cxp) / rx, (-y1p - cyp) / ry) % (Math.PI * 2);
433
+ path.currentPath.absellipse(cx, cy, rx, ry, theta, theta + delta, sweep_flag === 0, x_axis_rotation);
434
+ }
435
+ function svgAngle(ux, uy, vx, vy) {
436
+ var dot = ux * vx + uy * vy;
437
+ var len = Math.sqrt(ux * ux + uy * uy) * Math.sqrt(vx * vx + vy * vy);
438
+ var ang = Math.acos(Math.max(-1, Math.min(1, dot / len))); // floating point precision, slightly over values appear
439
+ if (ux * vy - uy * vx < 0) ang = -ang;
440
+ return ang;
441
+ }
442
+
443
+ /*
444
+ * According to https://www.w3.org/TR/SVG/shapes.html#RectElementRXAttribute
445
+ * rounded corner should be rendered to elliptical arc, but bezier curve does the job well enough
446
+ */
447
+ function parseRectNode(node) {
448
+ var x = parseFloatWithUnits(node.getAttribute('x') || 0);
449
+ var y = parseFloatWithUnits(node.getAttribute('y') || 0);
450
+ var rx = parseFloatWithUnits(node.getAttribute('rx') || 0);
451
+ var ry = parseFloatWithUnits(node.getAttribute('ry') || 0);
452
+ var w = parseFloatWithUnits(node.getAttribute('width'));
453
+ var h = parseFloatWithUnits(node.getAttribute('height'));
454
+ var path = new ShapePath();
455
+ path.moveTo(x + 2 * rx, y);
456
+ path.lineTo(x + w - 2 * rx, y);
457
+ if (rx !== 0 || ry !== 0) path.bezierCurveTo(x + w, y, x + w, y, x + w, y + 2 * ry);
458
+ path.lineTo(x + w, y + h - 2 * ry);
459
+ if (rx !== 0 || ry !== 0) path.bezierCurveTo(x + w, y + h, x + w, y + h, x + w - 2 * rx, y + h);
460
+ path.lineTo(x + 2 * rx, y + h);
461
+ if (rx !== 0 || ry !== 0) {
462
+ path.bezierCurveTo(x, y + h, x, y + h, x, y + h - 2 * ry);
463
+ }
464
+ path.lineTo(x, y + 2 * ry);
465
+ if (rx !== 0 || ry !== 0) {
466
+ path.bezierCurveTo(x, y, x, y, x + 2 * rx, y);
467
+ }
468
+ return path;
469
+ }
470
+ function parsePolygonNode(node) {
471
+ function iterator(match, a, b) {
472
+ var x = parseFloatWithUnits(a);
473
+ var y = parseFloatWithUnits(b);
474
+ if (index === 0) {
475
+ path.moveTo(x, y);
476
+ } else {
477
+ path.lineTo(x, y);
478
+ }
479
+ index++;
480
+ }
481
+ var regex = /(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g;
482
+ var path = new ShapePath();
483
+ var index = 0;
484
+ node.getAttribute('points').replace(regex, iterator);
485
+ path.currentPath.autoClose = true;
486
+ return path;
487
+ }
488
+ function parsePolylineNode(node) {
489
+ function iterator(match, a, b) {
490
+ var x = parseFloatWithUnits(a);
491
+ var y = parseFloatWithUnits(b);
492
+ if (index === 0) {
493
+ path.moveTo(x, y);
494
+ } else {
495
+ path.lineTo(x, y);
496
+ }
497
+ index++;
498
+ }
499
+ var regex = /(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g;
500
+ var path = new ShapePath();
501
+ var index = 0;
502
+ node.getAttribute('points').replace(regex, iterator);
503
+ path.currentPath.autoClose = false;
504
+ return path;
505
+ }
506
+ function parseCircleNode(node) {
507
+ var x = parseFloatWithUnits(node.getAttribute('cx'));
508
+ var y = parseFloatWithUnits(node.getAttribute('cy'));
509
+ var r = parseFloatWithUnits(node.getAttribute('r'));
510
+ var subpath = new Path();
511
+ subpath.absarc(x, y, r, 0, Math.PI * 2);
512
+ var path = new ShapePath();
513
+ path.subPaths.push(subpath);
514
+ return path;
515
+ }
516
+ function parseEllipseNode(node) {
517
+ var x = parseFloatWithUnits(node.getAttribute('cx'));
518
+ var y = parseFloatWithUnits(node.getAttribute('cy'));
519
+ var rx = parseFloatWithUnits(node.getAttribute('rx'));
520
+ var ry = parseFloatWithUnits(node.getAttribute('ry'));
521
+ var subpath = new Path();
522
+ subpath.absellipse(x, y, rx, ry, 0, Math.PI * 2);
523
+ var path = new ShapePath();
524
+ path.subPaths.push(subpath);
525
+ return path;
526
+ }
527
+ function parseLineNode(node) {
528
+ var x1 = parseFloatWithUnits(node.getAttribute('x1'));
529
+ var y1 = parseFloatWithUnits(node.getAttribute('y1'));
530
+ var x2 = parseFloatWithUnits(node.getAttribute('x2'));
531
+ var y2 = parseFloatWithUnits(node.getAttribute('y2'));
532
+ var path = new ShapePath();
533
+ path.moveTo(x1, y1);
534
+ path.lineTo(x2, y2);
535
+ path.currentPath.autoClose = false;
536
+ return path;
537
+ }
538
+
539
+ //
540
+
541
+ function parseStyle(node, style) {
542
+ style = Object.assign({}, style); // clone style
543
+
544
+ var stylesheetStyles = {};
545
+ if (node.hasAttribute('class')) {
546
+ var classSelectors = node.getAttribute('class').split(/\s/).filter(Boolean).map(function (i) {
547
+ return i.trim();
548
+ });
549
+ for (var i = 0; i < classSelectors.length; i++) {
550
+ stylesheetStyles = Object.assign(stylesheetStyles, stylesheets['.' + classSelectors[i]]);
551
+ }
552
+ }
553
+ if (node.hasAttribute('id')) {
554
+ stylesheetStyles = Object.assign(stylesheetStyles, stylesheets['#' + node.getAttribute('id')]);
555
+ }
556
+ function addStyle(svgName, jsName, adjustFunction) {
557
+ if (adjustFunction === undefined) adjustFunction = function copy(v) {
558
+ if (v.startsWith('url')) console.warn('SVGLoader: url access in attributes is not implemented.');
559
+ return v;
560
+ };
561
+ if (node.hasAttribute(svgName)) style[jsName] = adjustFunction(node.getAttribute(svgName));
562
+ if (stylesheetStyles[svgName]) style[jsName] = adjustFunction(stylesheetStyles[svgName]);
563
+ if (node.style && node.style[svgName] !== '') style[jsName] = adjustFunction(node.style[svgName]);
564
+ }
565
+ function clamp(v) {
566
+ return Math.max(0, Math.min(1, parseFloatWithUnits(v)));
567
+ }
568
+ function positive(v) {
569
+ return Math.max(0, parseFloatWithUnits(v));
570
+ }
571
+ addStyle('fill', 'fill');
572
+ addStyle('fill-opacity', 'fillOpacity', clamp);
573
+ addStyle('opacity', 'opacity', clamp);
574
+ addStyle('stroke', 'stroke');
575
+ addStyle('stroke-opacity', 'strokeOpacity', clamp);
576
+ addStyle('stroke-width', 'strokeWidth', positive);
577
+ addStyle('stroke-linejoin', 'strokeLineJoin');
578
+ addStyle('stroke-linecap', 'strokeLineCap');
579
+ addStyle('stroke-miterlimit', 'strokeMiterLimit', positive);
580
+ addStyle('visibility', 'visibility');
581
+ return style;
582
+ }
583
+
584
+ // http://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes
585
+
586
+ function getReflection(a, b) {
587
+ return a - (b - a);
588
+ }
589
+ function parseFloats(string) {
590
+ var array = string.split(/[\s,]+|(?=\s?[+\-])/);
591
+ for (var i = 0; i < array.length; i++) {
592
+ var number = array[i];
593
+
594
+ // Handle values like 48.6037.7.8
595
+ // TODO Find a regex for this
596
+
597
+ if (number.indexOf('.') !== number.lastIndexOf('.')) {
598
+ var split = number.split('.');
599
+ for (var s = 2; s < split.length; s++) {
600
+ array.splice(i + s - 1, 0, '0.' + split[s]);
601
+ }
602
+ }
603
+ array[i] = parseFloatWithUnits(number);
604
+ }
605
+ return array;
606
+ }
607
+
608
+ // Units
609
+
610
+ var units = ['mm', 'cm', 'in', 'pt', 'pc', 'px'];
611
+
612
+ // Conversion: [ fromUnit ][ toUnit ] (-1 means dpi dependent)
613
+ var unitConversion = {
614
+ mm: {
615
+ mm: 1,
616
+ cm: 0.1,
617
+ "in": 1 / 25.4,
618
+ pt: 72 / 25.4,
619
+ pc: 6 / 25.4,
620
+ px: -1
621
+ },
622
+ cm: {
623
+ mm: 10,
624
+ cm: 1,
625
+ "in": 1 / 2.54,
626
+ pt: 72 / 2.54,
627
+ pc: 6 / 2.54,
628
+ px: -1
629
+ },
630
+ "in": {
631
+ mm: 25.4,
632
+ cm: 2.54,
633
+ "in": 1,
634
+ pt: 72,
635
+ pc: 6,
636
+ px: -1
637
+ },
638
+ pt: {
639
+ mm: 25.4 / 72,
640
+ cm: 2.54 / 72,
641
+ "in": 1 / 72,
642
+ pt: 1,
643
+ pc: 6 / 72,
644
+ px: -1
645
+ },
646
+ pc: {
647
+ mm: 25.4 / 6,
648
+ cm: 2.54 / 6,
649
+ "in": 1 / 6,
650
+ pt: 72 / 6,
651
+ pc: 1,
652
+ px: -1
653
+ },
654
+ px: {
655
+ px: 1
656
+ }
657
+ };
658
+ function parseFloatWithUnits(string) {
659
+ var theUnit = 'px';
660
+ if (typeof string === 'string' || string instanceof String) {
661
+ for (var i = 0, n = units.length; i < n; i++) {
662
+ var u = units[i];
663
+ if (string.endsWith(u)) {
664
+ theUnit = u;
665
+ string = string.substring(0, string.length - u.length);
666
+ break;
667
+ }
668
+ }
669
+ }
670
+ var scale = undefined;
671
+ if (theUnit === 'px' && scope.defaultUnit !== 'px') {
672
+ // Conversion scale from pixels to inches, then to default units
673
+
674
+ scale = unitConversion['in'][scope.defaultUnit] / scope.defaultDPI;
675
+ } else {
676
+ scale = unitConversion[theUnit][scope.defaultUnit];
677
+ if (scale < 0) {
678
+ // Conversion scale to pixels
679
+
680
+ scale = unitConversion[theUnit]['in'] * scope.defaultDPI;
681
+ }
682
+ }
683
+ return scale * parseFloat(string);
684
+ }
685
+
686
+ // Transforms
687
+
688
+ function getNodeTransform(node) {
689
+ if (!(node.hasAttribute('transform') || node.nodeName === 'use' && (node.hasAttribute('x') || node.hasAttribute('y')))) {
690
+ return null;
691
+ }
692
+ var transform = parseNodeTransform(node);
693
+ if (transformStack.length > 0) {
694
+ transform.premultiply(transformStack[transformStack.length - 1]);
695
+ }
696
+ currentTransform.copy(transform);
697
+ transformStack.push(transform);
698
+ return transform;
699
+ }
700
+ function parseNodeTransform(node) {
701
+ var transform = new Matrix3();
702
+ var currentTransform = tempTransform0;
703
+ if (node.nodeName === 'use' && (node.hasAttribute('x') || node.hasAttribute('y'))) {
704
+ var tx = parseFloatWithUnits(node.getAttribute('x'));
705
+ var ty = parseFloatWithUnits(node.getAttribute('y'));
706
+ transform.translate(tx, ty);
707
+ }
708
+ if (node.hasAttribute('transform')) {
709
+ var transformsTexts = node.getAttribute('transform').split(')');
710
+ for (var tIndex = transformsTexts.length - 1; tIndex >= 0; tIndex--) {
711
+ var transformText = transformsTexts[tIndex].trim();
712
+ if (transformText === '') continue;
713
+ var openParPos = transformText.indexOf('(');
714
+ var closeParPos = transformText.length;
715
+ if (openParPos > 0 && openParPos < closeParPos) {
716
+ var transformType = transformText.substr(0, openParPos);
717
+ var array = parseFloats(transformText.substr(openParPos + 1, closeParPos - openParPos - 1));
718
+ currentTransform.identity();
719
+ switch (transformType) {
720
+ case 'translate':
721
+ if (array.length >= 1) {
722
+ var tx = array[0];
723
+ var ty = tx;
724
+ if (array.length >= 2) {
725
+ ty = array[1];
726
+ }
727
+ currentTransform.translate(tx, ty);
728
+ }
729
+ break;
730
+ case 'rotate':
731
+ if (array.length >= 1) {
732
+ var angle = 0;
733
+ var cx = 0;
734
+ var cy = 0;
735
+
736
+ // Angle
737
+ angle = -array[0] * Math.PI / 180;
738
+ if (array.length >= 3) {
739
+ // Center x, y
740
+ cx = array[1];
741
+ cy = array[2];
742
+ }
743
+
744
+ // Rotate around center (cx, cy)
745
+ tempTransform1.identity().translate(-cx, -cy);
746
+ tempTransform2.identity().rotate(angle);
747
+ tempTransform3.multiplyMatrices(tempTransform2, tempTransform1);
748
+ tempTransform1.identity().translate(cx, cy);
749
+ currentTransform.multiplyMatrices(tempTransform1, tempTransform3);
750
+ }
751
+ break;
752
+ case 'scale':
753
+ if (array.length >= 1) {
754
+ var scaleX = array[0];
755
+ var scaleY = scaleX;
756
+ if (array.length >= 2) {
757
+ scaleY = array[1];
758
+ }
759
+ currentTransform.scale(scaleX, scaleY);
760
+ }
761
+ break;
762
+ case 'skewX':
763
+ if (array.length === 1) {
764
+ currentTransform.set(1, Math.tan(array[0] * Math.PI / 180), 0, 0, 1, 0, 0, 0, 1);
765
+ }
766
+ break;
767
+ case 'skewY':
768
+ if (array.length === 1) {
769
+ currentTransform.set(1, 0, 0, Math.tan(array[0] * Math.PI / 180), 1, 0, 0, 0, 1);
770
+ }
771
+ break;
772
+ case 'matrix':
773
+ if (array.length === 6) {
774
+ currentTransform.set(array[0], array[2], array[4], array[1], array[3], array[5], 0, 0, 1);
775
+ }
776
+ break;
777
+ }
778
+ }
779
+ transform.premultiply(currentTransform);
780
+ }
781
+ }
782
+ return transform;
783
+ }
784
+ function transformPath(path, m) {
785
+ function transfVec2(v2) {
786
+ tempV3.set(v2.x, v2.y, 1).applyMatrix3(m);
787
+ v2.set(tempV3.x, tempV3.y);
788
+ }
789
+ var isRotated = isTransformRotated(m);
790
+ var subPaths = path.subPaths;
791
+ for (var i = 0, n = subPaths.length; i < n; i++) {
792
+ var subPath = subPaths[i];
793
+ var curves = subPath.curves;
794
+ for (var j = 0; j < curves.length; j++) {
795
+ var curve = curves[j];
796
+ if (curve.isLineCurve) {
797
+ transfVec2(curve.v1);
798
+ transfVec2(curve.v2);
799
+ } else if (curve.isCubicBezierCurve) {
800
+ transfVec2(curve.v0);
801
+ transfVec2(curve.v1);
802
+ transfVec2(curve.v2);
803
+ transfVec2(curve.v3);
804
+ } else if (curve.isQuadraticBezierCurve) {
805
+ transfVec2(curve.v0);
806
+ transfVec2(curve.v1);
807
+ transfVec2(curve.v2);
808
+ } else if (curve.isEllipseCurve) {
809
+ if (isRotated) {
810
+ console.warn('SVGLoader: Elliptic arc or ellipse rotation or skewing is not implemented.');
811
+ }
812
+ tempV2.set(curve.aX, curve.aY);
813
+ transfVec2(tempV2);
814
+ curve.aX = tempV2.x;
815
+ curve.aY = tempV2.y;
816
+ curve.xRadius *= getTransformScaleX(m);
817
+ curve.yRadius *= getTransformScaleY(m);
818
+ }
819
+ }
820
+ }
821
+ }
822
+ function isTransformRotated(m) {
823
+ return m.elements[1] !== 0 || m.elements[3] !== 0;
824
+ }
825
+ function getTransformScaleX(m) {
826
+ var te = m.elements;
827
+ return Math.sqrt(te[0] * te[0] + te[1] * te[1]);
828
+ }
829
+ function getTransformScaleY(m) {
830
+ var te = m.elements;
831
+ return Math.sqrt(te[3] * te[3] + te[4] * te[4]);
832
+ }
833
+
834
+ //
835
+
836
+ var paths = [];
837
+ var stylesheets = {};
838
+ var transformStack = [];
839
+ var tempTransform0 = new Matrix3();
840
+ var tempTransform1 = new Matrix3();
841
+ var tempTransform2 = new Matrix3();
842
+ var tempTransform3 = new Matrix3();
843
+ var tempV2 = new Vector2();
844
+ var tempV3 = new Vector3();
845
+ var currentTransform = new Matrix3();
846
+ var xml = new DOMParser().parseFromString(text, 'image/svg+xml'); // application/xml
847
+
848
+ parseNode(xml.documentElement, {
849
+ fill: '#000',
850
+ fillOpacity: 1,
851
+ strokeOpacity: 1,
852
+ strokeWidth: 1,
853
+ strokeLineJoin: 'miter',
854
+ strokeLineCap: 'butt',
855
+ strokeMiterLimit: 4
856
+ });
857
+ var data = {
858
+ paths: paths,
859
+ xml: xml.documentElement
860
+ };
861
+
862
+ // console.log( paths );
863
+ return data;
864
+ }
865
+ });
866
+ SVGLoader.getStrokeStyle = function (width, color, lineJoin, lineCap, miterLimit) {
867
+ // Param width: Stroke width
868
+ // Param color: As returned by THREE.Color.getStyle()
869
+ // Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
870
+ // Param lineCap: One of "round", "square" or "butt"
871
+ // Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
872
+ // Returns style object
873
+
874
+ width = width !== undefined ? width : 1;
875
+ color = color !== undefined ? color : '#000';
876
+ lineJoin = lineJoin !== undefined ? lineJoin : 'miter';
877
+ lineCap = lineCap !== undefined ? lineCap : 'butt';
878
+ miterLimit = miterLimit !== undefined ? miterLimit : 4;
879
+ return {
880
+ strokeColor: color,
881
+ strokeWidth: width,
882
+ strokeLineJoin: lineJoin,
883
+ strokeLineCap: lineCap,
884
+ strokeMiterLimit: miterLimit
885
+ };
886
+ };
887
+ SVGLoader.pointsToStroke = function (points, style, arcDivisions, minDistance) {
888
+ // Generates a stroke with some witdh around the given path.
889
+ // The path can be open or closed (last point equals to first point)
890
+ // Param points: Array of Vector2D (the path). Minimum 2 points.
891
+ // Param style: Object with SVG properties as returned by SVGLoader.getStrokeStyle(), or SVGLoader.parse() in the path.userData.style object
892
+ // Params arcDivisions: Arc divisions for round joins and endcaps. (Optional)
893
+ // Param minDistance: Points closer to this distance will be merged. (Optional)
894
+ // Returns BufferGeometry with stroke triangles (In plane z = 0). UV coordinates are generated ('u' along path. 'v' across it, from left to right)
895
+
896
+ var vertices = [];
897
+ var normals = [];
898
+ var uvs = [];
899
+ if (SVGLoader.pointsToStrokeWithBuffers(points, style, arcDivisions, minDistance, vertices, normals, uvs) === 0) {
900
+ return null;
901
+ }
902
+ var geometry = new BufferGeometry();
903
+ geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));
904
+ geometry.setAttribute('normal', new Float32BufferAttribute(normals, 3));
905
+ geometry.setAttribute('uv', new Float32BufferAttribute(uvs, 2));
906
+ return geometry;
907
+ };
908
+ SVGLoader.pointsToStrokeWithBuffers = function () {
909
+ var tempV2_1 = new Vector2();
910
+ var tempV2_2 = new Vector2();
911
+ var tempV2_3 = new Vector2();
912
+ var tempV2_4 = new Vector2();
913
+ var tempV2_5 = new Vector2();
914
+ var tempV2_6 = new Vector2();
915
+ var tempV2_7 = new Vector2();
916
+ var lastPointL = new Vector2();
917
+ var lastPointR = new Vector2();
918
+ var point0L = new Vector2();
919
+ var point0R = new Vector2();
920
+ var currentPointL = new Vector2();
921
+ var currentPointR = new Vector2();
922
+ var nextPointL = new Vector2();
923
+ var nextPointR = new Vector2();
924
+ var innerPoint = new Vector2();
925
+ var outerPoint = new Vector2();
926
+ return function (points, style, arcDivisions, minDistance, vertices, normals, uvs, vertexOffset) {
927
+ // This function can be called to update existing arrays or buffers.
928
+ // Accepts same parameters as pointsToStroke, plus the buffers and optional offset.
929
+ // Param vertexOffset: Offset vertices to start writing in the buffers (3 elements/vertex for vertices and normals, and 2 elements/vertex for uvs)
930
+ // Returns number of written vertices / normals / uvs pairs
931
+ // if 'vertices' parameter is undefined no triangles will be generated, but the returned vertices count will still be valid (useful to preallocate the buffers)
932
+ // 'normals' and 'uvs' buffers are optional
933
+
934
+ arcDivisions = arcDivisions !== undefined ? arcDivisions : 12;
935
+ minDistance = minDistance !== undefined ? minDistance : 0.001;
936
+ vertexOffset = vertexOffset !== undefined ? vertexOffset : 0;
937
+
938
+ // First ensure there are no duplicated points
939
+ points = removeDuplicatedPoints(points);
940
+ var numPoints = points.length;
941
+ if (numPoints < 2) return 0;
942
+ var isClosed = points[0].equals(points[numPoints - 1]);
943
+ var currentPoint;
944
+ var previousPoint = points[0];
945
+ var nextPoint;
946
+ var strokeWidth2 = style.strokeWidth / 2;
947
+ var deltaU = 1 / (numPoints - 1);
948
+ var u0 = 0;
949
+ var innerSideModified;
950
+ var joinIsOnLeftSide;
951
+ var isMiter;
952
+ var initialJoinIsOnLeftSide = false;
953
+ var numVertices = 0;
954
+ var currentCoordinate = vertexOffset * 3;
955
+ var currentCoordinateUV = vertexOffset * 2;
956
+
957
+ // Get initial left and right stroke points
958
+ getNormal(points[0], points[1], tempV2_1).multiplyScalar(strokeWidth2);
959
+ lastPointL.copy(points[0]).sub(tempV2_1);
960
+ lastPointR.copy(points[0]).add(tempV2_1);
961
+ point0L.copy(lastPointL);
962
+ point0R.copy(lastPointR);
963
+ for (var iPoint = 1; iPoint < numPoints; iPoint++) {
964
+ currentPoint = points[iPoint];
965
+
966
+ // Get next point
967
+ if (iPoint === numPoints - 1) {
968
+ if (isClosed) {
969
+ // Skip duplicated initial point
970
+ nextPoint = points[1];
971
+ } else nextPoint = undefined;
972
+ } else {
973
+ nextPoint = points[iPoint + 1];
974
+ }
975
+
976
+ // Normal of previous segment in tempV2_1
977
+ var normal1 = tempV2_1;
978
+ getNormal(previousPoint, currentPoint, normal1);
979
+ tempV2_3.copy(normal1).multiplyScalar(strokeWidth2);
980
+ currentPointL.copy(currentPoint).sub(tempV2_3);
981
+ currentPointR.copy(currentPoint).add(tempV2_3);
982
+ var u1 = u0 + deltaU;
983
+ innerSideModified = false;
984
+ if (nextPoint !== undefined) {
985
+ // Normal of next segment in tempV2_2
986
+ getNormal(currentPoint, nextPoint, tempV2_2);
987
+ tempV2_3.copy(tempV2_2).multiplyScalar(strokeWidth2);
988
+ nextPointL.copy(currentPoint).sub(tempV2_3);
989
+ nextPointR.copy(currentPoint).add(tempV2_3);
990
+ joinIsOnLeftSide = true;
991
+ tempV2_3.subVectors(nextPoint, previousPoint);
992
+ if (normal1.dot(tempV2_3) < 0) {
993
+ joinIsOnLeftSide = false;
994
+ }
995
+ if (iPoint === 1) initialJoinIsOnLeftSide = joinIsOnLeftSide;
996
+ tempV2_3.subVectors(nextPoint, currentPoint);
997
+ tempV2_3.normalize();
998
+ var dot = Math.abs(normal1.dot(tempV2_3));
999
+
1000
+ // If path is straight, don't create join
1001
+ if (dot !== 0) {
1002
+ // Compute inner and outer segment intersections
1003
+ var miterSide = strokeWidth2 / dot;
1004
+ tempV2_3.multiplyScalar(-miterSide);
1005
+ tempV2_4.subVectors(currentPoint, previousPoint);
1006
+ tempV2_5.copy(tempV2_4).setLength(miterSide).add(tempV2_3);
1007
+ innerPoint.copy(tempV2_5).negate();
1008
+ var miterLength2 = tempV2_5.length();
1009
+ var segmentLengthPrev = tempV2_4.length();
1010
+ tempV2_4.divideScalar(segmentLengthPrev);
1011
+ tempV2_6.subVectors(nextPoint, currentPoint);
1012
+ var segmentLengthNext = tempV2_6.length();
1013
+ tempV2_6.divideScalar(segmentLengthNext);
1014
+ // Check that previous and next segments doesn't overlap with the innerPoint of intersection
1015
+ if (tempV2_4.dot(innerPoint) < segmentLengthPrev && tempV2_6.dot(innerPoint) < segmentLengthNext) {
1016
+ innerSideModified = true;
1017
+ }
1018
+ outerPoint.copy(tempV2_5).add(currentPoint);
1019
+ innerPoint.add(currentPoint);
1020
+ isMiter = false;
1021
+ if (innerSideModified) {
1022
+ if (joinIsOnLeftSide) {
1023
+ nextPointR.copy(innerPoint);
1024
+ currentPointR.copy(innerPoint);
1025
+ } else {
1026
+ nextPointL.copy(innerPoint);
1027
+ currentPointL.copy(innerPoint);
1028
+ }
1029
+ } else {
1030
+ // The segment triangles are generated here if there was overlapping
1031
+
1032
+ makeSegmentTriangles();
1033
+ }
1034
+ switch (style.strokeLineJoin) {
1035
+ case 'bevel':
1036
+ makeSegmentWithBevelJoin(joinIsOnLeftSide, innerSideModified, u1);
1037
+ break;
1038
+ case 'round':
1039
+ // Segment triangles
1040
+
1041
+ createSegmentTrianglesWithMiddleSection(joinIsOnLeftSide, innerSideModified);
1042
+
1043
+ // Join triangles
1044
+
1045
+ if (joinIsOnLeftSide) {
1046
+ makeCircularSector(currentPoint, currentPointL, nextPointL, u1, 0);
1047
+ } else {
1048
+ makeCircularSector(currentPoint, nextPointR, currentPointR, u1, 1);
1049
+ }
1050
+ break;
1051
+ case 'miter':
1052
+ case 'miter-clip':
1053
+ default:
1054
+ var miterFraction = strokeWidth2 * style.strokeMiterLimit / miterLength2;
1055
+ if (miterFraction < 1) {
1056
+ // The join miter length exceeds the miter limit
1057
+
1058
+ if (style.strokeLineJoin !== 'miter-clip') {
1059
+ makeSegmentWithBevelJoin(joinIsOnLeftSide, innerSideModified, u1);
1060
+ break;
1061
+ } else {
1062
+ // Segment triangles
1063
+
1064
+ createSegmentTrianglesWithMiddleSection(joinIsOnLeftSide, innerSideModified);
1065
+
1066
+ // Miter-clip join triangles
1067
+
1068
+ if (joinIsOnLeftSide) {
1069
+ tempV2_6.subVectors(outerPoint, currentPointL).multiplyScalar(miterFraction).add(currentPointL);
1070
+ tempV2_7.subVectors(outerPoint, nextPointL).multiplyScalar(miterFraction).add(nextPointL);
1071
+ addVertex(currentPointL, u1, 0);
1072
+ addVertex(tempV2_6, u1, 0);
1073
+ addVertex(currentPoint, u1, 0.5);
1074
+ addVertex(currentPoint, u1, 0.5);
1075
+ addVertex(tempV2_6, u1, 0);
1076
+ addVertex(tempV2_7, u1, 0);
1077
+ addVertex(currentPoint, u1, 0.5);
1078
+ addVertex(tempV2_7, u1, 0);
1079
+ addVertex(nextPointL, u1, 0);
1080
+ } else {
1081
+ tempV2_6.subVectors(outerPoint, currentPointR).multiplyScalar(miterFraction).add(currentPointR);
1082
+ tempV2_7.subVectors(outerPoint, nextPointR).multiplyScalar(miterFraction).add(nextPointR);
1083
+ addVertex(currentPointR, u1, 1);
1084
+ addVertex(tempV2_6, u1, 1);
1085
+ addVertex(currentPoint, u1, 0.5);
1086
+ addVertex(currentPoint, u1, 0.5);
1087
+ addVertex(tempV2_6, u1, 1);
1088
+ addVertex(tempV2_7, u1, 1);
1089
+ addVertex(currentPoint, u1, 0.5);
1090
+ addVertex(tempV2_7, u1, 1);
1091
+ addVertex(nextPointR, u1, 1);
1092
+ }
1093
+ }
1094
+ } else {
1095
+ // Miter join segment triangles
1096
+
1097
+ if (innerSideModified) {
1098
+ // Optimized segment + join triangles
1099
+
1100
+ if (joinIsOnLeftSide) {
1101
+ addVertex(lastPointR, u0, 1);
1102
+ addVertex(lastPointL, u0, 0);
1103
+ addVertex(outerPoint, u1, 0);
1104
+ addVertex(lastPointR, u0, 1);
1105
+ addVertex(outerPoint, u1, 0);
1106
+ addVertex(innerPoint, u1, 1);
1107
+ } else {
1108
+ addVertex(lastPointR, u0, 1);
1109
+ addVertex(lastPointL, u0, 0);
1110
+ addVertex(outerPoint, u1, 1);
1111
+ addVertex(lastPointL, u0, 0);
1112
+ addVertex(innerPoint, u1, 0);
1113
+ addVertex(outerPoint, u1, 1);
1114
+ }
1115
+ if (joinIsOnLeftSide) {
1116
+ nextPointL.copy(outerPoint);
1117
+ } else {
1118
+ nextPointR.copy(outerPoint);
1119
+ }
1120
+ } else {
1121
+ // Add extra miter join triangles
1122
+
1123
+ if (joinIsOnLeftSide) {
1124
+ addVertex(currentPointL, u1, 0);
1125
+ addVertex(outerPoint, u1, 0);
1126
+ addVertex(currentPoint, u1, 0.5);
1127
+ addVertex(currentPoint, u1, 0.5);
1128
+ addVertex(outerPoint, u1, 0);
1129
+ addVertex(nextPointL, u1, 0);
1130
+ } else {
1131
+ addVertex(currentPointR, u1, 1);
1132
+ addVertex(outerPoint, u1, 1);
1133
+ addVertex(currentPoint, u1, 0.5);
1134
+ addVertex(currentPoint, u1, 0.5);
1135
+ addVertex(outerPoint, u1, 1);
1136
+ addVertex(nextPointR, u1, 1);
1137
+ }
1138
+ }
1139
+ isMiter = true;
1140
+ }
1141
+ break;
1142
+ }
1143
+ } else {
1144
+ // The segment triangles are generated here when two consecutive points are collinear
1145
+
1146
+ makeSegmentTriangles();
1147
+ }
1148
+ } else {
1149
+ // The segment triangles are generated here if it is the ending segment
1150
+
1151
+ makeSegmentTriangles();
1152
+ }
1153
+ if (!isClosed && iPoint === numPoints - 1) {
1154
+ // Start line endcap
1155
+ addCapGeometry(points[0], point0L, point0R, joinIsOnLeftSide, true, u0);
1156
+ }
1157
+
1158
+ // Increment loop variables
1159
+
1160
+ u0 = u1;
1161
+ previousPoint = currentPoint;
1162
+ lastPointL.copy(nextPointL);
1163
+ lastPointR.copy(nextPointR);
1164
+ }
1165
+ if (!isClosed) {
1166
+ // Ending line endcap
1167
+ addCapGeometry(currentPoint, currentPointL, currentPointR, joinIsOnLeftSide, false, u1);
1168
+ } else if (innerSideModified && vertices) {
1169
+ // Modify path first segment vertices to adjust to the segments inner and outer intersections
1170
+
1171
+ var lastOuter = outerPoint;
1172
+ var lastInner = innerPoint;
1173
+ if (initialJoinIsOnLeftSide !== joinIsOnLeftSide) {
1174
+ lastOuter = innerPoint;
1175
+ lastInner = outerPoint;
1176
+ }
1177
+ if (joinIsOnLeftSide) {
1178
+ if (isMiter || initialJoinIsOnLeftSide) {
1179
+ lastInner.toArray(vertices, 0 * 3);
1180
+ lastInner.toArray(vertices, 3 * 3);
1181
+ if (isMiter) {
1182
+ lastOuter.toArray(vertices, 1 * 3);
1183
+ }
1184
+ }
1185
+ } else {
1186
+ if (isMiter || !initialJoinIsOnLeftSide) {
1187
+ lastInner.toArray(vertices, 1 * 3);
1188
+ lastInner.toArray(vertices, 3 * 3);
1189
+ if (isMiter) {
1190
+ lastOuter.toArray(vertices, 0 * 3);
1191
+ }
1192
+ }
1193
+ }
1194
+ }
1195
+ return numVertices;
1196
+
1197
+ // -- End of algorithm
1198
+
1199
+ // -- Functions
1200
+
1201
+ function getNormal(p1, p2, result) {
1202
+ result.subVectors(p2, p1);
1203
+ return result.set(-result.y, result.x).normalize();
1204
+ }
1205
+ function addVertex(position, u, v) {
1206
+ if (vertices) {
1207
+ vertices[currentCoordinate] = position.x;
1208
+ vertices[currentCoordinate + 1] = position.y;
1209
+ vertices[currentCoordinate + 2] = 0;
1210
+ if (normals) {
1211
+ normals[currentCoordinate] = 0;
1212
+ normals[currentCoordinate + 1] = 0;
1213
+ normals[currentCoordinate + 2] = 1;
1214
+ }
1215
+ currentCoordinate += 3;
1216
+ if (uvs) {
1217
+ uvs[currentCoordinateUV] = u;
1218
+ uvs[currentCoordinateUV + 1] = v;
1219
+ currentCoordinateUV += 2;
1220
+ }
1221
+ }
1222
+ numVertices += 3;
1223
+ }
1224
+ function makeCircularSector(center, p1, p2, u, v) {
1225
+ // param p1, p2: Points in the circle arc.
1226
+ // p1 and p2 are in clockwise direction.
1227
+
1228
+ tempV2_1.copy(p1).sub(center).normalize();
1229
+ tempV2_2.copy(p2).sub(center).normalize();
1230
+ var angle = Math.PI;
1231
+ var dot = tempV2_1.dot(tempV2_2);
1232
+ if (Math.abs(dot) < 1) angle = Math.abs(Math.acos(dot));
1233
+ angle /= arcDivisions;
1234
+ tempV2_3.copy(p1);
1235
+ for (var i = 0, il = arcDivisions - 1; i < il; i++) {
1236
+ tempV2_4.copy(tempV2_3).rotateAround(center, angle);
1237
+ addVertex(tempV2_3, u, v);
1238
+ addVertex(tempV2_4, u, v);
1239
+ addVertex(center, u, 0.5);
1240
+ tempV2_3.copy(tempV2_4);
1241
+ }
1242
+ addVertex(tempV2_4, u, v);
1243
+ addVertex(p2, u, v);
1244
+ addVertex(center, u, 0.5);
1245
+ }
1246
+ function makeSegmentTriangles() {
1247
+ addVertex(lastPointR, u0, 1);
1248
+ addVertex(lastPointL, u0, 0);
1249
+ addVertex(currentPointL, u1, 0);
1250
+ addVertex(lastPointR, u0, 1);
1251
+ addVertex(currentPointL, u1, 1);
1252
+ addVertex(currentPointR, u1, 0);
1253
+ }
1254
+ function makeSegmentWithBevelJoin(joinIsOnLeftSide, innerSideModified, u) {
1255
+ if (innerSideModified) {
1256
+ // Optimized segment + bevel triangles
1257
+
1258
+ if (joinIsOnLeftSide) {
1259
+ // Path segments triangles
1260
+
1261
+ addVertex(lastPointR, u0, 1);
1262
+ addVertex(lastPointL, u0, 0);
1263
+ addVertex(currentPointL, u1, 0);
1264
+ addVertex(lastPointR, u0, 1);
1265
+ addVertex(currentPointL, u1, 0);
1266
+ addVertex(innerPoint, u1, 1);
1267
+
1268
+ // Bevel join triangle
1269
+
1270
+ addVertex(currentPointL, u, 0);
1271
+ addVertex(nextPointL, u, 0);
1272
+ addVertex(innerPoint, u, 0.5);
1273
+ } else {
1274
+ // Path segments triangles
1275
+
1276
+ addVertex(lastPointR, u0, 1);
1277
+ addVertex(lastPointL, u0, 0);
1278
+ addVertex(currentPointR, u1, 1);
1279
+ addVertex(lastPointL, u0, 0);
1280
+ addVertex(innerPoint, u1, 0);
1281
+ addVertex(currentPointR, u1, 1);
1282
+
1283
+ // Bevel join triangle
1284
+
1285
+ addVertex(currentPointR, u, 1);
1286
+ addVertex(nextPointR, u, 0);
1287
+ addVertex(innerPoint, u, 0.5);
1288
+ }
1289
+ } else {
1290
+ // Bevel join triangle. The segment triangles are done in the main loop
1291
+
1292
+ if (joinIsOnLeftSide) {
1293
+ addVertex(currentPointL, u, 0);
1294
+ addVertex(nextPointL, u, 0);
1295
+ addVertex(currentPoint, u, 0.5);
1296
+ } else {
1297
+ addVertex(currentPointR, u, 1);
1298
+ addVertex(nextPointR, u, 0);
1299
+ addVertex(currentPoint, u, 0.5);
1300
+ }
1301
+ }
1302
+ }
1303
+ function createSegmentTrianglesWithMiddleSection(joinIsOnLeftSide, innerSideModified) {
1304
+ if (innerSideModified) {
1305
+ if (joinIsOnLeftSide) {
1306
+ addVertex(lastPointR, u0, 1);
1307
+ addVertex(lastPointL, u0, 0);
1308
+ addVertex(currentPointL, u1, 0);
1309
+ addVertex(lastPointR, u0, 1);
1310
+ addVertex(currentPointL, u1, 0);
1311
+ addVertex(innerPoint, u1, 1);
1312
+ addVertex(currentPointL, u0, 0);
1313
+ addVertex(currentPoint, u1, 0.5);
1314
+ addVertex(innerPoint, u1, 1);
1315
+ addVertex(currentPoint, u1, 0.5);
1316
+ addVertex(nextPointL, u0, 0);
1317
+ addVertex(innerPoint, u1, 1);
1318
+ } else {
1319
+ addVertex(lastPointR, u0, 1);
1320
+ addVertex(lastPointL, u0, 0);
1321
+ addVertex(currentPointR, u1, 1);
1322
+ addVertex(lastPointL, u0, 0);
1323
+ addVertex(innerPoint, u1, 0);
1324
+ addVertex(currentPointR, u1, 1);
1325
+ addVertex(currentPointR, u0, 1);
1326
+ addVertex(innerPoint, u1, 0);
1327
+ addVertex(currentPoint, u1, 0.5);
1328
+ addVertex(currentPoint, u1, 0.5);
1329
+ addVertex(innerPoint, u1, 0);
1330
+ addVertex(nextPointR, u0, 1);
1331
+ }
1332
+ }
1333
+ }
1334
+ function addCapGeometry(center, p1, p2, joinIsOnLeftSide, start, u) {
1335
+ // param center: End point of the path
1336
+ // param p1, p2: Left and right cap points
1337
+
1338
+ switch (style.strokeLineCap) {
1339
+ case 'round':
1340
+ if (start) {
1341
+ makeCircularSector(center, p2, p1, u, 0.5);
1342
+ } else {
1343
+ makeCircularSector(center, p1, p2, u, 0.5);
1344
+ }
1345
+ break;
1346
+ case 'square':
1347
+ if (start) {
1348
+ tempV2_1.subVectors(p1, center);
1349
+ tempV2_2.set(tempV2_1.y, -tempV2_1.x);
1350
+ tempV2_3.addVectors(tempV2_1, tempV2_2).add(center);
1351
+ tempV2_4.subVectors(tempV2_2, tempV2_1).add(center);
1352
+
1353
+ // Modify already existing vertices
1354
+ if (joinIsOnLeftSide) {
1355
+ tempV2_3.toArray(vertices, 1 * 3);
1356
+ tempV2_4.toArray(vertices, 0 * 3);
1357
+ tempV2_4.toArray(vertices, 3 * 3);
1358
+ } else {
1359
+ tempV2_3.toArray(vertices, 1 * 3);
1360
+ tempV2_3.toArray(vertices, 3 * 3);
1361
+ tempV2_4.toArray(vertices, 0 * 3);
1362
+ }
1363
+ } else {
1364
+ tempV2_1.subVectors(p2, center);
1365
+ tempV2_2.set(tempV2_1.y, -tempV2_1.x);
1366
+ tempV2_3.addVectors(tempV2_1, tempV2_2).add(center);
1367
+ tempV2_4.subVectors(tempV2_2, tempV2_1).add(center);
1368
+ var vl = vertices.length;
1369
+
1370
+ // Modify already existing vertices
1371
+ if (joinIsOnLeftSide) {
1372
+ tempV2_3.toArray(vertices, vl - 1 * 3);
1373
+ tempV2_4.toArray(vertices, vl - 2 * 3);
1374
+ tempV2_4.toArray(vertices, vl - 4 * 3);
1375
+ } else {
1376
+ tempV2_3.toArray(vertices, vl - 2 * 3);
1377
+ tempV2_4.toArray(vertices, vl - 1 * 3);
1378
+ tempV2_4.toArray(vertices, vl - 4 * 3);
1379
+ }
1380
+ }
1381
+ break;
1382
+ case 'butt':
1383
+ default:
1384
+ // Nothing to do here
1385
+ break;
1386
+ }
1387
+ }
1388
+ function removeDuplicatedPoints(points) {
1389
+ // Creates a new array if necessary with duplicated points removed.
1390
+ // This does not remove duplicated initial and ending points of a closed path.
1391
+
1392
+ var dupPoints = false;
1393
+ for (var i = 1, n = points.length - 1; i < n; i++) {
1394
+ if (points[i].distanceTo(points[i + 1]) < minDistance) {
1395
+ dupPoints = true;
1396
+ break;
1397
+ }
1398
+ }
1399
+ if (!dupPoints) return points;
1400
+ var newPoints = [];
1401
+ newPoints.push(points[0]);
1402
+ for (var i = 1, n = points.length - 1; i < n; i++) {
1403
+ if (points[i].distanceTo(points[i + 1]) >= minDistance) {
1404
+ newPoints.push(points[i]);
1405
+ }
1406
+ }
1407
+ newPoints.push(points[points.length - 1]);
1408
+ return newPoints;
1409
+ }
1410
+ };
1411
+ }();
1412
+ export { SVGLoader };