kitchen-simulator 5.10.2-react.18 → 5.10.4-react.18
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.
- package/es/@history.js +2 -0
- package/es/AppContext.js +6 -0
- package/es/LiteKitchenConfigurator.js +474 -0
- package/es/LiteRenderer.js +363 -0
- package/es/WorkSpace.js +851 -0
- package/es/actions/area-actions.js +14 -0
- package/es/actions/export.js +23 -0
- package/es/actions/groups-actions.js +89 -0
- package/es/actions/holes-actions.js +119 -0
- package/es/actions/items-actions.js +316 -0
- package/es/actions/lines-actions.js +83 -0
- package/es/actions/project-actions.js +298 -0
- package/es/actions/scene-actions.js +33 -0
- package/es/actions/vertices-actions.js +27 -0
- package/es/actions/viewer2d-actions.js +58 -0
- package/es/actions/viewer3d-actions.js +23 -0
- package/es/assets/brown_photostudio_02_1k.hdr +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
- package/es/assets/fonts/style.css +177 -0
- package/es/assets/gltf/door_closet.bin +0 -0
- package/es/assets/gltf/door_closet.fbx +0 -0
- package/es/assets/gltf/door_closet.gltf +1 -0
- package/es/assets/gltf/door_exterior.bin +0 -0
- package/es/assets/gltf/door_exterior.fbx +0 -0
- package/es/assets/gltf/door_exterior.gltf +1 -0
- package/es/assets/gltf/door_interior.bin +0 -0
- package/es/assets/gltf/door_interior.fbx +0 -0
- package/es/assets/gltf/door_interior.gltf +1 -0
- package/es/assets/gltf/door_sliding.bin +0 -0
- package/es/assets/gltf/door_sliding.fbx +0 -0
- package/es/assets/gltf/door_sliding.gltf +1 -0
- package/es/assets/gltf/doorway_framed.bin +0 -0
- package/es/assets/gltf/doorway_framed.fbx +0 -0
- package/es/assets/gltf/doorway_framed.gltf +1 -0
- package/es/assets/gltf/window_clear.bin +0 -0
- package/es/assets/gltf/window_clear.fbx +0 -0
- package/es/assets/gltf/window_clear.gltf +1 -0
- package/es/assets/gltf/window_cross.bin +0 -0
- package/es/assets/gltf/window_cross.fbx +0 -0
- package/es/assets/gltf/window_cross.gltf +1 -0
- package/es/assets/gltf/window_double_hung.bin +0 -0
- package/es/assets/gltf/window_double_hung.fbx +0 -0
- package/es/assets/gltf/window_double_hung.gltf +1 -0
- package/es/assets/gltf/window_vertical.bin +0 -0
- package/es/assets/gltf/window_vertical.fbx +0 -0
- package/es/assets/gltf/window_vertical.gltf +1 -0
- package/es/assets/img/TKC_thumbnail.png +0 -0
- package/es/assets/img/Toggle.png +0 -0
- package/es/assets/img/loading/loading.gif +0 -0
- package/es/assets/img/loading/loading_1.svg +11 -0
- package/es/assets/img/loading_large.gif +0 -0
- package/es/assets/img/png/door/closet.png +0 -0
- package/es/assets/img/png/door/doorwaysframed.png +0 -0
- package/es/assets/img/png/door/doorwaysframeles.png +0 -0
- package/es/assets/img/png/door/doorwaysframeless.png +0 -0
- package/es/assets/img/png/door/exterior.png +0 -0
- package/es/assets/img/png/door/interior.png +0 -0
- package/es/assets/img/png/door/sliding.png +0 -0
- package/es/assets/img/png/helper/outcome.png +0 -0
- package/es/assets/img/png/helper/video_preview_3d.png +0 -0
- package/es/assets/img/png/helper/video_preview_start.png +0 -0
- package/es/assets/img/project_img.png +0 -0
- package/es/assets/img/rta/rta_logo_box_blue.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
- package/es/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_lightblue.png +0 -0
- package/es/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
- package/es/assets/img/rta/rta_logo_box_maroon.png +0 -0
- package/es/assets/img/rta/rta_logo_box_white.png +0 -0
- package/es/assets/img/rta_menu.png +0 -0
- package/es/assets/img/step2.jpg +0 -0
- package/es/assets/img/step3.jpg +0 -0
- package/es/assets/img/step4.jpg +0 -0
- package/es/assets/img/step5.jpg +0 -0
- package/es/assets/img/step6.jpg +0 -0
- package/es/assets/img/step7.jpg +0 -0
- package/es/assets/img/step8.jpg +0 -0
- package/es/assets/img/svg/2d_delete_object.svg +33 -0
- package/es/assets/img/svg/2d_delete_object1.svg +33 -0
- package/es/assets/img/svg/2d_lock_object.svg +33 -0
- package/es/assets/img/svg/3d_item_move.svg +106 -0
- package/es/assets/img/svg/3d_item_rotation.svg +76 -0
- package/es/assets/img/svg/3d_item_warning_edit.svg +77 -0
- package/es/assets/img/svg/3d_item_warning_info.svg +81 -0
- package/es/assets/img/svg/accessories.svg +4 -0
- package/es/assets/img/svg/angle_icon.svg +39 -0
- package/es/assets/img/svg/blank_div.svg +14 -0
- package/es/assets/img/svg/bottombar/2d3d_button.svg +3 -0
- package/es/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
- package/es/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
- package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
- package/es/assets/img/svg/bottombar/arrow-down.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-left.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-minus.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-plus.svg +11 -0
- package/es/assets/img/svg/bottombar/arrow-right.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-up.svg +3 -0
- package/es/assets/img/svg/bottombar/collapse.svg +3 -0
- package/es/assets/img/svg/bottombar/elevation-back.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-front.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-left.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-right.svg +7 -0
- package/es/assets/img/svg/bottombar/elevation.svg +13 -0
- package/es/assets/img/svg/bottombar/expand.svg +3 -0
- package/es/assets/img/svg/bottombar/help.svg +72 -0
- package/es/assets/img/svg/bottombar/incm_toggle.svg +39 -0
- package/es/assets/img/svg/bottombar/pan_1.svg +57 -0
- package/es/assets/img/svg/bottombar/pan_2.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_3.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_4.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_5.svg +27 -0
- package/es/assets/img/svg/bottombar/settings.svg +23 -0
- package/es/assets/img/svg/bottombar/spin-down.svg +76 -0
- package/es/assets/img/svg/bottombar/spin-left.svg +75 -0
- package/es/assets/img/svg/bottombar/spin-right.svg +75 -0
- package/es/assets/img/svg/bottombar/spin-up.svg +76 -0
- package/es/assets/img/svg/bottombar/spin_1.svg +48 -0
- package/es/assets/img/svg/bottombar/spin_2.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_3.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_4.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_5.svg +31 -0
- package/es/assets/img/svg/bottombar/zoomin.svg +29 -0
- package/es/assets/img/svg/bottombar/zoomout.svg +26 -0
- package/es/assets/img/svg/check.svg +10 -0
- package/es/assets/img/svg/close.svg +11 -0
- package/es/assets/img/svg/color/Black.svg +3 -0
- package/es/assets/img/svg/color/Blue.svg +3 -0
- package/es/assets/img/svg/color/Brown.svg +9 -0
- package/es/assets/img/svg/color/Cream.svg +3 -0
- package/es/assets/img/svg/color/Dark.svg +9 -0
- package/es/assets/img/svg/color/Gray.svg +3 -0
- package/es/assets/img/svg/color/Green.svg +3 -0
- package/es/assets/img/svg/color/Light.svg +9 -0
- package/es/assets/img/svg/color/Medium.svg +9 -0
- package/es/assets/img/svg/color/Unfinished.svg +9 -0
- package/es/assets/img/svg/color/White.svg +3 -0
- package/es/assets/img/svg/color/White.svg.bak +3 -0
- package/es/assets/img/svg/color/stone2.jpg +0 -0
- package/es/assets/img/svg/color/wood2.jpg +0 -0
- package/es/assets/img/svg/copy.svg +11 -0
- package/es/assets/img/svg/delete.svg +3 -0
- package/es/assets/img/svg/detail.svg +77 -0
- package/es/assets/img/svg/disclaimer/background.svg +758 -0
- package/es/assets/img/svg/disclaimer/logo-dots.svg +11 -0
- package/es/assets/img/svg/door/Closet.svg +11 -0
- package/es/assets/img/svg/door/Exterior.svg +5 -0
- package/es/assets/img/svg/door/Framed_dorway.svg +5 -0
- package/es/assets/img/svg/door/Frameless_dorway.svg +5 -0
- package/es/assets/img/svg/door/Interior.svg +7 -0
- package/es/assets/img/svg/door/Sliding.svg +5 -0
- package/es/assets/img/svg/doors_closet.svg +47 -0
- package/es/assets/img/svg/doors_exterior.svg +25 -0
- package/es/assets/img/svg/doors_interior.svg +29 -0
- package/es/assets/img/svg/doors_patio.svg +26 -0
- package/es/assets/img/svg/duplicate.svg +11 -0
- package/es/assets/img/svg/duplicate_object_left.svg +32 -0
- package/es/assets/img/svg/duplicate_object_right.svg +32 -0
- package/es/assets/img/svg/filtersActive.svg +19 -0
- package/es/assets/img/svg/firstsetting/L.svg +3 -0
- package/es/assets/img/svg/firstsetting/L2.svg +3 -0
- package/es/assets/img/svg/firstsetting/Open.svg +3 -0
- package/es/assets/img/svg/firstsetting/Square.svg +3 -0
- package/es/assets/img/svg/firstsetting/bar-active.svg +9 -0
- package/es/assets/img/svg/firstsetting/bar-normal.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-current.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-done.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
- package/es/assets/img/svg/firstsetting/check-active.svg +3 -0
- package/es/assets/img/svg/firstsetting/check-normal.svg +3 -0
- package/es/assets/img/svg/firstsetting/pencil.svg +11 -0
- package/es/assets/img/svg/green_checkmark.svg +27 -0
- package/es/assets/img/svg/headerbar/assist.svg +3 -0
- package/es/assets/img/svg/headerbar/cart.svg +3 -0
- package/es/assets/img/svg/headerbar/check.svg +10 -0
- package/es/assets/img/svg/headerbar/consult_designer.svg +45 -0
- package/es/assets/img/svg/headerbar/edit_name.svg +26 -0
- package/es/assets/img/svg/headerbar/file-dollar.svg +13 -0
- package/es/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
- package/es/assets/img/svg/headerbar/plus.svg +11 -0
- package/es/assets/img/svg/headerbar/review_quote.svg +44 -0
- package/es/assets/img/svg/headerbar/ruler-measure.svg +11 -0
- package/es/assets/img/svg/headerbar/save.svg +3 -0
- package/es/assets/img/svg/headerbar/setting.svg +75 -0
- package/es/assets/img/svg/help/check.svg +10 -0
- package/es/assets/img/svg/help/search.svg +76 -0
- package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
- package/es/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
- package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
- package/es/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
- package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
- package/es/assets/img/svg/intro/3-retrieve-project.svg +18 -0
- package/es/assets/img/svg/invert.svg +127 -0
- package/es/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/appliance.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
- package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
- package/es/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
- package/es/assets/img/svg/lefttoolbar/door-style.svg +20 -0
- package/es/assets/img/svg/lefttoolbar/door.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
- package/es/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/finishing.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
- package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
- package/es/assets/img/svg/lefttoolbar/search.svg +76 -0
- package/es/assets/img/svg/lefttoolbar/view_more.svg +86 -0
- package/es/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
- package/es/assets/img/svg/lefttoolbar/window.svg +12 -0
- package/es/assets/img/svg/logo.svg +11 -0
- package/es/assets/img/svg/logo_with_text.svg +25 -0
- package/es/assets/img/svg/menubar/login.svg +84 -0
- package/es/assets/img/svg/menubar/my_projects.svg +85 -0
- package/es/assets/img/svg/menubar/new_project.svg +110 -0
- package/es/assets/img/svg/menubar/save_project.svg +84 -0
- package/es/assets/img/svg/options.svg +3 -0
- package/es/assets/img/svg/positioning.svg +3 -0
- package/es/assets/img/svg/rotate.png +0 -0
- package/es/assets/img/svg/rotate.svg +17 -0
- package/es/assets/img/svg/rotate_object_clockwise.svg +26 -0
- package/es/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
- package/es/assets/img/svg/toggleFilters.svg +19 -0
- package/es/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
- package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
- package/es/assets/img/svg/toolbar/add_button.svg +36 -0
- package/es/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
- package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
- package/es/assets/img/svg/toolbar/add_items_doors.svg +25 -0
- package/es/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
- package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
- package/es/assets/img/svg/toolbar/add_items_windows.svg +28 -0
- package/es/assets/img/svg/toolbar/apply_button.svg +38 -0
- package/es/assets/img/svg/toolbar/arrow-plus.svg +11 -0
- package/es/assets/img/svg/toolbar/backsplash.svg +8 -0
- package/es/assets/img/svg/toolbar/cancel_button.svg +37 -0
- package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
- package/es/assets/img/svg/toolbar/countertop.svg +7 -0
- package/es/assets/img/svg/toolbar/dcm.png +0 -0
- package/es/assets/img/svg/toolbar/dcm_off.svg +12 -0
- package/es/assets/img/svg/toolbar/dcm_on.svg +474 -0
- package/es/assets/img/svg/toolbar/delete_button.svg +37 -0
- package/es/assets/img/svg/toolbar/download.svg +77 -0
- package/es/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
- package/es/assets/img/svg/toolbar/edit_button.svg +75 -0
- package/es/assets/img/svg/toolbar/email_quote_button.svg +44 -0
- package/es/assets/img/svg/toolbar/fbm.png +0 -0
- package/es/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
- package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
- package/es/assets/img/svg/toolbar/floorstyle.svg +9 -0
- package/es/assets/img/svg/toolbar/fmb.png +0 -0
- package/es/assets/img/svg/toolbar/fmb_off.svg +12 -0
- package/es/assets/img/svg/toolbar/fmb_on.svg +489 -0
- package/es/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
- package/es/assets/img/svg/toolbar/get_started_button.svg +41 -0
- package/es/assets/img/svg/toolbar/handles.svg +5 -0
- package/es/assets/img/svg/toolbar/lighting.svg +7 -0
- package/es/assets/img/svg/toolbar/lrm.png +0 -0
- package/es/assets/img/svg/toolbar/lrm_off.svg +12 -0
- package/es/assets/img/svg/toolbar/lrm_on.svg +470 -0
- package/es/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
- package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
- package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
- package/es/assets/img/svg/toolbar/redo_button.svg +75 -0
- package/es/assets/img/svg/toolbar/redo_button1.svg +75 -0
- package/es/assets/img/svg/toolbar/review_quote_active.svg +14 -0
- package/es/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
- package/es/assets/img/svg/toolbar/save_project_button.svg +44 -0
- package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
- package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
- package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -0
- package/es/assets/img/svg/toolbar/style_change_button.svg +47 -0
- package/es/assets/img/svg/toolbar/take_picture.svg +75 -0
- package/es/assets/img/svg/toolbar/undo_button.svg +76 -0
- package/es/assets/img/svg/toolbar/undo_button1.svg +76 -0
- package/es/assets/img/svg/toolbar/use_button.svg +37 -0
- package/es/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
- package/es/assets/img/svg/topbar/edit_active.svg +10 -0
- package/es/assets/img/svg/topbar/edit_inactive.svg +10 -0
- package/es/assets/img/svg/topbar/redo_active.svg +42 -0
- package/es/assets/img/svg/topbar/redo_inactive.svg +23 -0
- package/es/assets/img/svg/topbar/select_all_active.svg +50 -0
- package/es/assets/img/svg/topbar/select_all_inactive.svg +32 -0
- package/es/assets/img/svg/topbar/take_picture_active.svg +51 -0
- package/es/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
- package/es/assets/img/svg/topbar/undo_active.svg +42 -0
- package/es/assets/img/svg/topbar/undo_inactive.svg +23 -0
- package/es/assets/img/svg/warning_info_2d.svg +81 -0
- package/es/assets/img/svg/window/Clear.svg +3 -0
- package/es/assets/img/svg/window/Cross.svg +5 -0
- package/es/assets/img/svg/window/Double_hung.svg +4 -0
- package/es/assets/img/svg/window/Vertical.svg +4 -0
- package/es/assets/img/svg/windows_clear.svg +23 -0
- package/es/assets/img/svg/windows_cross.svg +28 -0
- package/es/assets/img/svg/windows_double_hung.svg +24 -0
- package/es/assets/img/svg/windows_vertical.svg +24 -0
- package/es/assets/img/svg/wizardstep/Custom.svg +3 -0
- package/es/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
- package/es/assets/img/svg/wizardstep/L.svg +3 -0
- package/es/assets/img/svg/wizardstep/L2.svg +3 -0
- package/es/assets/img/svg/wizardstep/Open.svg +3 -0
- package/es/assets/img/svg/wizardstep/Square.svg +3 -0
- package/es/assets/img/svg/wizardstep/bar-active.svg +9 -0
- package/es/assets/img/svg/wizardstep/bar-normal.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-current.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-done.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
- package/es/assets/img/svg/wizardstep/check-active.svg +3 -0
- package/es/assets/img/svg/wizardstep/check-normal.svg +3 -0
- package/es/assets/img/svg/wizardstep/detail_view.svg +87 -0
- package/es/assets/img/svg/wizardstep/pencil.svg +11 -0
- package/es/assets/img/svg/wizardstep/tile_view.svg +95 -0
- package/es/assets/img/texture/glass.jpg +0 -0
- package/es/assets/img/texture/steel.jpg +0 -0
- package/es/assets/img/texture/white1px.jpg +0 -0
- package/es/assets/img/texture/wood.jpg +0 -0
- package/es/assets/model/DCM.bin +0 -0
- package/es/assets/model/DCM.fbx +0 -0
- package/es/assets/model/DCM.gltf +1 -0
- package/es/assets/model/FBM.bin +0 -0
- package/es/assets/model/FBM.fbx +0 -0
- package/es/assets/model/FBM.gltf +1 -0
- package/es/assets/model/LRM.bin +0 -0
- package/es/assets/model/LRM.fbx +0 -0
- package/es/assets/model/LRM.gltf +1 -0
- package/es/assets/rtastore_logo.png +0 -0
- package/es/catalog/areas/area/planner-element.js +45 -0
- package/es/catalog/back.png +0 -0
- package/es/catalog/catalog.js +265 -0
- package/es/catalog/doors.png +0 -0
- package/es/catalog/doorways.png +0 -0
- package/es/catalog/envMap/nx.hdr +0 -0
- package/es/catalog/envMap/ny.hdr +0 -0
- package/es/catalog/envMap/nz.hdr +0 -0
- package/es/catalog/envMap/px.hdr +0 -0
- package/es/catalog/envMap/py.hdr +0 -0
- package/es/catalog/envMap/pz.hdr +0 -0
- package/es/catalog/export.js +0 -0
- package/es/catalog/factories/area-factory-3d.js +182 -0
- package/es/catalog/factories/area-factory.js +78 -0
- package/es/catalog/factories/export.js +7 -0
- package/es/catalog/factories/wall-factory-3d.js +202 -0
- package/es/catalog/factories/wall-factory.js +267 -0
- package/es/catalog/holes/door-closet/planner-element.js +222 -0
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-double/planner-element.js +315 -0
- package/es/catalog/holes/door-exterior/planner-element.js +215 -0
- package/es/catalog/holes/door-interior/planner-element.js +227 -0
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic/planner-element.js +503 -0
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
- package/es/catalog/holes/door-sliding/planner-element.js +225 -0
- package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
- package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
- package/es/catalog/holes/export.js +13 -0
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/planner-element.js +166 -0
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/planner-element.js +165 -0
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/planner-element.js +276 -0
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/lines/wall/planner-element.js +79 -0
- package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/es/catalog/molding/molding-dcm/planner-element.js +26 -0
- package/es/catalog/molding/molding-dcm/texture.png +0 -0
- package/es/catalog/molding/molding-fbm/planner-element.js +26 -0
- package/es/catalog/molding/molding-fbm/texture.png +0 -0
- package/es/catalog/molding/molding-lrm/planner-element.js +26 -0
- package/es/catalog/molding/molding-lrm/texture.png +0 -0
- package/es/catalog/properties/export.js +21 -0
- package/es/catalog/properties/property-checkbox.js +68 -0
- package/es/catalog/properties/property-color.js +39 -0
- package/es/catalog/properties/property-enum.js +50 -0
- package/es/catalog/properties/property-hidden.js +19 -0
- package/es/catalog/properties/property-lenght-measure.js +96 -0
- package/es/catalog/properties/property-length-measure.js +80 -0
- package/es/catalog/properties/property-length-measure_hole.js +96 -0
- package/es/catalog/properties/property-number.js +48 -0
- package/es/catalog/properties/property-read-only.js +26 -0
- package/es/catalog/properties/property-string.js +48 -0
- package/es/catalog/properties/property-toggle.js +39 -0
- package/es/catalog/properties/shared-property-style.js +14 -0
- package/es/catalog/utils/FuseUtils.js +79 -0
- package/es/catalog/utils/exporter.js +161 -0
- package/es/catalog/utils/geom-utils.js +189 -0
- package/es/catalog/utils/item-loader.js +1602 -0
- package/es/catalog/utils/load-obj.js +91 -0
- package/es/catalog/utils/mtl-loader.js +357 -0
- package/es/catalog/utils/obj-loader.js +476 -0
- package/es/catalog/windows.png +0 -0
- package/es/class/FuseUtils.js +79 -0
- package/es/class/area.js +141 -0
- package/es/class/export.js +24 -0
- package/es/class/group.js +431 -0
- package/es/class/guide.js +58 -0
- package/es/class/hole.js +924 -0
- package/es/class/item.js +1884 -0
- package/es/class/layer.js +663 -0
- package/es/class/line.js +1229 -0
- package/es/class/project.js +937 -0
- package/es/class/vertex.js +198 -0
- package/es/components/content.js +135 -0
- package/es/components/export.js +9 -0
- package/es/components/style/button.js +106 -0
- package/es/components/style/cancel-button.js +21 -0
- package/es/components/style/content-container.js +30 -0
- package/es/components/style/content-title.js +25 -0
- package/es/components/style/delete-button.js +24 -0
- package/es/components/style/export.js +31 -0
- package/es/components/style/form-block.js +20 -0
- package/es/components/style/form-color-input.js +26 -0
- package/es/components/style/form-label.js +22 -0
- package/es/components/style/form-number-input.js +192 -0
- package/es/components/style/form-number-input_2.js +238 -0
- package/es/components/style/form-select.js +19 -0
- package/es/components/style/form-slider.js +60 -0
- package/es/components/style/form-submit-button.js +25 -0
- package/es/components/style/form-text-input.js +69 -0
- package/es/components/viewer2d/area.js +81 -0
- package/es/components/viewer2d/export.js +31 -0
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +36 -0
- package/es/components/viewer2d/grids/grid-streak.js +36 -0
- package/es/components/viewer2d/grids/grid-vertical-streak.js +36 -0
- package/es/components/viewer2d/grids/grids.js +30 -0
- package/es/components/viewer2d/group.js +48 -0
- package/es/components/viewer2d/item.js +243 -0
- package/es/components/viewer2d/layer.js +164 -0
- package/es/components/viewer2d/line.js +997 -0
- package/es/components/viewer2d/ruler.js +84 -0
- package/es/components/viewer2d/rulerDist.js +102 -0
- package/es/components/viewer2d/rulerX.js +142 -0
- package/es/components/viewer2d/rulerY.js +144 -0
- package/es/components/viewer2d/scene.js +108 -0
- package/es/components/viewer2d/snap.js +74 -0
- package/es/components/viewer2d/state.js +73 -0
- package/es/components/viewer2d/utils.js +193 -0
- package/es/components/viewer2d/vertex.js +66 -0
- package/es/components/viewer2d/viewer2d.js +1405 -0
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2585 -0
- package/es/components/viewer3d/dcm.js +401 -0
- package/es/components/viewer3d/fbm.js +414 -0
- package/es/components/viewer3d/front3D.js +62 -0
- package/es/components/viewer3d/grid-creator.js +25 -0
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
- package/es/components/viewer3d/grids/grid-streak.js +27 -0
- package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
- package/es/components/viewer3d/libs/first-person-controls.js +67 -0
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
- package/es/components/viewer3d/libs/mtl-loader.js +357 -0
- package/es/components/viewer3d/libs/obj-loader.js +462 -0
- package/es/components/viewer3d/libs/orbit-controls.js +697 -0
- package/es/components/viewer3d/libs/pointer-lock-controls.js +44 -0
- package/es/components/viewer3d/lrm.js +305 -0
- package/es/components/viewer3d/model.js +708 -0
- package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
- package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
- package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
- package/es/components/viewer3d/ruler-utils/ruler3D.js +224 -0
- package/es/components/viewer3d/ruler-utils/scene3D.js +59 -0
- package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
- package/es/components/viewer3d/scene-creator.js +3818 -0
- package/es/components/viewer3d/three-memory-cleaner.js +51 -0
- package/es/components/viewer3d/viewer3d-first-person.js +311 -0
- package/es/components/viewer3d/viewer3d.js +2654 -0
- package/es/constants.js +769 -0
- package/es/index.html.ejs +264 -0
- package/es/index.js +627 -3
- package/es/models.js +512 -0
- package/es/plugins/SVGLoader.js +1414 -0
- package/es/plugins/console-debugger.js +34 -0
- package/es/plugins/export.js +7 -0
- package/es/plugins/keyboard.js +110 -0
- package/es/reducers/areas-reducer.js +12 -0
- package/es/reducers/export.js +25 -0
- package/es/reducers/groups-reducer.js +38 -0
- package/es/reducers/holes-reducer.js +62 -0
- package/es/reducers/items-reducer.js +143 -0
- package/es/reducers/lines-reducer.js +45 -0
- package/es/reducers/project-reducer.js +136 -0
- package/es/reducers/reducer.js +19 -0
- package/es/reducers/scene-reducer.js +28 -0
- package/es/reducers/user-reducer.js +41 -0
- package/es/reducers/vertices-reducer.js +19 -0
- package/es/reducers/viewer2d-reducer.js +77 -0
- package/es/reducers/viewer3d-reducer.js +58 -0
- package/es/shared-style.js +66 -0
- package/es/translator/en.js +104 -0
- package/es/translator/it.js +79 -0
- package/es/translator/ru.js +79 -0
- package/es/translator/translator.js +80 -0
- package/es/utils/browser.js +33 -0
- package/es/utils/convert-units-lite.js +29 -0
- package/es/utils/email-validator.js +4 -0
- package/es/utils/export.js +25 -0
- package/es/utils/geometry.js +2609 -0
- package/es/utils/get-edges-of-subgraphs.js +26 -0
- package/es/utils/graph-cycles.js +238 -0
- package/es/utils/graph-inner-cycles.js +46 -0
- package/es/utils/graph.js +145 -0
- package/es/utils/helper.js +436 -0
- package/es/utils/history.js +29 -0
- package/es/utils/id-broker.js +15 -0
- package/es/utils/isolate-event-handler.js +1622 -0
- package/es/utils/logger.js +8 -0
- package/es/utils/math.js +50 -0
- package/es/utils/molding.js +1347 -0
- package/es/utils/name-generator.js +17 -0
- package/es/utils/objects-utils.js +50 -0
- package/es/utils/phone-validator.js +4 -0
- package/es/utils/process-black-list.js +15 -0
- package/es/utils/react-if.js +18 -0
- package/es/utils/ruler.js +58 -0
- package/es/utils/snap-scene.js +94 -0
- package/es/utils/snap.js +231 -0
- package/es/utils/summarizeCart.js +24 -0
- package/es/utils/threeCSG.es6.js +494 -0
- package/es/version.js +1 -0
- package/package.json +3 -4
- package/es/index.js.LICENSE.txt +0 -45
- package/es/index.js.map +0 -1
- /package/es/{e8e5de0892f5375460bd.jpg → catalog/areas/area/textures/ceramic-tile.jpg} +0 -0
- /package/es/{e470a2ce76062955fa98.jpg → catalog/areas/area/textures/grass.jpg} +0 -0
- /package/es/{e5ae13166775e7d071e4.jpg → catalog/areas/area/textures/parquet.jpg} +0 -0
- /package/es/{c232d250fd899392b1b7.jpg → catalog/areas/area/textures/strand-porcelain.jpg} +0 -0
- /package/es/{c7ae6f4de09134ebe588.jpg → catalog/areas/area/textures/tile1.jpg} +0 -0
- /package/es/{81e7a7e6edf162e88b44.jpg → catalog/lines/wall/textures/bricks-normal.jpg} +0 -0
- /package/es/{340a84d3930143a53545.jpg → catalog/lines/wall/textures/bricks-normal2.jpg} +0 -0
- /package/es/{a07d30a04bda8ee03491.jpg → catalog/lines/wall/textures/bricks.jpg} +0 -0
- /package/es/{5c8d36b3e7223934f447.jpg → catalog/lines/wall/textures/morden-normal.jpg} +0 -0
- /package/es/{8fe0f1210d8ba435a790.jpg → catalog/lines/wall/textures/morden.jpg} +0 -0
- /package/es/{bee3f62687a97bcc3d9f.jpg → catalog/lines/wall/textures/painted.jpg} +0 -0
- /package/es/{1fc74a85baa030dbc913.jpg → catalog/lines/wall/textures/plaster-normal.jpg} +0 -0
- /package/es/{dad5ee758630256ee702.jpg → catalog/lines/wall/textures/plaster.jpg} +0 -0
- /package/es/{30a49a74d9bd10068b65.png → catalog/lines/wall/wall.png} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AreaFactory } from "../../factories/export";
|
|
2
|
+
import parquetTexture from "./textures/parquet.jpg";
|
|
3
|
+
import tile1Texture from "./textures/tile1.jpg";
|
|
4
|
+
import ceramicTexture from "./textures/ceramic-tile.jpg";
|
|
5
|
+
import strandPorcelainTexture from "./textures/strand-porcelain.jpg";
|
|
6
|
+
import grassTexture from "./textures/grass.jpg";
|
|
7
|
+
var info = {
|
|
8
|
+
title: 'area',
|
|
9
|
+
tag: ['area'],
|
|
10
|
+
description: 'Generic Room',
|
|
11
|
+
image: ''
|
|
12
|
+
};
|
|
13
|
+
var textures = {
|
|
14
|
+
parquet: {
|
|
15
|
+
name: 'Parquet',
|
|
16
|
+
uri: parquetTexture,
|
|
17
|
+
lengthRepeatScale: 0.004,
|
|
18
|
+
heightRepeatScale: 0.004
|
|
19
|
+
},
|
|
20
|
+
tile1: {
|
|
21
|
+
name: 'Tile1',
|
|
22
|
+
uri: tile1Texture,
|
|
23
|
+
lengthRepeatScale: 0.01,
|
|
24
|
+
heightRepeatScale: 0.01
|
|
25
|
+
},
|
|
26
|
+
ceramic: {
|
|
27
|
+
name: 'Ceramic Tile',
|
|
28
|
+
uri: ceramicTexture,
|
|
29
|
+
lengthRepeatScale: 0.02,
|
|
30
|
+
heightRepeatScale: 0.02
|
|
31
|
+
},
|
|
32
|
+
strand_porcelain: {
|
|
33
|
+
name: 'Strand Porcelain Tile',
|
|
34
|
+
uri: strandPorcelainTexture,
|
|
35
|
+
lengthRepeatScale: 0.02,
|
|
36
|
+
heightRepeatScale: 0.02
|
|
37
|
+
},
|
|
38
|
+
grass: {
|
|
39
|
+
name: 'Grass',
|
|
40
|
+
uri: grassTexture,
|
|
41
|
+
lengthRepeatScale: 0.01,
|
|
42
|
+
heightRepeatScale: 0.01
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export default AreaFactory('area', info, textures);
|
|
Binary file
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import { PropertyColor, PropertyEnum, PropertyString, PropertyNumber, PropertyLengthMeasure, PropertyToggle, PropertyCheckbox, PropertyHidden, PropertyReadOnly } from "./properties/export";
|
|
5
|
+
import { UNIT_CENTIMETER, UNIT_INCH } from "../constants";
|
|
6
|
+
import { returnReplaceableDeepSearchType } from "../components/viewer2d/utils";
|
|
7
|
+
var Catalog = /*#__PURE__*/function () {
|
|
8
|
+
function Catalog() {
|
|
9
|
+
var unit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : UNIT_CENTIMETER;
|
|
10
|
+
_classCallCheck(this, Catalog);
|
|
11
|
+
this.elements = {};
|
|
12
|
+
this.categories = {
|
|
13
|
+
root: {
|
|
14
|
+
name: 'root',
|
|
15
|
+
label: '/',
|
|
16
|
+
elements: [],
|
|
17
|
+
categories: []
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
this.propertyTypes = {};
|
|
21
|
+
this.unit = unit;
|
|
22
|
+
this.registerMultiplePropertyType([['color', PropertyColor, PropertyColor], ['enum', PropertyEnum, PropertyEnum], ['string', PropertyString, PropertyString], ['number', PropertyNumber, PropertyNumber], ['length-measure', PropertyLengthMeasure, PropertyLengthMeasure], ['toggle', PropertyToggle, PropertyToggle], ['checkbox', PropertyCheckbox, PropertyCheckbox], ['hidden', PropertyHidden, PropertyHidden], ['read-only', PropertyReadOnly, PropertyReadOnly]]);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @description Get catalog's element
|
|
27
|
+
* @param {string} type Element's type
|
|
28
|
+
* @return {?object} Element
|
|
29
|
+
*/
|
|
30
|
+
return _createClass(Catalog, [{
|
|
31
|
+
key: "getElement",
|
|
32
|
+
value: function getElement(type) {
|
|
33
|
+
if (this.hasElement(type)) {
|
|
34
|
+
return this.elements[type];
|
|
35
|
+
} else {
|
|
36
|
+
var deepSearchType = returnReplaceableDeepSearchType(type);
|
|
37
|
+
var element = this.elements[deepSearchType];
|
|
38
|
+
if (element) return element;
|
|
39
|
+
if (!element) return false;
|
|
40
|
+
// console.log("getElement", this);
|
|
41
|
+
throw new Error("Element ".concat(type, " does not exist in catalog"));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @description Get catalog category
|
|
47
|
+
* @param {string} categoryName Name of category
|
|
48
|
+
* @return {object} Category
|
|
49
|
+
*/
|
|
50
|
+
}, {
|
|
51
|
+
key: "getCategory",
|
|
52
|
+
value: function getCategory(categoryName) {
|
|
53
|
+
if (this.hasCategory(categoryName)) {
|
|
54
|
+
return this.categories[categoryName];
|
|
55
|
+
}
|
|
56
|
+
throw new Error("Category ".concat(categoryName, " does not exist in catalog"));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @description Return type of a specfied property
|
|
61
|
+
* @param {string} type Property type
|
|
62
|
+
* @return {?object} Property
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "getPropertyType",
|
|
66
|
+
value: function getPropertyType(type) {
|
|
67
|
+
if (this.propertyTypes.hasOwnProperty(type)) {
|
|
68
|
+
return this.propertyTypes[type];
|
|
69
|
+
}
|
|
70
|
+
throw new Error("Element ".concat(type, " does not exist in catalog"));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @description Register a new element
|
|
75
|
+
* @param {object} json Element structure
|
|
76
|
+
* @return {void}
|
|
77
|
+
*/
|
|
78
|
+
}, {
|
|
79
|
+
key: "registerElement",
|
|
80
|
+
value: function registerElement(json) {
|
|
81
|
+
json.properties = json.properties || {};
|
|
82
|
+
if (this.validateElement(json)) {
|
|
83
|
+
this.elements[json.name] = json;
|
|
84
|
+
this.categories.root.elements.push(this.elements[json.name]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @description Register multiple elements
|
|
90
|
+
* @param {array} [elementArray] Array of elements
|
|
91
|
+
* @return {void}
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "registerMultipleElements",
|
|
95
|
+
value: function registerMultipleElements(elementArray) {
|
|
96
|
+
var _this = this;
|
|
97
|
+
elementArray.forEach(function (el) {
|
|
98
|
+
return _this.registerElement(el);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @description Register a new property
|
|
104
|
+
* @param {string} type Type of property
|
|
105
|
+
* @param {object} Viewer Property viewer component
|
|
106
|
+
* @param {object} Editor Property editor component
|
|
107
|
+
* @return {void}
|
|
108
|
+
*/
|
|
109
|
+
}, {
|
|
110
|
+
key: "registerPropertyType",
|
|
111
|
+
value: function registerPropertyType(type, Viewer, Editor) {
|
|
112
|
+
this.propertyTypes[type] = {
|
|
113
|
+
type: type,
|
|
114
|
+
Viewer: Viewer,
|
|
115
|
+
Editor: Editor
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @description Register multiple property
|
|
121
|
+
* @param {array} propertyTypeArray Array of properties
|
|
122
|
+
* @return {void}
|
|
123
|
+
*/
|
|
124
|
+
}, {
|
|
125
|
+
key: "registerMultiplePropertyType",
|
|
126
|
+
value: function registerMultiplePropertyType(propertyTypeArray) {
|
|
127
|
+
var _this2 = this;
|
|
128
|
+
propertyTypeArray.forEach(function (el) {
|
|
129
|
+
return _this2.registerPropertyType.apply(_this2, _toConsumableArray(el));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @description Validate an element
|
|
135
|
+
* @param {object} json Element's structure
|
|
136
|
+
* @return {?boolean}
|
|
137
|
+
*/
|
|
138
|
+
}, {
|
|
139
|
+
key: "validateElement",
|
|
140
|
+
value: function validateElement(json) {
|
|
141
|
+
if (!json.hasOwnProperty('name')) throw new Error('Element not valid');
|
|
142
|
+
var name = json.name;
|
|
143
|
+
if (json.prototype.toLowerCase().includes('molding')) return true;
|
|
144
|
+
if (!json.hasOwnProperty('prototype')) throw new Error("Element ".concat(name, " doesn't have prototype"));
|
|
145
|
+
if (!json.hasOwnProperty('info')) throw new Error("Element ".concat(name, " doesn't have info"));
|
|
146
|
+
if (!json.info.hasOwnProperty('tag')) throw new Error("Element ".concat(name, " doesn't have tag"));
|
|
147
|
+
if (!json.info.hasOwnProperty('description')) throw new Error("Element ".concat(name, " doesn't have description"));
|
|
148
|
+
// if (!json.info.hasOwnProperty('image')) throw new Error(`Element ${name} doesn't have image`);
|
|
149
|
+
|
|
150
|
+
if (!json.hasOwnProperty('render2D')) throw new Error("Element ".concat(name, " doesn't have render2D handler"));
|
|
151
|
+
if (!json.hasOwnProperty('render3D')) throw new Error("Element ".concat(name, " doesn't have render3D handler"));
|
|
152
|
+
if (!json.hasOwnProperty('properties')) throw new Error("Element ".concat(name, " doesn't have properties"));
|
|
153
|
+
for (var propertyName in json.properties) {
|
|
154
|
+
var propertyConfigs = json.properties[propertyName];
|
|
155
|
+
if (!propertyConfigs.hasOwnProperty('type')) throw new Error("Element ".concat(name, ", Property ").concat(propertyName, " doesn't have type"));
|
|
156
|
+
if (!propertyConfigs.hasOwnProperty('defaultValue')) throw new Error("Element ".concat(name, ", Property ").concat(propertyName, " doesn't have defaultValue"));
|
|
157
|
+
}
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @description Check if catalog has element
|
|
163
|
+
* @param {string} type Element's type
|
|
164
|
+
* @return {boolean}
|
|
165
|
+
*/
|
|
166
|
+
}, {
|
|
167
|
+
key: "hasElement",
|
|
168
|
+
value: function hasElement(type) {
|
|
169
|
+
return this.elements.hasOwnProperty(type);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @description Register a new category
|
|
174
|
+
* @param {string} name Name of category
|
|
175
|
+
* @param {string} label Label of category
|
|
176
|
+
* @param {array} [childs] Category's childs
|
|
177
|
+
* @return {?object} Registered category
|
|
178
|
+
*/
|
|
179
|
+
}, {
|
|
180
|
+
key: "registerCategory",
|
|
181
|
+
value: function registerCategory(name, label, childs) {
|
|
182
|
+
var _this3 = this;
|
|
183
|
+
if (this.validateCategory(name, label)) {
|
|
184
|
+
this.categories[name] = {
|
|
185
|
+
name: name,
|
|
186
|
+
label: label,
|
|
187
|
+
categories: [],
|
|
188
|
+
elements: []
|
|
189
|
+
};
|
|
190
|
+
this.categories.root.categories.push(this.categories[name]);
|
|
191
|
+
if (childs && childs.length) {
|
|
192
|
+
childs.forEach(function (el) {
|
|
193
|
+
return _this3.addToCategory(name, el);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return this.categories[name];
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @description Add an element to the specified category
|
|
203
|
+
* @param {string} name Name of category
|
|
204
|
+
* @param {object} child Element's structure
|
|
205
|
+
* @return {?void}
|
|
206
|
+
*/
|
|
207
|
+
}, {
|
|
208
|
+
key: "addToCategory",
|
|
209
|
+
value: function addToCategory(name, child) {
|
|
210
|
+
if (this.hasElement(child.name)) {
|
|
211
|
+
this.categories[name].elements.push(child);
|
|
212
|
+
this.categories.root.elements.splice(this.categories.root.elements.indexOf(child), 1);
|
|
213
|
+
} else if (this.hasCategory(child.name)) {
|
|
214
|
+
this.categories[name].categories.push(child);
|
|
215
|
+
this.categories.root.categories.splice(this.categories.root.categories.indexOf(child), 1);
|
|
216
|
+
} else {
|
|
217
|
+
throw new Error("child ".concat(child, " is either category nor element"));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @description Check if category contain element
|
|
223
|
+
* @param {string} categoryName Name of category
|
|
224
|
+
* @param {string} elementName Name of element
|
|
225
|
+
* @return {boolean}
|
|
226
|
+
*/
|
|
227
|
+
}, {
|
|
228
|
+
key: "categoryHasElement",
|
|
229
|
+
value: function categoryHasElement(categoryName, elementName) {
|
|
230
|
+
return this.hasCategory(categoryName) && this.categories[categoryName].elements.some(function (el) {
|
|
231
|
+
return el.name === elementName;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @description Validate a category
|
|
237
|
+
* @param {string} name Name of category
|
|
238
|
+
* @param {string} label Label of category
|
|
239
|
+
* @return {?boolean}
|
|
240
|
+
*/
|
|
241
|
+
}, {
|
|
242
|
+
key: "validateCategory",
|
|
243
|
+
value: function validateCategory(name, label) {
|
|
244
|
+
if (!name) {
|
|
245
|
+
throw new Error('Category has undefined name');
|
|
246
|
+
}
|
|
247
|
+
if (name === '') {
|
|
248
|
+
throw new Error('Category has empty name');
|
|
249
|
+
}
|
|
250
|
+
return !this.hasCategory(name);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @description Verify if catalog already contain a category with specified name
|
|
255
|
+
* @param {string} categoryName Name of category
|
|
256
|
+
* @return {boolean}
|
|
257
|
+
*/
|
|
258
|
+
}, {
|
|
259
|
+
key: "hasCategory",
|
|
260
|
+
value: function hasCategory(categoryName) {
|
|
261
|
+
return this.categories.hasOwnProperty(categoryName);
|
|
262
|
+
}
|
|
263
|
+
}]);
|
|
264
|
+
}();
|
|
265
|
+
export { Catalog as default };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as Three from 'three';
|
|
2
|
+
import { Box3, Mesh, MeshBasicMaterial, MeshPhysicalMaterial, RepeatWrapping, Shape, TextureLoader, Vector2 } from 'three';
|
|
3
|
+
import * as SharedStyle from "../../shared-style";
|
|
4
|
+
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
|
|
5
|
+
var params = {
|
|
6
|
+
envMap: 'HDR',
|
|
7
|
+
roughness: 0.9,
|
|
8
|
+
metalness: 0.8,
|
|
9
|
+
exposure: 1.0
|
|
10
|
+
// debug: false
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Apply a texture to a wall face
|
|
15
|
+
* @param material: The material of the face
|
|
16
|
+
* @param texture: The texture to load
|
|
17
|
+
* @param length: The lenght of the face
|
|
18
|
+
* @param height: The height of the face
|
|
19
|
+
*/
|
|
20
|
+
var applyTexture = function applyTexture(material, texture, length, height) {
|
|
21
|
+
var loader = new TextureLoader();
|
|
22
|
+
if (texture) {
|
|
23
|
+
material.map = loader.load(texture.uri);
|
|
24
|
+
material.map.colorSpace = Three.SRGBColorSpace;
|
|
25
|
+
material.needsUpdate = true;
|
|
26
|
+
material.map.wrapS = RepeatWrapping;
|
|
27
|
+
material.map.wrapT = RepeatWrapping;
|
|
28
|
+
material.map.repeat.set(length * texture.lengthRepeatScale, height * texture.heightRepeatScale);
|
|
29
|
+
if (texture.normal) {
|
|
30
|
+
material.normalMap = loader.load(texture.normal.uri);
|
|
31
|
+
material.normalScale = new Vector2(texture.normal.normalScaleX, texture.normal.normalScaleY);
|
|
32
|
+
material.normalMap.wrapS = RepeatWrapping;
|
|
33
|
+
material.normalMap.wrapT = RepeatWrapping;
|
|
34
|
+
material.normalMap.repeat.set(length * texture.normal.lengthRepeatScale, height * texture.normal.heightRepeatScale);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Function that assign UV coordinates to a geometry
|
|
41
|
+
* @param geometry
|
|
42
|
+
*/
|
|
43
|
+
var assignUVs = function assignUVs(geometry) {
|
|
44
|
+
geometry.computeBoundingBox();
|
|
45
|
+
var _geometry$boundingBox = geometry.boundingBox,
|
|
46
|
+
min = _geometry$boundingBox.min,
|
|
47
|
+
max = _geometry$boundingBox.max;
|
|
48
|
+
var offset = new Vector2(0 - min.x, 0 - min.y);
|
|
49
|
+
var range = new Vector2(max.x - min.x, max.y - min.y);
|
|
50
|
+
var uvArray = [];
|
|
51
|
+
var position = geometry.attributes.position;
|
|
52
|
+
for (var i = 0; i < position.count; i += 3) {
|
|
53
|
+
var x1 = position.getX(i);
|
|
54
|
+
var y1 = position.getY(i);
|
|
55
|
+
var x2 = position.getX(i + 1);
|
|
56
|
+
var y2 = position.getY(i + 1);
|
|
57
|
+
var x3 = position.getX(i + 2);
|
|
58
|
+
var y3 = position.getY(i + 2);
|
|
59
|
+
uvArray.push((x1 + offset.x) / range.x, (y1 + offset.y) / range.y, (x2 + offset.x) / range.x, (y2 + offset.y) / range.y, (x3 + offset.x) / range.x, (y3 + offset.y) / range.y);
|
|
60
|
+
}
|
|
61
|
+
geometry.setAttribute('uv', new Three.BufferAttribute(new Float32Array(uvArray), 2));
|
|
62
|
+
geometry.needsUpdate = true;
|
|
63
|
+
};
|
|
64
|
+
export function createArea(element, layer, scene, textures) {
|
|
65
|
+
var vertices = [];
|
|
66
|
+
element.vertices.forEach(function (vertexID) {
|
|
67
|
+
vertices.push(layer.vertices.get(vertexID));
|
|
68
|
+
});
|
|
69
|
+
var texture = element.texture;
|
|
70
|
+
texture.lengthRepeatScale = 0.01;
|
|
71
|
+
texture.heightRepeatScale = 0.01;
|
|
72
|
+
var color = element.properties.get('patternColor');
|
|
73
|
+
if (element.selected) {
|
|
74
|
+
color = SharedStyle.AREA_MESH_COLOR.selected;
|
|
75
|
+
} else {
|
|
76
|
+
color = SharedStyle.AREA_MESH_COLOR.unselected;
|
|
77
|
+
}
|
|
78
|
+
if (texture.uri === undefined || texture.uri == '') {
|
|
79
|
+
// @todo THIS IS A TEMPORARY FIX TO HAVE A DEFAULT FLOOR TEXTURE
|
|
80
|
+
texture.uri = layer.floorStyle.uri || 'https://media.test.diydesignspace.com/uploads/CountTop/202203162950_2/texture/oak-barcelona-s.jpg';
|
|
81
|
+
}
|
|
82
|
+
var shape = new Shape();
|
|
83
|
+
shape.moveTo(vertices[0].x, vertices[0].y);
|
|
84
|
+
for (var i = 1; i < vertices.length; i++) {
|
|
85
|
+
shape.lineTo(vertices[i].x, vertices[i].y);
|
|
86
|
+
}
|
|
87
|
+
function loadFloorENV() {
|
|
88
|
+
return new RGBELoader().load('/assets/Window.hdr', function (texture) {
|
|
89
|
+
texture.mapping = Three.EquirectangularReflectionMapping;
|
|
90
|
+
return texture;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
var floorENV = loadFloorENV();
|
|
94
|
+
var loader = new TextureLoader();
|
|
95
|
+
var areaMaterial = new MeshPhysicalMaterial({
|
|
96
|
+
side: Three.DoubleSide,
|
|
97
|
+
metalness: texture.metalness,
|
|
98
|
+
roughness: 0.3,
|
|
99
|
+
envMap: floorENV,
|
|
100
|
+
envMapIntensity: 1.8,
|
|
101
|
+
specularIntensity: 0.4,
|
|
102
|
+
map: loader.load(texture.uri)
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/* Create holes for the area */
|
|
106
|
+
element.holes.forEach(function (holeID) {
|
|
107
|
+
var holeCoords = [];
|
|
108
|
+
layer.getIn(['areas', holeID, 'vertices']).forEach(function (vertexID) {
|
|
109
|
+
var _layer$getIn = layer.getIn(['vertices', vertexID]),
|
|
110
|
+
x = _layer$getIn.x,
|
|
111
|
+
y = _layer$getIn.y;
|
|
112
|
+
holeCoords.push([x, y]);
|
|
113
|
+
});
|
|
114
|
+
holeCoords = holeCoords.reverse();
|
|
115
|
+
var holeShape = createShape(holeCoords);
|
|
116
|
+
shape.holes.push(holeShape);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// This is extrude floor mesh
|
|
120
|
+
|
|
121
|
+
var extrudeSettings = {
|
|
122
|
+
depth: -3,
|
|
123
|
+
bevelEnabled: false
|
|
124
|
+
};
|
|
125
|
+
var shapeGeometry = new Three.ExtrudeGeometry(shape, extrudeSettings);
|
|
126
|
+
assignUVs(shapeGeometry);
|
|
127
|
+
var boundingBox = new Box3().setFromObject(new Mesh(shapeGeometry, new MeshBasicMaterial()));
|
|
128
|
+
var width = boundingBox.max.x - boundingBox.min.x;
|
|
129
|
+
var height = boundingBox.max.y - boundingBox.min.y;
|
|
130
|
+
var texture_unit = 70 * 2.54; // 70 inch
|
|
131
|
+
|
|
132
|
+
applyTexture(areaMaterial, texture, width / texture_unit * 100, height / texture_unit * 100);
|
|
133
|
+
var area = new Mesh(shapeGeometry, areaMaterial);
|
|
134
|
+
area.rotation.x -= Math.PI / 2;
|
|
135
|
+
area.receiveShadow = true;
|
|
136
|
+
area.name = 'floor';
|
|
137
|
+
// This mesh is use for creating ceiling mesh
|
|
138
|
+
|
|
139
|
+
var shapeGeometry2 = new Three.ShapeGeometry(shape);
|
|
140
|
+
var area2 = new Mesh(shapeGeometry2, new MeshBasicMaterial({
|
|
141
|
+
transparent: true,
|
|
142
|
+
opacity: 0.0
|
|
143
|
+
}));
|
|
144
|
+
area2.castShadow = true;
|
|
145
|
+
area2.rotation.x -= Math.PI / 2;
|
|
146
|
+
area2.receiveShadow = true;
|
|
147
|
+
area2.name = 'floorSupport';
|
|
148
|
+
var floorSupport = area2.clone();
|
|
149
|
+
area.userData.floorSupport = floorSupport;
|
|
150
|
+
return Promise.resolve(area);
|
|
151
|
+
}
|
|
152
|
+
export function updatedArea(element, layer, scene, textures, mesh, oldElement, differences, selfDestroy, selfBuild) {
|
|
153
|
+
var noPerf = function noPerf() {
|
|
154
|
+
selfDestroy();
|
|
155
|
+
return selfBuild();
|
|
156
|
+
};
|
|
157
|
+
var floor = mesh.getObjectByName('floor');
|
|
158
|
+
floor.receiveShadow = true;
|
|
159
|
+
if (differences[0] == 'selected') {
|
|
160
|
+
var color = element.selected ? SharedStyle.AREA_MESH_COLOR.selected : SharedStyle.AREA_MESH_COLOR.unselected;
|
|
161
|
+
floor.material.color.set(color);
|
|
162
|
+
} else if (differences[0] == 'properties') {
|
|
163
|
+
if (differences[1] === 'texture') {
|
|
164
|
+
return noPerf();
|
|
165
|
+
}
|
|
166
|
+
} else return noPerf();
|
|
167
|
+
return Promise.resolve(mesh);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* This function will create a shape given a list of coordinates
|
|
172
|
+
* @param shapeCoords
|
|
173
|
+
* @returns {Shape}
|
|
174
|
+
*/
|
|
175
|
+
var createShape = function createShape(shapeCoords) {
|
|
176
|
+
var shape = new Shape();
|
|
177
|
+
shape.moveTo(shapeCoords[0][0], shapeCoords[0][1]);
|
|
178
|
+
for (var i = 1; i < shapeCoords.length; i++) {
|
|
179
|
+
shape.lineTo(shapeCoords[i][0], shapeCoords[i][1]);
|
|
180
|
+
}
|
|
181
|
+
return shape;
|
|
182
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { createArea, updatedArea } from "./area-factory-3d";
|
|
6
|
+
import * as SharedStyle from "../../shared-style";
|
|
7
|
+
import Translator from "../../translator/translator";
|
|
8
|
+
var translator = new Translator();
|
|
9
|
+
export default function AreaFactory(name, info, textures) {
|
|
10
|
+
var areaElement = {
|
|
11
|
+
name: name,
|
|
12
|
+
prototype: 'areas',
|
|
13
|
+
info: _objectSpread(_objectSpread({}, info), {}, {
|
|
14
|
+
visibility: {
|
|
15
|
+
catalog: false,
|
|
16
|
+
layerElementsVisible: false
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
properties: {
|
|
20
|
+
patternColor: {
|
|
21
|
+
label: translator.t('color'),
|
|
22
|
+
type: 'color',
|
|
23
|
+
defaultValue: 'rgba(175, 175, 175)'
|
|
24
|
+
},
|
|
25
|
+
thickness: {
|
|
26
|
+
label: translator.t('thickness'),
|
|
27
|
+
type: 'length-measure',
|
|
28
|
+
defaultValue: {
|
|
29
|
+
length: 0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
render2D: function render2D(element, layer, scene) {
|
|
34
|
+
var path = '';
|
|
35
|
+
|
|
36
|
+
///print area path
|
|
37
|
+
element.vertices.forEach(function (vertexID, ind) {
|
|
38
|
+
var vertex = layer.vertices.get(vertexID);
|
|
39
|
+
path += (ind ? 'L' : 'M') + vertex.x + ' ' + vertex.y + ' ';
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//add holes
|
|
43
|
+
element.holes.forEach(function (areaID) {
|
|
44
|
+
var area = layer.areas.get(areaID);
|
|
45
|
+
area.vertices.reverse().forEach(function (vertexID, ind) {
|
|
46
|
+
var vertex = layer.vertices.get(vertexID);
|
|
47
|
+
path += (ind ? 'L' : 'M') + vertex.x + ' ' + vertex.y + ' ';
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var fill = element.selected ? SharedStyle.AREA_MESH_COLOR.selected : SharedStyle.AREA_MESH_COLOR.unselected;
|
|
51
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
52
|
+
d: path,
|
|
53
|
+
fill: fill
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
render3D: function render3D(element, layer, scene) {
|
|
57
|
+
return createArea(element, layer, scene, textures);
|
|
58
|
+
},
|
|
59
|
+
updateRender3D: function updateRender3D(element, layer, scene, mesh, oldElement, differences, selfDestroy, selfBuild) {
|
|
60
|
+
return updatedArea(element, layer, scene, textures, mesh, oldElement, differences, selfDestroy, selfBuild);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
if (textures && textures !== {}) {
|
|
64
|
+
var textureValues = {
|
|
65
|
+
none: 'None'
|
|
66
|
+
};
|
|
67
|
+
for (var textureName in textures) {
|
|
68
|
+
textureValues[textureName] = textures[textureName].name;
|
|
69
|
+
}
|
|
70
|
+
areaElement.properties.texture = {
|
|
71
|
+
label: translator.t('texture'),
|
|
72
|
+
type: 'enum',
|
|
73
|
+
defaultValue: 'none',
|
|
74
|
+
values: textureValues
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return areaElement;
|
|
78
|
+
}
|