kitchen-simulator 1.1.1-test.49 → 1.1.1-test.50

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 (358) hide show
  1. package/es/@history.js +2 -0
  2. package/es/AppContext.js +3 -0
  3. package/es/KitchenConfigurator.js +645 -0
  4. package/es/KitchenConfiguratorApp.js +480 -0
  5. package/es/actions/area-actions.js +14 -0
  6. package/es/actions/export.js +23 -0
  7. package/es/actions/groups-actions.js +89 -0
  8. package/es/actions/holes-actions.js +119 -0
  9. package/es/actions/items-actions.js +313 -0
  10. package/es/actions/lines-actions.js +81 -0
  11. package/es/actions/project-actions.js +281 -0
  12. package/es/actions/scene-actions.js +33 -0
  13. package/es/actions/vertices-actions.js +27 -0
  14. package/es/actions/viewer2d-actions.js +58 -0
  15. package/es/actions/viewer3d-actions.js +23 -0
  16. package/es/catalog/areas/area/planner-element.js +40 -0
  17. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  18. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  19. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  20. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  21. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  22. package/es/catalog/catalog.js +277 -0
  23. package/es/catalog/envMap/nx.hdr +0 -0
  24. package/es/catalog/envMap/ny.hdr +0 -0
  25. package/es/catalog/envMap/nz.hdr +0 -0
  26. package/es/catalog/envMap/px.hdr +0 -0
  27. package/es/catalog/envMap/py.hdr +0 -0
  28. package/es/catalog/envMap/pz.hdr +0 -0
  29. package/es/catalog/factories/area-factory-3d.js +181 -0
  30. package/es/catalog/factories/area-factory.js +81 -0
  31. package/es/catalog/factories/export.js +7 -0
  32. package/es/catalog/factories/wall-factory-3d.js +202 -0
  33. package/es/catalog/factories/wall-factory.js +268 -0
  34. package/es/catalog/holes/door-closet/planner-element.js +222 -0
  35. package/es/catalog/holes/door-double/door_double.png +0 -0
  36. package/es/catalog/holes/door-double/planner-element.js +315 -0
  37. package/es/catalog/holes/door-exterior/planner-element.js +215 -0
  38. package/es/catalog/holes/door-interior/planner-element.js +227 -0
  39. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  40. package/es/catalog/holes/door-panic/planner-element.js +503 -0
  41. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  42. package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
  43. package/es/catalog/holes/door-sliding/planner-element.js +225 -0
  44. package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
  45. package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
  46. package/es/catalog/holes/export.js +13 -0
  47. package/es/catalog/holes/gate/gate.jpg +0 -0
  48. package/es/catalog/holes/window-clear/planner-element.js +166 -0
  49. package/es/catalog/holes/window-clear/texture.png +0 -0
  50. package/es/catalog/holes/window-cross/planner-element.js +165 -0
  51. package/es/catalog/holes/window-cross/texture.png +0 -0
  52. package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
  53. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  54. package/es/catalog/holes/window-vertical/planner-element.js +276 -0
  55. package/es/catalog/holes/window-vertical/texture.png +0 -0
  56. package/es/catalog/lines/wall/planner-element.js +70 -0
  57. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  58. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  59. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  60. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  61. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  62. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  63. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  64. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  65. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  66. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  67. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  68. package/es/catalog/lines/wall/wall.png +0 -0
  69. package/es/catalog/molding/molding-dcm/planner-element.js +28 -0
  70. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  71. package/es/catalog/molding/molding-fbm/planner-element.js +28 -0
  72. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  73. package/es/catalog/molding/molding-lrm/planner-element.js +28 -0
  74. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  75. package/es/catalog/properties/export.js +21 -0
  76. package/es/catalog/properties/property-checkbox.js +116 -0
  77. package/es/catalog/properties/property-color.js +39 -0
  78. package/es/catalog/properties/property-enum.js +97 -0
  79. package/es/catalog/properties/property-hidden.js +19 -0
  80. package/es/catalog/properties/property-lenght-measure.js +101 -0
  81. package/es/catalog/properties/property-length-measure.js +134 -0
  82. package/es/catalog/properties/property-length-measure_hole.js +101 -0
  83. package/es/catalog/properties/property-number.js +48 -0
  84. package/es/catalog/properties/property-read-only.js +26 -0
  85. package/es/catalog/properties/property-string.js +48 -0
  86. package/es/catalog/properties/property-toggle.js +39 -0
  87. package/es/catalog/properties/shared-property-style.js +14 -0
  88. package/es/catalog/utils/FuseUtils.js +82 -0
  89. package/es/catalog/utils/exporter.js +148 -0
  90. package/es/catalog/utils/geom-utils.js +189 -0
  91. package/es/catalog/utils/item-loader.js +1521 -0
  92. package/es/catalog/utils/load-obj.js +91 -0
  93. package/es/catalog/utils/mtl-loader.js +358 -0
  94. package/es/catalog/utils/obj-loader.js +477 -0
  95. package/es/class/FuseUtils.js +82 -0
  96. package/es/class/area.js +145 -0
  97. package/es/class/export.js +24 -0
  98. package/es/class/group.js +440 -0
  99. package/es/class/guide.js +62 -0
  100. package/es/class/hole.js +929 -0
  101. package/es/class/item.js +1883 -0
  102. package/es/class/layer.js +667 -0
  103. package/es/class/line.js +1180 -0
  104. package/es/class/project.js +793 -0
  105. package/es/class/vertex.js +202 -0
  106. package/es/components/content.js +107 -0
  107. package/es/components/disclaimer/disclaimer.js +97 -0
  108. package/es/components/export.js +9 -0
  109. package/es/components/style/button.js +113 -0
  110. package/es/components/style/cancel-button.js +22 -0
  111. package/es/components/style/content-container.js +33 -0
  112. package/es/components/style/content-title.js +29 -0
  113. package/es/components/style/delete-button.js +25 -0
  114. package/es/components/style/export.js +31 -0
  115. package/es/components/style/form-block.js +24 -0
  116. package/es/components/style/form-color-input.js +27 -0
  117. package/es/components/style/form-label.js +26 -0
  118. package/es/components/style/form-number-input.js +213 -0
  119. package/es/components/style/form-number-input_2.js +206 -0
  120. package/es/components/style/form-select.js +68 -0
  121. package/es/components/style/form-slider.js +61 -0
  122. package/es/components/style/form-submit-button.js +26 -0
  123. package/es/components/style/form-text-input.js +95 -0
  124. package/es/components/viewer2d/area.js +81 -0
  125. package/es/components/viewer2d/export.js +31 -0
  126. package/es/components/viewer2d/grids/grid-horizontal-streak.js +37 -0
  127. package/es/components/viewer2d/grids/grid-streak.js +37 -0
  128. package/es/components/viewer2d/grids/grid-vertical-streak.js +37 -0
  129. package/es/components/viewer2d/grids/grids.js +35 -0
  130. package/es/components/viewer2d/group.js +53 -0
  131. package/es/components/viewer2d/item.js +513 -0
  132. package/es/components/viewer2d/layer.js +164 -0
  133. package/es/components/viewer2d/line.js +882 -0
  134. package/es/components/viewer2d/ruler.js +100 -0
  135. package/es/components/viewer2d/rulerDist.js +146 -0
  136. package/es/components/viewer2d/rulerX.js +151 -0
  137. package/es/components/viewer2d/rulerY.js +153 -0
  138. package/es/components/viewer2d/scene.js +140 -0
  139. package/es/components/viewer2d/snap.js +74 -0
  140. package/es/components/viewer2d/state.js +78 -0
  141. package/es/components/viewer2d/utils.js +198 -0
  142. package/es/components/viewer2d/vertex.js +65 -0
  143. package/es/components/viewer2d/viewer2d.js +1398 -0
  144. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2592 -0
  145. package/es/components/viewer3d/dcm.js +401 -0
  146. package/es/components/viewer3d/fbm.js +414 -0
  147. package/es/components/viewer3d/front3D.js +66 -0
  148. package/es/components/viewer3d/grid-creator.js +25 -0
  149. package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
  150. package/es/components/viewer3d/grids/grid-streak.js +27 -0
  151. package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
  152. package/es/components/viewer3d/libs/first-person-controls.js +67 -0
  153. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
  154. package/es/components/viewer3d/libs/mtl-loader.js +357 -0
  155. package/es/components/viewer3d/libs/obj-loader.js +462 -0
  156. package/es/components/viewer3d/libs/orbit-controls.js +699 -0
  157. package/es/components/viewer3d/libs/pointer-lock-controls.js +46 -0
  158. package/es/components/viewer3d/lrm.js +305 -0
  159. package/es/components/viewer3d/model.js +708 -0
  160. package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
  161. package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
  162. package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
  163. package/es/components/viewer3d/ruler-utils/ruler3D.js +227 -0
  164. package/es/components/viewer3d/ruler-utils/scene3D.js +60 -0
  165. package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
  166. package/es/components/viewer3d/scene-creator.js +3608 -0
  167. package/es/components/viewer3d/three-memory-cleaner.js +51 -0
  168. package/es/components/viewer3d/viewer3d-first-person.js +315 -0
  169. package/es/components/viewer3d/viewer3d.js +2527 -0
  170. package/es/constants.js +636 -0
  171. package/es/index.js +16 -0
  172. package/es/models.js +510 -0
  173. package/es/plugins/SVGLoader.js +1412 -0
  174. package/es/plugins/autosave.js +33 -0
  175. package/es/plugins/console-debugger.js +37 -0
  176. package/es/plugins/export.js +9 -0
  177. package/es/plugins/keyboard.js +101 -0
  178. package/es/reducers/areas-reducer.js +12 -0
  179. package/es/reducers/export.js +25 -0
  180. package/es/reducers/groups-reducer.js +38 -0
  181. package/es/reducers/holes-reducer.js +62 -0
  182. package/es/reducers/items-reducer.js +140 -0
  183. package/es/reducers/lines-reducer.js +45 -0
  184. package/es/reducers/project-reducer.js +129 -0
  185. package/es/reducers/reducer.js +19 -0
  186. package/es/reducers/scene-reducer.js +28 -0
  187. package/es/reducers/user-reducer.js +40 -0
  188. package/es/reducers/vertices-reducer.js +19 -0
  189. package/es/reducers/viewer2d-reducer.js +75 -0
  190. package/es/reducers/viewer3d-reducer.js +56 -0
  191. package/es/shared-style.js +66 -0
  192. package/es/styles/export.js +5 -0
  193. package/es/styles/tabs.css +40 -0
  194. package/es/translator/en.js +104 -0
  195. package/es/translator/it.js +79 -0
  196. package/es/translator/ru.js +79 -0
  197. package/es/translator/translator.js +84 -0
  198. package/es/utils/browser.js +33 -0
  199. package/es/utils/email-validator.js +4 -0
  200. package/es/utils/export.js +25 -0
  201. package/es/utils/geometry.js +2420 -0
  202. package/es/utils/get-edges-of-subgraphs.js +27 -0
  203. package/es/utils/graph-cycles.js +237 -0
  204. package/es/utils/graph-inner-cycles.js +46 -0
  205. package/es/utils/graph.js +150 -0
  206. package/es/utils/helper.js +268 -0
  207. package/es/utils/history.js +29 -0
  208. package/es/utils/id-broker.js +19 -0
  209. package/es/utils/logger.js +8 -0
  210. package/es/utils/math.js +50 -0
  211. package/es/utils/molding.js +871 -0
  212. package/es/utils/name-generator.js +18 -0
  213. package/es/utils/objects-utils.js +50 -0
  214. package/es/utils/phone-validator.js +4 -0
  215. package/es/utils/process-black-list.js +18 -0
  216. package/es/utils/react-if.js +18 -0
  217. package/es/utils/snap-scene.js +99 -0
  218. package/es/utils/snap.js +237 -0
  219. package/es/utils/summarizeCart.js +24 -0
  220. package/es/utils/threeCSG.es6.js +498 -0
  221. package/es/version.js +2 -0
  222. package/lib/catalog/properties/property-string.js +55 -0
  223. package/lib/catalog/properties/property-toggle.js +46 -0
  224. package/lib/catalog/properties/shared-property-style.js +20 -0
  225. package/lib/catalog/utils/FuseUtils.js +88 -0
  226. package/lib/catalog/utils/exporter.js +155 -0
  227. package/lib/catalog/utils/geom-utils.js +205 -0
  228. package/lib/catalog/utils/item-loader.js +1533 -0
  229. package/lib/catalog/utils/load-obj.js +99 -0
  230. package/lib/catalog/utils/mtl-loader.js +363 -0
  231. package/lib/catalog/utils/obj-loader.js +482 -0
  232. package/lib/class/FuseUtils.js +88 -0
  233. package/lib/class/area.js +150 -0
  234. package/lib/class/export.js +96 -0
  235. package/lib/class/group.js +445 -0
  236. package/lib/class/guide.js +67 -0
  237. package/lib/class/hole.js +934 -0
  238. package/lib/class/item.js +1889 -0
  239. package/lib/class/layer.js +672 -0
  240. package/lib/class/line.js +1186 -0
  241. package/lib/class/project.js +799 -0
  242. package/lib/class/vertex.js +207 -0
  243. package/lib/components/content.js +116 -0
  244. package/lib/components/disclaimer/disclaimer.js +105 -0
  245. package/lib/components/export.js +33 -0
  246. package/lib/components/style/button.js +120 -0
  247. package/lib/components/style/cancel-button.js +29 -0
  248. package/lib/components/style/content-container.js +40 -0
  249. package/lib/components/style/content-title.js +37 -0
  250. package/lib/components/style/delete-button.js +34 -0
  251. package/lib/components/style/export.js +121 -0
  252. package/lib/components/style/form-block.js +31 -0
  253. package/lib/components/style/form-color-input.js +34 -0
  254. package/lib/components/style/form-label.js +33 -0
  255. package/lib/components/style/form-number-input.js +220 -0
  256. package/lib/components/style/form-number-input_2.js +213 -0
  257. package/lib/components/style/form-select.js +75 -0
  258. package/lib/components/style/form-slider.js +68 -0
  259. package/lib/components/style/form-submit-button.js +35 -0
  260. package/lib/components/style/form-text-input.js +101 -0
  261. package/lib/components/viewer2d/area.js +88 -0
  262. package/lib/components/viewer2d/export.js +121 -0
  263. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +44 -0
  264. package/lib/components/viewer2d/grids/grid-streak.js +44 -0
  265. package/lib/components/viewer2d/grids/grid-vertical-streak.js +44 -0
  266. package/lib/components/viewer2d/grids/grids.js +44 -0
  267. package/lib/components/viewer2d/group.js +62 -0
  268. package/lib/components/viewer2d/item.js +521 -0
  269. package/lib/components/viewer2d/layer.js +171 -0
  270. package/lib/components/viewer2d/line.js +892 -0
  271. package/lib/components/viewer2d/ruler.js +107 -0
  272. package/lib/components/viewer2d/rulerDist.js +153 -0
  273. package/lib/components/viewer2d/rulerX.js +158 -0
  274. package/lib/components/viewer2d/rulerY.js +160 -0
  275. package/lib/components/viewer2d/scene.js +147 -0
  276. package/lib/components/viewer2d/snap.js +83 -0
  277. package/lib/components/viewer2d/state.js +87 -0
  278. package/lib/components/viewer2d/utils.js +210 -0
  279. package/lib/components/viewer2d/vertex.js +74 -0
  280. package/lib/components/viewer2d/viewer2d.js +1405 -0
  281. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +2597 -0
  282. package/lib/components/viewer3d/dcm.js +407 -0
  283. package/lib/components/viewer3d/fbm.js +420 -0
  284. package/lib/components/viewer3d/front3D.js +75 -0
  285. package/lib/components/viewer3d/grid-creator.js +34 -0
  286. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +44 -0
  287. package/lib/components/viewer3d/grids/grid-streak.js +35 -0
  288. package/lib/components/viewer3d/grids/grid-vertical-streak.js +44 -0
  289. package/lib/components/viewer3d/libs/first-person-controls.js +74 -0
  290. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +1287 -0
  291. package/lib/components/viewer3d/libs/mtl-loader.js +363 -0
  292. package/lib/components/viewer3d/libs/obj-loader.js +468 -0
  293. package/lib/components/viewer3d/libs/orbit-controls.js +705 -0
  294. package/lib/components/viewer3d/libs/pointer-lock-controls.js +52 -0
  295. package/lib/components/viewer3d/lrm.js +311 -0
  296. package/lib/components/viewer3d/model.js +714 -0
  297. package/lib/components/viewer3d/pointer-lock-navigation.js +122 -0
  298. package/lib/components/viewer3d/ruler-utils/itemRect.js +68 -0
  299. package/lib/components/viewer3d/ruler-utils/layer3D.js +502 -0
  300. package/lib/components/viewer3d/ruler-utils/ruler3D.js +234 -0
  301. package/lib/components/viewer3d/ruler-utils/scene3D.js +68 -0
  302. package/lib/components/viewer3d/ruler-utils/state3D.js +25 -0
  303. package/lib/components/viewer3d/scene-creator.js +3642 -0
  304. package/lib/components/viewer3d/three-memory-cleaner.js +60 -0
  305. package/lib/components/viewer3d/viewer3d-first-person.js +320 -0
  306. package/lib/components/viewer3d/viewer3d.js +2532 -0
  307. package/lib/constants.js +645 -0
  308. package/lib/index.js +96 -0
  309. package/lib/models.js +517 -0
  310. package/lib/plugins/SVGLoader.js +1417 -0
  311. package/lib/plugins/autosave.js +39 -0
  312. package/lib/plugins/console-debugger.js +44 -0
  313. package/lib/plugins/export.js +33 -0
  314. package/lib/plugins/keyboard.js +107 -0
  315. package/lib/reducers/areas-reducer.js +18 -0
  316. package/lib/reducers/export.js +97 -0
  317. package/lib/reducers/groups-reducer.js +44 -0
  318. package/lib/reducers/holes-reducer.js +68 -0
  319. package/lib/reducers/items-reducer.js +146 -0
  320. package/lib/reducers/lines-reducer.js +51 -0
  321. package/lib/reducers/project-reducer.js +135 -0
  322. package/lib/reducers/reducer.js +26 -0
  323. package/lib/reducers/scene-reducer.js +34 -0
  324. package/lib/reducers/user-reducer.js +46 -0
  325. package/lib/reducers/vertices-reducer.js +25 -0
  326. package/lib/reducers/viewer2d-reducer.js +82 -0
  327. package/lib/reducers/viewer3d-reducer.js +63 -0
  328. package/lib/shared-style.js +72 -0
  329. package/lib/styles/export.js +13 -0
  330. package/lib/translator/en.js +110 -0
  331. package/lib/translator/it.js +85 -0
  332. package/lib/translator/ru.js +85 -0
  333. package/lib/translator/translator.js +90 -0
  334. package/lib/utils/browser.js +40 -0
  335. package/lib/utils/email-validator.js +10 -0
  336. package/lib/utils/export.js +56 -0
  337. package/lib/utils/geometry.js +2516 -0
  338. package/lib/utils/get-edges-of-subgraphs.js +34 -0
  339. package/lib/utils/graph-cycles.js +240 -0
  340. package/lib/utils/graph-inner-cycles.js +54 -0
  341. package/lib/utils/graph.js +157 -0
  342. package/lib/utils/helper.js +291 -0
  343. package/lib/utils/history.js +36 -0
  344. package/lib/utils/id-broker.js +25 -0
  345. package/lib/utils/logger.js +14 -0
  346. package/lib/utils/math.js +57 -0
  347. package/lib/utils/molding.js +895 -0
  348. package/lib/utils/name-generator.js +23 -0
  349. package/lib/utils/objects-utils.js +60 -0
  350. package/lib/utils/phone-validator.js +10 -0
  351. package/lib/utils/process-black-list.js +24 -0
  352. package/lib/utils/react-if.js +24 -0
  353. package/lib/utils/snap-scene.js +105 -0
  354. package/lib/utils/snap.js +249 -0
  355. package/lib/utils/summarizeCart.js +30 -0
  356. package/lib/utils/threeCSG.es6.js +503 -0
  357. package/lib/version.js +8 -0
  358. package/package.json +3 -3
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
8
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
9
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
+ var FuseUtils = /*#__PURE__*/function () {
17
+ function FuseUtils() {
18
+ _classCallCheck(this, FuseUtils);
19
+ }
20
+ return _createClass(FuseUtils, null, [{
21
+ key: "filterArrayByString",
22
+ value: function filterArrayByString(mainArr, searchText) {
23
+ var _this = this;
24
+ if (searchText === '') {
25
+ return mainArr;
26
+ }
27
+ searchText = searchText.toLowerCase();
28
+ return mainArr.filter(function (itemObj) {
29
+ return _this.searchInObj(itemObj, searchText);
30
+ });
31
+ }
32
+ }, {
33
+ key: "searchInObj",
34
+ value: function searchInObj(itemObj, searchText) {
35
+ for (var prop in itemObj) {
36
+ if (!itemObj.hasOwnProperty(prop)) {
37
+ continue;
38
+ }
39
+ var value = itemObj[prop];
40
+ if (typeof value === 'string') {
41
+ if (this.searchInString(value, searchText)) {
42
+ return true;
43
+ }
44
+ } else if (Array.isArray(value)) {
45
+ if (this.searchInArray(value, searchText)) {
46
+ return true;
47
+ }
48
+ }
49
+ if (_typeof(value) === 'object') {
50
+ if (this.searchInObj(value, searchText)) {
51
+ return true;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }, {
57
+ key: "searchInArray",
58
+ value: function searchInArray(arr, searchText) {
59
+ var _iterator = _createForOfIteratorHelper(arr),
60
+ _step;
61
+ try {
62
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
63
+ var value = _step.value;
64
+ if (typeof value === 'string') {
65
+ if (this.searchInString(value, searchText)) {
66
+ return true;
67
+ }
68
+ }
69
+ if (_typeof(value) === 'object') {
70
+ if (this.searchInObj(value, searchText)) {
71
+ return true;
72
+ }
73
+ }
74
+ }
75
+ } catch (err) {
76
+ _iterator.e(err);
77
+ } finally {
78
+ _iterator.f();
79
+ }
80
+ }
81
+ }, {
82
+ key: "searchInString",
83
+ value: function searchInString(value, searchText) {
84
+ return value.toLowerCase().includes(searchText);
85
+ }
86
+ }]);
87
+ }();
88
+ var _default = exports["default"] = FuseUtils;
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = _default;
7
+ var _convertUnits = _interopRequireDefault(require("convert-units"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ function _default(_ref) {
16
+ var itemID = _ref.itemID,
17
+ type = _ref.type,
18
+ long_name = _ref.long_name,
19
+ name = _ref.name,
20
+ sizeinfo = _ref.sizeinfo,
21
+ description = _ref.description,
22
+ prototype = _ref.prototype,
23
+ base = _ref.base,
24
+ shape_svg = _ref.shape_svg,
25
+ render2DItem = _ref.render2DItem,
26
+ render3DItem = _ref.render3DItem,
27
+ structure_json = _ref.structure_json,
28
+ layoutpos = _ref.layoutpos,
29
+ is_corner = _ref.is_corner,
30
+ alti = _ref.alti,
31
+ obj_property = _ref.obj_property,
32
+ outlineSVGData = _ref.outlineSVGData;
33
+ var _length = alti || 0;
34
+ // const length = convert(_length).from("in").to("cm");
35
+ var length = _length;
36
+ var additional_props = [];
37
+ if (type === 'cabinet' && long_name.toLowerCase().includes('filler')) {
38
+ additional_props = {
39
+ width: {
40
+ label: 'Width',
41
+ type: 'length-measure',
42
+ defaultValue: {
43
+ _length: sizeinfo.width,
44
+ _unit: 'in',
45
+ length: (0, _convertUnits["default"])(sizeinfo.width).from('in').to('cm')
46
+ }
47
+ }
48
+ };
49
+ }
50
+ if (type === 'appliance' || type === 'furnishing' || type === 'cabinet' && long_name.toLowerCase().includes('panel')) {
51
+ additional_props = {
52
+ width: {
53
+ label: 'Width',
54
+ type: 'length-measure',
55
+ defaultValue: {
56
+ _length: sizeinfo.width,
57
+ _unit: 'in',
58
+ length: (0, _convertUnits["default"])(sizeinfo.width).from('in').to('cm')
59
+ }
60
+ },
61
+ depth: {
62
+ label: 'Depth',
63
+ type: 'length-measure',
64
+ defaultValue: {
65
+ _length: sizeinfo.depth,
66
+ _unit: 'in',
67
+ length: (0, _convertUnits["default"])(sizeinfo.depth).from('in').to('cm')
68
+ }
69
+ },
70
+ height: {
71
+ label: 'Height',
72
+ type: 'length-measure',
73
+ defaultValue: {
74
+ _length: sizeinfo.height,
75
+ _unit: 'in',
76
+ length: (0, _convertUnits["default"])(sizeinfo.height).from('in').to('cm')
77
+ }
78
+ }
79
+ };
80
+ }
81
+ var mode = null;
82
+ var retVal = {
83
+ itemID: itemID,
84
+ name: name,
85
+ prototype: prototype,
86
+ long_name: long_name,
87
+ type: type,
88
+ info: {
89
+ title: name,
90
+ outline: outlineSVGData,
91
+ tag: ['furnishing', 'electronics'],
92
+ description: description,
93
+ image: base,
94
+ door: obj_property.door_style,
95
+ doorcategory: obj_property.door_category,
96
+ has_single_door: obj_property.has_single_door,
97
+ sizeinfo: sizeinfo,
98
+ layoutpos: layoutpos,
99
+ is_corner: is_corner,
100
+ shape_svg: shape_svg
101
+ },
102
+ properties: _objectSpread(_objectSpread({
103
+ altitude: {
104
+ label: 'Distance from floor',
105
+ type: 'length-measure',
106
+ defaultValue: {
107
+ _length: _length,
108
+ _unit: 'in',
109
+ length: length
110
+ }
111
+ },
112
+ resize_and_scaling: {
113
+ label: 'Resize & Scaling',
114
+ id: 'resize_and_scaling',
115
+ description: 'Add preferred dimensions.',
116
+ type: 'checkbox',
117
+ defaultValue: false,
118
+ values: {
119
+ none: false,
120
+ yes: true
121
+ }
122
+ }
123
+ }, additional_props), {}, {
124
+ flip_doorhandle: {
125
+ label: 'Flip Door Handle',
126
+ description: 'Viewable in 3D mode.',
127
+ type: 'checkbox',
128
+ defaultValue: false,
129
+ values: {
130
+ none: false,
131
+ yes: true
132
+ }
133
+ },
134
+ open_doors: {
135
+ label: 'Open doors',
136
+ description: 'Viewable in 3D mode.',
137
+ type: 'checkbox',
138
+ defaultValue: false,
139
+ values: {
140
+ none: false,
141
+ yes: true
142
+ }
143
+ }
144
+ }),
145
+ img: base,
146
+ obj: obj_property,
147
+ render2D: function render2D(element, layer, scene) {
148
+ return render2DItem.call(this, element, layer, scene, sizeinfo, layoutpos, is_corner, shape_svg);
149
+ },
150
+ render3D: function render3D(element, layer, scene, mode) {
151
+ return render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner, mode);
152
+ }
153
+ };
154
+ return retVal;
155
+ }
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.addShape = addShape;
8
+ exports.baseBox3FromObject = baseBox3FromObject;
9
+ exports.baseBoxHelper = baseBoxHelper;
10
+ exports.controlGeom = controlGeom;
11
+ exports.createRotShape = createRotShape;
12
+ exports.emptyBoxHolder = emptyBoxHolder;
13
+ exports.makeMBoxfromObject = makeMBoxfromObject;
14
+ exports.rotGeoms = rotGeoms;
15
+ exports.upwardsGeom = upwardsGeom;
16
+ var Three = _interopRequireWildcard(require("three"));
17
+ var _constants = require("../../constants");
18
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
+ function controlGeom() {
20
+ var vertices = new Float32Array([0, 0.02, 0.55, -0.08, 0, 0.5, -0.05, 0, 0.5, -0.05, 0, -0.5, -0.08, 0, -0.5, 0, 0.02, -0.55, 0.08, 0, -0.5, 0.05, 0, -0.5, 0.05, 0, 0.5, 0.08, 0, 0.5, 0, 0.02, 0.55, -0.08, 0.04, 0.5, -0.05, 0.04, 0.5, -0.05, 0.04, -0.5, -0.08, 0.04, -0.5, 0, 0.02, -0.55, 0.08, 0.04, -0.5, 0.05, 0.04, -0.5, 0.05, 0.04, 0.5, 0.08, 0.04, 0.5, 0, 0.02, 0.55]);
21
+ var indices = new Uint16Array([0, 1, 9, 4, 5, 6, 2, 3, 8, 3, 7, 8, 10, 11, 19, 14, 15, 16, 12, 13, 18, 13, 17, 18, 10, 1, 11, 10, 9, 19, 1, 2, 11, 2, 12, 11, 8, 9, 18, 9, 18, 19, 12, 2, 3, 12, 3, 13, 17, 7, 8, 17, 8, 18, 5, 4, 14, 15, 6, 16]);
22
+ var geometry = new Three.BufferGeometry();
23
+ geometry.setAttribute('position', new Three.BufferAttribute(vertices, 3));
24
+ geometry.setIndex(new Three.BufferAttribute(indices, 1));
25
+ return geometry;
26
+ }
27
+ function upwardsGeom() {
28
+ var vertices = new Float32Array([0.05, 0, 0.05, 0.05, 0.3, 0.05, 0.07, 0.3, 0.05, 0, 0.4, 0.05, -0.07, 0.3, 0.05, -0.05, 0.3, 0.05, -0.05, 0, 0.05, 0.05, 0, 0.05, 0.05, 0, -0.05, 0.05, 0.3, -0.05, 0.07, 0.3, -0.05, 0, 0.4, -0.05, -0.07, 0.3, -0.05, -0.05, 0.3, -0.05, -0.05, 0, -0.05, 0.05, 0, -0.05]);
29
+ var indices = new Uint16Array([0, 1, 5, 0, 5, 6, 2, 3, 4, 0, 1, 8, 1, 8, 9, 1, 2, 9, 2, 9, 10, 2, 3, 10, 3, 10, 11, 3, 4, 11, 4, 11, 12, 4, 5, 12, 4, 12, 13, 5, 6, 13, 6, 13, 14, 6, 7, 14, 7, 14, 15, 8, 9, 13, 8, 13, 14, 10, 11, 12]);
30
+ var geometry = new Three.BufferGeometry();
31
+ geometry.setAttribute('position', new Three.BufferAttribute(vertices, 3));
32
+ geometry.setIndex(new Three.BufferAttribute(indices, 1));
33
+ return geometry;
34
+ }
35
+ function createRotShape(radius) {
36
+ var rotShape = new Three.Shape();
37
+ rotShape.moveTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
38
+ for (var i = -55; i <= 60; i += 5) {
39
+ rotShape.lineTo(Math.cos(i / 180 * Math.PI) * (radius - 0.05), Math.sin(i / 180 * Math.PI) * (radius - 0.05));
40
+ }
41
+ for (var _i = 60; _i >= -60; _i -= 5) {
42
+ if (_i === 5) {
43
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
44
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
45
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05) + 0.1);
46
+ continue;
47
+ } else if (_i === 0) {
48
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.25, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
49
+ continue;
50
+ } else if (_i === -5) {
51
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05) - 0.1);
52
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
53
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
54
+ continue;
55
+ }
56
+ rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
57
+ }
58
+ rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius + 0.1), Math.sin(-60 / 180 * Math.PI) * (radius + 0.1));
59
+ rotShape.lineTo(Math.cos(-70 / 180 * Math.PI) * (radius + 0.0), Math.sin(-70 / 180 * Math.PI) * (radius + 0.0));
60
+ rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.1), Math.sin(-60 / 180 * Math.PI) * (radius - 0.1));
61
+ rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
62
+ return rotShape;
63
+ }
64
+ function rotGeoms(radius) {
65
+ if (!Number.isFinite(radius)) radius = 1;
66
+ var rotShape = createRotShape(radius);
67
+ var rotFill = new Three.ShapeGeometry(rotShape);
68
+ var rotStroke = new Three.BufferGeometry().setFromPoints(rotShape.getPoints());
69
+ rotFill.rotateX(Math.PI / 2);
70
+ rotStroke.rotateX(Math.PI / 2);
71
+ return {
72
+ rotFill: rotFill,
73
+ rotStroke: rotStroke
74
+ };
75
+ }
76
+ function addShape(shape, extrudeSettings, color, x, y, z, rx, ry, rz, s) {
77
+ // flat shape
78
+ var geometry = geometry = new Three.ExtrudeGeometry(shape, extrudeSettings);
79
+ var mesh = new Three.Mesh(geometry, new Three.MeshPhongMaterial({
80
+ color: color,
81
+ side: Three.DoubleSide
82
+ }));
83
+ mesh.position.set(x, y, z);
84
+ mesh.rotation.set(rx, ry, rz);
85
+ mesh.scale.set(s, s, s);
86
+ return mesh;
87
+ }
88
+ function makeMBoxfromObject(props_Object) {
89
+ var _props_Object$childre;
90
+ var mBoxColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0x99c3fb;
91
+ if (!props_Object) {
92
+ console.warn('makeMBoxfromObject: props_Object is null or undefined');
93
+ return null;
94
+ }
95
+
96
+ // safe resolve of object (skip wrapper Group)
97
+ var object = props_Object;
98
+ if (props_Object.children && ((_props_Object$childre = props_Object.children[0]) === null || _props_Object$childre === void 0 ? void 0 : _props_Object$childre.type) === 'Group') {
99
+ object = props_Object.children[0];
100
+ }
101
+ if (!object) {
102
+ console.warn('makeMBoxfromObject: object is null after resolving children');
103
+ return null;
104
+ }
105
+ var _object = object,
106
+ scale = _object.scale,
107
+ position = _object.position,
108
+ userData = _object.userData;
109
+ if (!scale) {
110
+ console.warn('makeMBoxfromObject: object.scale is missing');
111
+ return null;
112
+ }
113
+ if (!position) {
114
+ console.warn('makeMBoxfromObject: object.position is missing');
115
+ return null;
116
+ }
117
+ if (!userData) {
118
+ console.warn('makeMBoxfromObject: object.userData is missing');
119
+ return null;
120
+ }
121
+ if (!userData.max || !userData.min) {
122
+ console.warn('makeMBoxfromObject: userData.max or userData.min is missing');
123
+ return null;
124
+ }
125
+ var scaleVec = new Three.Vector3(scale.x, scale.y, scale.z);
126
+ var posVec = new Three.Vector3(position.x, position.y, position.z);
127
+ var uVec = new Three.Vector3(-posVec.x / scaleVec.x, -posVec.y / scaleVec.y, -posVec.z / scaleVec.z);
128
+ var max = userData.max,
129
+ min = userData.min;
130
+ var moveBox = new Three.BoxGeometry(max.x - min.x, max.y - min.y, max.z - min.z);
131
+ var mBox = new Three.Mesh(moveBox, new Three.MeshBasicMaterial({
132
+ color: mBoxColor,
133
+ side: Three.DoubleSide,
134
+ transparent: true,
135
+ opacity: 0.4
136
+ }));
137
+ mBox.name = 'TransformBox';
138
+ mBox.translateOnAxis(new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z), 1);
139
+ mBox.scale.set(1.1, 1.1, 1.1);
140
+ mBox.translateY(posVec.y);
141
+ mBox.renderOrder = 1;
142
+ mBox.visible = mBoxColor !== 0x99c3fb;
143
+ return mBox;
144
+ }
145
+
146
+ // export function rotMesh(radius) {
147
+ // let rotShape = rotShape(radius);
148
+
149
+ // let rotGeom = new Three.ShapeBufferGeometry(rotShape);
150
+
151
+ // const points = rotShape.getPoints();
152
+ // const spacedPoints = shape.getSpacedPoints( 50 );
153
+
154
+ // const geometryPoints = new THREE.BufferGeometry().setFromPoints( points );
155
+ // const geometrySpacedPoints = new THREE.BufferGeometry().setFromPoints( spacedPoints );
156
+
157
+ // // solid line
158
+
159
+ // let line = new THREE.Line( geometryPoints, new THREE.LineBasicMaterial( { color: color } ) );
160
+ // line.position.set( x, y, z - 25 );
161
+ // line.rotation.set( rx, ry, rz );
162
+ // line.scale.set( s, s, s );
163
+ // group.add( line );
164
+
165
+ // }
166
+
167
+ function baseBoxHelper(object, color) {
168
+ var tempobj = [];
169
+ for (var j = object.children.length - 1; j >= 0; j--) {
170
+ if (object.children[j].type !== _constants.OBJTYPE_MESH) {
171
+ tempobj.push(object.children[j]);
172
+ object.remove(object.children[j]);
173
+ }
174
+ }
175
+ var boxHelper = new Three.BoxHelper(object, color);
176
+ tempobj.forEach(function (v) {
177
+ object.add(v);
178
+ });
179
+ return boxHelper;
180
+ }
181
+ function baseBox3FromObject(object) {
182
+ var tempobj = [];
183
+ for (var j = object.children.length - 1; j >= 0; j--) {
184
+ if (object.children[j].type !== _constants.OBJTYPE_MESH || object.children[j].name.includes('_countertop')) {
185
+ tempobj.push(object.children[j]);
186
+ object.remove(object.children[j]);
187
+ }
188
+ }
189
+ var box3 = new Three.Box3().setFromObject(object);
190
+ tempobj.forEach(function (v) {
191
+ object.add(v);
192
+ });
193
+ return box3;
194
+ }
195
+ function emptyBoxHolder(newWidth, newHeight, newDepth) {
196
+ var scale = 2.54 / 100;
197
+ var geometry = new Three.BoxGeometry(newWidth * scale, newHeight * scale, newDepth * scale);
198
+ var material = new Three.MeshBasicMaterial({
199
+ color: 0x00ff00,
200
+ opacity: 0.2,
201
+ transparent: true
202
+ });
203
+ var cube = new Three.Mesh(geometry, material);
204
+ return cube;
205
+ }