import dash
from dash import html, dcc, Input, Output
import dash_pannellum
app = dash.Dash(__name__)
tour_config = {
"default": {
"firstScene": "outside",
"sceneFadeDuration": 1000,
},
"scenes": {
"outside": {
"title": "Outside Classroom",
"hfov": 200,
"pitch": -1,
"yaw": -30,
"type": "equirectangular",
"panorama": "https://i.ibb.co/Fn71NwK/signal-2024-11-03-202251-111.jpg",
"autoLoad": True,
"hotSpots": [
{
"pitch": -2.1,
"yaw": -30,
"type": "scene",
"text": "Go into classroom",
"sceneId": "classroom"
}
]
},
"classroom": {
"title": "Inside Classroom",
"hfov": 200,
"yaw": -60,
"type": "equirectangular",
"panorama": "https://i.ibb.co/kmJQMzR/signal-2024-11-03-202251-333.jpg",
"autoLoad": True,
"hotSpots": [
{
"pitch": 0,
"yaw": 180,
"type": "scene",
"text": "Go outside",
"sceneId": "outside",
"targetYaw": 180,
"targetPitch": 0
}
]
}
}
}
app.layout = html.Div([
html.H1("GGM School Tour"),
dash_pannellum.DashPannellum(
id='tour-component',
tour=tour_config,
customControls=True,
showCenterDot=False,
width='100%',
height='750px',
autoLoad=True,
compass=True,
northOffset=90
),
])