kitchen-simulator 2.0.0 → 2.0.1-test.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/es/@history.js +2 -0
- package/es/AppContext.js +3 -0
- package/es/LiteKitchenConfigurator.js +480 -0
- package/es/LiteRenderer.js +503 -0
- package/es/actions/area-actions.js +14 -0
- package/es/actions/export.js +36 -0
- package/es/actions/groups-actions.js +89 -0
- package/es/actions/holes-actions.js +119 -0
- package/es/actions/items-actions.js +318 -0
- package/es/actions/lines-actions.js +81 -0
- package/es/actions/project-actions.js +286 -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/analytics/ga4.js +188 -0
- package/es/analytics/posthog.js +60 -0
- package/es/assets/Window.hdr +2100 -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/1.jpg +0 -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 +6 -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/areas/area/textures/ceramic-tile.jpg +0 -0
- package/es/catalog/areas/area/textures/grass.jpg +0 -0
- package/es/catalog/areas/area/textures/parquet.jpg +0 -0
- package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
- package/es/catalog/areas/area/textures/tile1.jpg +0 -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 +181 -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/bricks-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks.jpg +0 -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/morden-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/morden.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted.jpg +0 -0
- package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
- package/es/catalog/lines/wall/wall.png +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 +100 -0
- package/es/catalog/properties/property-length-measure.js +84 -0
- package/es/catalog/properties/property-length-measure_hole.js +100 -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 +149 -0
- package/es/catalog/utils/geom-utils.js +189 -0
- package/es/catalog/utils/item-loader.js +1594 -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 +926 -0
- package/es/class/item.js +1845 -0
- package/es/class/layer.js +663 -0
- package/es/class/line.js +1221 -0
- package/es/class/project.js +795 -0
- package/es/class/vertex.js +198 -0
- package/es/components/content.js +131 -0
- package/es/components/export.js +7 -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 +183 -0
- package/es/components/style/form-number-input_2.js +200 -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 +53 -0
- package/es/components/viewer2d/item.js +447 -0
- package/es/components/viewer2d/layer.js +164 -0
- package/es/components/viewer2d/line.js +964 -0
- package/es/components/viewer2d/ruler.js +79 -0
- package/es/components/viewer2d/rulerDist.js +132 -0
- package/es/components/viewer2d/rulerX.js +145 -0
- package/es/components/viewer2d/rulerY.js +147 -0
- package/es/components/viewer2d/scene.js +128 -0
- package/es/components/viewer2d/snap.js +74 -0
- package/es/components/viewer2d/state.js +73 -0
- package/es/components/viewer2d/utils.js +187 -0
- package/es/components/viewer2d/vertex.js +65 -0
- package/es/components/viewer2d/viewer2d.js +1433 -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 +61 -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 +3617 -0
- package/es/components/viewer3d/three-memory-cleaner.js +51 -0
- package/es/components/viewer3d/viewer3d-first-person.js +309 -0
- package/es/components/viewer3d/viewer3d.js +2654 -0
- package/es/constants.js +688 -0
- package/es/devLiteRenderer.js +316 -0
- package/es/index.js +56 -0
- package/es/models.js +506 -0
- package/es/plugins/SVGLoader.js +1412 -0
- package/es/plugins/console-debugger.js +34 -0
- package/es/plugins/export.js +7 -0
- package/es/plugins/keyboard.js +101 -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 +147 -0
- package/es/reducers/lines-reducer.js +45 -0
- package/es/reducers/project-reducer.js +131 -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 +75 -0
- package/es/reducers/viewer3d-reducer.js +56 -0
- package/es/shared-style.js +66 -0
- package/es/styles/export.js +5 -0
- package/es/styles/tabs.css +40 -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 +2446 -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 +334 -0
- package/es/utils/history.js +29 -0
- package/es/utils/id-broker.js +15 -0
- package/es/utils/isolate-event-handler.js +683 -0
- package/es/utils/logger.js +8 -0
- package/es/utils/math.js +50 -0
- package/es/utils/molding.js +865 -0
- package/es/utils/name-generator.js +14 -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/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/lib/@history.js +11 -0
- package/lib/AppContext.js +11 -0
- package/lib/LiteKitchenConfigurator.js +490 -0
- package/lib/LiteRenderer.js +513 -0
- package/lib/actions/area-actions.js +21 -0
- package/lib/actions/export.js +36 -0
- package/lib/actions/groups-actions.js +107 -0
- package/lib/actions/holes-actions.js +140 -0
- package/lib/actions/items-actions.js +370 -0
- package/lib/actions/lines-actions.js +96 -0
- package/lib/actions/project-actions.js +338 -0
- package/lib/actions/scene-actions.js +43 -0
- package/lib/actions/vertices-actions.js +35 -0
- package/lib/actions/viewer2d-actions.js +73 -0
- package/lib/actions/viewer3d-actions.js +32 -0
- package/lib/analytics/ga4.js +194 -0
- package/lib/analytics/posthog.js +68 -0
- package/lib/assets/Window.hdr +2100 -0
- package/lib/assets/brown_photostudio_02_1k.hdr +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
- package/lib/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
- package/lib/assets/fonts/style.css +177 -0
- package/lib/assets/gltf/door_closet.bin +0 -0
- package/lib/assets/gltf/door_closet.fbx +0 -0
- package/lib/assets/gltf/door_closet.gltf +1 -0
- package/lib/assets/gltf/door_exterior.bin +0 -0
- package/lib/assets/gltf/door_exterior.fbx +0 -0
- package/lib/assets/gltf/door_exterior.gltf +1 -0
- package/lib/assets/gltf/door_interior.bin +0 -0
- package/lib/assets/gltf/door_interior.fbx +0 -0
- package/lib/assets/gltf/door_interior.gltf +1 -0
- package/lib/assets/gltf/door_sliding.bin +0 -0
- package/lib/assets/gltf/door_sliding.fbx +0 -0
- package/lib/assets/gltf/door_sliding.gltf +1 -0
- package/lib/assets/gltf/doorway_framed.bin +0 -0
- package/lib/assets/gltf/doorway_framed.fbx +0 -0
- package/lib/assets/gltf/doorway_framed.gltf +1 -0
- package/lib/assets/gltf/window_clear.bin +0 -0
- package/lib/assets/gltf/window_clear.fbx +0 -0
- package/lib/assets/gltf/window_clear.gltf +1 -0
- package/lib/assets/gltf/window_cross.bin +0 -0
- package/lib/assets/gltf/window_cross.fbx +0 -0
- package/lib/assets/gltf/window_cross.gltf +1 -0
- package/lib/assets/gltf/window_double_hung.bin +0 -0
- package/lib/assets/gltf/window_double_hung.fbx +0 -0
- package/lib/assets/gltf/window_double_hung.gltf +1 -0
- package/lib/assets/gltf/window_vertical.bin +0 -0
- package/lib/assets/gltf/window_vertical.fbx +0 -0
- package/lib/assets/gltf/window_vertical.gltf +1 -0
- package/lib/assets/img/1.jpg +0 -0
- package/lib/assets/img/TKC_thumbnail.png +0 -0
- package/lib/assets/img/Toggle.png +0 -0
- package/lib/assets/img/loading/loading.gif +0 -0
- package/lib/assets/img/loading/loading_1.svg +11 -0
- package/lib/assets/img/loading_large.gif +0 -0
- package/lib/assets/img/png/door/closet.png +0 -0
- package/lib/assets/img/png/door/doorwaysframed.png +0 -0
- package/lib/assets/img/png/door/doorwaysframeles.png +0 -0
- package/lib/assets/img/png/door/doorwaysframeless.png +0 -0
- package/lib/assets/img/png/door/exterior.png +0 -0
- package/lib/assets/img/png/door/interior.png +0 -0
- package/lib/assets/img/png/door/sliding.png +0 -0
- package/lib/assets/img/png/helper/outcome.png +0 -0
- package/lib/assets/img/png/helper/video_preview_3d.png +0 -0
- package/lib/assets/img/png/helper/video_preview_start.png +0 -0
- package/lib/assets/img/project_img.png +0 -0
- package/lib/assets/img/rta/rta_logo_box_blue.jpg +0 -0
- package/lib/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
- package/lib/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
- package/lib/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
- package/lib/assets/img/rta/rta_logo_box_lightblue.png +0 -0
- package/lib/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
- package/lib/assets/img/rta/rta_logo_box_maroon.png +0 -0
- package/lib/assets/img/rta/rta_logo_box_white.png +0 -0
- package/lib/assets/img/rta_menu.png +0 -0
- package/lib/assets/img/step2.jpg +0 -0
- package/lib/assets/img/step3.jpg +0 -0
- package/lib/assets/img/step4.jpg +0 -0
- package/lib/assets/img/step5.jpg +0 -0
- package/lib/assets/img/step6.jpg +0 -0
- package/lib/assets/img/step7.jpg +0 -0
- package/lib/assets/img/step8.jpg +0 -0
- package/lib/assets/img/svg/2d_delete_object.svg +33 -0
- package/lib/assets/img/svg/2d_delete_object1.svg +33 -0
- package/lib/assets/img/svg/2d_lock_object.svg +33 -0
- package/lib/assets/img/svg/3d_item_move.svg +106 -0
- package/lib/assets/img/svg/3d_item_rotation.svg +76 -0
- package/lib/assets/img/svg/3d_item_warning_edit.svg +77 -0
- package/lib/assets/img/svg/3d_item_warning_info.svg +81 -0
- package/lib/assets/img/svg/accessories.svg +4 -0
- package/lib/assets/img/svg/angle_icon.svg +39 -0
- package/lib/assets/img/svg/blank_div.svg +14 -0
- package/lib/assets/img/svg/bottombar/2d3d_button.svg +3 -0
- package/lib/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
- package/lib/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
- package/lib/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
- package/lib/assets/img/svg/bottombar/arrow-down.svg +3 -0
- package/lib/assets/img/svg/bottombar/arrow-left.svg +3 -0
- package/lib/assets/img/svg/bottombar/arrow-minus.svg +3 -0
- package/lib/assets/img/svg/bottombar/arrow-plus.svg +11 -0
- package/lib/assets/img/svg/bottombar/arrow-right.svg +3 -0
- package/lib/assets/img/svg/bottombar/arrow-up.svg +3 -0
- package/lib/assets/img/svg/bottombar/collapse.svg +3 -0
- package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -0
- package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -0
- package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -0
- package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -0
- package/lib/assets/img/svg/bottombar/elevation.svg +6 -0
- package/lib/assets/img/svg/bottombar/expand.svg +3 -0
- package/lib/assets/img/svg/bottombar/help.svg +72 -0
- package/lib/assets/img/svg/bottombar/incm_toggle.svg +39 -0
- package/lib/assets/img/svg/bottombar/pan_1.svg +57 -0
- package/lib/assets/img/svg/bottombar/pan_2.svg +27 -0
- package/lib/assets/img/svg/bottombar/pan_3.svg +27 -0
- package/lib/assets/img/svg/bottombar/pan_4.svg +27 -0
- package/lib/assets/img/svg/bottombar/pan_5.svg +27 -0
- package/lib/assets/img/svg/bottombar/settings.svg +23 -0
- package/lib/assets/img/svg/bottombar/spin-down.svg +76 -0
- package/lib/assets/img/svg/bottombar/spin-left.svg +75 -0
- package/lib/assets/img/svg/bottombar/spin-right.svg +75 -0
- package/lib/assets/img/svg/bottombar/spin-up.svg +76 -0
- package/lib/assets/img/svg/bottombar/spin_1.svg +48 -0
- package/lib/assets/img/svg/bottombar/spin_2.svg +31 -0
- package/lib/assets/img/svg/bottombar/spin_3.svg +31 -0
- package/lib/assets/img/svg/bottombar/spin_4.svg +31 -0
- package/lib/assets/img/svg/bottombar/spin_5.svg +31 -0
- package/lib/assets/img/svg/bottombar/zoomin.svg +29 -0
- package/lib/assets/img/svg/bottombar/zoomout.svg +26 -0
- package/lib/assets/img/svg/check.svg +10 -0
- package/lib/assets/img/svg/close.svg +11 -0
- package/lib/assets/img/svg/color/Black.svg +3 -0
- package/lib/assets/img/svg/color/Blue.svg +3 -0
- package/lib/assets/img/svg/color/Brown.svg +9 -0
- package/lib/assets/img/svg/color/Cream.svg +3 -0
- package/lib/assets/img/svg/color/Dark.svg +9 -0
- package/lib/assets/img/svg/color/Gray.svg +3 -0
- package/lib/assets/img/svg/color/Green.svg +3 -0
- package/lib/assets/img/svg/color/Light.svg +9 -0
- package/lib/assets/img/svg/color/Medium.svg +9 -0
- package/lib/assets/img/svg/color/Unfinished.svg +9 -0
- package/lib/assets/img/svg/color/White.svg +3 -0
- package/lib/assets/img/svg/color/White.svg.bak +3 -0
- package/lib/assets/img/svg/color/stone2.jpg +0 -0
- package/lib/assets/img/svg/color/wood2.jpg +0 -0
- package/lib/assets/img/svg/copy.svg +11 -0
- package/lib/assets/img/svg/delete.svg +3 -0
- package/lib/assets/img/svg/detail.svg +77 -0
- package/lib/assets/img/svg/disclaimer/background.svg +758 -0
- package/lib/assets/img/svg/disclaimer/logo-dots.svg +11 -0
- package/lib/assets/img/svg/door/Closet.svg +11 -0
- package/lib/assets/img/svg/door/Exterior.svg +5 -0
- package/lib/assets/img/svg/door/Framed_dorway.svg +5 -0
- package/lib/assets/img/svg/door/Frameless_dorway.svg +5 -0
- package/lib/assets/img/svg/door/Interior.svg +7 -0
- package/lib/assets/img/svg/door/Sliding.svg +5 -0
- package/lib/assets/img/svg/doors_closet.svg +47 -0
- package/lib/assets/img/svg/doors_exterior.svg +25 -0
- package/lib/assets/img/svg/doors_interior.svg +29 -0
- package/lib/assets/img/svg/doors_patio.svg +26 -0
- package/lib/assets/img/svg/duplicate.svg +11 -0
- package/lib/assets/img/svg/duplicate_object_left.svg +32 -0
- package/lib/assets/img/svg/duplicate_object_right.svg +32 -0
- package/lib/assets/img/svg/filtersActive.svg +19 -0
- package/lib/assets/img/svg/firstsetting/L.svg +3 -0
- package/lib/assets/img/svg/firstsetting/L2.svg +3 -0
- package/lib/assets/img/svg/firstsetting/Open.svg +3 -0
- package/lib/assets/img/svg/firstsetting/Square.svg +3 -0
- package/lib/assets/img/svg/firstsetting/bar-active.svg +9 -0
- package/lib/assets/img/svg/firstsetting/bar-normal.svg +3 -0
- package/lib/assets/img/svg/firstsetting/bullet-current.svg +3 -0
- package/lib/assets/img/svg/firstsetting/bullet-done.svg +3 -0
- package/lib/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
- package/lib/assets/img/svg/firstsetting/check-active.svg +3 -0
- package/lib/assets/img/svg/firstsetting/check-normal.svg +3 -0
- package/lib/assets/img/svg/firstsetting/pencil.svg +11 -0
- package/lib/assets/img/svg/green_checkmark.svg +27 -0
- package/lib/assets/img/svg/headerbar/assist.svg +3 -0
- package/lib/assets/img/svg/headerbar/cart.svg +3 -0
- package/lib/assets/img/svg/headerbar/check.svg +10 -0
- package/lib/assets/img/svg/headerbar/consult_designer.svg +45 -0
- package/lib/assets/img/svg/headerbar/edit_name.svg +26 -0
- package/lib/assets/img/svg/headerbar/file-dollar.svg +13 -0
- package/lib/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
- package/lib/assets/img/svg/headerbar/plus.svg +11 -0
- package/lib/assets/img/svg/headerbar/review_quote.svg +44 -0
- package/lib/assets/img/svg/headerbar/ruler-measure.svg +11 -0
- package/lib/assets/img/svg/headerbar/save.svg +3 -0
- package/lib/assets/img/svg/headerbar/setting.svg +75 -0
- package/lib/assets/img/svg/help/check.svg +10 -0
- package/lib/assets/img/svg/help/search.svg +76 -0
- package/lib/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
- package/lib/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
- package/lib/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
- package/lib/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
- package/lib/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
- package/lib/assets/img/svg/intro/3-retrieve-project.svg +18 -0
- package/lib/assets/img/svg/invert.svg +127 -0
- package/lib/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
- package/lib/assets/img/svg/lefttoolbar/appliance.svg +13 -0
- package/lib/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
- package/lib/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
- package/lib/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
- package/lib/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
- package/lib/assets/img/svg/lefttoolbar/door-style.svg +20 -0
- package/lib/assets/img/svg/lefttoolbar/door.svg +12 -0
- package/lib/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
- package/lib/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
- package/lib/assets/img/svg/lefttoolbar/finishing.svg +13 -0
- package/lib/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
- package/lib/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
- package/lib/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
- package/lib/assets/img/svg/lefttoolbar/search.svg +76 -0
- package/lib/assets/img/svg/lefttoolbar/view_more.svg +86 -0
- package/lib/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
- package/lib/assets/img/svg/lefttoolbar/window.svg +12 -0
- package/lib/assets/img/svg/logo.svg +11 -0
- package/lib/assets/img/svg/logo_with_text.svg +25 -0
- package/lib/assets/img/svg/menubar/login.svg +84 -0
- package/lib/assets/img/svg/menubar/my_projects.svg +85 -0
- package/lib/assets/img/svg/menubar/new_project.svg +110 -0
- package/lib/assets/img/svg/menubar/save_project.svg +84 -0
- package/lib/assets/img/svg/options.svg +3 -0
- package/lib/assets/img/svg/positioning.svg +3 -0
- package/lib/assets/img/svg/rotate.png +0 -0
- package/lib/assets/img/svg/rotate.svg +17 -0
- package/lib/assets/img/svg/rotate_object_clockwise.svg +26 -0
- package/lib/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
- package/lib/assets/img/svg/toggleFilters.svg +19 -0
- package/lib/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
- package/lib/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
- package/lib/assets/img/svg/toolbar/add_button.svg +36 -0
- package/lib/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
- package/lib/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
- package/lib/assets/img/svg/toolbar/add_items_doors.svg +25 -0
- package/lib/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
- package/lib/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
- package/lib/assets/img/svg/toolbar/add_items_windows.svg +28 -0
- package/lib/assets/img/svg/toolbar/apply_button.svg +38 -0
- package/lib/assets/img/svg/toolbar/arrow-plus.svg +11 -0
- package/lib/assets/img/svg/toolbar/backsplash.svg +8 -0
- package/lib/assets/img/svg/toolbar/cancel_button.svg +37 -0
- package/lib/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
- package/lib/assets/img/svg/toolbar/countertop.svg +7 -0
- package/lib/assets/img/svg/toolbar/dcm.png +0 -0
- package/lib/assets/img/svg/toolbar/dcm_off.svg +12 -0
- package/lib/assets/img/svg/toolbar/dcm_on.svg +474 -0
- package/lib/assets/img/svg/toolbar/delete_button.svg +37 -0
- package/lib/assets/img/svg/toolbar/download.svg +77 -0
- package/lib/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
- package/lib/assets/img/svg/toolbar/edit_button.svg +75 -0
- package/lib/assets/img/svg/toolbar/email_quote_button.svg +44 -0
- package/lib/assets/img/svg/toolbar/fbm.png +0 -0
- package/lib/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
- package/lib/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
- package/lib/assets/img/svg/toolbar/floorstyle.svg +9 -0
- package/lib/assets/img/svg/toolbar/fmb.png +0 -0
- package/lib/assets/img/svg/toolbar/fmb_off.svg +12 -0
- package/lib/assets/img/svg/toolbar/fmb_on.svg +489 -0
- package/lib/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
- package/lib/assets/img/svg/toolbar/get_started_button.svg +41 -0
- package/lib/assets/img/svg/toolbar/handles.svg +5 -0
- package/lib/assets/img/svg/toolbar/lighting.svg +7 -0
- package/lib/assets/img/svg/toolbar/lrm.png +0 -0
- package/lib/assets/img/svg/toolbar/lrm_off.svg +12 -0
- package/lib/assets/img/svg/toolbar/lrm_on.svg +470 -0
- package/lib/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
- package/lib/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
- package/lib/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
- package/lib/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
- package/lib/assets/img/svg/toolbar/redo_button.svg +75 -0
- package/lib/assets/img/svg/toolbar/redo_button1.svg +75 -0
- package/lib/assets/img/svg/toolbar/review_quote_active.svg +14 -0
- package/lib/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
- package/lib/assets/img/svg/toolbar/save_project_button.svg +44 -0
- package/lib/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
- package/lib/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
- package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -0
- package/lib/assets/img/svg/toolbar/style_change_button.svg +47 -0
- package/lib/assets/img/svg/toolbar/take_picture.svg +75 -0
- package/lib/assets/img/svg/toolbar/undo_button.svg +76 -0
- package/lib/assets/img/svg/toolbar/undo_button1.svg +76 -0
- package/lib/assets/img/svg/toolbar/use_button.svg +37 -0
- package/lib/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
- package/lib/assets/img/svg/topbar/edit_active.svg +10 -0
- package/lib/assets/img/svg/topbar/edit_inactive.svg +10 -0
- package/lib/assets/img/svg/topbar/redo_active.svg +42 -0
- package/lib/assets/img/svg/topbar/redo_inactive.svg +23 -0
- package/lib/assets/img/svg/topbar/select_all_active.svg +50 -0
- package/lib/assets/img/svg/topbar/select_all_inactive.svg +32 -0
- package/lib/assets/img/svg/topbar/take_picture_active.svg +51 -0
- package/lib/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
- package/lib/assets/img/svg/topbar/undo_active.svg +42 -0
- package/lib/assets/img/svg/topbar/undo_inactive.svg +23 -0
- package/lib/assets/img/svg/warning_info_2d.svg +81 -0
- package/lib/assets/img/svg/window/Clear.svg +3 -0
- package/lib/assets/img/svg/window/Cross.svg +5 -0
- package/lib/assets/img/svg/window/Double_hung.svg +4 -0
- package/lib/assets/img/svg/window/Vertical.svg +4 -0
- package/lib/assets/img/svg/windows_clear.svg +23 -0
- package/lib/assets/img/svg/windows_cross.svg +28 -0
- package/lib/assets/img/svg/windows_double_hung.svg +24 -0
- package/lib/assets/img/svg/windows_vertical.svg +24 -0
- package/lib/assets/img/svg/wizardstep/Custom.svg +3 -0
- package/lib/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
- package/lib/assets/img/svg/wizardstep/L.svg +3 -0
- package/lib/assets/img/svg/wizardstep/L2.svg +3 -0
- package/lib/assets/img/svg/wizardstep/Open.svg +3 -0
- package/lib/assets/img/svg/wizardstep/Square.svg +3 -0
- package/lib/assets/img/svg/wizardstep/bar-active.svg +9 -0
- package/lib/assets/img/svg/wizardstep/bar-normal.svg +3 -0
- package/lib/assets/img/svg/wizardstep/bullet-current.svg +3 -0
- package/lib/assets/img/svg/wizardstep/bullet-done.svg +3 -0
- package/lib/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
- package/lib/assets/img/svg/wizardstep/check-active.svg +3 -0
- package/lib/assets/img/svg/wizardstep/check-normal.svg +3 -0
- package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -0
- package/lib/assets/img/svg/wizardstep/pencil.svg +11 -0
- package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -0
- package/lib/assets/img/texture/glass.jpg +0 -0
- package/lib/assets/img/texture/steel.jpg +0 -0
- package/lib/assets/img/texture/white1px.jpg +0 -0
- package/lib/assets/img/texture/wood.jpg +0 -0
- package/lib/assets/model/DCM.bin +0 -0
- package/lib/assets/model/DCM.fbx +0 -0
- package/lib/assets/model/DCM.gltf +1 -0
- package/lib/assets/model/FBM.bin +0 -0
- package/lib/assets/model/FBM.fbx +0 -0
- package/lib/assets/model/FBM.gltf +1 -0
- package/lib/assets/model/LRM.bin +0 -0
- package/lib/assets/model/LRM.fbx +0 -0
- package/lib/assets/model/LRM.gltf +1 -0
- package/lib/assets/rtastore_logo.png +0 -0
- package/lib/catalog/areas/area/planner-element.js +53 -0
- package/lib/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
- package/lib/catalog/areas/area/textures/grass.jpg +0 -0
- package/lib/catalog/areas/area/textures/parquet.jpg +0 -0
- package/lib/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
- package/lib/catalog/areas/area/textures/tile1.jpg +0 -0
- package/lib/catalog/back.png +0 -0
- package/lib/catalog/catalog.js +272 -0
- package/lib/catalog/doors.png +0 -0
- package/lib/catalog/doorways.png +0 -0
- package/lib/catalog/envMap/nx.hdr +0 -0
- package/lib/catalog/envMap/ny.hdr +0 -0
- package/lib/catalog/envMap/nz.hdr +0 -0
- package/lib/catalog/envMap/px.hdr +0 -0
- package/lib/catalog/envMap/py.hdr +0 -0
- package/lib/catalog/envMap/pz.hdr +0 -0
- package/lib/catalog/export.js +1 -0
- package/lib/catalog/factories/area-factory-3d.js +190 -0
- package/lib/catalog/factories/area-factory.js +88 -0
- package/lib/catalog/factories/export.js +25 -0
- package/lib/catalog/factories/wall-factory-3d.js +212 -0
- package/lib/catalog/factories/wall-factory.js +279 -0
- package/lib/catalog/holes/door-closet/planner-element.js +232 -0
- package/lib/catalog/holes/door-double/door_double.png +0 -0
- package/lib/catalog/holes/door-double/planner-element.js +325 -0
- package/lib/catalog/holes/door-exterior/planner-element.js +225 -0
- package/lib/catalog/holes/door-interior/planner-element.js +237 -0
- package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
- package/lib/catalog/holes/door-panic/planner-element.js +513 -0
- package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/lib/catalog/holes/door-panic-double/planner-element.js +473 -0
- package/lib/catalog/holes/door-sliding/planner-element.js +235 -0
- package/lib/catalog/holes/doorway-framed/planner-element.js +155 -0
- package/lib/catalog/holes/doorway-frameless/planner-element.js +114 -0
- package/lib/catalog/holes/export.js +97 -0
- package/lib/catalog/holes/gate/gate.jpg +0 -0
- package/lib/catalog/holes/window-clear/planner-element.js +176 -0
- package/lib/catalog/holes/window-clear/texture.png +0 -0
- package/lib/catalog/holes/window-cross/planner-element.js +175 -0
- package/lib/catalog/holes/window-cross/texture.png +0 -0
- package/lib/catalog/holes/window-double-hung/planner-element.js +313 -0
- package/lib/catalog/holes/window-double-hung/texture.png +0 -0
- package/lib/catalog/holes/window-vertical/planner-element.js +286 -0
- package/lib/catalog/holes/window-vertical/texture.png +0 -0
- package/lib/catalog/lines/wall/planner-element.js +87 -0
- package/lib/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
- package/lib/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/lib/catalog/lines/wall/textures/bricks.jpg +0 -0
- package/lib/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/lib/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/lib/catalog/lines/wall/textures/morden-normal.jpg +0 -0
- package/lib/catalog/lines/wall/textures/morden.jpg +0 -0
- package/lib/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/lib/catalog/lines/wall/textures/painted.jpg +0 -0
- package/lib/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
- package/lib/catalog/lines/wall/textures/plaster.jpg +0 -0
- package/lib/catalog/lines/wall/wall.png +0 -0
- package/lib/catalog/molding/molding-dcm/planner-element.js +33 -0
- package/lib/catalog/molding/molding-dcm/texture.png +0 -0
- package/lib/catalog/molding/molding-fbm/planner-element.js +33 -0
- package/lib/catalog/molding/molding-fbm/texture.png +0 -0
- package/lib/catalog/molding/molding-lrm/planner-element.js +33 -0
- package/lib/catalog/molding/molding-lrm/texture.png +0 -0
- package/lib/catalog/properties/export.js +81 -0
- package/lib/catalog/properties/property-checkbox.js +76 -0
- package/lib/catalog/properties/property-color.js +47 -0
- package/lib/catalog/properties/property-enum.js +58 -0
- package/lib/catalog/properties/property-hidden.js +27 -0
- package/lib/catalog/properties/property-lenght-measure.js +108 -0
- package/lib/catalog/properties/property-length-measure.js +92 -0
- package/lib/catalog/properties/property-length-measure_hole.js +108 -0
- package/lib/catalog/properties/property-number.js +56 -0
- package/lib/catalog/properties/property-read-only.js +34 -0
- package/lib/catalog/properties/property-string.js +56 -0
- package/lib/catalog/properties/property-toggle.js +47 -0
- package/lib/catalog/properties/shared-property-style.js +21 -0
- package/lib/catalog/utils/FuseUtils.js +87 -0
- package/lib/catalog/utils/exporter.js +157 -0
- package/lib/catalog/utils/geom-utils.js +205 -0
- package/lib/catalog/utils/item-loader.js +1608 -0
- package/lib/catalog/utils/load-obj.js +99 -0
- package/lib/catalog/utils/mtl-loader.js +366 -0
- package/lib/catalog/utils/obj-loader.js +486 -0
- package/lib/catalog/windows.png +0 -0
- package/lib/class/FuseUtils.js +87 -0
- package/lib/class/area.js +148 -0
- package/lib/class/export.js +96 -0
- package/lib/class/group.js +438 -0
- package/lib/class/guide.js +64 -0
- package/lib/class/hole.js +932 -0
- package/lib/class/item.js +1852 -0
- package/lib/class/layer.js +670 -0
- package/lib/class/line.js +1230 -0
- package/lib/class/project.js +804 -0
- package/lib/class/vertex.js +205 -0
- package/lib/components/content.js +142 -0
- package/lib/components/export.js +7 -0
- package/lib/components/style/button.js +115 -0
- package/lib/components/style/cancel-button.js +29 -0
- package/lib/components/style/content-container.js +38 -0
- package/lib/components/style/content-title.js +35 -0
- package/lib/components/style/delete-button.js +34 -0
- package/lib/components/style/export.js +121 -0
- package/lib/components/style/form-block.js +28 -0
- package/lib/components/style/form-color-input.js +34 -0
- package/lib/components/style/form-label.js +30 -0
- package/lib/components/style/form-number-input.js +192 -0
- package/lib/components/style/form-number-input_2.js +209 -0
- package/lib/components/style/form-select.js +29 -0
- package/lib/components/style/form-slider.js +68 -0
- package/lib/components/style/form-submit-button.js +35 -0
- package/lib/components/style/form-text-input.js +78 -0
- package/lib/components/viewer2d/area.js +89 -0
- package/lib/components/viewer2d/export.js +121 -0
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +44 -0
- package/lib/components/viewer2d/grids/grid-streak.js +44 -0
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +44 -0
- package/lib/components/viewer2d/grids/grids.js +40 -0
- package/lib/components/viewer2d/group.js +63 -0
- package/lib/components/viewer2d/item.js +457 -0
- package/lib/components/viewer2d/layer.js +172 -0
- package/lib/components/viewer2d/line.js +975 -0
- package/lib/components/viewer2d/ruler.js +87 -0
- package/lib/components/viewer2d/rulerDist.js +140 -0
- package/lib/components/viewer2d/rulerX.js +154 -0
- package/lib/components/viewer2d/rulerY.js +156 -0
- package/lib/components/viewer2d/scene.js +137 -0
- package/lib/components/viewer2d/snap.js +84 -0
- package/lib/components/viewer2d/state.js +83 -0
- package/lib/components/viewer2d/utils.js +200 -0
- package/lib/components/viewer2d/vertex.js +75 -0
- package/lib/components/viewer2d/viewer2d.js +1444 -0
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +2591 -0
- package/lib/components/viewer3d/dcm.js +408 -0
- package/lib/components/viewer3d/fbm.js +421 -0
- package/lib/components/viewer3d/front3D.js +71 -0
- package/lib/components/viewer3d/grid-creator.js +35 -0
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +45 -0
- package/lib/components/viewer3d/grids/grid-streak.js +36 -0
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +45 -0
- package/lib/components/viewer3d/libs/first-person-controls.js +74 -0
- package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +1287 -0
- package/lib/components/viewer3d/libs/mtl-loader.js +366 -0
- package/lib/components/viewer3d/libs/obj-loader.js +471 -0
- package/lib/components/viewer3d/libs/orbit-controls.js +706 -0
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +53 -0
- package/lib/components/viewer3d/lrm.js +312 -0
- package/lib/components/viewer3d/model.js +714 -0
- package/lib/components/viewer3d/pointer-lock-navigation.js +122 -0
- package/lib/components/viewer3d/ruler-utils/itemRect.js +69 -0
- package/lib/components/viewer3d/ruler-utils/layer3D.js +503 -0
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +232 -0
- package/lib/components/viewer3d/ruler-utils/scene3D.js +67 -0
- package/lib/components/viewer3d/ruler-utils/state3D.js +26 -0
- package/lib/components/viewer3d/scene-creator.js +3652 -0
- package/lib/components/viewer3d/three-memory-cleaner.js +60 -0
- package/lib/components/viewer3d/viewer3d-first-person.js +316 -0
- package/lib/components/viewer3d/viewer3d.js +2661 -0
- package/lib/constants.js +697 -0
- package/lib/devLiteRenderer.js +320 -0
- package/lib/index.js +64 -0
- package/lib/models.js +513 -0
- package/lib/plugins/SVGLoader.js +1417 -0
- package/lib/plugins/console-debugger.js +42 -0
- package/lib/plugins/export.js +25 -0
- package/lib/plugins/keyboard.js +108 -0
- package/lib/reducers/areas-reducer.js +19 -0
- package/lib/reducers/export.js +97 -0
- package/lib/reducers/groups-reducer.js +45 -0
- package/lib/reducers/holes-reducer.js +69 -0
- package/lib/reducers/items-reducer.js +151 -0
- package/lib/reducers/lines-reducer.js +52 -0
- package/lib/reducers/project-reducer.js +138 -0
- package/lib/reducers/reducer.js +26 -0
- package/lib/reducers/scene-reducer.js +35 -0
- package/lib/reducers/user-reducer.js +48 -0
- package/lib/reducers/vertices-reducer.js +26 -0
- package/lib/reducers/viewer2d-reducer.js +82 -0
- package/lib/reducers/viewer3d-reducer.js +63 -0
- package/lib/shared-style.js +72 -0
- package/lib/styles/export.js +13 -0
- package/lib/styles/tabs.css +40 -0
- package/lib/translator/en.js +111 -0
- package/lib/translator/it.js +86 -0
- package/lib/translator/ru.js +86 -0
- package/lib/translator/translator.js +87 -0
- package/lib/utils/browser.js +40 -0
- package/lib/utils/convert-units-lite.js +35 -0
- package/lib/utils/email-validator.js +10 -0
- package/lib/utils/export.js +56 -0
- package/lib/utils/geometry.js +2545 -0
- package/lib/utils/get-edges-of-subgraphs.js +33 -0
- package/lib/utils/graph-cycles.js +239 -0
- package/lib/utils/graph-inner-cycles.js +54 -0
- package/lib/utils/graph.js +153 -0
- package/lib/utils/helper.js +358 -0
- package/lib/utils/history.js +36 -0
- package/lib/utils/id-broker.js +22 -0
- package/lib/utils/isolate-event-handler.js +691 -0
- package/lib/utils/logger.js +14 -0
- package/lib/utils/math.js +57 -0
- package/lib/utils/molding.js +890 -0
- package/lib/utils/name-generator.js +21 -0
- package/lib/utils/objects-utils.js +62 -0
- package/lib/utils/phone-validator.js +10 -0
- package/lib/utils/process-black-list.js +22 -0
- package/lib/utils/react-if.js +25 -0
- package/lib/utils/snap-scene.js +101 -0
- package/lib/utils/snap.js +245 -0
- package/lib/utils/summarizeCart.js +30 -0
- package/lib/utils/threeCSG.es6.js +504 -0
- package/lib/version.js +7 -0
- package/package.json +93 -86
- package/dist/index.js +0 -3
- package/dist/index.js.LICENSE.txt +0 -55
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,1608 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.addEdgesToMesh = addEdgesToMesh;
|
|
9
|
+
exports.loadTexture = loadTexture;
|
|
10
|
+
exports.render2DItem = render2DItem;
|
|
11
|
+
exports.render3DApplianceItem = render3DApplianceItem;
|
|
12
|
+
exports.render3DItem = render3DItem;
|
|
13
|
+
exports.render3DLightingItem = render3DLightingItem;
|
|
14
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
+
var _convertUnitsLite = require("../../utils/convert-units-lite");
|
|
18
|
+
var _immutable = require("immutable");
|
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
+
var Three = _interopRequireWildcard(require("three"));
|
|
21
|
+
var SceneCreator = _interopRequireWildcard(require("../../components/viewer3d/scene-creator"));
|
|
22
|
+
var _constants = require("../../constants");
|
|
23
|
+
var _models = require("../../models");
|
|
24
|
+
var GeomUtils = _interopRequireWildcard(require("./geom-utils"));
|
|
25
|
+
var _loadObj = require("./load-obj");
|
|
26
|
+
var _helper = require("../../utils/helper");
|
|
27
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
28
|
+
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; }
|
|
29
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
30
|
+
var INITIAL_NORMAL_MAP = '';
|
|
31
|
+
|
|
32
|
+
// env Map ///////////////
|
|
33
|
+
var paramsCounter = {
|
|
34
|
+
envMap: 'HDR',
|
|
35
|
+
roughness: 0.6,
|
|
36
|
+
metalness: 0.3,
|
|
37
|
+
exposure: 1
|
|
38
|
+
// debug: true
|
|
39
|
+
};
|
|
40
|
+
var params = {
|
|
41
|
+
envMap: 'HDR',
|
|
42
|
+
roughness: 0.9,
|
|
43
|
+
metalness: 0.1,
|
|
44
|
+
metalness_glossy: 0.2,
|
|
45
|
+
exposure: 1.0
|
|
46
|
+
// debug: false
|
|
47
|
+
};
|
|
48
|
+
var paramsModel = {
|
|
49
|
+
envMap: 'HDR',
|
|
50
|
+
roughness: 0.9,
|
|
51
|
+
metalness: 0.2,
|
|
52
|
+
exposure: 1.0
|
|
53
|
+
// debug: false
|
|
54
|
+
};
|
|
55
|
+
var buttons = [{
|
|
56
|
+
name: 'Edit',
|
|
57
|
+
thumbnail: '/assets/img/svg/3d_item_warning_edit.svg'
|
|
58
|
+
}, {
|
|
59
|
+
name: 'Info',
|
|
60
|
+
thumbnail: '/assets/img/svg/3d_item_warning_info.svg'
|
|
61
|
+
}];
|
|
62
|
+
|
|
63
|
+
// /////////////////////////
|
|
64
|
+
|
|
65
|
+
var cachedObject = {}; // cached Object for quickly load-3d
|
|
66
|
+
|
|
67
|
+
// render 2d function//////
|
|
68
|
+
function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, shape_svg) {
|
|
69
|
+
var _useState = (0, _react.useState)(false),
|
|
70
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
71
|
+
hover = _useState2[0],
|
|
72
|
+
setHover = _useState2[1];
|
|
73
|
+
var x = element.x,
|
|
74
|
+
y = element.y,
|
|
75
|
+
rotation = element.rotation;
|
|
76
|
+
var el_DSN = 'el_DSN',
|
|
77
|
+
doorStylesKeys = [];
|
|
78
|
+
var _element = element.toJS();
|
|
79
|
+
if (_element.doorStyle !== undefined) {
|
|
80
|
+
if (_element.doorStyle.doorStyles !== undefined) {
|
|
81
|
+
doorStylesKeys = Object.keys(_element.doorStyle.doorStyles);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if ((doorStylesKeys.includes('euro_length') || doorStylesKeys.includes('euro_width') || doorStylesKeys.includes('euro_shape_svg')) && _element.doorStyle.doorStyles.is_euro_cds) {
|
|
85
|
+
el_DSN = _element.doorStyle.door_style_name;
|
|
86
|
+
} else {
|
|
87
|
+
el_DSN = 'el_DSN';
|
|
88
|
+
}
|
|
89
|
+
var width, depth, el_euro_length, el_euro_width, el_euro_length_unit, el_euro_width_unit, el_is_euro_cds, el_euro_shape_svg;
|
|
90
|
+
if (doorStylesKeys.length > 0) {
|
|
91
|
+
el_euro_length = _element.doorStyle.doorStyles.euro_length;
|
|
92
|
+
el_euro_width = _element.doorStyle.doorStyles.euro_width;
|
|
93
|
+
el_is_euro_cds = _element.doorStyle.doorStyles.is_euro_cds;
|
|
94
|
+
el_euro_shape_svg = _element.doorStyle.doorStyles.euro_shape_svg;
|
|
95
|
+
}
|
|
96
|
+
if (el_euro_length === undefined && el_euro_width === undefined) {
|
|
97
|
+
el_DSN = 'el_DSN';
|
|
98
|
+
}
|
|
99
|
+
if (el_DSN === 'Euro & Frameless') {
|
|
100
|
+
// sizeinfo["depth"] = el_euro_length;
|
|
101
|
+
// sizeinfo["width"] = el_euro_width;
|
|
102
|
+
}
|
|
103
|
+
var tempWidth = element.properties.get('width');
|
|
104
|
+
var tempDepth = element.properties.get('depth');
|
|
105
|
+
width = tempWidth && {
|
|
106
|
+
length: tempWidth.get('_length'),
|
|
107
|
+
unit: tempWidth.get('_unit')
|
|
108
|
+
};
|
|
109
|
+
depth = tempDepth && {
|
|
110
|
+
length: tempDepth.get('_length'),
|
|
111
|
+
unit: tempDepth.get('_unit')
|
|
112
|
+
};
|
|
113
|
+
var originalWidth = (0, _convertUnitsLite.convert)(sizeinfo.width).from('in').to('cm');
|
|
114
|
+
var originalDepth = (0, _convertUnitsLite.convert)(sizeinfo.depth).from('in').to('cm');
|
|
115
|
+
var newWidth = (0, _convertUnitsLite.convert)(width.length).from(width.unit).to('cm');
|
|
116
|
+
var newDepth = (0, _convertUnitsLite.convert)(depth.length).from(depth.unit).to('cm');
|
|
117
|
+
var padding = (0, _convertUnitsLite.convert)(_constants.SHAPE_SVG_PADDING).from(_constants.UNIT_INCH).to(_constants.UNIT_CENTIMETER);
|
|
118
|
+
var angle = element.rotation + 90;
|
|
119
|
+
var textRotation = 0;
|
|
120
|
+
if (Math.sin(angle * Math.PI / 180) < 0) {
|
|
121
|
+
textRotation = 180;
|
|
122
|
+
}
|
|
123
|
+
var color = '#eee';
|
|
124
|
+
if (layoutpos == _constants.BASE_CABINET_LAYOUTPOS) {
|
|
125
|
+
color = '#3f8db3';
|
|
126
|
+
}
|
|
127
|
+
if (layoutpos == _constants.TALL_CABINET_LAYOUTPOS) {
|
|
128
|
+
color = '#93b3be';
|
|
129
|
+
}
|
|
130
|
+
if (layoutpos == _constants.WALL_CABINET_LAYOUTPOS) {
|
|
131
|
+
color = '#48b08dcc';
|
|
132
|
+
}
|
|
133
|
+
var splitStr = [];
|
|
134
|
+
var txtContent = [];
|
|
135
|
+
var lineCount = 0; //parseInt(((newWidth) / 8 - 0.51).toFixed(), 10) - 1;
|
|
136
|
+
var rowCount = 0; //parseInt((element.type.length / lineCount - 0.51).toFixed(), 10);
|
|
137
|
+
|
|
138
|
+
// Get type
|
|
139
|
+
var type = element.type;
|
|
140
|
+
var objSKU = this.obj.sku_number;
|
|
141
|
+
if (objSKU.length !== 0) {
|
|
142
|
+
var dcId,
|
|
143
|
+
doorStyle = element.doorStyle;
|
|
144
|
+
if (doorStyle instanceof _immutable.Map) {
|
|
145
|
+
dcId = doorStyle.get('id');
|
|
146
|
+
} else {
|
|
147
|
+
dcId = doorStyle.id;
|
|
148
|
+
}
|
|
149
|
+
var skuItem = this.obj.skuArray.find(function (el) {
|
|
150
|
+
return el.door_color_id === dcId;
|
|
151
|
+
});
|
|
152
|
+
if (skuItem !== undefined) {
|
|
153
|
+
type = skuItem.sku;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (rowCount > 0) {
|
|
157
|
+
for (var _x = 0; _x < rowCount; _x++) {
|
|
158
|
+
splitStr.push(type.slice(lineCount * _x, lineCount * (_x + 1)));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
splitStr.push(type.slice(lineCount * rowCount));
|
|
162
|
+
splitStr.forEach(function (el, key) {
|
|
163
|
+
txtContent.push(/*#__PURE__*/_react["default"].createElement("text", {
|
|
164
|
+
key: 'text' + key,
|
|
165
|
+
x: "0",
|
|
166
|
+
y: newDepth / 2 - 12,
|
|
167
|
+
dy: 16 * key,
|
|
168
|
+
transform: "translate(".concat(newWidth / 2, ", ").concat(newDepth / 2 + 5, ") scale(1,-1) rotate(").concat(textRotation, ")")
|
|
169
|
+
// textLength={newWidth - 10}
|
|
170
|
+
// lengthAdjust="spacingAndGlyphs"
|
|
171
|
+
,
|
|
172
|
+
style: {
|
|
173
|
+
fontWeight: 500,
|
|
174
|
+
fontSize: '7px',
|
|
175
|
+
textAnchor: 'middle',
|
|
176
|
+
fill: '#FFF',
|
|
177
|
+
display: 'block'
|
|
178
|
+
}
|
|
179
|
+
}, el));
|
|
180
|
+
});
|
|
181
|
+
var style = {
|
|
182
|
+
stroke: element.selected ? '#565658' : '#565658',
|
|
183
|
+
strokeWidth: '2px',
|
|
184
|
+
fill: color
|
|
185
|
+
};
|
|
186
|
+
// let arrow_style = { stroke: element.selected ? '#0096fd' : null, strokeWidth: "2px", fill: "#84e1ce" };
|
|
187
|
+
|
|
188
|
+
var rendered = null;
|
|
189
|
+
var svg_url, svg_width, svg_depth;
|
|
190
|
+
if (shape_svg || el_euro_shape_svg) {
|
|
191
|
+
var _element$toJS$doorSty;
|
|
192
|
+
if (typeof shape_svg == 'string' || typeof el_euro_shape_svg == 'string') {
|
|
193
|
+
if (el_DSN === 'Euro & Frameless' && el_is_euro_cds) {
|
|
194
|
+
svg_url = el_euro_shape_svg;
|
|
195
|
+
svg_width = newWidth;
|
|
196
|
+
svg_depth = newDepth;
|
|
197
|
+
} else {
|
|
198
|
+
svg_url = shape_svg;
|
|
199
|
+
svg_width = originalWidth;
|
|
200
|
+
svg_depth = originalDepth;
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
// if (el_DSN === "Euro & Frameless" && el_is_euro_cds) {
|
|
204
|
+
// // svg_url = el_euro_shape_svg.url;
|
|
205
|
+
// } else {
|
|
206
|
+
// }
|
|
207
|
+
svg_url = shape_svg.url;
|
|
208
|
+
svg_width = (0, _convertUnitsLite.convert)(_constants.SHAPE_SVG_WIDTH).from(_constants.UNIT_INCH).to(_constants.UNIT_CENTIMETER);
|
|
209
|
+
svg_depth = (0, _convertUnitsLite.convert)(_constants.SHAPE_SVG_DEPTH).from(_constants.UNIT_INCH).to(_constants.UNIT_CENTIMETER);
|
|
210
|
+
}
|
|
211
|
+
var padding_width = padding * newWidth / svg_width;
|
|
212
|
+
var padding_depth = padding * newDepth / svg_depth;
|
|
213
|
+
|
|
214
|
+
// offset of the warning icons(by default, show the icons with width direction and if depth is bigger than width, show with depth direction.)
|
|
215
|
+
var transX = svg_width < svg_depth ? 0 : 10;
|
|
216
|
+
var transY = svg_width < svg_depth ? 10 : 0;
|
|
217
|
+
var warning_buttons = /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("g", {
|
|
218
|
+
id: "warning_info_2d",
|
|
219
|
+
style: {
|
|
220
|
+
cursor: 'pointer',
|
|
221
|
+
transform: "translate(".concat(-transX, "px, ").concat(-transY, "px)")
|
|
222
|
+
},
|
|
223
|
+
onMouseEnter: function onMouseEnter(event) {
|
|
224
|
+
var bbox = event.target.getBoundingClientRect();
|
|
225
|
+
document.getElementById('warning_box_2d').style.display = 'flex';
|
|
226
|
+
document.getElementById('warning_box_2d').style.top = "".concat(bbox.top - 60, "px");
|
|
227
|
+
document.getElementById('warning_box_2d').style.left = "".concat(bbox.left, "px");
|
|
228
|
+
},
|
|
229
|
+
onMouseLeave: function onMouseLeave() {
|
|
230
|
+
document.getElementById('warning_box_2d').style.display = 'none';
|
|
231
|
+
}
|
|
232
|
+
}, /*#__PURE__*/_react["default"].createElement("circle", {
|
|
233
|
+
cx: 0,
|
|
234
|
+
cy: 0,
|
|
235
|
+
r: 8,
|
|
236
|
+
fill: "white"
|
|
237
|
+
}), /*#__PURE__*/_react["default"].createElement("image", {
|
|
238
|
+
width: 15,
|
|
239
|
+
height: 15,
|
|
240
|
+
x: -7.5,
|
|
241
|
+
y: -7.5,
|
|
242
|
+
style: {
|
|
243
|
+
transform: "rotate(".concat(180 - element.rotation, "deg)")
|
|
244
|
+
},
|
|
245
|
+
href: buttons[1].thumbnail
|
|
246
|
+
})), /*#__PURE__*/_react["default"].createElement("g", {
|
|
247
|
+
style: {
|
|
248
|
+
cursor: 'pointer',
|
|
249
|
+
transform: "translate(".concat(transX, "px, ").concat(transY, "px)")
|
|
250
|
+
},
|
|
251
|
+
"data-element-root": true,
|
|
252
|
+
"data-prototype": element.prototype,
|
|
253
|
+
"data-id": element.id,
|
|
254
|
+
"data-selected": element.selected,
|
|
255
|
+
"data-layer": layer.id,
|
|
256
|
+
"data-part": "warning_edit"
|
|
257
|
+
}, /*#__PURE__*/_react["default"].createElement("circle", {
|
|
258
|
+
cx: 0,
|
|
259
|
+
cy: 0,
|
|
260
|
+
r: 8,
|
|
261
|
+
fill: "white"
|
|
262
|
+
}), /*#__PURE__*/_react["default"].createElement("image", {
|
|
263
|
+
width: 15,
|
|
264
|
+
height: 15,
|
|
265
|
+
x: -7.5,
|
|
266
|
+
y: -7.5,
|
|
267
|
+
style: {
|
|
268
|
+
transform: "rotate(".concat(90 - element.rotation, "deg)")
|
|
269
|
+
},
|
|
270
|
+
href: buttons[0].thumbnail
|
|
271
|
+
})));
|
|
272
|
+
|
|
273
|
+
// show item
|
|
274
|
+
rendered = /*#__PURE__*/_react["default"].createElement("g", {
|
|
275
|
+
"data-element-root": true,
|
|
276
|
+
"data-prototype": element.prototype,
|
|
277
|
+
"data-id": element.id,
|
|
278
|
+
"data-selected": element.selected,
|
|
279
|
+
"data-layer": layer.id,
|
|
280
|
+
onMouseOver: function onMouseOver(event) {
|
|
281
|
+
setHover(true);
|
|
282
|
+
},
|
|
283
|
+
onMouseOut: function onMouseOut(event) {
|
|
284
|
+
setHover(false);
|
|
285
|
+
},
|
|
286
|
+
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
287
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
288
|
+
transform: "rotate(".concat(rotation, ")")
|
|
289
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
290
|
+
transform: "translate(".concat(-newWidth / 2 - padding_width, ",").concat(-newDepth / 2 - padding_depth, ")")
|
|
291
|
+
}, /*#__PURE__*/_react["default"].createElement("image", {
|
|
292
|
+
preserveAspectRatio: "none",
|
|
293
|
+
style: {
|
|
294
|
+
pointerEvents: 'none'
|
|
295
|
+
},
|
|
296
|
+
href: svg_url,
|
|
297
|
+
width: "".concat(newWidth + 2 * padding_width),
|
|
298
|
+
height: "".concat(newDepth + 2 * padding_depth),
|
|
299
|
+
transform: "scale(1, -1)",
|
|
300
|
+
x: "0",
|
|
301
|
+
y: "".concat(-newDepth - 2 * padding_depth)
|
|
302
|
+
}), /*#__PURE__*/_react["default"].createElement("rect", {
|
|
303
|
+
x: "".concat(padding_width),
|
|
304
|
+
y: "".concat(padding_depth),
|
|
305
|
+
width: "".concat(newWidth),
|
|
306
|
+
height: "".concat(newDepth),
|
|
307
|
+
visibility: 'hidden',
|
|
308
|
+
style: {
|
|
309
|
+
pointerEvents: 'all',
|
|
310
|
+
opacity: 0.7,
|
|
311
|
+
postion: 'relative'
|
|
312
|
+
}
|
|
313
|
+
}), /*#__PURE__*/_react["default"].createElement("g", {
|
|
314
|
+
transform: "translate(".concat(padding_width, ",").concat(padding_depth, ")")
|
|
315
|
+
}, txtContent)), element.category === 'cabinet' && /*#__PURE__*/_react["default"].createElement("g", {
|
|
316
|
+
visibility: (element === null || element === void 0 || (_element$toJS$doorSty = element.toJS().doorStyle) === null || _element$toJS$doorSty === void 0 || (_element$toJS$doorSty = _element$toJS$doorSty.doorStyles) === null || _element$toJS$doorSty === void 0 || (_element$toJS$doorSty = _element$toJS$doorSty.cds) === null || _element$toJS$doorSty === void 0 ? void 0 : _element$toJS$doorSty.filter(function (cd) {
|
|
317
|
+
return cd.itemID == (element === null || element === void 0 ? void 0 : element.getIn(['itemID']));
|
|
318
|
+
}).length) > 0 ? 'hidden' : 'visible'
|
|
319
|
+
}, warning_buttons)));
|
|
320
|
+
} else {
|
|
321
|
+
rendered = /*#__PURE__*/_react["default"].createElement("g", {
|
|
322
|
+
onMouseOver: function onMouseOver(event) {
|
|
323
|
+
setHover(true);
|
|
324
|
+
},
|
|
325
|
+
onMouseOut: function onMouseOut(event) {
|
|
326
|
+
setHover(false);
|
|
327
|
+
},
|
|
328
|
+
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
329
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
330
|
+
transform: "rotate(".concat(rotation, ")")
|
|
331
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
332
|
+
transform: "translate(".concat(-newWidth / 2, ",").concat(-newDepth / 2, ")")
|
|
333
|
+
}, newDepth > 15 ? [/*#__PURE__*/_react["default"].createElement("rect", {
|
|
334
|
+
key: "base",
|
|
335
|
+
x: "0",
|
|
336
|
+
y: "12",
|
|
337
|
+
width: newWidth,
|
|
338
|
+
height: newDepth - 12,
|
|
339
|
+
style: style
|
|
340
|
+
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
341
|
+
key: "door",
|
|
342
|
+
style: style,
|
|
343
|
+
points: "0,9 ".concat(newWidth, ",9 ").concat(newWidth, ",6 ").concat(newWidth - 5, ",6 ").concat(newWidth - 5, ",3 ").concat(newWidth - 2, ",3 ").concat(newWidth - 2, " 0 ").concat(newWidth - 10, " 0 ").concat(newWidth - 10, ",3 ").concat(newWidth - 7, ",3 ").concat(newWidth - 7, ",6 0 6")
|
|
344
|
+
})] : /*#__PURE__*/_react["default"].createElement("rect", {
|
|
345
|
+
key: "base",
|
|
346
|
+
x: "0",
|
|
347
|
+
y: "0",
|
|
348
|
+
width: newWidth,
|
|
349
|
+
height: newDepth,
|
|
350
|
+
style: style
|
|
351
|
+
}), txtContent)));
|
|
352
|
+
}
|
|
353
|
+
return rendered;
|
|
354
|
+
}
|
|
355
|
+
// end of render 2d function /////////////////////////
|
|
356
|
+
|
|
357
|
+
function loadTexture(url) {
|
|
358
|
+
var texture = new Three.TextureLoader().load(url);
|
|
359
|
+
texture.colorSpace = Three.SRGBColorSpace;
|
|
360
|
+
texture.wrapS = Three.MirroredRepeatWrapping;
|
|
361
|
+
texture.wrapT = Three.MirroredRepeatWrapping;
|
|
362
|
+
return texture;
|
|
363
|
+
}
|
|
364
|
+
var applyTexture = function applyTexture(material, texture, length, height) {
|
|
365
|
+
if (texture) {
|
|
366
|
+
material.map = texture;
|
|
367
|
+
material.needsUpdate = true;
|
|
368
|
+
material.map.wrapS = Three.RepeatWrapping;
|
|
369
|
+
material.map.wrapT = Three.RepeatWrapping;
|
|
370
|
+
material.map.repeat.set(length * 0.01, height * 0.01);
|
|
371
|
+
if (texture.normal) {
|
|
372
|
+
material.normalMap = loadTexture(texture.normal.uri);
|
|
373
|
+
material.normalScale = new Vector2(texture.normal.normalScaleX, texture.normal.normalScaleY);
|
|
374
|
+
material.normalMap.wrapS = Three.RepeatWrapping;
|
|
375
|
+
material.normalMap.wrapT = Three.RepeatWrapping;
|
|
376
|
+
material.normalMap.repeat.set(length * texture.normal.lengthRepeatScale, height * texture.normal.heightRepeatScale);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
var assignUVs = function assignUVs(geometry) {
|
|
381
|
+
geometry.computeBoundingBox();
|
|
382
|
+
var _geometry$boundingBox = geometry.boundingBox,
|
|
383
|
+
min = _geometry$boundingBox.min,
|
|
384
|
+
max = _geometry$boundingBox.max;
|
|
385
|
+
var offset = new Three.Vector3(0 - min.x, 0 - min.y, 0 - min.z);
|
|
386
|
+
var range = new Three.Vector3(max.x - min.x, max.y - min.y, max.z - min.z);
|
|
387
|
+
geometry.faceVertexUvs[0] = geometry.faces.map(function (face) {
|
|
388
|
+
var v1 = geometry.vertices[face.a];
|
|
389
|
+
var v2 = geometry.vertices[face.b];
|
|
390
|
+
var v3 = geometry.vertices[face.c];
|
|
391
|
+
return [new Three.Vector3((v1.x + offset.x) / range.x, (v1.y + offset.y) / range.y, (v1.z + offset.z) / range.z), new Three.Vector3((v2.x + offset.x) / range.x, (v2.y + offset.y) / range.y, (v1.z + offset.z) / range.z), new Three.Vector3((v3.x + offset.x) / range.x, (v3.y + offset.y) / range.y, (v1.z + offset.z) / range.z)];
|
|
392
|
+
});
|
|
393
|
+
geometry.uvsNeedUpdate = true;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Render 3D Item
|
|
398
|
+
* @param {Item} element Rendering item
|
|
399
|
+
* @param sizeinfo Dimesion of the item
|
|
400
|
+
* @param structure_json Structure of the item such as place holders and meshes, etc
|
|
401
|
+
*/
|
|
402
|
+
function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner) {
|
|
403
|
+
var mode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
404
|
+
if (element.doorStyle.constructor !== _immutable.Map) {
|
|
405
|
+
element = element.set('doorStyle', (0, _immutable.fromJS)(element.doorStyle));
|
|
406
|
+
}
|
|
407
|
+
if (element.doorStyle.toJS().handle_gltf !== '') {
|
|
408
|
+
// Check element has doorHandle
|
|
409
|
+
for (var i = 1; i < 10; i++) {
|
|
410
|
+
element = element.setIn(['doorStyle', 'doorStyles', 'door_handle_' + i + '_gltf'], element.doorStyle.toJS().handle_gltf);
|
|
411
|
+
element = element.setIn(['doorStyle', 'doorStyles', 'fixed_drawer_door_handle_' + i + '_gltf'], element.doorStyle.toJS().handle_gltf);
|
|
412
|
+
element = element.setIn(['doorStyle', 'doorStyles', 'drawer_door_handle_' + i + '_gltf'], element.doorStyle.toJS().handle_gltf);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
var width = {
|
|
416
|
+
length: sizeinfo.width,
|
|
417
|
+
unit: 'in'
|
|
418
|
+
};
|
|
419
|
+
var depth = {
|
|
420
|
+
length: sizeinfo.depth,
|
|
421
|
+
unit: 'in'
|
|
422
|
+
};
|
|
423
|
+
var height = {
|
|
424
|
+
length: sizeinfo.height,
|
|
425
|
+
unit: 'in'
|
|
426
|
+
};
|
|
427
|
+
var newWidth = (0, _convertUnitsLite.convert)(width.length).from(width.unit).to('in');
|
|
428
|
+
var newDepth = (0, _convertUnitsLite.convert)(depth.length).from(depth.unit).to('in');
|
|
429
|
+
var newHeight = (0, _convertUnitsLite.convert)(height.length).from(height.unit).to('in');
|
|
430
|
+
var mainName = ''; // to get name structure//
|
|
431
|
+
if (element.properties.get('width')) newWidth = element.getIn(['properties', 'width', '_length']);
|
|
432
|
+
if (element.properties.get('depth')) newDepth = element.getIn(['properties', 'depth', '_length']);
|
|
433
|
+
if (element.properties.get('height')) newHeight = element.getIn(['properties', 'height', '_length']);
|
|
434
|
+
var structure = structure_json;
|
|
435
|
+
// structure.push({name:'model', url: '/assets/model/DCM.gltf'});
|
|
436
|
+
structure.model = '/assets/model/DCM.gltf';
|
|
437
|
+
var placeholders = structure.placeholders;
|
|
438
|
+
var doorStyles = null;
|
|
439
|
+
var color = 0xffffff,
|
|
440
|
+
glossness = 1,
|
|
441
|
+
handleMaterial = {};
|
|
442
|
+
var counterTop = element.counterTop;
|
|
443
|
+
if (layer.toJS().counterTop.uri) {
|
|
444
|
+
counterTop.uri = layer.toJS().counterTop.uri;
|
|
445
|
+
}
|
|
446
|
+
if ('name' in element.doorStyle) {
|
|
447
|
+
doorStyles = new _immutable.Map(element.doorStyle.doorStyles);
|
|
448
|
+
color = element.doorStyle.color;
|
|
449
|
+
glossness = element.doorStyle.glossness;
|
|
450
|
+
handleMaterial.metalness = element.doorStyle.metalness;
|
|
451
|
+
handleMaterial.roughness = element.doorStyle.roughness;
|
|
452
|
+
} else if (element.doorStyle != null && element.doorStyle) {
|
|
453
|
+
doorStyles = element.doorStyle.get('doorStyles');
|
|
454
|
+
color = element.doorStyle.get('color');
|
|
455
|
+
glossness = element.doorStyle.get('glossness');
|
|
456
|
+
handleMaterial.metalness = element.doorStyle.get('metalness');
|
|
457
|
+
handleMaterial.roughness = element.doorStyle.get('roughness');
|
|
458
|
+
}
|
|
459
|
+
if (color === undefined) color = '#ffffff';
|
|
460
|
+
if (glossness === undefined) glossness = 1;
|
|
461
|
+
var tempDoorStyles = doorStyles.toJS();
|
|
462
|
+
var tempPlaceholders = structure.tempPlaceholders;
|
|
463
|
+
var tPlaceholders = tempPlaceholders.find(function (el) {
|
|
464
|
+
return el.id === tempDoorStyles.cabinet_door_style_id;
|
|
465
|
+
});
|
|
466
|
+
if (tPlaceholders !== undefined) {
|
|
467
|
+
placeholders = tPlaceholders.placeholders;
|
|
468
|
+
var tempStructure = _objectSpread(_objectSpread({}, tPlaceholders.structure), {}, {
|
|
469
|
+
animation: structure.animation,
|
|
470
|
+
placeholders: structure.placeholders,
|
|
471
|
+
tempPlaceholders: structure.tempPlaceholders,
|
|
472
|
+
model: structure.model
|
|
473
|
+
});
|
|
474
|
+
structure = tempStructure;
|
|
475
|
+
}
|
|
476
|
+
var userData = structure.animation;
|
|
477
|
+
// ///////////////////////////
|
|
478
|
+
var onLoadItem = function onLoadItem(object) {
|
|
479
|
+
var areaMaterial = new Three.MeshStandardMaterial();
|
|
480
|
+
areaMaterial.side = Three.DoubleSide;
|
|
481
|
+
// areaMaterial.envMap = textureCube;
|
|
482
|
+
if ((0, _helper.isEmpty)(doorStyles)) {
|
|
483
|
+
var normalMap = doorStyles.get('base') || INITIAL_NORMAL_MAP;
|
|
484
|
+
var interiortexture = loadTexture(normalMap);
|
|
485
|
+
applyTexture(areaMaterial, interiortexture, 100, 100);
|
|
486
|
+
}
|
|
487
|
+
var object1 = object;
|
|
488
|
+
var newAltitude = element.properties.get('altitude').get('_length');
|
|
489
|
+
var newUnit = element.properties.get('altitude').get('_unit') || 'in';
|
|
490
|
+
newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from(newUnit).to(scene.unit);
|
|
491
|
+
var _element = element.toJS();
|
|
492
|
+
if (!_element.doorStyle.doorStyles.is_euro_cds) {
|
|
493
|
+
object1.scale.set(100 * newWidth / sizeinfo.width, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
|
|
494
|
+
} else {
|
|
495
|
+
object1.scale.set(100, 100, 100);
|
|
496
|
+
}
|
|
497
|
+
// Normalize the origin of the object
|
|
498
|
+
var boundingBox = GeomUtils.baseBox3FromObject(object1);
|
|
499
|
+
object1.userData = boundingBox;
|
|
500
|
+
var door_animate_offset = {};
|
|
501
|
+
var matchStr = /\d_(door[^LR1-9]*)(_[LR])?(_[1-9])?$/;
|
|
502
|
+
object1.children.forEach(function (child) {
|
|
503
|
+
var door_match = child.name.match(matchStr);
|
|
504
|
+
if (door_match && door_match.length > 2) {
|
|
505
|
+
var _child$children$;
|
|
506
|
+
var rotate_match_text = element.properties.toJS().flip_doorhandle ? 'rotate_L' : 'rotate_R';
|
|
507
|
+
if (door_match[2] === '_L') {
|
|
508
|
+
rotate_match_text = element.properties.toJS().flip_doorhandle ? 'rotate_R' : 'rotate_L';
|
|
509
|
+
}
|
|
510
|
+
var isDoubleDoor = door_match && door_match[2] !== undefined;
|
|
511
|
+
(_child$children$ = child.children[0]) === null || _child$children$ === void 0 || _child$children$.children.forEach(function (it) {
|
|
512
|
+
var _it$name, _it$children;
|
|
513
|
+
if (it !== null && it !== void 0 && (_it$name = it.name) !== null && _it$name !== void 0 && _it$name.includes('handle') && (_it$children = it.children) !== null && _it$children !== void 0 && _it$children.length && is_corner === 1 && isDoubleDoor) {
|
|
514
|
+
var _child$name, _child$name2, _object1$children, _t0$name, _t0$children;
|
|
515
|
+
var tname = child !== null && child !== void 0 && (_child$name = child.name) !== null && _child$name !== void 0 && _child$name.endsWith('_L') ? child.name.replace('_L', '_R') : child === null || child === void 0 || (_child$name2 = child.name) === null || _child$name2 === void 0 ? void 0 : _child$name2.replace('_R', '_L');
|
|
516
|
+
var tmp = (object1 === null || object1 === void 0 || (_object1$children = object1.children) === null || _object1$children === void 0 ? void 0 : _object1$children.filter(function (item) {
|
|
517
|
+
return (item === null || item === void 0 ? void 0 : item.name) === tname;
|
|
518
|
+
})) || [];
|
|
519
|
+
var t0 = tmp[0];
|
|
520
|
+
var filterStr = t0 !== null && t0 !== void 0 && (_t0$name = t0.name) !== null && _t0$name !== void 0 && _t0$name.endsWith('_L') ? 'rotate_L' : 'rotate_R';
|
|
521
|
+
var tposArr = (t0 === null || t0 === void 0 || (_t0$children = t0.children) === null || _t0$children === void 0 || (_t0$children = _t0$children[0]) === null || _t0$children === void 0 || (_t0$children = _t0$children.children) === null || _t0$children === void 0 ? void 0 : _t0$children.filter(function (item) {
|
|
522
|
+
var _item$name;
|
|
523
|
+
return item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.endsWith(filterStr);
|
|
524
|
+
})) || [];
|
|
525
|
+
var tpos0 = tposArr[0];
|
|
526
|
+
if (it.name.includes('base_end')) {
|
|
527
|
+
var _it$position$x, _it$position, _it$position$y, _it$position2, _tpos0$position$x, _tpos0$position;
|
|
528
|
+
door_animate_offset[child.name] = {
|
|
529
|
+
x: -2 * ((_it$position$x = (_it$position = it.position) === null || _it$position === void 0 ? void 0 : _it$position.x) !== null && _it$position$x !== void 0 ? _it$position$x : 0) - 0.12,
|
|
530
|
+
y: (_it$position$y = (_it$position2 = it.position) === null || _it$position2 === void 0 ? void 0 : _it$position2.y) !== null && _it$position$y !== void 0 ? _it$position$y : 0,
|
|
531
|
+
z: -((_tpos0$position$x = tpos0 === null || tpos0 === void 0 || (_tpos0$position = tpos0.position) === null || _tpos0$position === void 0 ? void 0 : _tpos0$position.x) !== null && _tpos0$position$x !== void 0 ? _tpos0$position$x : 0) + 0.12,
|
|
532
|
+
isCorner: true
|
|
533
|
+
};
|
|
534
|
+
} else {
|
|
535
|
+
var _it$position$x2, _it$position3, _it$position$y2, _it$position4, _tpos0$position$x2, _tpos0$position2;
|
|
536
|
+
door_animate_offset[child.name] = {
|
|
537
|
+
x: -((_it$position$x2 = (_it$position3 = it.position) === null || _it$position3 === void 0 ? void 0 : _it$position3.x) !== null && _it$position$x2 !== void 0 ? _it$position$x2 : 0) - 0.04,
|
|
538
|
+
y: (_it$position$y2 = (_it$position4 = it.position) === null || _it$position4 === void 0 ? void 0 : _it$position4.y) !== null && _it$position$y2 !== void 0 ? _it$position$y2 : 0,
|
|
539
|
+
z: 2 * ((_tpos0$position$x2 = tpos0 === null || tpos0 === void 0 || (_tpos0$position2 = tpos0.position) === null || _tpos0$position2 === void 0 ? void 0 : _tpos0$position2.x) !== null && _tpos0$position$x2 !== void 0 ? _tpos0$position$x2 : 0) - 0.01,
|
|
540
|
+
isCorner: true
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
} else if (it.name.endsWith(rotate_match_text) && door_animate_offset[child.name] == undefined) {
|
|
544
|
+
door_animate_offset[child.name] = {
|
|
545
|
+
x: it.position.x,
|
|
546
|
+
y: it.position.y,
|
|
547
|
+
z: it.position.z,
|
|
548
|
+
isCorner: false
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
object1.userData.door_animate_offset = door_animate_offset;
|
|
555
|
+
object1.userData.animation = userData;
|
|
556
|
+
var center = [(boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x, (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y, (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z];
|
|
557
|
+
object1.position.x -= center[0];
|
|
558
|
+
object1.position.y -= center[1] - (boundingBox.max.y - boundingBox.min.y) / 2;
|
|
559
|
+
object1.position.z -= center[2];
|
|
560
|
+
object1.position.y += newAltitude;
|
|
561
|
+
if (element.selected) {
|
|
562
|
+
// if object is selected
|
|
563
|
+
// save object transform info///
|
|
564
|
+
var scalevec = new Three.Vector3(object1.scale.x, object1.scale.y, object1.scale.z);
|
|
565
|
+
var posVec = new Three.Vector3(object1.position.x, object1.position.y, object1.position.z);
|
|
566
|
+
object.scale.set(1 * newWidth / sizeinfo.width, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
|
|
567
|
+
object1.position.set(0, 0, 0);
|
|
568
|
+
object1.rotation.set(0, 0, 0);
|
|
569
|
+
|
|
570
|
+
//let box = new Three.BoxHelper(object, 0xffffff);
|
|
571
|
+
//box.material.lineWidth = 5;
|
|
572
|
+
//box.renderOrder = 1000;
|
|
573
|
+
//box.material.depthTest = false;
|
|
574
|
+
//object.add(box);
|
|
575
|
+
var _boundingBox = GeomUtils.baseBox3FromObject(object);
|
|
576
|
+
var max = _boundingBox.max;
|
|
577
|
+
var min = _boundingBox.min;
|
|
578
|
+
var radius = Math.sqrt((_boundingBox.max.x - _boundingBox.min.x) * (_boundingBox.max.x - _boundingBox.min.x) + (_boundingBox.max.z - _boundingBox.min.z) * (_boundingBox.max.z - _boundingBox.min.z)) / 2;
|
|
579
|
+
var moveBox = new Three.BoxGeometry(max.x - min.x, max.y - min.y, max.z - min.z);
|
|
580
|
+
|
|
581
|
+
// translate Object
|
|
582
|
+
var controlGeom = GeomUtils.controlGeom();
|
|
583
|
+
|
|
584
|
+
// rotate Object //////////
|
|
585
|
+
var rotGeom = GeomUtils.rotGeoms(radius + 0.05);
|
|
586
|
+
// //////////////////////////////////
|
|
587
|
+
|
|
588
|
+
// upwards Geometry/////////// Move up Object
|
|
589
|
+
var upwardsGeom = GeomUtils.upwardsGeom();
|
|
590
|
+
|
|
591
|
+
// vertical line - 4 lines around object//////////////////////////
|
|
592
|
+
var vLineGeom = new Three.BufferGeometry();
|
|
593
|
+
var vertices = [(max.x - min.x) / 2 + min.x, 0, max.z, (max.x - min.x) / 2 + min.x, 0, max.z + 1.3];
|
|
594
|
+
vLineGeom.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices), 3));
|
|
595
|
+
var vLineGeom1 = new Three.BufferGeometry();
|
|
596
|
+
var vertices1 = [(max.x - min.x) / 2 + min.x, 0, min.z, (max.x - min.x) / 2 + min.x, 0, min.z - 1.3];
|
|
597
|
+
vLineGeom1.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices1), 3));
|
|
598
|
+
var vLineGeom2 = new Three.BufferGeometry();
|
|
599
|
+
var vertices2 = [max.x, 0, max.z - (max.z - min.z) / 2, max.x + 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
600
|
+
vLineGeom2.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices2), 3));
|
|
601
|
+
var vLineGeom3 = new Three.BufferGeometry();
|
|
602
|
+
var vertices3 = [min.x, 0, max.z - (max.z - min.z) / 2, min.x - 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
603
|
+
vLineGeom3.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices3), 3));
|
|
604
|
+
// ///////////////////////////////////////
|
|
605
|
+
|
|
606
|
+
// set names of transform object
|
|
607
|
+
var rotFillObj = new Three.Mesh(rotGeom.rotFill, new Three.MeshPhongMaterial({
|
|
608
|
+
color: new Three.Color(0x000000).convertLinearToSRGB(),
|
|
609
|
+
side: Three.DoubleSide,
|
|
610
|
+
colorWrite: true
|
|
611
|
+
}));
|
|
612
|
+
var rotStrokeObj = new Three.Line(rotGeom.rotStroke, new Three.LineBasicMaterial({
|
|
613
|
+
color: new Three.Color(0xffffff).convertLinearToSRGB(),
|
|
614
|
+
colorWrite: true
|
|
615
|
+
}));
|
|
616
|
+
rotFillObj.name = 'rotate';
|
|
617
|
+
var upObj = new Three.Mesh(upwardsGeom, new Three.MeshBasicMaterial({
|
|
618
|
+
color: new Three.Color(0xffffff).convertLinearToSRGB(),
|
|
619
|
+
side: Three.DoubleSide
|
|
620
|
+
}));
|
|
621
|
+
upObj.name = 'transUp';
|
|
622
|
+
var mBox = new Three.Mesh(moveBox, new Three.MeshBasicMaterial({
|
|
623
|
+
color: new Three.Color(0xdd6699).convertLinearToSRGB(),
|
|
624
|
+
side: Three.DoubleSide,
|
|
625
|
+
transparent: true,
|
|
626
|
+
opacity: 0.4
|
|
627
|
+
}));
|
|
628
|
+
var _color = new Three.Color(_constants.SHADE_DARK_PURPLE_COLOR).convertLinearToSRGB();
|
|
629
|
+
var vLine = new Three.Line(vLineGeom, new Three.LineBasicMaterial({
|
|
630
|
+
color: _color
|
|
631
|
+
}));
|
|
632
|
+
var vLine1 = new Three.Line(vLineGeom1, new Three.LineBasicMaterial({
|
|
633
|
+
color: _color
|
|
634
|
+
}));
|
|
635
|
+
var vLine2 = new Three.Line(vLineGeom2, new Three.LineBasicMaterial({
|
|
636
|
+
color: _color
|
|
637
|
+
}));
|
|
638
|
+
var vLine3 = new Three.Line(vLineGeom3, new Three.LineBasicMaterial({
|
|
639
|
+
color: _color
|
|
640
|
+
}));
|
|
641
|
+
vLine.renderOrder = 1;
|
|
642
|
+
vLine1.renderOrder = 1;
|
|
643
|
+
vLine2.renderOrder = 1;
|
|
644
|
+
vLine3.renderOrder = 1;
|
|
645
|
+
vLine.material.transparent = true;
|
|
646
|
+
vLine1.material.transparent = true;
|
|
647
|
+
vLine2.material.transparent = true;
|
|
648
|
+
vLine3.material.transparent = true;
|
|
649
|
+
vLine.material.depthTest = false;
|
|
650
|
+
vLine1.material.depthTest = false;
|
|
651
|
+
vLine2.material.depthTest = false;
|
|
652
|
+
vLine3.material.depthTest = false;
|
|
653
|
+
// translate vector to center of object
|
|
654
|
+
var uVec = new Three.Vector3(-posVec.x / scalevec.x, -posVec.y / scalevec.y, -posVec.z / scalevec.z);
|
|
655
|
+
vLine.translateY(0.1);
|
|
656
|
+
vLine1.translateY(0.1);
|
|
657
|
+
vLine2.translateY(0.1);
|
|
658
|
+
vLine3.translateY(0.1);
|
|
659
|
+
|
|
660
|
+
//rotObj.translateOnAxis(uVec, 1);
|
|
661
|
+
upObj.translateOnAxis(uVec, 1);
|
|
662
|
+
upObj.translateY(max.y - min.y);
|
|
663
|
+
mBox.name = 'TransformBox';
|
|
664
|
+
mBox.translateOnAxis(new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z), 1);
|
|
665
|
+
mBox.scale.set(1.01, 1.01, 1.01);
|
|
666
|
+
|
|
667
|
+
// other side rotate object
|
|
668
|
+
var rotFillObj1 = rotFillObj.clone();
|
|
669
|
+
var rotStrokeObj1 = rotStrokeObj.clone();
|
|
670
|
+
rotFillObj1.rotateY(Math.PI);
|
|
671
|
+
rotStrokeObj1.rotateY(Math.PI);
|
|
672
|
+
rotFillObj.translateY(0.1);
|
|
673
|
+
rotFillObj1.translateY(0.1);
|
|
674
|
+
rotStrokeObj.translateY(0.1);
|
|
675
|
+
rotStrokeObj1.translateY(0.1);
|
|
676
|
+
|
|
677
|
+
// assets Objects group includes rotate objects...
|
|
678
|
+
var asrtObj = new Three.Group();
|
|
679
|
+
// asrtObj.add(rotFillObj);
|
|
680
|
+
// asrtObj.add(rotFillObj1);
|
|
681
|
+
// asrtObj.add(rotStrokeObj);
|
|
682
|
+
// asrtObj.add(rotStrokeObj1);
|
|
683
|
+
//asrtObj.add(upObj);
|
|
684
|
+
asrtObj.add(vLine);
|
|
685
|
+
asrtObj.add(vLine1);
|
|
686
|
+
asrtObj.add(vLine2);
|
|
687
|
+
asrtObj.add(vLine3);
|
|
688
|
+
mBox.visible = false;
|
|
689
|
+
asrtObj.add(mBox);
|
|
690
|
+
asrtObj.scale.set(1 / object.scale.x, object.scale.y, 1 / object.scale.z);
|
|
691
|
+
//asrtObj.translateY(newAltitude / scalevec.y);
|
|
692
|
+
asrtObj.name = 'TransformGizmo';
|
|
693
|
+
// add assets Objects Group
|
|
694
|
+
object1.add(asrtObj);
|
|
695
|
+
|
|
696
|
+
// recover objects transform
|
|
697
|
+
object1.position.x = posVec.x;
|
|
698
|
+
object1.position.y = posVec.y;
|
|
699
|
+
object1.position.z = posVec.z;
|
|
700
|
+
object1.scale.set(scalevec.x, scalevec.y, scalevec.z);
|
|
701
|
+
setTimeout(function () {
|
|
702
|
+
SceneCreator.getDistances(layer);
|
|
703
|
+
}, 100);
|
|
704
|
+
}
|
|
705
|
+
var flip_doorhandle = element.properties.get('flip_doorhandle');
|
|
706
|
+
if (flip_doorhandle) {
|
|
707
|
+
SceneCreator.updateDoorHandleMesh(element, object1, true);
|
|
708
|
+
}
|
|
709
|
+
object1.traverse(function (obj) {
|
|
710
|
+
if (obj.type === _constants.OBJTYPE_MESH) {
|
|
711
|
+
var name = obj.name;
|
|
712
|
+
if (name.match(/_door_.*_glass_/)) {
|
|
713
|
+
var material = new Three.MeshPhysicalMaterial({
|
|
714
|
+
roughness: 0,
|
|
715
|
+
transmission: 1,
|
|
716
|
+
thickness: 0.5,
|
|
717
|
+
// Add refraction!
|
|
718
|
+
transparency: 0.8
|
|
719
|
+
});
|
|
720
|
+
obj.material = material;
|
|
721
|
+
} else if (name.startsWith('sink_')) {
|
|
722
|
+
// texture = loadTexture('/assets/img/texture/steel.jpg');
|
|
723
|
+
|
|
724
|
+
var _material;
|
|
725
|
+
// Get color from name
|
|
726
|
+
if (name.includes('black') || name.includes('white')) {
|
|
727
|
+
var _color2;
|
|
728
|
+
if (name.includes('black')) {
|
|
729
|
+
_color2 = new Three.Color(0x555555).convertLinearToSRGB();
|
|
730
|
+
} else {
|
|
731
|
+
_color2 = 0xffffff;
|
|
732
|
+
}
|
|
733
|
+
_material = new Three.MeshPhysicalMaterial({
|
|
734
|
+
roughness: 0.5,
|
|
735
|
+
metalness: 0,
|
|
736
|
+
// transmission: 1,
|
|
737
|
+
transparent: true,
|
|
738
|
+
opacity: 1,
|
|
739
|
+
thickness: 0.5,
|
|
740
|
+
// Add refraction!
|
|
741
|
+
// transparency: 0.8,
|
|
742
|
+
color: _color2,
|
|
743
|
+
side: Three.DoubleSide
|
|
744
|
+
});
|
|
745
|
+
} else {
|
|
746
|
+
// if (name.includes('chrome')) {
|
|
747
|
+
_material = new Three.MeshPhysicalMaterial({
|
|
748
|
+
roughness: 0.2,
|
|
749
|
+
metalness: 1,
|
|
750
|
+
reflectivity: 0.5,
|
|
751
|
+
color: new Three.Color(0xdddddd).convertLinearToSRGB()
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
obj.material = _material;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
if (element.toJS().properties.open_doors) {
|
|
758
|
+
var open_doors = element.toJS().properties.open_doors;
|
|
759
|
+
var object_match = obj.name.match(/\d_(interior_drawer[^LR1-9]*)(_[LR1-9])?$/) || obj.name.match(matchStr);
|
|
760
|
+
if (object_match && object_match.length > 2) {
|
|
761
|
+
var isDoor = object_match[1] === 'door';
|
|
762
|
+
if (isDoor) {
|
|
763
|
+
var offsetData = object1.userData.door_animate_offset[obj.name];
|
|
764
|
+
// Open Door
|
|
765
|
+
(0, _helper.animateDoor)(offsetData, obj, open_doors, element.toJS(), is_corner, 'Opened2D');
|
|
766
|
+
} else {
|
|
767
|
+
// Open Drawer
|
|
768
|
+
(0, _helper.translateDrawer)(element.toJS(), obj, open_doors, 'Opened2D');
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
return object1;
|
|
774
|
+
};
|
|
775
|
+
// keys in structure
|
|
776
|
+
var keys = Object.keys(structure);
|
|
777
|
+
// if exist in cached Objects
|
|
778
|
+
if (element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS()) + element.counterTop.uri in cachedObject) {
|
|
779
|
+
var _objGroup = cachedObject[element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())].clone();
|
|
780
|
+
return Promise.resolve(onLoadItem(_objGroup.clone()));
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// base Object/////
|
|
784
|
+
var objGroup = null;
|
|
785
|
+
var _loadGLTFs = function loadGLTFs(i) {
|
|
786
|
+
if (keys[i] === 'animation') {
|
|
787
|
+
// if animation info
|
|
788
|
+
i++;
|
|
789
|
+
return _loadGLTFs(i);
|
|
790
|
+
}
|
|
791
|
+
if (keys[i] === 'placeholders') {
|
|
792
|
+
// if placeholders group
|
|
793
|
+
i++;
|
|
794
|
+
return _loadGLTFs(i);
|
|
795
|
+
}
|
|
796
|
+
if (i === keys.length) {
|
|
797
|
+
// if end of keys
|
|
798
|
+
cachedObject[element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())] = objGroup.clone(); //register to cachedObject
|
|
799
|
+
return onLoadItem(cachedObject[element.type + color + 'doorStyle' + JSON.stringify(doorStyles.toJS())].clone());
|
|
800
|
+
}
|
|
801
|
+
if (keys[i] === 'base') {
|
|
802
|
+
// if base Objects
|
|
803
|
+
i++;
|
|
804
|
+
return _loadGLTFs(i);
|
|
805
|
+
}
|
|
806
|
+
var phsArray = [];
|
|
807
|
+
var placeholderStructure = placeholders[keys[i]];
|
|
808
|
+
if (placeholderStructure == undefined || placeholderStructure.length == 0) {
|
|
809
|
+
i++;
|
|
810
|
+
return _loadGLTFs(i);
|
|
811
|
+
}
|
|
812
|
+
for (var j = 0; j < placeholderStructure.length; j++) {
|
|
813
|
+
var phData = placeholderStructure[j];
|
|
814
|
+
var phs = phData.split('/');
|
|
815
|
+
var temp = phData.split('/');
|
|
816
|
+
// placeholder remake////////////////
|
|
817
|
+
for (var k = 0; k < phs.length; k++) {
|
|
818
|
+
if (phs[k] in placeholders) {
|
|
819
|
+
var placeholderphs = placeholders[phs[k]];
|
|
820
|
+
var key = placeholderStructure.length / placeholderphs.length;
|
|
821
|
+
phs[k] = placeholderphs[Math.floor(j / key)];
|
|
822
|
+
var splitedData = phs[k].split('/');
|
|
823
|
+
if (splitedData.length > 1) {
|
|
824
|
+
phs[k] = splitedData[splitedData.length - 1];
|
|
825
|
+
for (var m = splitedData.length - 2; m >= 0; m--) {
|
|
826
|
+
phs.unshift(splitedData[m]);
|
|
827
|
+
temp.unshift(splitedData[m]);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
k = -1;
|
|
831
|
+
continue;
|
|
832
|
+
}
|
|
833
|
+
if (phs[k].indexOf('ph') == -1) {
|
|
834
|
+
var _url = structure[temp[k - 1]];
|
|
835
|
+
if (temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS()) in structure) {
|
|
836
|
+
if (structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] != null) {
|
|
837
|
+
_url = structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())];
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
if ((0, _typeof2["default"])(_url) == Array) _url = _url[0];
|
|
841
|
+
var uData = _url.split('/');
|
|
842
|
+
uData = uData[uData.length - 1];
|
|
843
|
+
uData = uData.slice(0, -5);
|
|
844
|
+
var datas = uData.split('_');
|
|
845
|
+
uData = datas[1];
|
|
846
|
+
for (var _i = 2; _i < datas.length; _i++) {
|
|
847
|
+
uData += '_';
|
|
848
|
+
uData += datas[_i];
|
|
849
|
+
}
|
|
850
|
+
uData = mainName.replace('main', uData);
|
|
851
|
+
phs[k] = 'ph_' + uData + '_' + phs[k];
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
phsArray.push(phs);
|
|
855
|
+
}
|
|
856
|
+
var url = structure[keys[i]];
|
|
857
|
+
var normalMap = '';
|
|
858
|
+
var urlData = url.split('/');
|
|
859
|
+
for (var _j = 0; _j < element.submodule.size; _j++) {
|
|
860
|
+
var replaceUrlData = element.submodule.get(_j).split('/');
|
|
861
|
+
if (urlData.includes(replaceUrlData[replaceUrlData.length - 2])) {
|
|
862
|
+
url = element.submodule.get(_j);
|
|
863
|
+
break;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
for (var _j2 = 0; _j2 < element.normalMap.size; _j2++) {
|
|
867
|
+
var normalMapData = element.normalMap.get(_j2).split('/');
|
|
868
|
+
if (urlData.includes(normalMapData[normalMapData.length - 2])) {
|
|
869
|
+
normalMap = element.normalMap.get(_j2);
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// replace submodule gltf file
|
|
875
|
+
// if (placeholderTree.length > 0) {
|
|
876
|
+
if (phsArray.length > 0) {
|
|
877
|
+
// let loadUrl = dirName + url;
|
|
878
|
+
var loadUrl = url;
|
|
879
|
+
if (doorStyles.get(keys[i] + '_gltf') != undefined) {
|
|
880
|
+
loadUrl = doorStyles.get(keys[i] + '_gltf');
|
|
881
|
+
structure[keys[i] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] = loadUrl;
|
|
882
|
+
} else {
|
|
883
|
+
structure[keys[i] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] = null;
|
|
884
|
+
}
|
|
885
|
+
return (0, _loadObj.loadGLTF)(loadUrl).then(function (object) {
|
|
886
|
+
if (normalMap !== '') {
|
|
887
|
+
var normalUrl = normalMap.split('.')[0] + '-normal.' + normalMap.split('.')[1];
|
|
888
|
+
var t = loadTexture(normalMap);
|
|
889
|
+
var _m = loadTexture(normalUrl);
|
|
890
|
+
var mat2 = new Three.MeshStandardMaterial({
|
|
891
|
+
metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
|
|
892
|
+
roughness: glossness || params.roughness
|
|
893
|
+
});
|
|
894
|
+
mat2.map = t;
|
|
895
|
+
mat2.normalMap = _m;
|
|
896
|
+
// mat2.envMap = textureCube;
|
|
897
|
+
for (var _j3 = 0; _j3 < object.children.length; _j3++) {
|
|
898
|
+
if (object.children[_j3].type === _constants.OBJTYPE_MESH) {
|
|
899
|
+
object.children[_j3].material = mat2;
|
|
900
|
+
object.children[_j3].receiveShadow = true;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
// set Door Style////
|
|
906
|
+
if (doorStyles != null) {
|
|
907
|
+
// if (doorStyles.get(keys[i]) != undefined) {
|
|
908
|
+
// let normalMap = "catalog/items/doorstyle/" + doorStyles.get(keys[i]);
|
|
909
|
+
var _normalMap = doorStyles.get(keys[i]) || INITIAL_NORMAL_MAP;
|
|
910
|
+
var _mat;
|
|
911
|
+
if (_normalMap === '') {
|
|
912
|
+
var examplecolor = new Three.Color(parseInt(color.slice(1), 16)).convertLinearToSRGB();
|
|
913
|
+
_mat = new Three.MeshStandardMaterial({
|
|
914
|
+
color: examplecolor,
|
|
915
|
+
metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
|
|
916
|
+
roughness: glossness || params.roughness
|
|
917
|
+
});
|
|
918
|
+
} else {
|
|
919
|
+
var _t = loadTexture(_normalMap);
|
|
920
|
+
_mat = new Three.MeshStandardMaterial({
|
|
921
|
+
// NOTE : this is for cabinets (wood) frontface
|
|
922
|
+
metalness: 0.1,
|
|
923
|
+
roughness: 0.5
|
|
924
|
+
// metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
|
|
925
|
+
// roughness: glossness || params.roughness
|
|
926
|
+
});
|
|
927
|
+
_mat.map = _t;
|
|
928
|
+
}
|
|
929
|
+
// mat2.envMap = textureCube;
|
|
930
|
+
for (var _j4 = 0; _j4 < object.children.length; _j4++) {
|
|
931
|
+
if (object.children[_j4].type === _constants.OBJTYPE_MESH) {
|
|
932
|
+
object.children[_j4].material = _mat;
|
|
933
|
+
object.children[_j4].receiveShadow = true;
|
|
934
|
+
object.children[_j4].castShadow = true;
|
|
935
|
+
!object.children[_j4].name.includes('handle') && addEdgesToMesh(object.children[_j4]);
|
|
936
|
+
} else if (!object.children[_j4].name.startsWith('ph_') && object.children[_j4].type === _constants.OBJTYPE_GROUP) {
|
|
937
|
+
object.children[_j4].traverse(function (prim) {
|
|
938
|
+
prim.material = _mat;
|
|
939
|
+
prim.receiveShadow = true;
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
// } else {
|
|
945
|
+
// let mat2 = new Three.MeshStandardMaterial({
|
|
946
|
+
// metalness:
|
|
947
|
+
// glossness === 1
|
|
948
|
+
// ? params.metalness
|
|
949
|
+
// : params.metalness_glossy,
|
|
950
|
+
// roughness: glossness || params.roughness
|
|
951
|
+
// });
|
|
952
|
+
// // mat2.envMap = textureCube;
|
|
953
|
+
// for (let j = 0; j < object.children.length; j++) {
|
|
954
|
+
// if (object.children[j].type === OBJTYPE_MESH) {
|
|
955
|
+
// object.children[j].material = mat2;
|
|
956
|
+
// object.children[j].receiveShadow = true;
|
|
957
|
+
// }
|
|
958
|
+
// }
|
|
959
|
+
// }
|
|
960
|
+
|
|
961
|
+
for (var _i2 = 0; _i2 < phsArray.length; _i2++) {
|
|
962
|
+
var _phs = phsArray[_i2];
|
|
963
|
+
var parent = objGroup;
|
|
964
|
+
for (var _j5 = 0; _j5 < _phs.length; _j5++) {
|
|
965
|
+
var placeholder = _phs[_j5];
|
|
966
|
+
for (var _k = 0; _k < ((_parent = parent) === null || _parent === void 0 ? void 0 : _parent.children.length); _k++) {
|
|
967
|
+
var _parent;
|
|
968
|
+
if (_j5 != _phs.length - 1) {
|
|
969
|
+
if (parent.children[_k].name == placeholder) {
|
|
970
|
+
parent = parent.children[_k].children[0];
|
|
971
|
+
break;
|
|
972
|
+
}
|
|
973
|
+
} else {
|
|
974
|
+
if (parent.children[_k].name == placeholder) {
|
|
975
|
+
var tmp = object.clone();
|
|
976
|
+
if (placeholder.includes('drawer_door') && placeholder.includes('_handle')) {
|
|
977
|
+
tmp.rotateZ(Math.PI / 2);
|
|
978
|
+
}
|
|
979
|
+
if (placeholder.includes('_handle') && tmp.children[0].type === _constants.OBJTYPE_MESH) {
|
|
980
|
+
// NOTE: change metalness of handle
|
|
981
|
+
tmp.children[0].material.metalness = 1;
|
|
982
|
+
// handleMaterial.metalness || 0.2;
|
|
983
|
+
tmp.children[0].material.roughness = handleMaterial.roughness || 0.1;
|
|
984
|
+
//tmp.children[0].material.map = loadTexture('catalog/areas/area/textures/grass.jpg');
|
|
985
|
+
}
|
|
986
|
+
parent.children[_k].add(tmp);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}, function (reason) {
|
|
993
|
+
console.log('loadGLTF failed for reason:', reason);
|
|
994
|
+
}).then(function () {
|
|
995
|
+
i++;
|
|
996
|
+
return _loadGLTFs(i);
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
return (0, _loadObj.loadGLTF)(structure['base']).then(function (object) {
|
|
1001
|
+
object.name = 'MainObject';
|
|
1002
|
+
object.receiveShadow = true;
|
|
1003
|
+
objGroup = object;
|
|
1004
|
+
if (!(0, _helper.isEmpty)(doorStyles)) {
|
|
1005
|
+
var normalMap = doorStyles.get('base') || INITIAL_NORMAL_MAP;
|
|
1006
|
+
if (counterTop.uri === undefined) {
|
|
1007
|
+
try {
|
|
1008
|
+
counterTop = counterTop.toJS();
|
|
1009
|
+
} catch (error) {
|
|
1010
|
+
console.log(error);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
if (counterTop.uri === undefined && layer.toJS().counterTop.uri !== undefined) {
|
|
1014
|
+
counterTop.uri = layer.toJS().counterTop.uri;
|
|
1015
|
+
}
|
|
1016
|
+
var countTopMap = counterTop.uri;
|
|
1017
|
+
var interiorMap = doorStyles.get('interior');
|
|
1018
|
+
var countT = loadTexture(countTopMap);
|
|
1019
|
+
countT.wrapS = Three.RepeatWrapping;
|
|
1020
|
+
countT.wrapT = Three.RepeatWrapping;
|
|
1021
|
+
countT.repeat.set(1, 1);
|
|
1022
|
+
var examplecolor = new Three.Color(parseInt(color.slice(1), 16)).convertLinearToSRGB();
|
|
1023
|
+
var mat2 = null,
|
|
1024
|
+
mat3 = null,
|
|
1025
|
+
mat4 = null;
|
|
1026
|
+
if (normalMap === '') {
|
|
1027
|
+
mat2 = new Three.MeshStandardMaterial({
|
|
1028
|
+
color: examplecolor,
|
|
1029
|
+
metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
|
|
1030
|
+
roughness: glossness || params.roughness
|
|
1031
|
+
});
|
|
1032
|
+
} else {
|
|
1033
|
+
mat2 = new Three.MeshStandardMaterial({
|
|
1034
|
+
// TODO: changes in metalness and roughness of base_main (cabinet wood)
|
|
1035
|
+
metalness: 0.1,
|
|
1036
|
+
roughness: 0.5
|
|
1037
|
+
// metalness: glossness === 1 ? params.metalness : params.metalness_glossy,
|
|
1038
|
+
// roughness: glossness || params.roughness
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
// mat2.envMap = textureCube;
|
|
1042
|
+
|
|
1043
|
+
if (normalMap !== '') {
|
|
1044
|
+
var t = loadTexture(normalMap);
|
|
1045
|
+
mat2.map = t;
|
|
1046
|
+
}
|
|
1047
|
+
if (normalMap === '') {
|
|
1048
|
+
mat3 = new Three.MeshStandardMaterial({
|
|
1049
|
+
// color: examplecolor,
|
|
1050
|
+
metalness: counterTop.metalness,
|
|
1051
|
+
roughness: counterTop.roughness
|
|
1052
|
+
});
|
|
1053
|
+
} else {
|
|
1054
|
+
mat3 = new Three.MeshStandardMaterial({
|
|
1055
|
+
// metalness: counterTop.metalness,
|
|
1056
|
+
// roughness: counterTop.roughness
|
|
1057
|
+
metalness: 0.3,
|
|
1058
|
+
roughness: 0.8
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
mat3.map = countT;
|
|
1062
|
+
// mat3.envMap = textureCube;
|
|
1063
|
+
mat4 = new Three.MeshStandardMaterial({
|
|
1064
|
+
metalness: params.metalness,
|
|
1065
|
+
roughness: params.roughness
|
|
1066
|
+
});
|
|
1067
|
+
mat4.map = loadTexture(interiorMap);
|
|
1068
|
+
for (var j = 0; j < object.children.length; j++) {
|
|
1069
|
+
if (object.children[j].name.includes('main')) {}
|
|
1070
|
+
if (object.children[j].name.includes('countertop')) {
|
|
1071
|
+
object.children[j].material = mat3;
|
|
1072
|
+
object.children[j].receiveShadow = true;
|
|
1073
|
+
object.children[j].castShadow = true;
|
|
1074
|
+
addEdgesToMesh(object.children[j]);
|
|
1075
|
+
} else if (object.children[j].name.includes('_interior_')) {
|
|
1076
|
+
object.children[j].material = mat4;
|
|
1077
|
+
} else if (object.children[j].type === _constants.OBJTYPE_MESH) {
|
|
1078
|
+
object.children[j].material = mat2;
|
|
1079
|
+
object.children[j].receiveShadow = true;
|
|
1080
|
+
object.children[j].castShadow = true;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}, function (reason) {
|
|
1085
|
+
console.log('loadGLTF failed for reason:', reason);
|
|
1086
|
+
objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
|
|
1087
|
+
}).then(function () {
|
|
1088
|
+
return _loadGLTFs(0);
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// render 3d appliance function ////////////////////////////////
|
|
1093
|
+
function render3DApplianceItem(element, layer, scene, sizeinfo, structure_json) {
|
|
1094
|
+
var mode = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1095
|
+
var structure = structure_json;
|
|
1096
|
+
var applianceMaterial = element.applianceMaterial;
|
|
1097
|
+
if (applianceMaterial.metalness == undefined) applianceMaterial = applianceMaterial.toJS();
|
|
1098
|
+
var onLoadItem = function onLoadItem(object) {
|
|
1099
|
+
var newAltitude = element.properties.get('altitude').get('_length');
|
|
1100
|
+
var newUnit = element.properties.get('altitude').get('_unit') || 'in';
|
|
1101
|
+
newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from(newUnit).to(scene.unit);
|
|
1102
|
+
var newWidth = element.properties.get('width').get('_length');
|
|
1103
|
+
var newWidthUnit = element.properties.get('width').get('_unit') || 'in';
|
|
1104
|
+
newWidth = (0, _convertUnitsLite.convert)(newWidth).from(newWidthUnit).to('in');
|
|
1105
|
+
var newHeight = element.properties.get('height').get('_length');
|
|
1106
|
+
var newHeightUnit = element.properties.get('height').get('_unit') || 'in';
|
|
1107
|
+
newHeight = (0, _convertUnitsLite.convert)(newHeight).from(newHeightUnit).to('in');
|
|
1108
|
+
var newDepth = element.properties.get('depth').get('_length');
|
|
1109
|
+
var newDepthUnit = element.properties.get('depth').get('_unit') || 'in';
|
|
1110
|
+
newDepth = (0, _convertUnitsLite.convert)(newDepth).from(newDepthUnit).to('in');
|
|
1111
|
+
object.scale.set(100 * newWidth / sizeinfo.width, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
|
|
1112
|
+
// Normalize the origin of the object
|
|
1113
|
+
var boundingBox = new Three.Box3().setFromObject(object);
|
|
1114
|
+
object.userData = boundingBox;
|
|
1115
|
+
var center = [(boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x, (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y, (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z];
|
|
1116
|
+
object.position.x -= center[0];
|
|
1117
|
+
object.position.y -= center[1] - (boundingBox.max.y - boundingBox.min.y) / 2;
|
|
1118
|
+
object.position.z -= center[2];
|
|
1119
|
+
object.position.y += newAltitude;
|
|
1120
|
+
object.traverse(function (obj) {
|
|
1121
|
+
if (obj.type === _constants.OBJTYPE_MESH) {
|
|
1122
|
+
var name = obj.name;
|
|
1123
|
+
var texture,
|
|
1124
|
+
textureLoader = new Three.TextureLoader();
|
|
1125
|
+
if (name.includes('_black')) {
|
|
1126
|
+
obj.material.roughness = 0.4;
|
|
1127
|
+
obj.material.metalness = 1.0;
|
|
1128
|
+
obj.material.color = new Three.Color(0, 0, 0);
|
|
1129
|
+
obj.castShadow = true;
|
|
1130
|
+
obj.receiveShadow = true;
|
|
1131
|
+
return object;
|
|
1132
|
+
} else if (name.includes('_wood')) {
|
|
1133
|
+
texture = loadTexture('/assets/img/texture/wood.jpg');
|
|
1134
|
+
} else if (name.includes('_glass')) {
|
|
1135
|
+
// texture = loadTexture('/assets/img/texture/glass.jpg');
|
|
1136
|
+
var material = new Three.MeshPhysicalMaterial({
|
|
1137
|
+
transparent: true,
|
|
1138
|
+
opacity: 0.5,
|
|
1139
|
+
roughness: 0,
|
|
1140
|
+
transmission: 1,
|
|
1141
|
+
thickness: 0.5,
|
|
1142
|
+
// Add refraction!
|
|
1143
|
+
transparency: 0.8
|
|
1144
|
+
});
|
|
1145
|
+
obj.material = material;
|
|
1146
|
+
obj.castShadow = true;
|
|
1147
|
+
obj.receiveShadow = true;
|
|
1148
|
+
return object;
|
|
1149
|
+
} else if (name.includes('_steel')) {
|
|
1150
|
+
// texture = loadTexture('/assets/img/texture/steel.jpg');
|
|
1151
|
+
var _material2 = new Three.MeshPhysicalMaterial({
|
|
1152
|
+
roughness: 0.2,
|
|
1153
|
+
metalness: 0.5,
|
|
1154
|
+
reflectivity: 0.5,
|
|
1155
|
+
color: new Three.Color(0xdddddd).convertLinearToSRGB()
|
|
1156
|
+
});
|
|
1157
|
+
obj.material = _material2;
|
|
1158
|
+
obj.castShadow = true;
|
|
1159
|
+
obj.receiveShadow = true;
|
|
1160
|
+
return object;
|
|
1161
|
+
}
|
|
1162
|
+
var mat = new Three.MeshStandardMaterial({
|
|
1163
|
+
metalness: 0.1,
|
|
1164
|
+
roughness: 0.9,
|
|
1165
|
+
map: texture
|
|
1166
|
+
});
|
|
1167
|
+
obj.material = mat;
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
if (element.selected) {
|
|
1171
|
+
// if object is selected
|
|
1172
|
+
// save object transform info///
|
|
1173
|
+
var scalevec = new Three.Vector3(object.scale.x, object.scale.y, object.scale.z);
|
|
1174
|
+
var posVec = new Three.Vector3(object.position.x, object.position.y, object.position.z);
|
|
1175
|
+
object.scale.set(1 * newWidth / sizeinfo.width, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
|
|
1176
|
+
object.position.set(0, 0, 0);
|
|
1177
|
+
object.rotation.set(0, 0, 0);
|
|
1178
|
+
var _boundingBox2 = new Three.Box3().setFromObject(object);
|
|
1179
|
+
var max = _boundingBox2.max;
|
|
1180
|
+
var min = _boundingBox2.min;
|
|
1181
|
+
var radius = Math.sqrt((_boundingBox2.max.x - _boundingBox2.min.x) * (_boundingBox2.max.x - _boundingBox2.min.x) + (_boundingBox2.max.z - _boundingBox2.min.z) * (_boundingBox2.max.z - _boundingBox2.min.z)) / 2;
|
|
1182
|
+
var moveBox = new Three.BoxGeometry(max.x - min.x, max.y - min.y, max.z - min.z);
|
|
1183
|
+
|
|
1184
|
+
// translate Object
|
|
1185
|
+
var controlGeom = GeomUtils.controlGeom();
|
|
1186
|
+
// ////////////////////////
|
|
1187
|
+
|
|
1188
|
+
// rotate Object //////////
|
|
1189
|
+
var rotGeom = GeomUtils.rotGeoms(radius + 0.05);
|
|
1190
|
+
// //////////////////////////////////
|
|
1191
|
+
|
|
1192
|
+
// upwards Geometry/////////// Move up Object
|
|
1193
|
+
var upwardsGeom = GeomUtils.upwardsGeom();
|
|
1194
|
+
// ///////////////////////////////////////
|
|
1195
|
+
|
|
1196
|
+
// vertical line - 4 lines around object//////////////////////////
|
|
1197
|
+
var vLineGeom = new Three.BufferGeometry();
|
|
1198
|
+
var vertices = [(max.x - min.x) / 2 + min.x, 0, min.z, (max.x - min.x) / 2 + min.x, 0, min.z + 1.3];
|
|
1199
|
+
vLineGeom.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices), 3));
|
|
1200
|
+
var vLineGeom1 = new Three.BufferGeometry();
|
|
1201
|
+
var vertices1 = [(max.x - min.x) / 2 + min.x, 0, min.z, (max.x - min.x) / 2 + min.x, 0, min.z - 1.3];
|
|
1202
|
+
vLineGeom1.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices1), 3));
|
|
1203
|
+
var vLineGeom2 = new Three.BufferGeometry();
|
|
1204
|
+
var vertices2 = [max.x, 0, max.z - (max.z - min.z) / 2, max.x + 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
1205
|
+
vLineGeom1.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices2), 3));
|
|
1206
|
+
var vLineGeom3 = new Three.BufferGeometry();
|
|
1207
|
+
var vertices3 = [min.x, 0, max.z - (max.z - min.z) / 2, min.x - 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
1208
|
+
vLineGeom1.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices3), 3));
|
|
1209
|
+
// ///////////////////////////////////////
|
|
1210
|
+
|
|
1211
|
+
// set names of transform object
|
|
1212
|
+
var rotFillObj = new Three.Mesh(rotGeom.rotFill, new Three.MeshPhongMaterial({
|
|
1213
|
+
color: 0x000000,
|
|
1214
|
+
side: Three.DoubleSide,
|
|
1215
|
+
colorWrite: true
|
|
1216
|
+
}));
|
|
1217
|
+
var rotStrokeObj = new Three.Line(rotGeom.rotStroke, new Three.LineBasicMaterial({
|
|
1218
|
+
color: 0xffffff,
|
|
1219
|
+
colorWrite: true
|
|
1220
|
+
}));
|
|
1221
|
+
rotFillObj.name = 'rotate';
|
|
1222
|
+
var upObj = new Three.Mesh(upwardsGeom, new Three.MeshBasicMaterial({
|
|
1223
|
+
color: 0xffffff,
|
|
1224
|
+
side: Three.DoubleSide
|
|
1225
|
+
}));
|
|
1226
|
+
upObj.name = 'transUp';
|
|
1227
|
+
var mBox = new Three.Mesh(moveBox, new Three.MeshBasicMaterial({
|
|
1228
|
+
color: new Three.Color(0xdd6699).convertLinearToSRGB(),
|
|
1229
|
+
side: Three.DoubleSide,
|
|
1230
|
+
transparent: true,
|
|
1231
|
+
opacity: 0.4
|
|
1232
|
+
}));
|
|
1233
|
+
var color = new Three.Color(_constants.ARROW_COLOR).convertLinearToSRGB();
|
|
1234
|
+
var vLine = new Three.Line(vLineGeom, new Three.LineBasicMaterial({
|
|
1235
|
+
color: color
|
|
1236
|
+
}));
|
|
1237
|
+
var vLine1 = new Three.Line(vLineGeom1, new Three.LineBasicMaterial({
|
|
1238
|
+
color: color
|
|
1239
|
+
}));
|
|
1240
|
+
var vLine2 = new Three.Line(vLineGeom2, new Three.LineBasicMaterial({
|
|
1241
|
+
color: color
|
|
1242
|
+
}));
|
|
1243
|
+
var vLine3 = new Three.Line(vLineGeom3, new Three.LineBasicMaterial({
|
|
1244
|
+
color: color
|
|
1245
|
+
}));
|
|
1246
|
+
vLine.renderOrder = 1;
|
|
1247
|
+
vLine1.renderOrder = 1;
|
|
1248
|
+
vLine2.renderOrder = 1;
|
|
1249
|
+
vLine3.renderOrder = 1;
|
|
1250
|
+
vLine.material.transparent = true;
|
|
1251
|
+
vLine1.material.transparent = true;
|
|
1252
|
+
vLine2.material.transparent = true;
|
|
1253
|
+
vLine3.material.transparent = true;
|
|
1254
|
+
vLine.material.depthTest = false;
|
|
1255
|
+
vLine1.material.depthTest = false;
|
|
1256
|
+
vLine2.material.depthTest = false;
|
|
1257
|
+
vLine3.material.depthTest = false;
|
|
1258
|
+
// translate vector to center of object
|
|
1259
|
+
var uVec = new Three.Vector3(-posVec.x / scalevec.x, -posVec.y / scalevec.y, -posVec.z / scalevec.z);
|
|
1260
|
+
vLine.translateY(0.1);
|
|
1261
|
+
vLine1.translateY(0.1);
|
|
1262
|
+
vLine2.translateY(0.1);
|
|
1263
|
+
vLine3.translateY(0.1);
|
|
1264
|
+
upObj.translateOnAxis(uVec, 1);
|
|
1265
|
+
upObj.translateY(max.y - min.y + 0.05);
|
|
1266
|
+
mBox.name = 'TransformBox';
|
|
1267
|
+
mBox.translateOnAxis(new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z), 1);
|
|
1268
|
+
mBox.scale.set(1.01, 1.01, 1.01);
|
|
1269
|
+
|
|
1270
|
+
// other side rotate object
|
|
1271
|
+
var rotFillObj1 = rotFillObj.clone();
|
|
1272
|
+
var rotStrokeObj1 = rotStrokeObj.clone();
|
|
1273
|
+
rotFillObj1.rotateY(Math.PI);
|
|
1274
|
+
rotStrokeObj1.rotateY(Math.PI);
|
|
1275
|
+
rotFillObj.translateY(0.1);
|
|
1276
|
+
rotFillObj1.translateY(0.1);
|
|
1277
|
+
rotStrokeObj.translateY(0.1);
|
|
1278
|
+
rotStrokeObj1.translateY(0.1);
|
|
1279
|
+
|
|
1280
|
+
// assets Objects group includes rotate objects...
|
|
1281
|
+
var asrtObj = new Three.Group();
|
|
1282
|
+
// asrtObj.add(rotFillObj);
|
|
1283
|
+
// asrtObj.add(rotFillObj1);
|
|
1284
|
+
// asrtObj.add(rotStrokeObj);
|
|
1285
|
+
// asrtObj.add(rotStrokeObj1);
|
|
1286
|
+
asrtObj.add(vLine);
|
|
1287
|
+
asrtObj.add(vLine1);
|
|
1288
|
+
asrtObj.add(vLine2);
|
|
1289
|
+
asrtObj.add(vLine3);
|
|
1290
|
+
mBox.visible = false;
|
|
1291
|
+
asrtObj.add(mBox);
|
|
1292
|
+
asrtObj.scale.set(1 / object.scale.x, object.scale.y, 1 / object.scale.z);
|
|
1293
|
+
// asrtObj.translateY(newAltitude / scalevec.y);
|
|
1294
|
+
asrtObj.name = 'TransformGizmo';
|
|
1295
|
+
// add assets Objects Group
|
|
1296
|
+
object.add(asrtObj);
|
|
1297
|
+
|
|
1298
|
+
// recover objects transform
|
|
1299
|
+
object.position.x = posVec.x;
|
|
1300
|
+
object.position.y = posVec.y;
|
|
1301
|
+
object.position.z = posVec.z;
|
|
1302
|
+
object.scale.set(scalevec.x, scalevec.y, scalevec.z);
|
|
1303
|
+
}
|
|
1304
|
+
return object;
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
// keys in structure
|
|
1308
|
+
var keys = Object.keys(structure);
|
|
1309
|
+
|
|
1310
|
+
// if exist in cached Objects
|
|
1311
|
+
if (element.type in cachedObject) {
|
|
1312
|
+
var _objGroup2 = cachedObject[element.type].clone();
|
|
1313
|
+
return Promise.resolve(onLoadItem(_objGroup2.clone()));
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// base Object/////
|
|
1317
|
+
var objGroup = null;
|
|
1318
|
+
var _loadGLTFs2 = function loadGLTFs(i) {
|
|
1319
|
+
if (i === keys.length) {
|
|
1320
|
+
// if end of keys
|
|
1321
|
+
cachedObject[element.type] = objGroup.clone(); //register to cachedObject
|
|
1322
|
+
return onLoadItem(cachedObject[element.type].clone());
|
|
1323
|
+
}
|
|
1324
|
+
if (keys[i] === 'base') {
|
|
1325
|
+
// if base Objects
|
|
1326
|
+
i++;
|
|
1327
|
+
return _loadGLTFs2(i);
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
// load base to start //
|
|
1332
|
+
// return loadGLTF(dirName + structure["base"])
|
|
1333
|
+
return (0, _loadObj.loadGLTF)(structure['base']).then(function (object) {
|
|
1334
|
+
// let textureURL = `${API_SERVER_URL}/uploads/assets/default/steel.jpg`;
|
|
1335
|
+
// let texture = loadTexture(textureURL);
|
|
1336
|
+
// texture.wrapS = Three.MirroredRepeatWrapping;
|
|
1337
|
+
// texture.wrapT = Three.MirroredRepeatWrapping;
|
|
1338
|
+
|
|
1339
|
+
object.name = 'MainObject';
|
|
1340
|
+
// NOTE: changed appliance emissive color to black
|
|
1341
|
+
var mat2 = new Three.MeshStandardMaterial({
|
|
1342
|
+
emissive: new Three.Color(0x0d0d0d).convertLinearToSRGB(),
|
|
1343
|
+
metalness: applianceMaterial.metalness,
|
|
1344
|
+
roughness: applianceMaterial.roughness
|
|
1345
|
+
});
|
|
1346
|
+
// mat2.envMap = textureCube;
|
|
1347
|
+
object.material = mat2;
|
|
1348
|
+
for (var j = 0; j < object.children.length; j++) {
|
|
1349
|
+
if (object.children[j].type === _constants.OBJTYPE_MESH) {
|
|
1350
|
+
object.children[j].material = mat2;
|
|
1351
|
+
object.children[j].receiveShadow = true;
|
|
1352
|
+
object.children[j].castShadow = true; // change
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
objGroup = object;
|
|
1356
|
+
}, function (reason) {
|
|
1357
|
+
console.log('loadGLTF failed for reason:', reason);
|
|
1358
|
+
objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
|
|
1359
|
+
}).then(function () {
|
|
1360
|
+
return _loadGLTFs2(0);
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
// render 3d appliance function ////////////////////////////////
|
|
1364
|
+
function render3DLightingItem(element, layer, scene, sizeinfo, structure_json) {
|
|
1365
|
+
var mode = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1366
|
+
var structure = structure_json;
|
|
1367
|
+
var onLoadItem = function onLoadItem(object) {
|
|
1368
|
+
var width = {
|
|
1369
|
+
length: sizeinfo.width,
|
|
1370
|
+
unit: 'in'
|
|
1371
|
+
};
|
|
1372
|
+
var depth = {
|
|
1373
|
+
length: sizeinfo.depth,
|
|
1374
|
+
unit: 'in'
|
|
1375
|
+
};
|
|
1376
|
+
var height = {
|
|
1377
|
+
length: sizeinfo.height,
|
|
1378
|
+
unit: 'in'
|
|
1379
|
+
};
|
|
1380
|
+
var newWidth = (0, _convertUnitsLite.convert)(width.length).from(width.unit).to('cm');
|
|
1381
|
+
var newDepth = (0, _convertUnitsLite.convert)(depth.length).from(depth.unit).to('cm');
|
|
1382
|
+
var newHeight = (0, _convertUnitsLite.convert)(height.length).from(height.unit).to('cm');
|
|
1383
|
+
var newAltitude = element.properties.get('altitude').get('_length');
|
|
1384
|
+
var newUnit = element.properties.get('altitude').get('_unit') || 'in';
|
|
1385
|
+
newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from(newUnit).to(scene.unit);
|
|
1386
|
+
|
|
1387
|
+
//object.scale.set(newWidth, newHeight, newDepth);
|
|
1388
|
+
object.scale.set(100, 100, 100);
|
|
1389
|
+
// Normalize the origin of the object
|
|
1390
|
+
var boundingBox = new Three.Box3().setFromObject(object);
|
|
1391
|
+
object.userData = boundingBox;
|
|
1392
|
+
var objectHeight = boundingBox.max.y - boundingBox.min.y;
|
|
1393
|
+
var objectYPos = boundingBox.min.y;
|
|
1394
|
+
var center = [(boundingBox.max.x - boundingBox.min.x) / 2 + boundingBox.min.x, (boundingBox.max.y - boundingBox.min.y) / 2 + boundingBox.min.y, (boundingBox.max.z - boundingBox.min.z) / 2 + boundingBox.min.z];
|
|
1395
|
+
object.position.x = center[0];
|
|
1396
|
+
object.position.y = newHeight + newAltitude - boundingBox.max.y;
|
|
1397
|
+
object.position.z = center[2];
|
|
1398
|
+
if (element.selected) {
|
|
1399
|
+
// if object is selected
|
|
1400
|
+
// save object transform info///
|
|
1401
|
+
var scalevec = new Three.Vector3(object.scale.x, object.scale.y, object.scale.z);
|
|
1402
|
+
var posVec = new Three.Vector3(object.position.x, object.position.y, object.position.z);
|
|
1403
|
+
object.scale.set(1, 1, 1);
|
|
1404
|
+
object.position.set(0, 0, 0);
|
|
1405
|
+
object.rotation.set(0, 0, 0);
|
|
1406
|
+
|
|
1407
|
+
//let box = new Three.BoxHelper(object, 0xffffff);
|
|
1408
|
+
//box.material.lineWidth = 5;
|
|
1409
|
+
//box.renderOrder = 1000;
|
|
1410
|
+
//box.material.depthTest = false;
|
|
1411
|
+
//object.add(box);
|
|
1412
|
+
var _boundingBox3 = new Three.Box3().setFromObject(object);
|
|
1413
|
+
var max = _boundingBox3.max;
|
|
1414
|
+
var min = _boundingBox3.min;
|
|
1415
|
+
var radius = Math.sqrt((_boundingBox3.max.x - _boundingBox3.min.x) * (_boundingBox3.max.x - _boundingBox3.min.x) + (_boundingBox3.max.z - _boundingBox3.min.z) * (_boundingBox3.max.z - _boundingBox3.min.z)) / 2;
|
|
1416
|
+
var moveBox = new Three.BoxGeometry(max.x - min.x, max.y - min.y, max.z - min.z);
|
|
1417
|
+
|
|
1418
|
+
// translate Object
|
|
1419
|
+
var controlGeom = GeomUtils.controlGeom();
|
|
1420
|
+
|
|
1421
|
+
// rotate Object //////////
|
|
1422
|
+
var rotGeom = GeomUtils.rotGeoms(radius + 0.05);
|
|
1423
|
+
// //////////////////////////////////
|
|
1424
|
+
|
|
1425
|
+
// upwards Geometry/////////// Move up Object
|
|
1426
|
+
var upwardsGeom = GeomUtils.upwardsGeom();
|
|
1427
|
+
|
|
1428
|
+
// vertical line - 4 lines around object//////////////////////////
|
|
1429
|
+
var vLineGeom = new Three.BufferGeometry();
|
|
1430
|
+
var vertices = [(max.x - min.x) / 2 + min.x, 0, min.z, (max.x - min.x) / 2 + min.x, 0, min.z + 1.3];
|
|
1431
|
+
vLineGeom.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices), 3));
|
|
1432
|
+
var vLineGeom1 = new Three.BufferGeometry();
|
|
1433
|
+
var vertices1 = [(max.x - min.x) / 2 + min.x, 0, min.z, (max.x - min.x) / 2 + min.x, 0, min.z - 1.3];
|
|
1434
|
+
vLineGeom1.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices1), 3));
|
|
1435
|
+
var vLineGeom2 = new Three.BufferGeometry();
|
|
1436
|
+
var vertices2 = [min.x, 0, max.z - (max.z - min.z) / 2, min.x + 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
1437
|
+
vLineGeom2.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices2), 3));
|
|
1438
|
+
var vLineGeom3 = new Three.BufferGeometry();
|
|
1439
|
+
var vertices3 = [min.x, 0, max.z - (max.z - min.z) / 2, min.x - 1.3, 0, max.z - (max.z - min.z) / 2];
|
|
1440
|
+
vLineGeom3.setAttribute('position', new Three.BufferAttribute(new Float32Array(vertices3), 3));
|
|
1441
|
+
// ///////////////////////////////////////
|
|
1442
|
+
|
|
1443
|
+
// set names of transform object
|
|
1444
|
+
var rotFillObj = new Three.Mesh(rotGeom.rotFill, new Three.MeshPhongMaterial({
|
|
1445
|
+
color: 0x000000,
|
|
1446
|
+
side: Three.DoubleSide,
|
|
1447
|
+
colorWrite: true
|
|
1448
|
+
}));
|
|
1449
|
+
var rotStrokeObj = new Three.Line(rotGeom.rotStroke, new Three.LineBasicMaterial({
|
|
1450
|
+
color: 0xffffff,
|
|
1451
|
+
colorWrite: true
|
|
1452
|
+
}));
|
|
1453
|
+
rotFillObj.name = 'rotate';
|
|
1454
|
+
var upObj = new Three.Mesh(upwardsGeom, new Three.MeshBasicMaterial({
|
|
1455
|
+
color: 0xffffff,
|
|
1456
|
+
side: Three.DoubleSide
|
|
1457
|
+
}));
|
|
1458
|
+
upObj.name = 'transUp';
|
|
1459
|
+
var mBox = new Three.Mesh(moveBox, new Three.MeshBasicMaterial({
|
|
1460
|
+
color: 0xdd6699,
|
|
1461
|
+
side: Three.DoubleSide,
|
|
1462
|
+
transparent: true,
|
|
1463
|
+
opacity: 0.4
|
|
1464
|
+
}));
|
|
1465
|
+
var color = new Three.Color(_constants.ARROW_COLOR).convertLinearToSRGB();
|
|
1466
|
+
var vLine = new Three.Line(vLineGeom, new Three.LineBasicMaterial({
|
|
1467
|
+
color: color
|
|
1468
|
+
}));
|
|
1469
|
+
var vLine1 = new Three.Line(vLineGeom1, new Three.LineBasicMaterial({
|
|
1470
|
+
color: color
|
|
1471
|
+
}));
|
|
1472
|
+
var vLine2 = new Three.Line(vLineGeom2, new Three.LineBasicMaterial({
|
|
1473
|
+
color: color
|
|
1474
|
+
}));
|
|
1475
|
+
var vLine3 = new Three.Line(vLineGeom3, new Three.LineBasicMaterial({
|
|
1476
|
+
color: color
|
|
1477
|
+
}));
|
|
1478
|
+
vLine.renderOrder = 1;
|
|
1479
|
+
vLine1.renderOrder = 1;
|
|
1480
|
+
vLine2.renderOrder = 1;
|
|
1481
|
+
vLine3.renderOrder = 1;
|
|
1482
|
+
vLine.material.transparent = true;
|
|
1483
|
+
vLine1.material.transparent = true;
|
|
1484
|
+
vLine2.material.transparent = true;
|
|
1485
|
+
vLine3.material.transparent = true;
|
|
1486
|
+
vLine.material.depthTest = false;
|
|
1487
|
+
vLine1.material.depthTest = false;
|
|
1488
|
+
vLine2.material.depthTest = false;
|
|
1489
|
+
vLine3.material.depthTest = false;
|
|
1490
|
+
// translate vector to center of object
|
|
1491
|
+
var uVec = new Three.Vector3(-posVec.x / scalevec.x, -posVec.y / scalevec.y, -posVec.z / scalevec.z);
|
|
1492
|
+
vLine.translateY(1.6);
|
|
1493
|
+
vLine1.translateY(1.6);
|
|
1494
|
+
vLine2.translateY(1.6);
|
|
1495
|
+
vLine3.translateY(1.6);
|
|
1496
|
+
|
|
1497
|
+
//rotObj.translateOnAxis(uVec, 1);
|
|
1498
|
+
upObj.translateOnAxis(uVec, 1);
|
|
1499
|
+
upObj.translateY(max.y - min.y);
|
|
1500
|
+
mBox.name = 'TransformBox';
|
|
1501
|
+
mBox.translateOnAxis(new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z), 1);
|
|
1502
|
+
mBox.scale.set(1.01, 1.01, 1.01);
|
|
1503
|
+
|
|
1504
|
+
// other side rotate object
|
|
1505
|
+
var rotFillObj1 = rotFillObj.clone();
|
|
1506
|
+
var rotStrokeObj1 = rotStrokeObj.clone();
|
|
1507
|
+
rotFillObj1.rotateY(Math.PI);
|
|
1508
|
+
rotStrokeObj1.rotateY(Math.PI);
|
|
1509
|
+
rotFillObj.translateY(1.6);
|
|
1510
|
+
rotFillObj1.translateY(1.6);
|
|
1511
|
+
rotStrokeObj.translateY(1.6);
|
|
1512
|
+
rotStrokeObj1.translateY(1.6);
|
|
1513
|
+
|
|
1514
|
+
// assets Objects group includes rotate objects...
|
|
1515
|
+
var asrtObj = new Three.Group();
|
|
1516
|
+
// asrtObj.add(rotFillObj);
|
|
1517
|
+
// asrtObj.add(rotFillObj1);
|
|
1518
|
+
// asrtObj.add(rotStrokeObj);
|
|
1519
|
+
// asrtObj.add(rotStrokeObj1);
|
|
1520
|
+
//asrtObj.add(upObj);
|
|
1521
|
+
asrtObj.add(vLine);
|
|
1522
|
+
asrtObj.add(vLine1);
|
|
1523
|
+
asrtObj.add(vLine2);
|
|
1524
|
+
asrtObj.add(vLine3);
|
|
1525
|
+
mBox.visible = false;
|
|
1526
|
+
asrtObj.add(mBox);
|
|
1527
|
+
asrtObj.scale.set(1, 1, 1);
|
|
1528
|
+
//asrtObj.translateY(newAltitude / scalevec.y);
|
|
1529
|
+
asrtObj.name = 'TransformGizmo';
|
|
1530
|
+
// add assets Objects Group
|
|
1531
|
+
object.add(asrtObj);
|
|
1532
|
+
|
|
1533
|
+
// recover objects transform
|
|
1534
|
+
object.position.x = posVec.x;
|
|
1535
|
+
object.position.y = posVec.y;
|
|
1536
|
+
object.position.z = posVec.z;
|
|
1537
|
+
object.scale.set(scalevec.x, scalevec.y, scalevec.z);
|
|
1538
|
+
setTimeout(function () {
|
|
1539
|
+
SceneCreator.getDistances(layer);
|
|
1540
|
+
}, 100);
|
|
1541
|
+
}
|
|
1542
|
+
return object;
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
// keys in structure
|
|
1546
|
+
var keys = Object.keys(structure);
|
|
1547
|
+
|
|
1548
|
+
// if exist in cached Objects
|
|
1549
|
+
if (element.type in cachedObject) {
|
|
1550
|
+
var _objGroup3 = cachedObject[element.type].clone();
|
|
1551
|
+
return Promise.resolve(onLoadItem(_objGroup3.clone()));
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
// base Object/////
|
|
1555
|
+
var objGroup = null;
|
|
1556
|
+
var _loadGLTFs3 = function loadGLTFs(i) {
|
|
1557
|
+
if (i === keys.length) {
|
|
1558
|
+
// if end of keys
|
|
1559
|
+
cachedObject[element.type] = objGroup.clone(); //register to cachedObject
|
|
1560
|
+
return onLoadItem(cachedObject[element.type].clone());
|
|
1561
|
+
}
|
|
1562
|
+
if (keys[i] === 'base') {
|
|
1563
|
+
// if base Objects
|
|
1564
|
+
i++;
|
|
1565
|
+
return _loadGLTFs3(i);
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
// load base to start //
|
|
1570
|
+
// return loadGLTF(dirName + structure["base"])
|
|
1571
|
+
return (0, _loadObj.loadGLTF)(structure['base']).then(function (object) {
|
|
1572
|
+
// let textureURL = `${API_SERVER_URL}/uploads/assets/default/steel.jpg`;
|
|
1573
|
+
// let texture = loadTexture(textureURL);
|
|
1574
|
+
// texture.wrapS = Three.MirroredRepeatWrapping;
|
|
1575
|
+
// texture.wrapT = Three.MirroredRepeatWrapping;
|
|
1576
|
+
|
|
1577
|
+
object.name = 'MainObject';
|
|
1578
|
+
var mat2 = new Three.MeshStandardMaterial({
|
|
1579
|
+
emissive: new Three.Color(0x666666).convertLinearToSRGB(),
|
|
1580
|
+
metalness: 0.7,
|
|
1581
|
+
roughness: 0.3
|
|
1582
|
+
});
|
|
1583
|
+
// mat2.envMap = textureCube;
|
|
1584
|
+
object.material = mat2;
|
|
1585
|
+
for (var j = 0; j < object.children.length; j++) {
|
|
1586
|
+
if (object.children[j].type === _constants.OBJTYPE_MESH) {
|
|
1587
|
+
object.children[j].material = mat2;
|
|
1588
|
+
object.children[j].receiveShadow = true;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
objGroup = object;
|
|
1592
|
+
}, function (reason) {
|
|
1593
|
+
console.log('loadGLTF failed for reason:', reason);
|
|
1594
|
+
objGroup = GeomUtils.emptyBoxHolder(newWidth, newHeight, newDepth);
|
|
1595
|
+
}).then(function () {
|
|
1596
|
+
return _loadGLTFs3(0);
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
function addEdgesToMesh(inChild) {
|
|
1600
|
+
var boxEdge = new Three.EdgesGeometry(inChild.geometry, 10);
|
|
1601
|
+
var boxEdgeMaterial = new Three.LineBasicMaterial({
|
|
1602
|
+
color: 0x000000,
|
|
1603
|
+
transparent: true,
|
|
1604
|
+
opacity: 0.09
|
|
1605
|
+
});
|
|
1606
|
+
var boxEdgeLine = new Three.LineSegments(boxEdge, boxEdgeMaterial);
|
|
1607
|
+
// inChild.add(boxEdgeLine);
|
|
1608
|
+
}
|