diff --git a/public/images/L_Hata/L_Hata_0.jpg b/public/images/L_Hata/L_Hata_0.jpg new file mode 100644 index 0000000..4a07816 Binary files /dev/null and b/public/images/L_Hata/L_Hata_0.jpg differ diff --git a/public/images/L_Hata/L_Hata_1.jpg b/public/images/L_Hata/L_Hata_1.jpg new file mode 100644 index 0000000..ebb80be Binary files /dev/null and b/public/images/L_Hata/L_Hata_1.jpg differ diff --git a/public/images/L_Hata/L_Hata_10.jpg b/public/images/L_Hata/L_Hata_10.jpg new file mode 100644 index 0000000..509d07a Binary files /dev/null and b/public/images/L_Hata/L_Hata_10.jpg differ diff --git a/public/images/L_Hata/L_Hata_11.jpg b/public/images/L_Hata/L_Hata_11.jpg new file mode 100644 index 0000000..8dcefee Binary files /dev/null and b/public/images/L_Hata/L_Hata_11.jpg differ diff --git a/public/images/L_Hata/L_Hata_12.jpg b/public/images/L_Hata/L_Hata_12.jpg new file mode 100644 index 0000000..b0e1730 Binary files /dev/null and b/public/images/L_Hata/L_Hata_12.jpg differ diff --git a/public/images/L_Hata/L_Hata_13.jpg b/public/images/L_Hata/L_Hata_13.jpg new file mode 100644 index 0000000..415a6d4 Binary files /dev/null and b/public/images/L_Hata/L_Hata_13.jpg differ diff --git a/public/images/L_Hata/L_Hata_2.jpg b/public/images/L_Hata/L_Hata_2.jpg new file mode 100644 index 0000000..2a47473 Binary files /dev/null and b/public/images/L_Hata/L_Hata_2.jpg differ diff --git a/public/images/L_Hata/L_Hata_3.jpg b/public/images/L_Hata/L_Hata_3.jpg new file mode 100644 index 0000000..a0e6ad7 Binary files /dev/null and b/public/images/L_Hata/L_Hata_3.jpg differ diff --git a/public/images/L_Hata/L_Hata_4.jpg b/public/images/L_Hata/L_Hata_4.jpg new file mode 100644 index 0000000..8819b7e Binary files /dev/null and b/public/images/L_Hata/L_Hata_4.jpg differ diff --git a/public/images/L_Hata/L_Hata_5.jpg b/public/images/L_Hata/L_Hata_5.jpg new file mode 100644 index 0000000..17b4c01 Binary files /dev/null and b/public/images/L_Hata/L_Hata_5.jpg differ diff --git a/public/images/L_Hata/L_Hata_6.jpg b/public/images/L_Hata/L_Hata_6.jpg new file mode 100644 index 0000000..27340b1 Binary files /dev/null and b/public/images/L_Hata/L_Hata_6.jpg differ diff --git a/public/images/L_Hata/L_Hata_7.jpg b/public/images/L_Hata/L_Hata_7.jpg new file mode 100644 index 0000000..94268a0 Binary files /dev/null and b/public/images/L_Hata/L_Hata_7.jpg differ diff --git a/public/images/L_Hata/L_Hata_8.jpg b/public/images/L_Hata/L_Hata_8.jpg new file mode 100644 index 0000000..c5ecb01 Binary files /dev/null and b/public/images/L_Hata/L_Hata_8.jpg differ diff --git a/public/images/L_Hata/L_Hata_9.jpg b/public/images/L_Hata/L_Hata_9.jpg new file mode 100644 index 0000000..23b7a43 Binary files /dev/null and b/public/images/L_Hata/L_Hata_9.jpg differ diff --git a/public/images/LeftTower.jpg b/public/images/LeftTower.jpg new file mode 100644 index 0000000..07e6828 Binary files /dev/null and b/public/images/LeftTower.jpg differ diff --git a/public/images/R_Hata/R_Hata_0.jpg b/public/images/R_Hata/R_Hata_0.jpg new file mode 100644 index 0000000..38b7f24 Binary files /dev/null and b/public/images/R_Hata/R_Hata_0.jpg differ diff --git a/public/images/R_Hata/R_Hata_1.jpg b/public/images/R_Hata/R_Hata_1.jpg new file mode 100644 index 0000000..8814518 Binary files /dev/null and b/public/images/R_Hata/R_Hata_1.jpg differ diff --git a/public/images/R_Hata/R_Hata_10.jpg b/public/images/R_Hata/R_Hata_10.jpg new file mode 100644 index 0000000..0f91542 Binary files /dev/null and b/public/images/R_Hata/R_Hata_10.jpg differ diff --git a/public/images/R_Hata/R_Hata_11.jpg b/public/images/R_Hata/R_Hata_11.jpg new file mode 100644 index 0000000..df0fd09 Binary files /dev/null and b/public/images/R_Hata/R_Hata_11.jpg differ diff --git a/public/images/R_Hata/R_Hata_12.jpg b/public/images/R_Hata/R_Hata_12.jpg new file mode 100644 index 0000000..a0aee0b Binary files /dev/null and b/public/images/R_Hata/R_Hata_12.jpg differ diff --git a/public/images/R_Hata/R_Hata_13.jpg b/public/images/R_Hata/R_Hata_13.jpg new file mode 100644 index 0000000..d8f8b10 Binary files /dev/null and b/public/images/R_Hata/R_Hata_13.jpg differ diff --git a/public/images/R_Hata/R_Hata_14.jpg b/public/images/R_Hata/R_Hata_14.jpg new file mode 100644 index 0000000..1e58682 Binary files /dev/null and b/public/images/R_Hata/R_Hata_14.jpg differ diff --git a/public/images/R_Hata/R_Hata_2.jpg b/public/images/R_Hata/R_Hata_2.jpg new file mode 100644 index 0000000..500a423 Binary files /dev/null and b/public/images/R_Hata/R_Hata_2.jpg differ diff --git a/public/images/R_Hata/R_Hata_3.jpg b/public/images/R_Hata/R_Hata_3.jpg new file mode 100644 index 0000000..624be50 Binary files /dev/null and b/public/images/R_Hata/R_Hata_3.jpg differ diff --git a/public/images/R_Hata/R_Hata_4.jpg b/public/images/R_Hata/R_Hata_4.jpg new file mode 100644 index 0000000..a923b98 Binary files /dev/null and b/public/images/R_Hata/R_Hata_4.jpg differ diff --git a/public/images/R_Hata/R_Hata_5.jpg b/public/images/R_Hata/R_Hata_5.jpg new file mode 100644 index 0000000..8712e2e Binary files /dev/null and b/public/images/R_Hata/R_Hata_5.jpg differ diff --git a/public/images/R_Hata/R_Hata_6.jpg b/public/images/R_Hata/R_Hata_6.jpg new file mode 100644 index 0000000..b5c6331 Binary files /dev/null and b/public/images/R_Hata/R_Hata_6.jpg differ diff --git a/public/images/R_Hata/R_Hata_7.jpg b/public/images/R_Hata/R_Hata_7.jpg new file mode 100644 index 0000000..9f46c3f Binary files /dev/null and b/public/images/R_Hata/R_Hata_7.jpg differ diff --git a/public/images/R_Hata/R_Hata_8.jpg b/public/images/R_Hata/R_Hata_8.jpg new file mode 100644 index 0000000..c6c74f0 Binary files /dev/null and b/public/images/R_Hata/R_Hata_8.jpg differ diff --git a/public/images/R_Hata/R_Hata_9.jpg b/public/images/R_Hata/R_Hata_9.jpg new file mode 100644 index 0000000..c02f02b Binary files /dev/null and b/public/images/R_Hata/R_Hata_9.jpg differ diff --git a/public/images/RightTower.jpg b/public/images/RightTower.jpg new file mode 100644 index 0000000..7603ea5 Binary files /dev/null and b/public/images/RightTower.jpg differ diff --git a/public/images/Split_LTower.jpg b/public/images/Split_LTower.jpg new file mode 100644 index 0000000..5689246 Binary files /dev/null and b/public/images/Split_LTower.jpg differ diff --git a/public/images/Split_RTower.jpg b/public/images/Split_RTower.jpg new file mode 100644 index 0000000..71aa766 Binary files /dev/null and b/public/images/Split_RTower.jpg differ diff --git a/src/components/MainMarksContainer.tsx b/src/components/MainMarksContainer.tsx index cc06065..9a255f0 100644 --- a/src/components/MainMarksContainer.tsx +++ b/src/components/MainMarksContainer.tsx @@ -6,11 +6,15 @@ import { useNavigate } from "react-router-dom"; import MarkTower1Icon from "./icons/marks/MarkTower1Icon"; import MarkTower2Icon from "./icons/marks/MarkTower2Icon"; import MarkWalkIcon from "./icons/marks/MarkWalkIcon"; +import MarkLockIcon from "./icons/marks/MarkLockIcon"; +import MarkWalkHereIcon from "./icons/marks/MarkWalkHereIcon"; const markIcons: { [key: string]: React.ReactNode } = { tower1: , tower2: , walk: , + lock: , + walkHere: , }; interface MarksContainerProps { diff --git a/src/components/SequenceSlider.tsx b/src/components/SequenceSlider.tsx index 0047444..645031a 100644 --- a/src/components/SequenceSlider.tsx +++ b/src/components/SequenceSlider.tsx @@ -19,7 +19,7 @@ const marks: Mark[] = [ icon: "tower1", x: 1360, y: 840, - // url: "/virtual-tour-3", + url: "/tower1", }, { id: "2", @@ -27,7 +27,7 @@ const marks: Mark[] = [ icon: "tower2", x: 730, y: 820, - // url: "/virtual-tour-4", + url: "/tower2", }, { id: "3", @@ -196,7 +196,7 @@ function SequenceSlider({ path, onChange }: SequenceSliderProps) {
+ + + + ); +} + +export default MarkLockIcon; diff --git a/src/components/icons/marks/MarkWalkHereIcon.tsx b/src/components/icons/marks/MarkWalkHereIcon.tsx new file mode 100644 index 0000000..63388ba --- /dev/null +++ b/src/components/icons/marks/MarkWalkHereIcon.tsx @@ -0,0 +1,19 @@ +function MarkWalkHereIcon() { + return ( + + + + ); +} + +export default MarkWalkHereIcon; diff --git a/src/images3.json b/src/images3.json index c2fc60e..f9224ee 100644 --- a/src/images3.json +++ b/src/images3.json @@ -1,65 +1,118 @@ [ { - "id": "Niz_Dvor_1", - "src": "/images/NizDvor/NKS_360_NizDvor01.jpg", - "position": [-135.4, 0, -62.6], + "id": "R_Hata_0", + "src": "/images/R_Hata/R_Hata_0.jpg", + "position": [88, 0, 51], "links": [ - { "toId": "Niz_Dvor_6", "label": "" }, - { "toId": "Niz_Dvor_2", "label": "" } + { "toId": "R_Hata_1", "label": "Гардероб" }, + { "toId": "R_Hata_2", "label": "Коридор" } ] }, { - "id": "Niz_Dvor_2", - "src": "/images/NizDvor/NKS_360_NizDvor02.jpg", - "position": [-47.39, 0, 10.06], + "id": "R_Hata_1", + "src": "/images/R_Hata/R_Hata_1.jpg", + "position": [63, 0, 62], + "links": [{ "toId": "R_Hata_0", "label": "Прихожая" }] + }, + { + "id": "R_Hata_2", + "src": "/images/R_Hata/R_Hata_2.jpg", + "position": [102, 0, 32], "links": [ - { "toId": "Niz_Dvor_1", "label": "" }, - { "toId": "Niz_Dvor_3", "label": "" } + { "toId": "R_Hata_0", "label": "Прихожая" }, + { "toId": "R_Hata_8", "label": "Комната" }, + { "toId": "R_Hata_5", "label": "Гостиная" }, + { "toId": "R_Hata_6", "label": "Кухня" }, + { "toId": "R_Hata_14", "label": "Комната" }, + { "toId": "R_Hata_3", "label": "Санузел" } ] }, { - "id": "Niz_Dvor_3", - "src": "/images/NizDvor/NKS_360_NizDvor03.jpg", - "position": [-2.28, 0, 54.31], + "id": "R_Hata_3", + "src": "/images/R_Hata/R_Hata_3.jpg", + "position": [119, 0, 53], + "links": [{ "toId": "R_Hata_2", "label": "Коридор" }] + }, + { + "id": "R_Hata_4", + "src": "/images/R_Hata/R_Hata_4.jpg", + "position": [153, 0, 29], + "links": [{ "toId": "R_Hata_14", "label": "Комната" }] + }, + { + "id": "R_Hata_5", + "src": "/images/R_Hata/R_Hata_5.jpg", + "position": [96, 0, -5], "links": [ - { "toId": "Niz_Dvor_2", "label": "" }, - { "toId": "Niz_Dvor_4", "label": "" } + { "toId": "R_Hata_6", "label": "Кухня" }, + { "toId": "R_Hata_2", "label": "Коридор" } ] }, { - "id": "Niz_Dvor_4", - "src": "/images/NizDvor/NKS_360_NizDvor04.jpg", - "position": [60.5, 0, 22.7], + "id": "R_Hata_6", + "src": "/images/R_Hata/R_Hata_6.jpg", + "position": [118, 0, -2], "links": [ - { "toId": "Niz_Dvor_3", "label": "" }, - { "toId": "Niz_Dvor_5", "label": "" } + { "toId": "R_Hata_2", "label": "Коридор" }, + { "toId": "R_Hata_5", "label": "Гостиная" } ] }, { - "id": "Niz_Dvor_5", - "src": "/images/NizDvor/NKS_360_NizDvor05.jpg", - "position": [3.3, 0, -24.9], + "id": "R_Hata_7", + "src": "/images/R_Hata/R_Hata_7.jpg", + "position": [55, 0, -5], + "links": [{ "toId": "R_Hata_8", "label": "Комната" }] + }, + { + "id": "R_Hata_8", + "src": "/images/R_Hata/R_Hata_8.jpg", + "position": [73, 0, 32], "links": [ - { "toId": "Niz_Dvor_4", "label": "" }, - { "toId": "Niz_Dvor_0", "label": "" } + { "toId": "R_Hata_9", "label": "Санузел" }, + { "toId": "R_Hata_7", "label": "Комната" }, + { "toId": "R_Hata_2", "label": "Коридор" } ] }, { - "id": "Niz_Dvor_0", - "src": "/images/NizDvor/NKS_360_NizDvor00.jpg", - "position": [-61.9, 0, -76.4], + "id": "R_Hata_9", + "src": "/images/R_Hata/R_Hata_9.jpg", + "position": [55, 0, 39], + "links": [{ "toId": "R_Hata_8", "label": "Комната" }] + }, + { + "id": "R_Hata_10", + "src": "/images/R_Hata/R_Hata_10.jpg", + "position": [70.6, 0, 60], "links": [ - { "toId": "Niz_Dvor_5", "label": "" }, - { "toId": "Niz_Dvor_6", "label": "" } + { "toId": "R_Hata_0", "label": "" }, + { "toId": "R_Hata_1", "label": "" } ] }, { - "id": "Niz_Dvor_6", - "src": "/images/NizDvor/NKS_360_NizDvor06.jpg", - "position": [-119.7, 0, -121.6], + "id": "R_Hata_11", + "src": "/images/R_Hata/R_Hata_11.jpg", + "position": [66.3, 0, 36.1], + "links": [] + }, + { + "id": "R_Hata_12", + "src": "/images/R_Hata/R_Hata_12.jpg", + "position": [78.1, 0, 29.3], + "links": [] + }, + { + "id": "R_Hata_13", + "src": "/images/R_Hata/R_Hata_13.jpg", + "position": [110.6, 0, 41.1], + "links": [] + }, + { + "id": "R_Hata_14", + "src": "/images/R_Hata/R_Hata_14.jpg", + "position": [127.3, 0, 32.1], "links": [ - { "toId": "Niz_Dvor_0", "label": "" }, - { "toId": "Niz_Dvor_1", "label": "" } + { "toId": "R_Hata_4", "label": "Комната" }, + { "toId": "R_Hata_2", "label": "Коридор" } ] } ] diff --git a/src/images4.json b/src/images4.json index c2fc60e..c04bd40 100644 --- a/src/images4.json +++ b/src/images4.json @@ -1,65 +1,111 @@ [ { - "id": "Niz_Dvor_1", - "src": "/images/NizDvor/NKS_360_NizDvor01.jpg", - "position": [-135.4, 0, -62.6], + "id": "L_Hata_0", + "src": "/images/L_Hata/L_Hata_0.jpg", + "position": [-103.69, 0, -44.75], + "links": [{ "toId": "L_Hata_9", "label": "Коридор" }] + }, + { + "id": "L_Hata_1", + "src": "/images/L_Hata/L_Hata_1.jpg", + "position": [-100.25, 0, -42.89], "links": [ - { "toId": "Niz_Dvor_6", "label": "" }, - { "toId": "Niz_Dvor_2", "label": "" } + { "toId": "L_Hata_9", "label": "Коридор" }, + { "toId": "L_Hata_8", "label": "Санузел" }, + { "toId": "L_Hata_7", "label": "Комната" }, + { "toId": "L_Hata_2", "label": "Коридор" }, + { "toId": "L_Hata_6", "label": "Комната" }, + { "toId": "L_Hata_11", "label": "Комната" } ] }, { - "id": "Niz_Dvor_2", - "src": "/images/NizDvor/NKS_360_NizDvor02.jpg", - "position": [-47.39, 0, 10.06], + "id": "L_Hata_2", + "src": "/images/L_Hata/L_Hata_2.jpg", + "position": [-98.79, 0, -40.85], "links": [ - { "toId": "Niz_Dvor_1", "label": "" }, - { "toId": "Niz_Dvor_3", "label": "" } + { "toId": "L_Hata_1", "label": "Коридор" }, + { "toId": "L_Hata_3", "label": "Кухня" } ] }, { - "id": "Niz_Dvor_3", - "src": "/images/NizDvor/NKS_360_NizDvor03.jpg", - "position": [-2.28, 0, 54.31], + "id": "L_Hata_3", + "src": "/images/L_Hata/L_Hata_3.jpg", + "position": [-95.06, 0, -38.66], "links": [ - { "toId": "Niz_Dvor_2", "label": "" }, - { "toId": "Niz_Dvor_4", "label": "" } + { "toId": "L_Hata_2", "label": "Коридор" }, + { "toId": "L_Hata_4", "label": "Кухня" } ] }, { - "id": "Niz_Dvor_4", - "src": "/images/NizDvor/NKS_360_NizDvor04.jpg", - "position": [60.5, 0, 22.7], + "id": "L_Hata_4", + "src": "/images/L_Hata/L_Hata_4.jpg", + "position": [-95.07, 0, -35.38], "links": [ - { "toId": "Niz_Dvor_3", "label": "" }, - { "toId": "Niz_Dvor_5", "label": "" } + { "toId": "L_Hata_3", "label": "Кухня" }, + { "toId": "L_Hata_5", "label": "Балкон" } ] }, { - "id": "Niz_Dvor_5", - "src": "/images/NizDvor/NKS_360_NizDvor05.jpg", - "position": [3.3, 0, -24.9], + "id": "L_Hata_5", + "src": "/images/L_Hata/L_Hata_5.jpg", + "position": [-92.78, 0, -31.67], + "links": [{ "toId": "L_Hata_4", "label": "Комната" }] + }, + { + "id": "L_Hata_6", + "src": "/images/L_Hata/L_Hata_6.jpg", + "position": [-95.91, 0, -42], + "links": [{ "toId": "L_Hata_1", "label": "Коридор" }] + }, + { + "id": "L_Hata_7", + "src": "/images/L_Hata/L_Hata_7.jpg", + "position": [-97.47, 0, -44.71], + "links": [{ "toId": "L_Hata_1", "label": "Коридор" }] + }, + { + "id": "L_Hata_8", + "src": "/images/L_Hata/L_Hata_8.jpg", + "position": [-100.68, 0, -45.16], + "links": [{ "toId": "L_Hata_1", "label": "Коридор" }] + }, + { + "id": "L_Hata_9", + "src": "/images/L_Hata/L_Hata_9.jpg", + "position": [-102.13, 0, -43.45], "links": [ - { "toId": "Niz_Dvor_4", "label": "" }, - { "toId": "Niz_Dvor_0", "label": "" } + { "toId": "L_Hata_0", "label": "Прихожая" }, + { "toId": "L_Hata_1", "label": "Коридор" } ] }, { - "id": "Niz_Dvor_0", - "src": "/images/NizDvor/NKS_360_NizDvor00.jpg", - "position": [-61.9, 0, -76.4], + "id": "L_Hata_10", + "src": "/images/L_Hata/L_Hata_10.jpg", + "position": [-102.73, 0, -42.12], + "links": [] + }, + { + "id": "L_Hata_11", + "src": "/images/L_Hata/L_Hata_11.jpg", + "position": [-101.47, 0, -39.36], "links": [ - { "toId": "Niz_Dvor_5", "label": "" }, - { "toId": "Niz_Dvor_6", "label": "" } + { "toId": "L_Hata_1", "label": "Коридор" }, + { "toId": "L_Hata_12", "label": "Комната" } ] }, { - "id": "Niz_Dvor_6", - "src": "/images/NizDvor/NKS_360_NizDvor06.jpg", - "position": [-119.7, 0, -121.6], + "id": "L_Hata_12", + "src": "/images/L_Hata/L_Hata_12.jpg", + "position": [-101.25, 0, -36.96], "links": [ - { "toId": "Niz_Dvor_0", "label": "" }, - { "toId": "Niz_Dvor_1", "label": "" } + { "toId": "L_Hata_11", "label": "Комната" }, + { "toId": "L_Hata_13", "label": "Санузел" } ] + }, + { + "id": "L_Hata_13", + "src": "/images/L_Hata/L_Hata_13.jpg", + "position": [-98.86, 0, -37.99], + "links": [{ "toId": "L_Hata_12", "label": "Комната" }] } ] diff --git a/src/main.tsx b/src/main.tsx index f7ce9a4..015b8f1 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -7,12 +7,32 @@ import Infra2Page from "./pages/Infra2Page.tsx"; import VirtualTour2Page from "./pages/VirtualTour2Page.tsx"; import VirtualTour3Page from "./pages/VirtualTour3Page.tsx"; import VirtualTour4Page from "./pages/VirtualTour4Page.tsx"; +import Tower1Page from "./pages/Tower1Page.tsx"; +import Tower1SelectPage from "./pages/Tower1SelectPage.tsx"; +import Tower2Page from "./pages/Tower2Page.tsx"; +import Tower2SelectPage from "./pages/Tower2SelectPage.tsx"; const router = createBrowserRouter([ { path: "/", element: , }, + { + path: "/tower1", + element: , + }, + { + path: "/tower1/select", + element: , + }, + { + path: "/tower2", + element: , + }, + { + path: "/tower2/select", + element: , + }, { path: "/virtual-tour", element: , diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index 1616b3e..eee3ebe 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -1,7 +1,6 @@ import { useNavigate } from "react-router-dom"; import Button from "../components/Button"; import SequenceSlider from "../components/SequenceSlider"; -// import SequenceAnimation from "../components/SequenceAnimation"; function MainPage() { const navigate = useNavigate(); @@ -15,12 +14,6 @@ function MainPage() { } /> - {/* */} -
+ {!isLoaded && ( +
+

+ Загрузка... +

+
+ )} +
+
+ ); +} + +export default Tower1Page; diff --git a/src/pages/Tower1SelectPage.tsx b/src/pages/Tower1SelectPage.tsx new file mode 100644 index 0000000..a5aaab1 --- /dev/null +++ b/src/pages/Tower1SelectPage.tsx @@ -0,0 +1,145 @@ +import { useNavigate } from "react-router-dom"; +import MainMarksContainer from "../components/MainMarksContainer"; +import { Mark } from "../types/Mark"; +import { useEffect, useState } from "react"; +import ArrowLeftIcon from "../components/icons/ArrowLeftIcon"; +import Button from "../components/Button"; + +const marks: Mark[] = [ + { + id: "1", + label: "Просмотр квартиры", + icon: "walk", + x: 1210, + y: 800, + url: "/virtual-tour-3", + }, + { + id: "2", + label: "Недоступно", + icon: "lock", + x: 1270, + y: 960, + }, + { + id: "3", + label: "Недоступно", + icon: "lock", + x: 1320, + y: 1100, + }, + { + id: "4", + label: "Недоступно", + icon: "lock", + x: 1380, + y: 1300, + }, + { + id: "5", + label: "Недоступно", + icon: "lock", + x: 1180, + y: 1350, + }, + { + id: "6", + label: "Недоступно", + icon: "lock", + x: 950, + y: 1350, + }, + { + id: "7", + label: "Недоступно", + icon: "lock", + x: 750, + y: 1300, + }, + { + id: "8", + label: "Недоступно", + icon: "lock", + x: 820, + y: 1100, + }, + { + id: "9", + label: "Недоступно", + icon: "lock", + x: 860, + y: 960, + }, + { + id: "10", + label: "Недоступно", + icon: "lock", + x: 950, + y: 800, + }, +]; + +function Tower1SelectPage() { + const [width, setWidth] = useState(); + const [top, setTop] = useState(); + const [isLoaded, setIsLoaded] = useState(false); + const navigate = useNavigate(); + + function handleResize() { + setWidth(window.innerWidth); + setTop(window.innerWidth / 2 - window.innerHeight / 2); + } + + useEffect(() => { + handleResize(); + window.addEventListener("resize", handleResize); + return () => window.removeEventListener("resize", handleResize); + }, []); + + function handleOnImageLoad() { + setIsLoaded(true); + } + + return ( +
+
+
+ + + +
+
+
+ {!isLoaded && ( +
+

+ Загрузка... +

+
+ )} +
+
+ ); +} + +export default Tower1SelectPage; diff --git a/src/pages/Tower2Page.tsx b/src/pages/Tower2Page.tsx new file mode 100644 index 0000000..d625970 --- /dev/null +++ b/src/pages/Tower2Page.tsx @@ -0,0 +1,82 @@ +import { useNavigate } from "react-router-dom"; +import MainMarksContainer from "../components/MainMarksContainer"; +import { Mark } from "../types/Mark"; +import { useEffect, useState } from "react"; +import ArrowLeftIcon from "../components/icons/ArrowLeftIcon"; +import Button from "../components/Button"; + +const marks: Mark[] = [ + { + id: "1", + label: "Перейти к планировке", + icon: "walkHere", + x: 1095, + y: 850, + url: "/tower2/select", + }, +]; + +function Tower2Page() { + const [width, setWidth] = useState(); + const [top, setTop] = useState(); + const [isLoaded, setIsLoaded] = useState(false); + const navigate = useNavigate(); + + function handleResize() { + setWidth(window.innerWidth); + setTop(window.innerWidth / 2 - window.innerHeight / 2); + } + + useEffect(() => { + handleResize(); + window.addEventListener("resize", handleResize); + return () => window.removeEventListener("resize", handleResize); + }, []); + + function handleOnImageLoad() { + setIsLoaded(true); + } + + return ( +
+
+
+ + + +
+
+
+ {!isLoaded && ( +
+

+ Загрузка... +

+
+ )} +
+
+ ); +} + +export default Tower2Page; diff --git a/src/pages/Tower2SelectPage.tsx b/src/pages/Tower2SelectPage.tsx new file mode 100644 index 0000000..9a8be11 --- /dev/null +++ b/src/pages/Tower2SelectPage.tsx @@ -0,0 +1,145 @@ +import { useNavigate } from "react-router-dom"; +import MainMarksContainer from "../components/MainMarksContainer"; +import { Mark } from "../types/Mark"; +import { useEffect, useState } from "react"; +import ArrowLeftIcon from "../components/icons/ArrowLeftIcon"; +import Button from "../components/Button"; + +const marks: Mark[] = [ + { + id: "1", + label: "Просмотр квартиры", + icon: "walk", + x: 1720, + y: 980, + url: "/virtual-tour-4", + }, + { + id: "2", + label: "Недоступно", + icon: "lock", + x: 1450, + y: 980, + }, + { + id: "3", + label: "Недоступно", + icon: "lock", + x: 1300, + y: 980, + }, + { + id: "4", + label: "Недоступно", + icon: "lock", + x: 830, + y: 980, + }, + { + id: "5", + label: "Недоступно", + icon: "lock", + x: 680, + y: 980, + }, + { + id: "6", + label: "Недоступно", + icon: "lock", + x: 450, + y: 980, + }, + { + id: "7", + label: "Недоступно", + icon: "lock", + x: 1460, + y: 1240, + }, + { + id: "8", + label: "Недоступно", + icon: "lock", + x: 1200, + y: 1240, + }, + { + id: "9", + label: "Недоступно", + icon: "lock", + x: 950, + y: 1240, + }, + { + id: "9", + label: "Недоступно", + icon: "lock", + x: 700, + y: 1240, + }, +]; + +function Tower2SelectPage() { + const [width, setWidth] = useState(); + const [top, setTop] = useState(); + const [isLoaded, setIsLoaded] = useState(false); + const navigate = useNavigate(); + + function handleResize() { + setWidth(window.innerWidth); + setTop(window.innerWidth / 2 - window.innerHeight / 2); + } + + useEffect(() => { + handleResize(); + window.addEventListener("resize", handleResize); + return () => window.removeEventListener("resize", handleResize); + }, []); + + function handleOnImageLoad() { + setIsLoaded(true); + } + + return ( +
+
+
+ + + +
+
+
+ {!isLoaded && ( +
+

+ Загрузка... +

+
+ )} +
+
+ ); +} + +export default Tower2SelectPage;