kitchen-simulator 5.10.1-react.18 → 5.10.2-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/index.js +3 -627
- package/es/index.js.LICENSE.txt +45 -0
- package/es/index.js.map +1 -0
- package/package.json +9 -5
- package/es/@history.js +0 -2
- package/es/AppContext.js +0 -6
- package/es/LiteKitchenConfigurator.js +0 -474
- package/es/LiteRenderer.js +0 -363
- package/es/WorkSpace.js +0 -851
- package/es/actions/area-actions.js +0 -14
- package/es/actions/export.js +0 -23
- package/es/actions/groups-actions.js +0 -89
- package/es/actions/holes-actions.js +0 -119
- package/es/actions/items-actions.js +0 -316
- package/es/actions/lines-actions.js +0 -83
- package/es/actions/project-actions.js +0 -298
- package/es/actions/scene-actions.js +0 -33
- package/es/actions/vertices-actions.js +0 -27
- package/es/actions/viewer2d-actions.js +0 -58
- package/es/actions/viewer3d-actions.js +0 -23
- 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 +0 -177
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -11
- 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 +0 -55
- 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 +0 -33
- package/es/assets/img/svg/2d_delete_object1.svg +0 -33
- package/es/assets/img/svg/2d_lock_object.svg +0 -33
- package/es/assets/img/svg/3d_item_move.svg +0 -106
- package/es/assets/img/svg/3d_item_rotation.svg +0 -76
- package/es/assets/img/svg/3d_item_warning_edit.svg +0 -77
- package/es/assets/img/svg/3d_item_warning_info.svg +0 -81
- package/es/assets/img/svg/accessories.svg +0 -4
- package/es/assets/img/svg/angle_icon.svg +0 -39
- package/es/assets/img/svg/blank_div.svg +0 -14
- package/es/assets/img/svg/bottombar/2d3d_button.svg +0 -3
- package/es/assets/img/svg/bottombar/2d3d_button_active.svg +0 -3
- package/es/assets/img/svg/bottombar/2d3d_toggle.svg +0 -4
- package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +0 -4
- package/es/assets/img/svg/bottombar/arrow-down.svg +0 -3
- package/es/assets/img/svg/bottombar/arrow-left.svg +0 -3
- package/es/assets/img/svg/bottombar/arrow-minus.svg +0 -3
- package/es/assets/img/svg/bottombar/arrow-plus.svg +0 -11
- package/es/assets/img/svg/bottombar/arrow-right.svg +0 -3
- package/es/assets/img/svg/bottombar/arrow-up.svg +0 -3
- package/es/assets/img/svg/bottombar/collapse.svg +0 -3
- package/es/assets/img/svg/bottombar/elevation-back.svg +0 -6
- package/es/assets/img/svg/bottombar/elevation-front.svg +0 -6
- package/es/assets/img/svg/bottombar/elevation-left.svg +0 -6
- package/es/assets/img/svg/bottombar/elevation-right.svg +0 -7
- package/es/assets/img/svg/bottombar/elevation.svg +0 -13
- package/es/assets/img/svg/bottombar/expand.svg +0 -3
- package/es/assets/img/svg/bottombar/help.svg +0 -72
- package/es/assets/img/svg/bottombar/incm_toggle.svg +0 -39
- package/es/assets/img/svg/bottombar/pan_1.svg +0 -57
- package/es/assets/img/svg/bottombar/pan_2.svg +0 -27
- package/es/assets/img/svg/bottombar/pan_3.svg +0 -27
- package/es/assets/img/svg/bottombar/pan_4.svg +0 -27
- package/es/assets/img/svg/bottombar/pan_5.svg +0 -27
- package/es/assets/img/svg/bottombar/settings.svg +0 -23
- package/es/assets/img/svg/bottombar/spin-down.svg +0 -76
- package/es/assets/img/svg/bottombar/spin-left.svg +0 -75
- package/es/assets/img/svg/bottombar/spin-right.svg +0 -75
- package/es/assets/img/svg/bottombar/spin-up.svg +0 -76
- package/es/assets/img/svg/bottombar/spin_1.svg +0 -48
- package/es/assets/img/svg/bottombar/spin_2.svg +0 -31
- package/es/assets/img/svg/bottombar/spin_3.svg +0 -31
- package/es/assets/img/svg/bottombar/spin_4.svg +0 -31
- package/es/assets/img/svg/bottombar/spin_5.svg +0 -31
- package/es/assets/img/svg/bottombar/zoomin.svg +0 -29
- package/es/assets/img/svg/bottombar/zoomout.svg +0 -26
- package/es/assets/img/svg/check.svg +0 -10
- package/es/assets/img/svg/close.svg +0 -11
- package/es/assets/img/svg/color/Black.svg +0 -3
- package/es/assets/img/svg/color/Blue.svg +0 -3
- package/es/assets/img/svg/color/Brown.svg +0 -9
- package/es/assets/img/svg/color/Cream.svg +0 -3
- package/es/assets/img/svg/color/Dark.svg +0 -9
- package/es/assets/img/svg/color/Gray.svg +0 -3
- package/es/assets/img/svg/color/Green.svg +0 -3
- package/es/assets/img/svg/color/Light.svg +0 -9
- package/es/assets/img/svg/color/Medium.svg +0 -9
- package/es/assets/img/svg/color/Unfinished.svg +0 -9
- package/es/assets/img/svg/color/White.svg +0 -3
- package/es/assets/img/svg/color/White.svg.bak +0 -3
- 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 +0 -11
- package/es/assets/img/svg/delete.svg +0 -3
- package/es/assets/img/svg/detail.svg +0 -77
- package/es/assets/img/svg/disclaimer/background.svg +0 -758
- package/es/assets/img/svg/disclaimer/logo-dots.svg +0 -11
- package/es/assets/img/svg/door/Closet.svg +0 -11
- package/es/assets/img/svg/door/Exterior.svg +0 -5
- package/es/assets/img/svg/door/Framed_dorway.svg +0 -5
- package/es/assets/img/svg/door/Frameless_dorway.svg +0 -5
- package/es/assets/img/svg/door/Interior.svg +0 -7
- package/es/assets/img/svg/door/Sliding.svg +0 -5
- package/es/assets/img/svg/doors_closet.svg +0 -47
- package/es/assets/img/svg/doors_exterior.svg +0 -25
- package/es/assets/img/svg/doors_interior.svg +0 -29
- package/es/assets/img/svg/doors_patio.svg +0 -26
- package/es/assets/img/svg/duplicate.svg +0 -11
- package/es/assets/img/svg/duplicate_object_left.svg +0 -32
- package/es/assets/img/svg/duplicate_object_right.svg +0 -32
- package/es/assets/img/svg/filtersActive.svg +0 -19
- package/es/assets/img/svg/firstsetting/L.svg +0 -3
- package/es/assets/img/svg/firstsetting/L2.svg +0 -3
- package/es/assets/img/svg/firstsetting/Open.svg +0 -3
- package/es/assets/img/svg/firstsetting/Square.svg +0 -3
- package/es/assets/img/svg/firstsetting/bar-active.svg +0 -9
- package/es/assets/img/svg/firstsetting/bar-normal.svg +0 -3
- package/es/assets/img/svg/firstsetting/bullet-current.svg +0 -3
- package/es/assets/img/svg/firstsetting/bullet-done.svg +0 -3
- package/es/assets/img/svg/firstsetting/bullet-not-done.svg +0 -3
- package/es/assets/img/svg/firstsetting/check-active.svg +0 -3
- package/es/assets/img/svg/firstsetting/check-normal.svg +0 -3
- package/es/assets/img/svg/firstsetting/pencil.svg +0 -11
- package/es/assets/img/svg/green_checkmark.svg +0 -27
- package/es/assets/img/svg/headerbar/assist.svg +0 -3
- package/es/assets/img/svg/headerbar/cart.svg +0 -3
- package/es/assets/img/svg/headerbar/check.svg +0 -10
- package/es/assets/img/svg/headerbar/consult_designer.svg +0 -45
- package/es/assets/img/svg/headerbar/edit_name.svg +0 -26
- package/es/assets/img/svg/headerbar/file-dollar.svg +0 -13
- package/es/assets/img/svg/headerbar/hamburger_menu.svg +0 -32
- package/es/assets/img/svg/headerbar/plus.svg +0 -11
- package/es/assets/img/svg/headerbar/review_quote.svg +0 -44
- package/es/assets/img/svg/headerbar/ruler-measure.svg +0 -11
- package/es/assets/img/svg/headerbar/save.svg +0 -3
- package/es/assets/img/svg/headerbar/setting.svg +0 -75
- package/es/assets/img/svg/help/check.svg +0 -10
- package/es/assets/img/svg/help/search.svg +0 -76
- package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +0 -27
- package/es/assets/img/svg/intro/1-start-with-floorplan.svg +0 -26
- package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +0 -28
- package/es/assets/img/svg/intro/2-start-from-scratch.svg +0 -27
- package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +0 -19
- package/es/assets/img/svg/intro/3-retrieve-project.svg +0 -18
- package/es/assets/img/svg/invert.svg +0 -127
- package/es/assets/img/svg/lefttoolbar/appliance-active.svg +0 -13
- package/es/assets/img/svg/lefttoolbar/appliance.svg +0 -13
- package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +0 -10
- package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/cabinet.svg +0 -10
- package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +0 -89
- package/es/assets/img/svg/lefttoolbar/door-style-active.svg +0 -20
- package/es/assets/img/svg/lefttoolbar/door-style.svg +0 -20
- package/es/assets/img/svg/lefttoolbar/door.svg +0 -12
- package/es/assets/img/svg/lefttoolbar/error_icon.svg +0 -81
- package/es/assets/img/svg/lefttoolbar/finishing-active.svg +0 -13
- package/es/assets/img/svg/lefttoolbar/finishing.svg +0 -13
- package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +0 -86
- package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +0 -12
- package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +0 -18
- package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +0 -12
- package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +0 -3
- package/es/assets/img/svg/lefttoolbar/room-shape.svg +0 -18
- package/es/assets/img/svg/lefttoolbar/search.svg +0 -76
- package/es/assets/img/svg/lefttoolbar/view_more.svg +0 -86
- package/es/assets/img/svg/lefttoolbar/warning_icon.svg +0 -81
- package/es/assets/img/svg/lefttoolbar/window.svg +0 -12
- package/es/assets/img/svg/logo.svg +0 -11
- package/es/assets/img/svg/logo_with_text.svg +0 -25
- package/es/assets/img/svg/menubar/login.svg +0 -84
- package/es/assets/img/svg/menubar/my_projects.svg +0 -85
- package/es/assets/img/svg/menubar/new_project.svg +0 -110
- package/es/assets/img/svg/menubar/save_project.svg +0 -84
- package/es/assets/img/svg/options.svg +0 -3
- package/es/assets/img/svg/positioning.svg +0 -3
- package/es/assets/img/svg/rotate.png +0 -0
- package/es/assets/img/svg/rotate.svg +0 -17
- package/es/assets/img/svg/rotate_object_clockwise.svg +0 -26
- package/es/assets/img/svg/rotate_object_counterclockwise.svg +0 -26
- package/es/assets/img/svg/toggleFilters.svg +0 -19
- package/es/assets/img/svg/toolbar/add_appliances_active.svg +0 -64
- package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +0 -52
- package/es/assets/img/svg/toolbar/add_button.svg +0 -36
- package/es/assets/img/svg/toolbar/add_cabinets_active.svg +0 -59
- package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +0 -49
- package/es/assets/img/svg/toolbar/add_items_doors.svg +0 -25
- package/es/assets/img/svg/toolbar/add_items_doorways.svg +0 -24
- package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +0 -32
- package/es/assets/img/svg/toolbar/add_items_windows.svg +0 -28
- package/es/assets/img/svg/toolbar/apply_button.svg +0 -38
- package/es/assets/img/svg/toolbar/arrow-plus.svg +0 -11
- package/es/assets/img/svg/toolbar/backsplash.svg +0 -8
- package/es/assets/img/svg/toolbar/cancel_button.svg +0 -37
- package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +0 -47
- package/es/assets/img/svg/toolbar/countertop.svg +0 -7
- package/es/assets/img/svg/toolbar/dcm.png +0 -0
- package/es/assets/img/svg/toolbar/dcm_off.svg +0 -12
- package/es/assets/img/svg/toolbar/dcm_on.svg +0 -474
- package/es/assets/img/svg/toolbar/delete_button.svg +0 -37
- package/es/assets/img/svg/toolbar/download.svg +0 -77
- package/es/assets/img/svg/toolbar/draw_custom_floor.svg +0 -31
- package/es/assets/img/svg/toolbar/edit_button.svg +0 -75
- package/es/assets/img/svg/toolbar/email_quote_button.svg +0 -44
- package/es/assets/img/svg/toolbar/fbm.png +0 -0
- package/es/assets/img/svg/toolbar/finishing_touches_active.svg +0 -54
- package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +0 -42
- package/es/assets/img/svg/toolbar/floorstyle.svg +0 -9
- package/es/assets/img/svg/toolbar/fmb.png +0 -0
- package/es/assets/img/svg/toolbar/fmb_off.svg +0 -12
- package/es/assets/img/svg/toolbar/fmb_on.svg +0 -489
- package/es/assets/img/svg/toolbar/furnishings_icon.svg +0 -6
- package/es/assets/img/svg/toolbar/get_started_button.svg +0 -41
- package/es/assets/img/svg/toolbar/handles.svg +0 -5
- package/es/assets/img/svg/toolbar/lighting.svg +0 -7
- package/es/assets/img/svg/toolbar/lrm.png +0 -0
- package/es/assets/img/svg/toolbar/lrm_off.svg +0 -12
- package/es/assets/img/svg/toolbar/lrm_on.svg +0 -470
- package/es/assets/img/svg/toolbar/make_floorplan_active.svg +0 -66
- package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +0 -52
- package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_layout.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +0 -20
- package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +0 -20
- package/es/assets/img/svg/toolbar/redo_button.svg +0 -75
- package/es/assets/img/svg/toolbar/redo_button1.svg +0 -75
- package/es/assets/img/svg/toolbar/review_quote_active.svg +0 -14
- package/es/assets/img/svg/toolbar/review_quote_inactive.svg +0 -44
- package/es/assets/img/svg/toolbar/save_project_button.svg +0 -44
- package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +0 -67
- package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +0 -57
- package/es/assets/img/svg/toolbar/shopping-cart.svg +0 -13
- package/es/assets/img/svg/toolbar/style_change_button.svg +0 -47
- package/es/assets/img/svg/toolbar/take_picture.svg +0 -75
- package/es/assets/img/svg/toolbar/undo_button.svg +0 -76
- package/es/assets/img/svg/toolbar/undo_button1.svg +0 -76
- package/es/assets/img/svg/toolbar/use_button.svg +0 -37
- package/es/assets/img/svg/toolbar/wall_color_icon.svg +0 -6
- package/es/assets/img/svg/topbar/edit_active.svg +0 -10
- package/es/assets/img/svg/topbar/edit_inactive.svg +0 -10
- package/es/assets/img/svg/topbar/redo_active.svg +0 -42
- package/es/assets/img/svg/topbar/redo_inactive.svg +0 -23
- package/es/assets/img/svg/topbar/select_all_active.svg +0 -50
- package/es/assets/img/svg/topbar/select_all_inactive.svg +0 -32
- package/es/assets/img/svg/topbar/take_picture_active.svg +0 -51
- package/es/assets/img/svg/topbar/take_picture_inactive.svg +0 -26
- package/es/assets/img/svg/topbar/undo_active.svg +0 -42
- package/es/assets/img/svg/topbar/undo_inactive.svg +0 -23
- package/es/assets/img/svg/warning_info_2d.svg +0 -81
- package/es/assets/img/svg/window/Clear.svg +0 -3
- package/es/assets/img/svg/window/Cross.svg +0 -5
- package/es/assets/img/svg/window/Double_hung.svg +0 -4
- package/es/assets/img/svg/window/Vertical.svg +0 -4
- package/es/assets/img/svg/windows_clear.svg +0 -23
- package/es/assets/img/svg/windows_cross.svg +0 -28
- package/es/assets/img/svg/windows_double_hung.svg +0 -24
- package/es/assets/img/svg/windows_vertical.svg +0 -24
- package/es/assets/img/svg/wizardstep/Custom.svg +0 -3
- package/es/assets/img/svg/wizardstep/Dashed_line.svg +0 -3
- package/es/assets/img/svg/wizardstep/L.svg +0 -3
- package/es/assets/img/svg/wizardstep/L2.svg +0 -3
- package/es/assets/img/svg/wizardstep/Open.svg +0 -3
- package/es/assets/img/svg/wizardstep/Square.svg +0 -3
- package/es/assets/img/svg/wizardstep/bar-active.svg +0 -9
- package/es/assets/img/svg/wizardstep/bar-normal.svg +0 -3
- package/es/assets/img/svg/wizardstep/bullet-current.svg +0 -3
- package/es/assets/img/svg/wizardstep/bullet-done.svg +0 -3
- package/es/assets/img/svg/wizardstep/bullet-not-done.svg +0 -3
- package/es/assets/img/svg/wizardstep/check-active.svg +0 -3
- package/es/assets/img/svg/wizardstep/check-normal.svg +0 -3
- package/es/assets/img/svg/wizardstep/detail_view.svg +0 -87
- package/es/assets/img/svg/wizardstep/pencil.svg +0 -11
- package/es/assets/img/svg/wizardstep/tile_view.svg +0 -95
- 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 +0 -1
- package/es/assets/model/FBM.bin +0 -0
- package/es/assets/model/FBM.fbx +0 -0
- package/es/assets/model/FBM.gltf +0 -1
- package/es/assets/model/LRM.bin +0 -0
- package/es/assets/model/LRM.fbx +0 -0
- package/es/assets/model/LRM.gltf +0 -1
- package/es/assets/rtastore_logo.png +0 -0
- package/es/catalog/areas/area/planner-element.js +0 -45
- package/es/catalog/back.png +0 -0
- package/es/catalog/catalog.js +0 -265
- 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 +0 -182
- package/es/catalog/factories/area-factory.js +0 -78
- package/es/catalog/factories/export.js +0 -7
- package/es/catalog/factories/wall-factory-3d.js +0 -202
- package/es/catalog/factories/wall-factory.js +0 -267
- package/es/catalog/holes/door-closet/planner-element.js +0 -222
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-double/planner-element.js +0 -315
- package/es/catalog/holes/door-exterior/planner-element.js +0 -215
- package/es/catalog/holes/door-interior/planner-element.js +0 -227
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic/planner-element.js +0 -503
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/door-panic-double/planner-element.js +0 -463
- package/es/catalog/holes/door-sliding/planner-element.js +0 -225
- package/es/catalog/holes/doorway-framed/planner-element.js +0 -145
- package/es/catalog/holes/doorway-frameless/planner-element.js +0 -104
- package/es/catalog/holes/export.js +0 -13
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/planner-element.js +0 -166
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/planner-element.js +0 -165
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/planner-element.js +0 -303
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/planner-element.js +0 -276
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/lines/wall/planner-element.js +0 -79
- 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 +0 -26
- package/es/catalog/molding/molding-dcm/texture.png +0 -0
- package/es/catalog/molding/molding-fbm/planner-element.js +0 -26
- package/es/catalog/molding/molding-fbm/texture.png +0 -0
- package/es/catalog/molding/molding-lrm/planner-element.js +0 -26
- package/es/catalog/molding/molding-lrm/texture.png +0 -0
- package/es/catalog/properties/export.js +0 -21
- package/es/catalog/properties/property-checkbox.js +0 -68
- package/es/catalog/properties/property-color.js +0 -39
- package/es/catalog/properties/property-enum.js +0 -50
- package/es/catalog/properties/property-hidden.js +0 -19
- package/es/catalog/properties/property-lenght-measure.js +0 -96
- package/es/catalog/properties/property-length-measure.js +0 -80
- package/es/catalog/properties/property-length-measure_hole.js +0 -96
- package/es/catalog/properties/property-number.js +0 -48
- package/es/catalog/properties/property-read-only.js +0 -26
- package/es/catalog/properties/property-string.js +0 -48
- package/es/catalog/properties/property-toggle.js +0 -39
- package/es/catalog/properties/shared-property-style.js +0 -14
- package/es/catalog/utils/FuseUtils.js +0 -79
- package/es/catalog/utils/exporter.js +0 -161
- package/es/catalog/utils/geom-utils.js +0 -189
- package/es/catalog/utils/item-loader.js +0 -1602
- package/es/catalog/utils/load-obj.js +0 -91
- package/es/catalog/utils/mtl-loader.js +0 -357
- package/es/catalog/utils/obj-loader.js +0 -476
- package/es/catalog/windows.png +0 -0
- package/es/class/FuseUtils.js +0 -79
- package/es/class/area.js +0 -141
- package/es/class/export.js +0 -24
- package/es/class/group.js +0 -431
- package/es/class/guide.js +0 -58
- package/es/class/hole.js +0 -924
- package/es/class/item.js +0 -1884
- package/es/class/layer.js +0 -663
- package/es/class/line.js +0 -1229
- package/es/class/project.js +0 -937
- package/es/class/vertex.js +0 -198
- package/es/components/content.js +0 -135
- package/es/components/export.js +0 -9
- package/es/components/style/button.js +0 -106
- package/es/components/style/cancel-button.js +0 -21
- package/es/components/style/content-container.js +0 -30
- package/es/components/style/content-title.js +0 -25
- package/es/components/style/delete-button.js +0 -24
- package/es/components/style/export.js +0 -31
- package/es/components/style/form-block.js +0 -20
- package/es/components/style/form-color-input.js +0 -26
- package/es/components/style/form-label.js +0 -22
- package/es/components/style/form-number-input.js +0 -192
- package/es/components/style/form-number-input_2.js +0 -238
- package/es/components/style/form-select.js +0 -19
- package/es/components/style/form-slider.js +0 -60
- package/es/components/style/form-submit-button.js +0 -25
- package/es/components/style/form-text-input.js +0 -69
- package/es/components/viewer2d/area.js +0 -81
- package/es/components/viewer2d/export.js +0 -31
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -36
- package/es/components/viewer2d/grids/grid-streak.js +0 -36
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -36
- package/es/components/viewer2d/grids/grids.js +0 -30
- package/es/components/viewer2d/group.js +0 -48
- package/es/components/viewer2d/item.js +0 -242
- package/es/components/viewer2d/layer.js +0 -164
- package/es/components/viewer2d/line.js +0 -997
- package/es/components/viewer2d/ruler.js +0 -84
- package/es/components/viewer2d/rulerDist.js +0 -102
- package/es/components/viewer2d/rulerX.js +0 -142
- package/es/components/viewer2d/rulerY.js +0 -144
- package/es/components/viewer2d/scene.js +0 -108
- package/es/components/viewer2d/snap.js +0 -74
- package/es/components/viewer2d/state.js +0 -73
- package/es/components/viewer2d/utils.js +0 -193
- package/es/components/viewer2d/vertex.js +0 -66
- package/es/components/viewer2d/viewer2d.js +0 -1405
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2585
- package/es/components/viewer3d/dcm.js +0 -401
- package/es/components/viewer3d/fbm.js +0 -414
- package/es/components/viewer3d/front3D.js +0 -62
- package/es/components/viewer3d/grid-creator.js +0 -25
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +0 -36
- package/es/components/viewer3d/grids/grid-streak.js +0 -27
- package/es/components/viewer3d/grids/grid-vertical-streak.js +0 -36
- package/es/components/viewer3d/libs/first-person-controls.js +0 -67
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1281
- package/es/components/viewer3d/libs/mtl-loader.js +0 -357
- package/es/components/viewer3d/libs/obj-loader.js +0 -462
- package/es/components/viewer3d/libs/orbit-controls.js +0 -697
- package/es/components/viewer3d/libs/pointer-lock-controls.js +0 -44
- package/es/components/viewer3d/lrm.js +0 -305
- package/es/components/viewer3d/model.js +0 -708
- package/es/components/viewer3d/pointer-lock-navigation.js +0 -115
- package/es/components/viewer3d/ruler-utils/itemRect.js +0 -61
- package/es/components/viewer3d/ruler-utils/layer3D.js +0 -495
- package/es/components/viewer3d/ruler-utils/ruler3D.js +0 -224
- package/es/components/viewer3d/ruler-utils/scene3D.js +0 -59
- package/es/components/viewer3d/ruler-utils/state3D.js +0 -18
- package/es/components/viewer3d/scene-creator.js +0 -3818
- package/es/components/viewer3d/three-memory-cleaner.js +0 -51
- package/es/components/viewer3d/viewer3d-first-person.js +0 -311
- package/es/components/viewer3d/viewer3d.js +0 -2654
- package/es/constants.js +0 -769
- package/es/index.html.ejs +0 -264
- package/es/models.js +0 -512
- package/es/plugins/SVGLoader.js +0 -1414
- package/es/plugins/console-debugger.js +0 -34
- package/es/plugins/export.js +0 -7
- package/es/plugins/keyboard.js +0 -110
- package/es/reducers/areas-reducer.js +0 -12
- package/es/reducers/export.js +0 -25
- package/es/reducers/groups-reducer.js +0 -38
- package/es/reducers/holes-reducer.js +0 -62
- package/es/reducers/items-reducer.js +0 -143
- package/es/reducers/lines-reducer.js +0 -45
- package/es/reducers/project-reducer.js +0 -136
- package/es/reducers/reducer.js +0 -19
- package/es/reducers/scene-reducer.js +0 -28
- package/es/reducers/user-reducer.js +0 -41
- package/es/reducers/vertices-reducer.js +0 -19
- package/es/reducers/viewer2d-reducer.js +0 -77
- package/es/reducers/viewer3d-reducer.js +0 -58
- package/es/shared-style.js +0 -66
- package/es/translator/en.js +0 -104
- package/es/translator/it.js +0 -79
- package/es/translator/ru.js +0 -79
- package/es/translator/translator.js +0 -80
- package/es/utils/browser.js +0 -33
- package/es/utils/convert-units-lite.js +0 -29
- package/es/utils/email-validator.js +0 -4
- package/es/utils/export.js +0 -25
- package/es/utils/geometry.js +0 -2609
- package/es/utils/get-edges-of-subgraphs.js +0 -26
- package/es/utils/graph-cycles.js +0 -238
- package/es/utils/graph-inner-cycles.js +0 -46
- package/es/utils/graph.js +0 -145
- package/es/utils/helper.js +0 -436
- package/es/utils/history.js +0 -29
- package/es/utils/id-broker.js +0 -15
- package/es/utils/isolate-event-handler.js +0 -1622
- package/es/utils/logger.js +0 -8
- package/es/utils/math.js +0 -50
- package/es/utils/molding.js +0 -1347
- package/es/utils/name-generator.js +0 -17
- package/es/utils/objects-utils.js +0 -50
- package/es/utils/phone-validator.js +0 -4
- package/es/utils/process-black-list.js +0 -15
- package/es/utils/react-if.js +0 -18
- package/es/utils/ruler.js +0 -58
- package/es/utils/snap-scene.js +0 -94
- package/es/utils/snap.js +0 -231
- package/es/utils/summarizeCart.js +0 -24
- package/es/utils/threeCSG.es6.js +0 -494
- package/es/version.js +0 -1
- /package/es/{catalog/lines/wall/textures/plaster-normal.jpg → 1fc74a85baa030dbc913.jpg} +0 -0
- /package/es/{catalog/lines/wall/wall.png → 30a49a74d9bd10068b65.png} +0 -0
- /package/es/{catalog/lines/wall/textures/bricks-normal2.jpg → 340a84d3930143a53545.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/morden-normal.jpg → 5c8d36b3e7223934f447.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/bricks-normal.jpg → 81e7a7e6edf162e88b44.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/morden.jpg → 8fe0f1210d8ba435a790.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/bricks.jpg → a07d30a04bda8ee03491.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/painted.jpg → bee3f62687a97bcc3d9f.jpg} +0 -0
- /package/es/{catalog/areas/area/textures/strand-porcelain.jpg → c232d250fd899392b1b7.jpg} +0 -0
- /package/es/{catalog/areas/area/textures/tile1.jpg → c7ae6f4de09134ebe588.jpg} +0 -0
- /package/es/{catalog/lines/wall/textures/plaster.jpg → dad5ee758630256ee702.jpg} +0 -0
- /package/es/{catalog/areas/area/textures/grass.jpg → e470a2ce76062955fa98.jpg} +0 -0
- /package/es/{catalog/areas/area/textures/parquet.jpg → e5ae13166775e7d071e4.jpg} +0 -0
- /package/es/{catalog/areas/area/textures/ceramic-tile.jpg → e8e5de0892f5375460bd.jpg} +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import PointerLockControls from "./libs/pointer-lock-controls";
|
|
2
|
-
export function initPointerLock(camera, rendererElement) {
|
|
3
|
-
var havePointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;
|
|
4
|
-
var pointerlockchange = function pointerlockchange(event) {
|
|
5
|
-
controls.enabled = !controls.enabled;
|
|
6
|
-
};
|
|
7
|
-
var requestPointerLockEvent = function requestPointerLockEvent(event) {
|
|
8
|
-
document.body.requestPointerLock = document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock;
|
|
9
|
-
document.body.requestPointerLock();
|
|
10
|
-
};
|
|
11
|
-
if (havePointerLock) {
|
|
12
|
-
document.addEventListener('pointerlockchange', pointerlockchange, false);
|
|
13
|
-
document.addEventListener('mozpointerlockchange', pointerlockchange, false);
|
|
14
|
-
document.addEventListener('webkitpointerlockchange', pointerlockchange, false);
|
|
15
|
-
rendererElement.addEventListener('click', requestPointerLockEvent);
|
|
16
|
-
} else {
|
|
17
|
-
console.log("Your browser doesn't seem to support Pointer Lock API");
|
|
18
|
-
}
|
|
19
|
-
var controls = new PointerLockControls(camera);
|
|
20
|
-
return {
|
|
21
|
-
controls: controls,
|
|
22
|
-
pointerlockChangeEvent: pointerlockchange,
|
|
23
|
-
requestPointerLockEvent: requestPointerLockEvent
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Funzione per il calcolo delle collisioni con gli oggetti contenuti all'interno di un array.
|
|
28
|
-
* L'idea è quella di utilizzare il ray casting. Per tenere conto del fatto che ci possiamo
|
|
29
|
-
* muovere nelle quattro direzioni, applico una matrice di rotazione alla direzione verso la
|
|
30
|
-
* quale l'oggetto del pointer lock è orientato. */
|
|
31
|
-
|
|
32
|
-
function collision(controls, collisionArray) {
|
|
33
|
-
var rotationMatrix;
|
|
34
|
-
var cameraDirection = controls.getDirection(new THREE.Vector3(0, 0, 0)).clone();
|
|
35
|
-
if (controls.moveForward()) {
|
|
36
|
-
// Nothing to do!
|
|
37
|
-
} else if (controls.moveBackward()) {
|
|
38
|
-
rotationMatrix = new THREE.Matrix4();
|
|
39
|
-
rotationMatrix.makeRotationY(180 * Math.PI / 180);
|
|
40
|
-
} else if (controls.moveLeft()) {
|
|
41
|
-
rotationMatrix = new THREE.Matrix4();
|
|
42
|
-
rotationMatrix.makeRotationY(90 * Math.PI / 180);
|
|
43
|
-
} else if (controls.moveRight()) {
|
|
44
|
-
rotationMatrix = new THREE.Matrix4();
|
|
45
|
-
rotationMatrix.makeRotationY((360 - 90) * Math.PI / 180);
|
|
46
|
-
} else return;
|
|
47
|
-
if (rotationMatrix !== undefined) {
|
|
48
|
-
cameraDirection.applyMatrix4(rotationMatrix);
|
|
49
|
-
}
|
|
50
|
-
var rayCaster = new THREE.Raycaster(controls.getObject().position, cameraDirection.normalize());
|
|
51
|
-
var intersects = rayCaster.intersectObjects(collisionArray, true);
|
|
52
|
-
if (intersects.length > 0 && intersects[0].distance < 10) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Funzione meno raffinata per il calcolo delle collisioni.
|
|
59
|
-
* In pratica viene definita una bounding geometry (in questo caso la skymap) e poi vengono fatti
|
|
60
|
-
* partire una serie di raggi dall'object del controller fino ai vertici di questa geometria. Se uno di questi interseca
|
|
61
|
-
* uno degli oggetti dei quali vogliamo controllare la collisione, allora la funzione restituirà il valore true */
|
|
62
|
-
/*
|
|
63
|
-
function collision(object, boundingGeometry, collisionArray ) {
|
|
64
|
-
|
|
65
|
-
for (let vertexIndex = 0; vertexIndex < boundingGeometry.geometry.vertices.length; vertexIndex++) {
|
|
66
|
-
let localVertex = boundingGeometry.geometry.vertices[vertexIndex].clone();
|
|
67
|
-
let globalVertex = localVertex.applyMatrix4( object.matrix );
|
|
68
|
-
let directionVector = globalVertex.sub( object.position );
|
|
69
|
-
|
|
70
|
-
let ray = new THREE.Raycaster(object.position, directionVector.clone().normalize());
|
|
71
|
-
let collisionResults = ray.intersectObjects(collisionArray, true);
|
|
72
|
-
if (collisionResults.length > 0 && collisionResults[0].distance < directionVector.length() - 1293) {
|
|
73
|
-
console.log("collisione: ",collisionResults[0].distance," ",directionVector.length()-1293);
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
/* Questa funzione si occupa di determinare se il controllo si trova su un oggetto, in caso negativo cade verso il basso
|
|
82
|
-
* (vedi esempio pointer lock) */
|
|
83
|
-
|
|
84
|
-
function translateY(controls, ray, objects) {
|
|
85
|
-
controls.isOnObject(false);
|
|
86
|
-
ray.ray.origin.copy(controls.getObject().position);
|
|
87
|
-
ray.ray.origin.y -= 10;
|
|
88
|
-
var intersections = ray.intersectObjects(objects, true);
|
|
89
|
-
if (intersections.length > 0) {
|
|
90
|
-
var distance = intersections[0].distance;
|
|
91
|
-
if (distance > 0 && distance < 10) {
|
|
92
|
-
controls.isOnObject(true);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Queste funzioni bloccano o sbloccano il movimento del controller (utili in caso di collisione) */
|
|
98
|
-
|
|
99
|
-
function lockDirection(controls) {
|
|
100
|
-
if (controls.moveForward()) {
|
|
101
|
-
controls.lockMoveForward(true);
|
|
102
|
-
} else if (controls.moveBackward()) {
|
|
103
|
-
controls.lockMoveBackward(true);
|
|
104
|
-
} else if (controls.moveLeft()) {
|
|
105
|
-
controls.lockMoveLeft(true);
|
|
106
|
-
} else if (controls.moveRight()) {
|
|
107
|
-
controls.lockMoveRight(true);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function unlockAllDirection(controls) {
|
|
111
|
-
controls.lockMoveForward(false);
|
|
112
|
-
controls.lockMoveBackward(false);
|
|
113
|
-
controls.lockMoveLeft(false);
|
|
114
|
-
controls.lockMoveRight(false);
|
|
115
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MODE_BACK_ELEVATION_VIEW, MODE_FRONT_ELEVATION_VIEW, MODE_LEFT_ELEVATION_VIEW, MODE_RIGHT_ELEVATION_VIEW } from "../../../constants";
|
|
3
|
-
import { convert } from "../../../utils/convert-units-lite";
|
|
4
|
-
export default function ItemRect(_ref) {
|
|
5
|
-
var scene = _ref.scene,
|
|
6
|
-
layer = _ref.layer,
|
|
7
|
-
calcrect = _ref.calcrect,
|
|
8
|
-
v0 = _ref.v0,
|
|
9
|
-
v1 = _ref.v1,
|
|
10
|
-
mode = _ref.mode,
|
|
11
|
-
frontRect = _ref.frontRect,
|
|
12
|
-
scale = _ref.scale,
|
|
13
|
-
sideFlag = _ref.sideFlag;
|
|
14
|
-
var rect = calcrect.rect;
|
|
15
|
-
var x0 = v0.x,
|
|
16
|
-
y0 = v0.y;
|
|
17
|
-
var x1 = v1.x,
|
|
18
|
-
y1 = v1.y;
|
|
19
|
-
var translateY = frontRect.height / 2 - convert(Math.abs(calcrect.itemInfo.properties.altitude._length)).from(calcrect.itemInfo.properties.altitude._unit).to(layer.unit) * scale;
|
|
20
|
-
var translateX = -frontRect.width / 2;
|
|
21
|
-
var itemWidth = convert(calcrect.size.width).from(scene.unit).to(layer.unit) * scale;
|
|
22
|
-
var itemDepth = convert(calcrect.size.depth).from(scene.unit).to(layer.unit) * scale;
|
|
23
|
-
var itemHeight = convert(calcrect.size.height).from(scene.unit).to(layer.unit) * scale;
|
|
24
|
-
switch (mode) {
|
|
25
|
-
case MODE_FRONT_ELEVATION_VIEW:
|
|
26
|
-
case MODE_BACK_ELEVATION_VIEW:
|
|
27
|
-
translateX += convert(Math.abs(rect[3].x - x0)).from(scene.unit).to(layer.unit) * scale;
|
|
28
|
-
break;
|
|
29
|
-
case MODE_RIGHT_ELEVATION_VIEW:
|
|
30
|
-
case MODE_LEFT_ELEVATION_VIEW:
|
|
31
|
-
translateX += convert(Math.abs(rect[3].y - y1)).from(scene.unit).to(layer.unit) * scale;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
var dimension;
|
|
35
|
-
switch (sideFlag) {
|
|
36
|
-
case 0:
|
|
37
|
-
dimension = /*#__PURE__*/React.createElement("polygon", {
|
|
38
|
-
points: "0,0 0,-".concat(itemHeight, " ").concat(itemWidth, ",-").concat(itemHeight, " ").concat(itemWidth, ",0"),
|
|
39
|
-
fill: "none",
|
|
40
|
-
stroke: "black"
|
|
41
|
-
});
|
|
42
|
-
break;
|
|
43
|
-
case 1:
|
|
44
|
-
dimension = /*#__PURE__*/React.createElement("polygon", {
|
|
45
|
-
points: "0,0 0,-".concat(itemHeight, " ").concat(itemDepth, ",-").concat(itemHeight, " ").concat(itemDepth, ",0"),
|
|
46
|
-
fill: "none",
|
|
47
|
-
stroke: "black"
|
|
48
|
-
});
|
|
49
|
-
break;
|
|
50
|
-
case 2:
|
|
51
|
-
dimension = /*#__PURE__*/React.createElement("polygon", {
|
|
52
|
-
points: "0,0 0,-".concat(itemHeight, " -").concat(itemDepth, ",-").concat(itemHeight, " -").concat(itemDepth, ",0"),
|
|
53
|
-
fill: "none",
|
|
54
|
-
stroke: "black"
|
|
55
|
-
});
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.createElement("g", {
|
|
59
|
-
transform: "translate(".concat(translateX, ", ").concat(translateY, ")")
|
|
60
|
-
}, dimension);
|
|
61
|
-
}
|
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Ruler3D from "./ruler3D";
|
|
3
|
-
import { convert } from "../../../utils/convert-units-lite";
|
|
4
|
-
import { GeometryUtils } from "../../../utils/export";
|
|
5
|
-
import { returnReplaceableDeepSearchType } from "../../../components/viewer2d/utils";
|
|
6
|
-
import { DECIMAL_PLACES_2, DELTA, DISTANCE_EPSILON } from "../../../constants";
|
|
7
|
-
import { formatNumber, isNonZeroText } from "../../../utils/math";
|
|
8
|
-
export default function Layer3D(_ref) {
|
|
9
|
-
var layer = _ref.layer,
|
|
10
|
-
frontRect = _ref.frontRect,
|
|
11
|
-
lineLength = _ref.lineLength,
|
|
12
|
-
ceilHeight = _ref.ceilHeight,
|
|
13
|
-
catalog = _ref.catalog,
|
|
14
|
-
scene = _ref.scene,
|
|
15
|
-
scale = _ref.scale,
|
|
16
|
-
mode = _ref.mode,
|
|
17
|
-
line = _ref.line,
|
|
18
|
-
viewScale = _ref.viewScale,
|
|
19
|
-
downloadFlag = _ref.downloadFlag;
|
|
20
|
-
var width = frontRect.width,
|
|
21
|
-
height = frontRect.height;
|
|
22
|
-
var v0 = layer.vertices.get(line.vertices.get(0));
|
|
23
|
-
var v1 = layer.vertices.get(line.vertices.get(1));
|
|
24
|
-
var l0 = {
|
|
25
|
-
x: v0.x,
|
|
26
|
-
y: v0.y
|
|
27
|
-
};
|
|
28
|
-
var l1 = {
|
|
29
|
-
x: v1.x,
|
|
30
|
-
y: v1.y
|
|
31
|
-
};
|
|
32
|
-
var rulerSpace = 50 * viewScale;
|
|
33
|
-
var lineSpace = 25 * viewScale;
|
|
34
|
-
var rulerLines = [],
|
|
35
|
-
rulerData = [],
|
|
36
|
-
baseItems = [],
|
|
37
|
-
wallItems = [],
|
|
38
|
-
basePosArray = [{
|
|
39
|
-
x: width / 2,
|
|
40
|
-
y: height / 2
|
|
41
|
-
}, {
|
|
42
|
-
x: -width / 2,
|
|
43
|
-
y: height / 2
|
|
44
|
-
}],
|
|
45
|
-
wallPosArray = [{
|
|
46
|
-
x: -width / 2,
|
|
47
|
-
y: -height / 2
|
|
48
|
-
}, {
|
|
49
|
-
x: width / 2,
|
|
50
|
-
y: -height / 2
|
|
51
|
-
}],
|
|
52
|
-
left_count = 0,
|
|
53
|
-
right_count = 0,
|
|
54
|
-
leftBaseItems = [],
|
|
55
|
-
rightBaseItems = [],
|
|
56
|
-
leftWallItems = [],
|
|
57
|
-
rightWallItems = [],
|
|
58
|
-
toler_unit = 'mm';
|
|
59
|
-
|
|
60
|
-
// get length between 2 points
|
|
61
|
-
var getLength = function getLength(vertex0, vertex1) {
|
|
62
|
-
return Math.sqrt(Math.pow(vertex0.x - vertex1.x, 2) + Math.pow(vertex0.y - vertex1.y, 2));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// determin if this line(vertex0, vertex1) is snapped into wall
|
|
66
|
-
var isSnapped = function isSnapped(vertex0, vertex1) {
|
|
67
|
-
var itemSnapped = false;
|
|
68
|
-
var delta = GeometryUtils.distancePointFromLineSegment(l0, l1, (vertex0.x + vertex1.x) / 2, (vertex0.y + vertex1.y) / 2);
|
|
69
|
-
if (delta < DISTANCE_EPSILON) {
|
|
70
|
-
itemSnapped = true;
|
|
71
|
-
}
|
|
72
|
-
return itemSnapped;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// get array of wallItem and baseITem in layer
|
|
76
|
-
layer.items.forEach(function (item) {
|
|
77
|
-
var val = {
|
|
78
|
-
pos: {
|
|
79
|
-
x: item.x,
|
|
80
|
-
y: item.y
|
|
81
|
-
},
|
|
82
|
-
rotRad: item.rotation / 180 * Math.PI
|
|
83
|
-
};
|
|
84
|
-
var catid = item.type;
|
|
85
|
-
var cat = catalog.elements[catid];
|
|
86
|
-
if (!cat) cat = catalog.elements[returnReplaceableDeepSearchType(catid)];
|
|
87
|
-
var width = convert(item.properties.getIn(['width', '_length'])).from(item.properties.getIn(['width', '_unit'])).to(scene.unit);
|
|
88
|
-
var height = convert(item.properties.getIn(['height', '_length'])).from(item.properties.getIn(['height', '_unit'])).to(scene.unit);
|
|
89
|
-
var depth = convert(item.properties.getIn(['depth', '_length'])).from(item.properties.getIn(['depth', '_unit'])).to(scene.unit);
|
|
90
|
-
var altitude = convert(item.properties.getIn(['altitude', '_length'])).from(item.properties.getIn(['altitude', '_unit'])).to(scene.unit);
|
|
91
|
-
val.size = {
|
|
92
|
-
width: width,
|
|
93
|
-
height: height,
|
|
94
|
-
depth: depth,
|
|
95
|
-
altitude: altitude
|
|
96
|
-
};
|
|
97
|
-
val.layoutpos = cat && cat.info.layoutpos;
|
|
98
|
-
val.is_corner = cat && cat.info.is_corner;
|
|
99
|
-
val.item = item.toJS();
|
|
100
|
-
var calcrect = GeometryUtils.getCalcRectFromItem3D(val);
|
|
101
|
-
if (isSnapped(calcrect.rect[3], calcrect.rect[2]) || isSnapped(calcrect.rect[2], calcrect.rect[1]) || isSnapped(calcrect.rect[0], calcrect.rect[3])) {
|
|
102
|
-
if (calcrect.itemInfo.properties.altitude.length) {
|
|
103
|
-
wallItems.push(calcrect);
|
|
104
|
-
} else {
|
|
105
|
-
baseItems.push(calcrect);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// sort function
|
|
111
|
-
var sortFunc = function sortFunc(a, b) {
|
|
112
|
-
return a.pos.x - b.pos.x;
|
|
113
|
-
};
|
|
114
|
-
var negSortFunc = function negSortFunc(a, b) {
|
|
115
|
-
return -sortFunc(a, b);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// get item's pos array about baseItem, then sort - baseItems' order is right: (width/2) -> left: (-width/2)
|
|
119
|
-
if (baseItems.length) {
|
|
120
|
-
baseItems.forEach(function (item) {
|
|
121
|
-
var vertex0, vertex1;
|
|
122
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
123
|
-
vertex0 = {
|
|
124
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[3], v0)).from('cm').to(layer.unit) * scale,
|
|
125
|
-
y: height / 2
|
|
126
|
-
};
|
|
127
|
-
vertex1 = {
|
|
128
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[2], v0)).from('cm').to(layer.unit) * scale,
|
|
129
|
-
y: height / 2
|
|
130
|
-
};
|
|
131
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
132
|
-
vertex0 = {
|
|
133
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[2], v0)).from('cm').to(layer.unit) * scale,
|
|
134
|
-
y: height / 2
|
|
135
|
-
};
|
|
136
|
-
vertex1 = {
|
|
137
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[1], v0)).from('cm').to(layer.unit) * scale,
|
|
138
|
-
y: height / 2
|
|
139
|
-
};
|
|
140
|
-
} else if (isSnapped(item.rect[0], item.rect[3])) {
|
|
141
|
-
vertex0 = {
|
|
142
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[0], v0)).from('cm').to(layer.unit) * scale,
|
|
143
|
-
y: height / 2
|
|
144
|
-
};
|
|
145
|
-
vertex1 = {
|
|
146
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[3], v0)).from('cm').to(layer.unit) * scale,
|
|
147
|
-
y: height / 2
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
basePosArray.push(vertex0);
|
|
151
|
-
basePosArray.push(vertex1);
|
|
152
|
-
|
|
153
|
-
// determin which side(left or right) item is closer to. If item is closer to left side, it will be included in leftBaseITems
|
|
154
|
-
var distLeft = getLength(item.pos, v0);
|
|
155
|
-
var distRight = getLength(item.pos, v1);
|
|
156
|
-
if (distLeft < distRight) {
|
|
157
|
-
leftBaseItems.push(item);
|
|
158
|
-
} else {
|
|
159
|
-
rightBaseItems.push(item);
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
basePosArray.sort(function (a, b) {
|
|
164
|
-
return b.x - a.x;
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
// get item's pos array about wallItem, then sort - wallItems' order is left: (-width/2) -> right: (width/2)
|
|
168
|
-
if (wallItems.length) {
|
|
169
|
-
wallItems.forEach(function (item) {
|
|
170
|
-
var vertex0, vertex1;
|
|
171
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
172
|
-
vertex0 = {
|
|
173
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[3], v0)).from('cm').to(layer.unit) * scale,
|
|
174
|
-
y: -height / 2
|
|
175
|
-
};
|
|
176
|
-
vertex1 = {
|
|
177
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[2], v0)).from('cm').to(layer.unit) * scale,
|
|
178
|
-
y: -height / 2
|
|
179
|
-
};
|
|
180
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
181
|
-
vertex0 = {
|
|
182
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[2], v0)).from('cm').to(layer.unit) * scale,
|
|
183
|
-
y: -height / 2
|
|
184
|
-
};
|
|
185
|
-
vertex1 = {
|
|
186
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[1], v0)).from('cm').to(layer.unit) * scale,
|
|
187
|
-
y: -height / 2
|
|
188
|
-
};
|
|
189
|
-
} else if (isSnapped(item.rect[0], item.rect[3])) {
|
|
190
|
-
vertex0 = {
|
|
191
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[0], v0)).from('cm').to(layer.unit) * scale,
|
|
192
|
-
y: -height / 2
|
|
193
|
-
};
|
|
194
|
-
vertex1 = {
|
|
195
|
-
x: -frontRect.width / 2 + convert(getLength(item.rect[3], v0)).from('cm').to(layer.unit) * scale,
|
|
196
|
-
y: -height / 2
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
wallPosArray.push(vertex0);
|
|
200
|
-
wallPosArray.push(vertex1);
|
|
201
|
-
|
|
202
|
-
// determin which side(left or right) item is closer to. If item is closer to left side, it will be included in leftBaseITems
|
|
203
|
-
var distLeft = getLength(item.pos, v0);
|
|
204
|
-
var distRight = getLength(item.pos, v1);
|
|
205
|
-
if (distLeft < distRight) {
|
|
206
|
-
rightWallItems.push(item);
|
|
207
|
-
} else {
|
|
208
|
-
leftWallItems.push(item);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
wallPosArray.sort(function (a, b) {
|
|
213
|
-
return a.x - b.x;
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// leftItems = leftBaseItems + inverted leftWallItems : Here, it's different between BaseItem's order and WallItem's order
|
|
217
|
-
leftBaseItems.sort(sortFunc);
|
|
218
|
-
leftWallItems.sort(negSortFunc);
|
|
219
|
-
rightBaseItems.sort(negSortFunc);
|
|
220
|
-
rightWallItems.sort(sortFunc);
|
|
221
|
-
var leftItems = leftBaseItems.concat(leftWallItems);
|
|
222
|
-
var rightItems = rightBaseItems.concat(rightWallItems);
|
|
223
|
-
|
|
224
|
-
// To display side dimensions, set rulerLines about leftItems
|
|
225
|
-
leftItems.forEach(function (item, idx) {
|
|
226
|
-
var forwardItems = [];
|
|
227
|
-
var distLine = 0;
|
|
228
|
-
var itemHeight = convert(item.size.height).from(scene.unit).to(layer.unit);
|
|
229
|
-
for (var i = 0; i < idx; i++) {
|
|
230
|
-
forwardItems.push(leftItems[i]);
|
|
231
|
-
}
|
|
232
|
-
if (!forwardItems.filter(function (it) {
|
|
233
|
-
return it.itemInfo.properties.altitude._length === item.itemInfo.properties.altitude._length && it.itemInfo.properties.height._length === item.itemInfo.properties.height._length;
|
|
234
|
-
}).length) {
|
|
235
|
-
if (item.itemInfo.properties.altitude._length) {
|
|
236
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
237
|
-
distLine = convert(getLength(item.rect[2], v1)).from(scene.unit).to(layer.unit);
|
|
238
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
239
|
-
distLine = convert(getLength(item.rect[1], v1)).from(scene.unit).to(layer.unit);
|
|
240
|
-
}
|
|
241
|
-
var itemAltitude = convert(item.size.altitude).from(scene.unit).to(layer.unit);
|
|
242
|
-
if (ceilHeight - (itemAltitude + itemHeight) > convert(DELTA).from(toler_unit).to(layer.unit)) {
|
|
243
|
-
rulerLines.push({
|
|
244
|
-
v0: {
|
|
245
|
-
x: width / 2,
|
|
246
|
-
y: -height / 2
|
|
247
|
-
},
|
|
248
|
-
v1: {
|
|
249
|
-
x: width / 2,
|
|
250
|
-
y: height / 2 - (itemHeight + itemAltitude) * scale
|
|
251
|
-
},
|
|
252
|
-
text: formatNumber(ceilHeight - (itemAltitude + itemHeight), DECIMAL_PLACES_2),
|
|
253
|
-
space: rulerSpace + right_count * lineSpace
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
rulerLines.push({
|
|
257
|
-
v0: {
|
|
258
|
-
x: width / 2 - distLine * scale,
|
|
259
|
-
y: height / 2 - (itemHeight + itemAltitude) * scale
|
|
260
|
-
},
|
|
261
|
-
v1: {
|
|
262
|
-
x: width / 2 - distLine * scale,
|
|
263
|
-
y: height / 2 - itemAltitude * scale
|
|
264
|
-
},
|
|
265
|
-
text: formatNumber(itemHeight, DECIMAL_PLACES_2),
|
|
266
|
-
space: rulerSpace + distLine * scale + right_count * lineSpace
|
|
267
|
-
});
|
|
268
|
-
rulerLines.push({
|
|
269
|
-
v0: {
|
|
270
|
-
x: width / 2,
|
|
271
|
-
y: height / 2 - itemAltitude * scale
|
|
272
|
-
},
|
|
273
|
-
v1: {
|
|
274
|
-
x: width / 2,
|
|
275
|
-
y: height / 2
|
|
276
|
-
},
|
|
277
|
-
text: formatNumber(itemAltitude, DECIMAL_PLACES_2),
|
|
278
|
-
space: rulerSpace + right_count * lineSpace
|
|
279
|
-
});
|
|
280
|
-
right_count++;
|
|
281
|
-
} else {
|
|
282
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
283
|
-
distLine = convert(getLength(item.rect[3], v0)).from(scene.unit).to(layer.unit);
|
|
284
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
285
|
-
distLine = convert(getLength(item.rect[2], v0)).from(scene.unit).to(layer.unit);
|
|
286
|
-
}
|
|
287
|
-
rulerLines.push({
|
|
288
|
-
v0: {
|
|
289
|
-
x: -width / 2 + distLine * scale,
|
|
290
|
-
y: height / 2
|
|
291
|
-
},
|
|
292
|
-
v1: {
|
|
293
|
-
x: -width / 2 + distLine * scale,
|
|
294
|
-
y: height / 2 - itemHeight * scale
|
|
295
|
-
},
|
|
296
|
-
text: formatNumber(itemHeight, DECIMAL_PLACES_2),
|
|
297
|
-
space: rulerSpace + distLine * scale + left_count * lineSpace
|
|
298
|
-
});
|
|
299
|
-
rulerLines.push({
|
|
300
|
-
v0: {
|
|
301
|
-
x: -width / 2,
|
|
302
|
-
y: height / 2 - itemHeight * scale
|
|
303
|
-
},
|
|
304
|
-
v1: {
|
|
305
|
-
x: -width / 2,
|
|
306
|
-
y: -height / 2
|
|
307
|
-
},
|
|
308
|
-
text: formatNumber(ceilHeight - itemHeight, DECIMAL_PLACES_2),
|
|
309
|
-
space: rulerSpace + left_count * lineSpace
|
|
310
|
-
});
|
|
311
|
-
left_count++;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
// To display side dimensions, set rulerLines about rightItems
|
|
317
|
-
rightItems.forEach(function (item, idx) {
|
|
318
|
-
var forwardItems = [];
|
|
319
|
-
var distLine = 0;
|
|
320
|
-
var itemHeight = convert(item.size.height).from(scene.unit).to(layer.unit);
|
|
321
|
-
for (var i = 0; i < idx; i++) {
|
|
322
|
-
forwardItems.push(rightItems[i]);
|
|
323
|
-
}
|
|
324
|
-
if (!forwardItems.filter(function (it) {
|
|
325
|
-
return it.itemInfo.properties.altitude._length === item.itemInfo.properties.altitude._length && it.itemInfo.properties.height._length === item.itemInfo.properties.height._length;
|
|
326
|
-
}).length) {
|
|
327
|
-
if (item.itemInfo.properties.altitude._length) {
|
|
328
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
329
|
-
distLine = convert(getLength(item.rect[3], v0)).from(scene.unit).to(layer.unit);
|
|
330
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
331
|
-
distLine = convert(getLength(item.rect[2], v0)).from(scene.unit).to(layer.unit);
|
|
332
|
-
}
|
|
333
|
-
var _itemHeight = convert(item.size.height).from(scene.unit).to(layer.unit);
|
|
334
|
-
var itemAltitude = convert(item.size.altitude).from(scene.unit).to(layer.unit);
|
|
335
|
-
rulerLines.push({
|
|
336
|
-
v0: {
|
|
337
|
-
x: -width / 2,
|
|
338
|
-
y: height / 2
|
|
339
|
-
},
|
|
340
|
-
v1: {
|
|
341
|
-
x: -width / 2,
|
|
342
|
-
y: height / 2 - itemAltitude * scale
|
|
343
|
-
},
|
|
344
|
-
text: formatNumber(itemAltitude, DECIMAL_PLACES_2),
|
|
345
|
-
space: rulerSpace + left_count * lineSpace
|
|
346
|
-
});
|
|
347
|
-
rulerLines.push({
|
|
348
|
-
v0: {
|
|
349
|
-
x: -width / 2 + distLine * scale,
|
|
350
|
-
y: height / 2 - itemAltitude * scale
|
|
351
|
-
},
|
|
352
|
-
v1: {
|
|
353
|
-
x: -width / 2 + distLine * scale,
|
|
354
|
-
y: height / 2 - (itemAltitude + _itemHeight) * scale
|
|
355
|
-
},
|
|
356
|
-
text: formatNumber(_itemHeight, DECIMAL_PLACES_2),
|
|
357
|
-
space: rulerSpace + +distLine * scale + left_count * lineSpace
|
|
358
|
-
});
|
|
359
|
-
if (ceilHeight - (itemAltitude + _itemHeight) > convert(DELTA).from(toler_unit).to(layer.unit)) {
|
|
360
|
-
rulerLines.push({
|
|
361
|
-
v0: {
|
|
362
|
-
x: -width / 2,
|
|
363
|
-
y: height / 2 - (itemAltitude + _itemHeight) * scale
|
|
364
|
-
},
|
|
365
|
-
v1: {
|
|
366
|
-
x: -width / 2,
|
|
367
|
-
y: -height / 2
|
|
368
|
-
},
|
|
369
|
-
text: formatNumber(ceilHeight - (itemAltitude + _itemHeight), DECIMAL_PLACES_2),
|
|
370
|
-
space: rulerSpace + left_count * lineSpace
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
left_count++;
|
|
374
|
-
} else {
|
|
375
|
-
if (isSnapped(item.rect[3], item.rect[2])) {
|
|
376
|
-
distLine = convert(getLength(item.rect[2], v1)).from(scene.unit).to(layer.unit);
|
|
377
|
-
} else if (isSnapped(item.rect[2], item.rect[1])) {
|
|
378
|
-
distLine = convert(getLength(item.rect[1], v1)).from(scene.unit).to(layer.unit);
|
|
379
|
-
}
|
|
380
|
-
rulerLines.push({
|
|
381
|
-
v0: {
|
|
382
|
-
x: width / 2,
|
|
383
|
-
y: -height / 2
|
|
384
|
-
},
|
|
385
|
-
v1: {
|
|
386
|
-
x: width / 2,
|
|
387
|
-
y: height / 2 - itemHeight * scale
|
|
388
|
-
},
|
|
389
|
-
text: formatNumber(ceilHeight - itemHeight, DECIMAL_PLACES_2),
|
|
390
|
-
space: rulerSpace + right_count * lineSpace
|
|
391
|
-
});
|
|
392
|
-
rulerLines.push({
|
|
393
|
-
v0: {
|
|
394
|
-
x: width / 2 - distLine * scale,
|
|
395
|
-
y: height / 2 - itemHeight * scale
|
|
396
|
-
},
|
|
397
|
-
v1: {
|
|
398
|
-
x: width / 2 - distLine * scale,
|
|
399
|
-
y: height / 2
|
|
400
|
-
},
|
|
401
|
-
text: formatNumber(itemHeight, DECIMAL_PLACES_2),
|
|
402
|
-
space: rulerSpace + distLine * scale + right_count * lineSpace
|
|
403
|
-
});
|
|
404
|
-
right_count++;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
// To display wall line dimensions, set rulerLines
|
|
410
|
-
rulerLines.push({
|
|
411
|
-
v0: {
|
|
412
|
-
x: width / 2,
|
|
413
|
-
y: -height / 2
|
|
414
|
-
},
|
|
415
|
-
v1: {
|
|
416
|
-
x: width / 2,
|
|
417
|
-
y: height / 2
|
|
418
|
-
},
|
|
419
|
-
text: ceilHeight,
|
|
420
|
-
space: rulerSpace + lineSpace * right_count
|
|
421
|
-
});
|
|
422
|
-
rulerLines.push({
|
|
423
|
-
v0: {
|
|
424
|
-
x: -width / 2,
|
|
425
|
-
y: height / 2
|
|
426
|
-
},
|
|
427
|
-
v1: {
|
|
428
|
-
x: -width / 2,
|
|
429
|
-
y: -height / 2
|
|
430
|
-
},
|
|
431
|
-
text: ceilHeight,
|
|
432
|
-
space: rulerSpace + lineSpace * left_count
|
|
433
|
-
});
|
|
434
|
-
rulerLines.push({
|
|
435
|
-
v0: {
|
|
436
|
-
x: width / 2,
|
|
437
|
-
y: height / 2
|
|
438
|
-
},
|
|
439
|
-
v1: {
|
|
440
|
-
x: -width / 2,
|
|
441
|
-
y: height / 2
|
|
442
|
-
},
|
|
443
|
-
text: formatNumber(lineLength, DECIMAL_PLACES_2),
|
|
444
|
-
space: rulerSpace + (baseItems.length ? lineSpace : 0)
|
|
445
|
-
});
|
|
446
|
-
rulerLines.push({
|
|
447
|
-
v0: {
|
|
448
|
-
x: -width / 2,
|
|
449
|
-
y: -height / 2
|
|
450
|
-
},
|
|
451
|
-
v1: {
|
|
452
|
-
x: width / 2,
|
|
453
|
-
y: -height / 2
|
|
454
|
-
},
|
|
455
|
-
text: formatNumber(lineLength, DECIMAL_PLACES_2),
|
|
456
|
-
space: rulerSpace + (wallItems.length ? lineSpace : 0)
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
// To display wallItems dimensions, set rulerLines with wallPosArray
|
|
460
|
-
if (wallItems.length) {
|
|
461
|
-
for (var i = 0; i < wallPosArray.length - 1; i++) {
|
|
462
|
-
var dist = getLength(wallPosArray[i], wallPosArray[i + 1]) / scale;
|
|
463
|
-
rulerLines.push({
|
|
464
|
-
v0: wallPosArray[i],
|
|
465
|
-
v1: wallPosArray[i + 1],
|
|
466
|
-
space: rulerSpace,
|
|
467
|
-
text: formatNumber(dist, DECIMAL_PLACES_2)
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
// To display baseItems dimensions, set rulerLines with basePosArray
|
|
473
|
-
if (baseItems.length) {
|
|
474
|
-
for (var j = 0; j < basePosArray.length - 1; j++) {
|
|
475
|
-
var _dist = getLength(basePosArray[j], basePosArray[j + 1]) / scale;
|
|
476
|
-
rulerLines.push({
|
|
477
|
-
v0: basePosArray[j],
|
|
478
|
-
v1: basePosArray[j + 1],
|
|
479
|
-
space: rulerSpace,
|
|
480
|
-
text: formatNumber(_dist, DECIMAL_PLACES_2)
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
rulerLines.forEach(function (line) {
|
|
485
|
-
if (isNonZeroText(line.text)) rulerData.push(/*#__PURE__*/React.createElement(Ruler3D, {
|
|
486
|
-
line: line,
|
|
487
|
-
layer: layer,
|
|
488
|
-
viewScale: viewScale,
|
|
489
|
-
downloadFlag: downloadFlag
|
|
490
|
-
}));
|
|
491
|
-
});
|
|
492
|
-
return /*#__PURE__*/React.createElement("g", {
|
|
493
|
-
opacity: layer.opacity
|
|
494
|
-
}, rulerData);
|
|
495
|
-
}
|