import { View } from "@dage/krpano";
import { ISceneProps } from "@/types";

const URL = "https://houseoss.4dkankan.com/project/leifeng-transfer";

export const CENTER_SCENE_LIST: ISceneProps[] = [
  {
    name: "center1",
    thumbUrl: URL + "/panos/center1.tiles/thumb.jpg",
    previewUrl: URL + "/panos/center1.tiles/preview.jpg",
    imageTagAttributes: {
      type: "cube",
      tileSize: 512,
      multires: true,
    },
    images: [
      {
        tiledImageWidth: 2624,
        tiledImageHeight: 2624,
        url: URL + "/panos/center1.tiles/%s/l3/%v/l3_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 1280,
        tiledImageHeight: 1280,
        url: URL + "/panos/center1.tiles/%s/l2/%v/l2_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 640,
        tiledImageHeight: 640,
        url: URL + "/panos/center1.tiles/%s/l1/%v/l1_%s_%v_%h.jpg",
      },
    ],
    children: (
      <View
        hlookat={0}
        vlookat={0}
        fovType="MFOV"
        fov={120}
        maxPixelZoom={2}
        fovMin={70}
        fovMax={140}
        limitView="auto"
      />
    ),
  },
  {
    name: "center2",
    thumbUrl: URL + "/panos/center2.tiles/thumb.jpg",
    previewUrl: URL + "/panos/center2.tiles/preview.jpg",
    imageTagAttributes: {
      type: "cube",
      tileSize: 512,
      multires: true,
    },
    images: [
      {
        tiledImageWidth: 2624,
        tiledImageHeight: 2624,
        url: URL + "/panos/center2.tiles/%s/l3/%v/l3_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 1280,
        tiledImageHeight: 1280,
        url: URL + "/panos/center2.tiles/%s/l2/%v/l2_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 640,
        tiledImageHeight: 640,
        url: URL + "/panos/center2.tiles/%s/l1/%v/l1_%s_%v_%h.jpg",
      },
    ],
    children: (
      <View
        hlookat={0}
        vlookat={0}
        fovType="MFOV"
        fov={120}
        maxPixelZoom={2}
        fovMin={70}
        fovMax={140}
        limitView="auto"
      />
    ),
  },
];

export const SERVICE_SCENE_LIST: ISceneProps[] = [
  {
    name: "service1",
    thumbUrl: URL + "/panos/service1.tiles/thumb.jpg",
    previewUrl: URL + "/panos/service1.tiles/preview.jpg",
    imageTagAttributes: {
      type: "cube",
      tileSize: 512,
      multires: true,
    },
    images: [
      {
        tiledImageWidth: 2624,
        tiledImageHeight: 2624,
        url: URL + "/panos/service1.tiles/%s/l3/%v/l3_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 1280,
        tiledImageHeight: 1280,
        url: URL + "/panos/service1.tiles/%s/l2/%v/l2_%s_%v_%h.jpg",
      },
      {
        tiledImageWidth: 640,
        tiledImageHeight: 640,
        url: URL + "/panos/service1.tiles/%s/l1/%v/l1_%s_%v_%h.jpg",
      },
    ],
    children: (
      <View
        hlookat={0}
        vlookat={0}
        fovType="MFOV"
        fov={120}
        maxPixelZoom={2}
        fovMin={70}
        fovMax={140}
        limitView="auto"
      />
    ),
  },
];

export const MENUS = [
  {
    title: "长沙国防教育馆",
    scenes: CENTER_SCENE_LIST,
  },
  {
    title: "游客服务中心",
    scenes: SERVICE_SCENE_LIST,
  },
];

export const ALL_SCENES = [...CENTER_SCENE_LIST, ...SERVICE_SCENE_LIST];
