2023-04-06 01:33:08 +02:00
|
|
|
<script lang="ts">
|
2025-03-16 16:31:38 +01:00
|
|
|
import { onMount } from "svelte"
|
2024-11-24 23:19:17 +01:00
|
|
|
|
2025-03-16 16:31:38 +01:00
|
|
|
export let imageInfo
|
|
|
|
|
2025-03-30 03:10:29 +02:00
|
|
|
import { PhotoSphereViewerWrapper } from "./Image/photoSphereViewerWrapper"
|
2025-03-16 16:31:38 +01:00
|
|
|
|
|
|
|
let container: HTMLElement
|
|
|
|
|
|
|
|
onMount(() => {
|
2025-03-30 03:10:29 +02:00
|
|
|
console.log("Creating viewer...")
|
|
|
|
const features = [
|
|
|
|
{
|
2025-04-15 18:18:44 +02:00
|
|
|
type: "Feature",
|
|
|
|
properties: { name: "trap" },
|
|
|
|
geometry: {
|
|
|
|
coordinates: [3.742395038713312, 51.05237592785801],
|
|
|
|
type: "Point",
|
|
|
|
},
|
|
|
|
},
|
2025-03-30 03:10:29 +02:00
|
|
|
]
|
|
|
|
const viewer = new PhotoSphereViewerWrapper(container, imageInfo, features)
|
|
|
|
|
|
|
|
// console.log(panorama, container)
|
2025-03-16 16:31:38 +01:00
|
|
|
})
|
2024-02-22 18:58:34 +01:00
|
|
|
</script>
|
2024-11-24 23:19:17 +01:00
|
|
|
|
2025-03-30 03:10:29 +02:00
|
|
|
<head>
|
2025-04-15 18:18:44 +02:00
|
|
|
<link rel="stylesheet" href="./node_modules/pannellum/build/pannellum.css" />
|
2025-03-30 03:10:29 +02:00
|
|
|
</head>
|
2025-04-15 18:18:44 +02:00
|
|
|
<div bind:this={container} class="h-screen w-screen border" style="height: 500px" />
|