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,414 @@
1
+ export default [{
2
+ x: 6.513524830609185e-9,
3
+ y: 0,
4
+ z: 1.19209286886246e-9
5
+ }, {
6
+ x: -2.9929081435398075e-10,
7
+ y: 0.11430007964372635,
8
+ z: 1.5497207073167374e-8
9
+ }, {
10
+ x: -2.9929081435398075e-10,
11
+ y: 0.11430007964372635,
12
+ z: 1.5497207073167374e-8
13
+ }, {
14
+ x: 6.513524830609185e-9,
15
+ y: 0,
16
+ z: 1.19209286886246e-9
17
+ }, {
18
+ x: -2.9929081435398075e-10,
19
+ y: 0.11430007964372635,
20
+ z: -0.011996750719845295
21
+ }, {
22
+ x: -2.9929081435398075e-10,
23
+ y: 0.11430007964372635,
24
+ z: -0.011996750719845295
25
+ }, {
26
+ x: -2.857603875749959e-10,
27
+ y: 0.11407307535409927,
28
+ z: -0.014381852000951767
29
+ }, {
30
+ x: -2.857603875749959e-10,
31
+ y: 0.11407307535409927,
32
+ z: -0.014381852000951767
33
+ }, {
34
+ x: -2.6880001002815845e-10,
35
+ y: 0.11378852277994156,
36
+ z: -0.01577681116759777
37
+ }, {
38
+ x: -2.6880001002815845e-10,
39
+ y: 0.11378852277994156,
40
+ z: -0.01577681116759777
41
+ }, {
42
+ x: -2.3992810516126895e-10,
43
+ y: 0.11330413818359375,
44
+ z: -0.016878647729754448
45
+ }, {
46
+ x: -2.3992810516126895e-10,
47
+ y: 0.11330413818359375,
48
+ z: -0.016878647729754448
49
+ }, {
50
+ x: -1.9096546566288453e-10,
51
+ y: 0.11248268187046051,
52
+ z: -0.017795395106077194
53
+ }, {
54
+ x: -1.9096546566288453e-10,
55
+ y: 0.11248268187046051,
56
+ z: -0.017795395106077194
57
+ }, {
58
+ x: -1.3194607906275024e-10,
59
+ y: 0.11149249970912933,
60
+ z: -0.018403001129627228
61
+ }, {
62
+ x: -1.3194607906275024e-10,
63
+ y: 0.11149249970912933,
64
+ z: -0.018403001129627228
65
+ }, {
66
+ x: -6.697859628035374e-11,
67
+ y: 0.11040252447128296,
68
+ z: -0.01870192028582096
69
+ }, {
70
+ x: -6.697859628035374e-11,
71
+ y: 0.11040252447128296,
72
+ z: -0.01870192028582096
73
+ }, {
74
+ x: -1.7337242481495901e-13,
75
+ y: 0.10928171873092651,
76
+ z: -0.018692459911108017
77
+ }, {
78
+ x: -1.7337242481495901e-13,
79
+ y: 0.10928171873092651,
80
+ z: -0.018692459911108017
81
+ }, {
82
+ x: 6.436266797305024e-11,
83
+ y: 0.10819898545742035,
84
+ z: -0.018374618142843246
85
+ }, {
86
+ x: 6.436266797305024e-11,
87
+ y: 0.10819898545742035,
88
+ z: -0.018374618142843246
89
+ }, {
90
+ x: 1.2252029946147047e-10,
91
+ y: 0.1072232574224472,
92
+ z: -0.017748551443219185
93
+ }, {
94
+ x: 1.2252029946147047e-10,
95
+ y: 0.1072232574224472,
96
+ z: -0.017748551443219185
97
+ }, {
98
+ x: 1.7019147202645968e-10,
99
+ y: 0.10642346739768982,
100
+ z: -0.016814865171909332
101
+ }, {
102
+ x: 1.7019147202645968e-10,
103
+ y: 0.10642346739768982,
104
+ z: -0.016814865171909332
105
+ }, {
106
+ x: 1.960347578711108e-10,
107
+ y: 0.10598989576101303,
108
+ z: -0.015734391286969185
109
+ }, {
110
+ x: 1.960347578711108e-10,
111
+ y: 0.10598989576101303,
112
+ z: -0.015734391286969185
113
+ }, {
114
+ x: 2.1125515226039226e-10,
115
+ y: 0.10573453456163406,
116
+ z: -0.01397657860070467
117
+ }, {
118
+ x: 2.1125515226039226e-10,
119
+ y: 0.10573453456163406,
120
+ z: -0.01397657860070467
121
+ }, {
122
+ x: 2.1715663989230194e-10,
123
+ y: 0.10563552379608154,
124
+ z: -0.011996750719845295
125
+ }, {
126
+ x: 2.1715663989230194e-10,
127
+ y: 0.10563552379608154,
128
+ z: -0.011996750719845295
129
+ }, {
130
+ x: 3.628213007811354e-10,
131
+ y: 0.10319168120622635,
132
+ z: -0.011996750719845295
133
+ }, {
134
+ x: 3.628213007811354e-10,
135
+ y: 0.10319168120622635,
136
+ z: -0.011996750719845295
137
+ }, {
138
+ x: 3.628213007811354e-10,
139
+ y: 0.10319168120622635,
140
+ z: -0.016662126407027245
141
+ }, {
142
+ x: 3.628213007811354e-10,
143
+ y: 0.10319168120622635,
144
+ z: -0.016662126407027245
145
+ }, {
146
+ x: 3.6975278394635325e-10,
147
+ y: 0.10307538509368896,
148
+ z: -0.017714371904730797
149
+ }, {
150
+ x: 3.6975278394635325e-10,
151
+ y: 0.10307538509368896,
152
+ z: -0.017714371904730797
153
+ }, {
154
+ x: 3.89493381991457e-10,
155
+ y: 0.1027441918849945,
156
+ z: -0.01863997057080269
157
+ }, {
158
+ x: 3.89493381991457e-10,
159
+ y: 0.1027441918849945,
160
+ z: -0.01863997057080269
161
+ }, {
162
+ x: 4.204628034631952e-10,
163
+ y: 0.10222461819648743,
164
+ z: -0.01945677399635315
165
+ }, {
166
+ x: 4.204628034631952e-10,
167
+ y: 0.10222461819648743,
168
+ z: -0.01945677399635315
169
+ }, {
170
+ x: 4.610791193293551e-10,
171
+ y: 0.10154318809509277,
172
+ z: -0.020138230174779892
173
+ }, {
174
+ x: 4.610791193293551e-10,
175
+ y: 0.10154318809509277,
176
+ z: -0.020138230174779892
177
+ }, {
178
+ x: 5.097632316264367e-10,
179
+ y: 0.1007264032959938,
180
+ z: -0.020657790824770927
181
+ }, {
182
+ x: 5.097632316264367e-10,
183
+ y: 0.1007264032959938,
184
+ z: -0.020657790824770927
185
+ }, {
186
+ x: 5.649337664337395e-10,
187
+ y: 0.09980079531669617,
188
+ z: -0.020989060401916504
189
+ }, {
190
+ x: 5.649337664337395e-10,
191
+ y: 0.09980079531669617,
192
+ z: -0.020989060401916504
193
+ }, {
194
+ x: 6.250098771864998e-10,
195
+ y: 0.09879288822412491,
196
+ z: -0.021105332300066948
197
+ }, {
198
+ x: 6.250098771864998e-10,
199
+ y: 0.09879288822412491,
200
+ z: -0.021105332300066948
201
+ }, {
202
+ x: 1.7002150798361981e-9,
203
+ y: 0.08075393736362457,
204
+ z: -0.021105334162712097
205
+ }, {
206
+ x: 1.7002150798361981e-9,
207
+ y: 0.08075393736362457,
208
+ z: -0.021105334162712097
209
+ }, {
210
+ x: 1.714297481747451e-9,
211
+ y: 0.08051767200231552,
212
+ z: -0.018116597086191177
213
+ }, {
214
+ x: 1.714297481747451e-9,
215
+ y: 0.08051767200231552,
216
+ z: -0.018116597086191177
217
+ }, {
218
+ x: 1.7745017677484043e-9,
219
+ y: 0.07950761169195175,
220
+ z: -0.017054280266165733
221
+ }, {
222
+ x: 1.7745017677484043e-9,
223
+ y: 0.07950761169195175,
224
+ z: -0.017054280266165733
225
+ }, {
226
+ x: 1.8525417866399607e-9,
227
+ y: 0.07819831371307373,
228
+ z: -0.016856525093317032
229
+ }, {
230
+ x: 1.8525417866399607e-9,
231
+ y: 0.07819831371307373,
232
+ z: -0.016856525093317032
233
+ }, {
234
+ x: 1.924275405684739e-9,
235
+ y: 0.07699482887983322,
236
+ z: -0.017449786886572838
237
+ }, {
238
+ x: 1.924275405684739e-9,
239
+ y: 0.07699482887983322,
240
+ z: -0.017449786886572838
241
+ }, {
242
+ x: 1.953144312949462e-9,
243
+ y: 0.0765104815363884,
244
+ z: -0.01833067648112774
245
+ }, {
246
+ x: 1.953144312949462e-9,
247
+ y: 0.0765104815363884,
248
+ z: -0.01833067648112774
249
+ }, {
250
+ x: 1.965059892583554e-9,
251
+ y: 0.07631057500839233,
252
+ z: -0.021105336025357246
253
+ }, {
254
+ x: 1.965059892583554e-9,
255
+ y: 0.07631057500839233,
256
+ z: -0.021105336025357246
257
+ }, {
258
+ x: 2.4947495180782653e-9,
259
+ y: 0.06742385774850845,
260
+ z: -0.021105336025357246
261
+ }, {
262
+ x: 2.4947495180782653e-9,
263
+ y: 0.06742385774850845,
264
+ z: -0.021105336025357246
265
+ }, {
266
+ x: 2.503704132905682e-9,
267
+ y: 0.06727362424135208,
268
+ z: -0.018105152994394302
269
+ }, {
270
+ x: 2.503704132905682e-9,
271
+ y: 0.06727362424135208,
272
+ z: -0.018105152994394302
273
+ }, {
274
+ x: 2.571708179743837e-9,
275
+ y: 0.06613270938396454,
276
+ z: -0.016959065571427345
277
+ }, {
278
+ x: 2.571708179743837e-9,
279
+ y: 0.06613270938396454,
280
+ z: -0.016959065571427345
281
+ }, {
282
+ x: 2.6591682189547328e-9,
283
+ y: 0.06466536968946457,
284
+ z: -0.016765890643000603
285
+ }, {
286
+ x: 2.6591682189547328e-9,
287
+ y: 0.06466536968946457,
288
+ z: -0.016765890643000603
289
+ }, {
290
+ x: 2.7385753664788126e-9,
291
+ y: 0.06333313882350922,
292
+ z: -0.017454519867897034
293
+ }, {
294
+ x: 2.7385753664788126e-9,
295
+ y: 0.06333313882350922,
296
+ z: -0.017454519867897034
297
+ }, {
298
+ x: 2.767359896793664e-9,
299
+ y: 0.0628502145409584,
300
+ z: -0.018239127472043037
301
+ }, {
302
+ x: 2.767359896793664e-9,
303
+ y: 0.0628502145409584,
304
+ z: -0.018239127472043037
305
+ }, {
306
+ x: 2.77283662697414e-9,
307
+ y: 0.06275832653045654,
308
+ z: -0.021105336025357246
309
+ }, {
310
+ x: 2.77283662697414e-9,
311
+ y: 0.06275832653045654,
312
+ z: -0.021105336025357246
313
+ }, {
314
+ x: 6.513524830609185e-9,
315
+ y: 0,
316
+ z: -0.021105345338582993
317
+ }, {
318
+ x: 6.513524830609185e-9,
319
+ y: 0,
320
+ z: -0.021105345338582993
321
+ }, {
322
+ x: 6.513524830609185e-9,
323
+ y: 0,
324
+ z: 1.19209286886246e-9
325
+ }, {
326
+ x: -2.9929081435398075e-10,
327
+ y: 0.11430007964372635,
328
+ z: -0.011996750719845295
329
+ }, {
330
+ x: -2.9929081435398075e-10,
331
+ y: 0.11430007964372635,
332
+ z: 1.5497207073167374e-8
333
+ }, {
334
+ x: 1.965059892583554e-9,
335
+ y: 0.07631057500839233,
336
+ z: -0.021105336025357246
337
+ }, {
338
+ x: 2.503704132905682e-9,
339
+ y: 0.06727362424135208,
340
+ z: -0.018105152994394302
341
+ }
342
+ // ,{x: 2.4947495180782653e-9, y: 0.06742385774850845, z: -0.021105336025357246}
343
+ // ,{x: 1.953144312949462e-9, y: 0.0765104815363884, z: -0.01833067648112774}
344
+ // ,{x: 6.250098771864998e-10, y: 0.09879288822412491, z: -0.021105332300066948}
345
+ // ,{x: 1.714297481747451e-9, y: 0.08051767200231552, z: -0.018116597086191177}
346
+ // ,{x: 1.7002150798361981e-9, y: 0.08075393736362457, z: -0.021105334162712097}
347
+ // ,{x: 2.7385753664788126e-9, y: 0.06333313882350922, z: -0.017454519867897034}
348
+ // ,{x: 1.924275405684739e-9, y: 0.07699482887983322, z: -0.017449786886572838}
349
+ // ,{x: 2.571708179743837e-9, y: 0.06613270938396454, z: -0.016959065571427345}
350
+ // ,{x: 2.6591682189547328e-9, y: 0.06466536968946457, z: -0.016765890643000603}
351
+ // ,{x: 1.7745017677484043e-9, y: 0.07950761169195175, z: -0.017054280266165733}
352
+ // ,{x: 1.8525417866399607e-9, y: 0.07819831371307373, z: -0.016856525093317032}
353
+ // ,{x: 1.2252029946147047e-10, y: 0.1072232574224472, z: -0.017748551443219185}
354
+ // ,{x: 1.960347578711108e-10, y: 0.10598989576101303, z: -0.015734391286969185}
355
+ // ,{x: 1.7019147202645968e-10, y: 0.10642346739768982, z: -0.016814865171909332}
356
+ // ,{x: 6.436266797305024e-11, y: 0.10819898545742035, z: -0.018374618142843246}
357
+ // ,{x: -1.7337242481495901e-13, y: 0.10928171873092651, z: -0.018692459911108017}
358
+ // ,{x: -6.697859628035374e-11, y: 0.11040252447128296, z: -0.01870192028582096}
359
+ // ,{x: -1.3194607906275024e-10, y: 0.11149249970912933, z: -0.018403001129627228}
360
+ // ,{x: -1.9096546566288453e-10, y: 0.11248268187046051, z: -0.017795395106077194}
361
+ // ,{x: -2.3992810516126895e-10, y: 0.11330413818359375, z: -0.016878647729754448}
362
+ // ,{x: -2.6880001002815845e-10, y: 0.11378852277994156, z: -0.01577681116759777}
363
+ // ,{x: 2.1125515226039226e-10, y: 0.10573453456163406, z: -0.01397657860070467}
364
+ // ,{x: -2.857603875749959e-10, y: 0.11407307535409927, z: -0.014381852000951767}
365
+ // ,{x: 2.1715663989230194e-10, y: 0.10563552379608154, z: -0.011996750719845295}
366
+ // ,{x: 3.628213007811354e-10, y: 0.10319168120622635, z: -0.011996750719845295}
367
+ // ,{x: 3.628213007811354e-10, y: 0.10319168120622635, z: -0.016662126407027245}
368
+ // ,{x: 3.6975278394635325e-10, y: 0.10307538509368896, z: -0.017714371904730797}
369
+ // ,{x: 5.649337664337395e-10, y: 0.09980079531669617, z: -0.020989060401916504}
370
+ // ,{x: 5.097632316264367e-10, y: 0.1007264032959938, z: -0.020657790824770927}
371
+ // ,{x: 3.89493381991457e-10, y: 0.1027441918849945, z: -0.01863997057080269}
372
+ // ,{x: 4.204628034631952e-10, y: 0.10222461819648743, z: -0.01945677399635315}
373
+ // ,{x: 4.610791193293551e-10, y: 0.10154318809509277, z: -0.020138230174779892}
374
+ // ,{x: 2.77283662697414e-9, y: 0.06275832653045654, z: -0.021105336025357246}
375
+ // ,{x: 6.513524830609185e-9, y: 0, z: -0.021105345338582993}
376
+ // ,{x: 6.513524830609185e-9, y: 0, z: 1.19209286886246e-9}
377
+ // ,{x: 2.767359896793664e-9, y: 0.0628502145409584, z: -0.018239127472043037}
378
+ // ,{x: -2.9929081435398075e-10, y: 0.11430007964372635, z: 1.5497207073167374e-8}
379
+ // ,{x: -2.9929081435398075e-10, y: 0.11430007964372635, z: -0.011996750719845295}
380
+ // ,{x: 1.965059892583554e-9, y: 0.07631057500839233, z: -0.021105336025357246}
381
+ // ,{x: 2.4947495180782653e-9, y: 0.06742385774850845, z: -0.021105336025357246}
382
+ // ,{x: 2.503704132905682e-9, y: 0.06727362424135208, z: -0.018105152994394302}
383
+ // ,{x: 1.953144312949462e-9, y: 0.0765104815363884, z: -0.01833067648112774}
384
+ // ,{x: 6.250098771864998e-10, y: 0.09879288822412491, z: -0.021105332300066948}
385
+ // ,{x: 1.7002150798361981e-9, y: 0.08075393736362457, z: -0.021105334162712097}
386
+ // ,{x: 1.714297481747451e-9, y: 0.08051767200231552, z: -0.018116597086191177}
387
+ // ,{x: 2.7385753664788126e-9, y: 0.06333313882350922, z: -0.017454519867897034}
388
+ // ,{x: 1.924275405684739e-9, y: 0.07699482887983322, z: -0.017449786886572838}
389
+ // ,{x: 2.571708179743837e-9, y: 0.06613270938396454, z: -0.016959065571427345}
390
+ // ,{x: 2.6591682189547328e-9, y: 0.06466536968946457, z: -0.016765890643000603}
391
+ // ,{x: 1.7745017677484043e-9, y: 0.07950761169195175, z: -0.017054280266165733}
392
+ // ,{x: 1.8525417866399607e-9, y: 0.07819831371307373, z: -0.016856525093317032}
393
+ // ,{x: 1.2252029946147047e-10, y: 0.1072232574224472, z: -0.017748551443219185}
394
+ // ,{x: 1.7019147202645968e-10, y: 0.10642346739768982, z: -0.016814865171909332}
395
+ // ,{x: 1.960347578711108e-10, y: 0.10598989576101303, z: -0.015734391286969185}
396
+ // ,{x: 6.436266797305024e-11, y: 0.10819898545742035, z: -0.018374618142843246}
397
+ // ,{x: -1.7337242481495901e-13, y: 0.10928171873092651, z: -0.018692459911108017}
398
+ // ,{x: -6.697859628035374e-11, y: 0.11040252447128296, z: -0.01870192028582096}
399
+ // ,{x: -1.3194607906275024e-10, y: 0.11149249970912933, z: -0.018403001129627228}
400
+ // ,{x: -1.9096546566288453e-10, y: 0.11248268187046051, z: -0.017795395106077194}
401
+ // ,{x: -2.3992810516126895e-10, y: 0.11330413818359375, z: -0.016878647729754448}
402
+ // ,{x: -2.6880001002815845e-10, y: 0.11378852277994156, z: -0.01577681116759777}
403
+ // ,{x: 2.1125515226039226e-10, y: 0.10573453456163406, z: -0.01397657860070467}
404
+ // ,{x: -2.857603875749959e-10, y: 0.11407307535409927, z: -0.014381852000951767}
405
+ // ,{x: 2.1715663989230194e-10, y: 0.10563552379608154, z: -0.011996750719845295}
406
+ // ,{x: 3.628213007811354e-10, y: 0.10319168120622635, z: -0.011996750719845295}
407
+ // ,{x: 3.628213007811354e-10, y: 0.10319168120622635, z: -0.016662126407027245}
408
+ // ,{x: 3.6975278394635325e-10, y: 0.10307538509368896, z: -0.017714371904730797}
409
+ // ,{x: 5.649337664337395e-10, y: 0.09980079531669617, z: -0.020989060401916504}
410
+ // ,{x: 5.097632316264367e-10, y: 0.1007264032959938, z: -0.020657790824770927}
411
+ // ,{x: 3.89493381991457e-10, y: 0.1027441918849945, z: -0.01863997057080269}
412
+ // ,{x: 4.204628034631952e-10, y: 0.10222461819648743, z: -0.01945677399635315}
413
+ // ,{x: 4.610791193293551e-10, y: 0.10154318809509277, z: -0.020138230174779892}
414
+ ];
@@ -0,0 +1,66 @@
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ 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; } }
4
+ 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; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
+ import React, { useState, useEffect } from 'react';
8
+ import Viewer3D from "./viewer3d";
9
+ import State3D from "./ruler-utils/state3D";
10
+ var k = 0;
11
+ export default function Front3D(_ref, _ref2) {
12
+ var width = _ref.width,
13
+ height = _ref.height,
14
+ state = _ref.state,
15
+ setToolbar = _ref.setToolbar,
16
+ replaceCabinet = _ref.replaceCabinet,
17
+ keyDownEnable = _ref.keyDownEnable,
18
+ catalog = _ref.catalog;
19
+ var viewer2DActions = _ref2.viewer2DActions;
20
+ var _useState = useState(''),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ mode = _useState2[0],
23
+ setMode = _useState2[1];
24
+ var sceneWidth = width;
25
+ var sceneHeight = height;
26
+ if (mode !== state.get('mode')) {
27
+ k++;
28
+ setMode(state.get('mode'));
29
+ }
30
+ var mouseUpEvent = function mouseUpEvent(event) {
31
+ setToolbar('');
32
+ };
33
+ useEffect(function () {
34
+ document.getElementById('front').addEventListener('mouseup', mouseUpEvent);
35
+ return function () {
36
+ document.getElementById('front').removeEventListener('mouseup', mouseUpEvent);
37
+ };
38
+ }, []);
39
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("svg", {
40
+ width: sceneWidth,
41
+ height: sceneHeight,
42
+ id: "front",
43
+ style: {
44
+ position: 'absolute',
45
+ display: 'block'
46
+ }
47
+ }, /*#__PURE__*/React.createElement("g", {
48
+ transform: "translate(".concat(width / 2, ", ").concat(height / 2, ")")
49
+ }, /*#__PURE__*/React.createElement(State3D, {
50
+ state: state,
51
+ catalog: catalog,
52
+ height: sceneHeight,
53
+ width: sceneWidth,
54
+ downloadFlag: false
55
+ }))), /*#__PURE__*/React.createElement(Viewer3D, {
56
+ id: "viewer3D",
57
+ key: k,
58
+ state: state,
59
+ width: width,
60
+ height: height,
61
+ setToolbar: setToolbar,
62
+ replaceCabinet: replaceCabinet,
63
+ keyDownEnable: keyDownEnable,
64
+ downloadFlag: false
65
+ }));
66
+ }
@@ -0,0 +1,25 @@
1
+ import * as Three from 'three';
2
+ import { HELVETIKER } from "./libs/helvetiker_regular.typeface.js";
3
+ import gridStreak from "./grids/grid-streak";
4
+ import { FontLoader } from 'three/examples/jsm/loaders/FontLoader.js';
5
+ export default function createGrid(scene) {
6
+ var gridMesh = new Three.Object3D();
7
+ gridMesh.name = 'grid';
8
+ var fontLoader = new FontLoader();
9
+ var font = fontLoader.parse(HELVETIKER); // For measures
10
+ var grids = scene.grids,
11
+ width = scene.width,
12
+ height = scene.height;
13
+ grids.forEach(function (grid) {
14
+ switch (grid.type) {
15
+ case 'horizontal-streak':
16
+ gridMesh.add(gridStreak(width, height, grid, font));
17
+ break;
18
+ default:
19
+ break;
20
+ }
21
+ });
22
+
23
+ // gridMesh.position.y = -1;
24
+ return gridMesh;
25
+ }
@@ -0,0 +1,36 @@
1
+ import * as Three from 'three';
2
+ import { List } from 'immutable';
3
+ import { COLORS } from "../../../shared-style";
4
+ export default function (width, height, grid, font) {
5
+ var step = grid.properties.get('step');
6
+ var colors = grid.properties.has('color') ? new List([grid.properties.get('color')]) : grid.properties.get('colors');
7
+ var streak = new Three.Object3D();
8
+ streak.name = 'streak';
9
+ var counter = 0;
10
+ for (var i = 0; i <= height; i += step) {
11
+ var geometry = new Three.Geometry();
12
+ geometry.vertices.push(new Three.Vector3(0, 0, -i));
13
+ geometry.vertices.push(new Three.Vector3(width, 0, -i));
14
+ var color = colors.get(counter % colors.size);
15
+ var material = new Three.LineBasicMaterial({
16
+ color: color
17
+ });
18
+ if (counter % 5 == 0) {
19
+ var shape = new Three.TextGeometry('' + counter * step, {
20
+ size: 16,
21
+ height: 1,
22
+ font: font
23
+ });
24
+ var wrapper = new Three.MeshBasicMaterial({
25
+ color: COLORS.black
26
+ });
27
+ var words = new Three.Mesh(shape, wrapper);
28
+ words.rotation.x -= Math.PI / 2;
29
+ words.position.set(-90, 0, -i);
30
+ // streak.add(words);
31
+ }
32
+ streak.add(new Three.LineSegments(geometry, material));
33
+ counter++;
34
+ }
35
+ return streak;
36
+ }
@@ -0,0 +1,27 @@
1
+ import * as Three from 'three';
2
+ import { List } from 'immutable';
3
+ import { COLORS } from "../../../shared-style";
4
+ export default function (width, height, grid, font) {
5
+ var step = grid.properties.get('step');
6
+ var colors = grid.properties.has('color') ? new List([grid.properties.get('color')]) : grid.properties.get('colors');
7
+ var streak = new Three.Object3D();
8
+ streak.name = 'streak';
9
+ var counter = 0;
10
+ for (var i = 0; i <= height; i += step) {
11
+ for (var j = 0; j <= width; j += step) {
12
+ var geometry = new Three.BufferGeometry();
13
+ geometry.setAttribute('position', new Three.BufferAttribute(new Float32Array([0, 0, -i, width, 0, -i]), 3));
14
+ var color = colors.get(counter % colors.size);
15
+ var material = new Three.LineBasicMaterial({
16
+ color: color
17
+ });
18
+ var circlegeometry = new Three.CircleGeometry(3, 32); // 3D dot's radius
19
+ var circle = new Three.Mesh(circlegeometry, material);
20
+ circle.rotation.x -= Math.PI / 2;
21
+ circle.position.set(j, -0.5, -i);
22
+ streak.add(circle);
23
+ counter++;
24
+ }
25
+ }
26
+ return streak;
27
+ }
@@ -0,0 +1,36 @@
1
+ import * as Three from 'three';
2
+ import { List } from 'immutable';
3
+ import { COLORS } from "../../../shared-style";
4
+ export default function (width, height, grid, font) {
5
+ var step = grid.properties.get('step');
6
+ var colors = grid.properties.has('color') ? new List([grid.properties.get('color')]) : grid.properties.get('colors');
7
+ var streak = new Three.Object3D();
8
+ streak.name = 'streak';
9
+ var counter = 0;
10
+ for (var i = 0; i <= width; i += step) {
11
+ var geometry = new Three.Geometry();
12
+ geometry.vertices.push(new Three.Vector3(i, 0, 0));
13
+ geometry.vertices.push(new Three.Vector3(i, 0, -height));
14
+ var color = colors.get(counter % colors.size);
15
+ var material = new Three.LineBasicMaterial({
16
+ color: color
17
+ });
18
+ if (counter % 5 == 0) {
19
+ var shape = new Three.TextGeometry('' + counter * step, {
20
+ size: 16,
21
+ height: 1,
22
+ font: font
23
+ });
24
+ var wrapper = new Three.MeshBasicMaterial({
25
+ color: COLORS.black
26
+ });
27
+ var words = new Three.Mesh(shape, wrapper);
28
+ words.rotation.x -= Math.PI / 2;
29
+ words.position.set(i - 20, 0, 50);
30
+ // streak.add(words);
31
+ }
32
+ streak.add(new Three.LineSegments(geometry, material));
33
+ counter++;
34
+ }
35
+ return streak;
36
+ }
@@ -0,0 +1,67 @@
1
+ export function firstPersonOnKeyDown(event, moveForward, moveLeft, moveBackward, moveRight, canJump, velocity) {
2
+ switch (event.keyCode) {
3
+ case 38: // up
4
+ case 87:
5
+ // w
6
+ moveForward = true;
7
+ break;
8
+ case 37: // left
9
+ case 65:
10
+ // a
11
+ moveLeft = true;
12
+ break;
13
+ case 40: // down
14
+ case 83:
15
+ // s
16
+ moveBackward = true;
17
+ break;
18
+ case 39: // right
19
+ case 68:
20
+ // d
21
+ moveRight = true;
22
+ break;
23
+ case 32:
24
+ // space
25
+ if (canJump === true) velocity.y += 225;
26
+ canJump = false;
27
+ break;
28
+ }
29
+ return {
30
+ moveForward: moveForward,
31
+ moveLeft: moveLeft,
32
+ moveBackward: moveBackward,
33
+ moveRight: moveRight,
34
+ canJump: canJump
35
+ };
36
+ }
37
+ export function firstPersonOnKeyUp(event, moveForward, moveLeft, moveBackward, moveRight, canJump) {
38
+ switch (event.keyCode) {
39
+ case 38: // up
40
+ case 87:
41
+ // w
42
+ moveForward = false;
43
+ break;
44
+ case 37: // left
45
+ case 65:
46
+ // a
47
+ moveLeft = false;
48
+ break;
49
+ case 40: // down
50
+ case 83:
51
+ // s
52
+ moveBackward = false;
53
+ break;
54
+ case 39: // right
55
+ case 68:
56
+ // d
57
+ moveRight = false;
58
+ break;
59
+ }
60
+ return {
61
+ moveForward: moveForward,
62
+ moveLeft: moveLeft,
63
+ moveBackward: moveBackward,
64
+ moveRight: moveRight,
65
+ canJump: canJump
66
+ };
67
+ }