Created
June 18, 2025 01:43
-
-
Save theothermattm/b40f41133d1492c900826e2ec2d90f21 to your computer and use it in GitHub Desktop.
Concept 3D POC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>AWE Concept 3D POC</title> | |
<style> | |
body { | |
background: #fff; | |
font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'Liberation Sans', sans-serif; | |
margin: 0; | |
padding: 0; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
min-height: 100vh; | |
} | |
h1 { | |
margin-top: 2rem; | |
font-size: 2rem; | |
color: #222; | |
letter-spacing: 0.02em; | |
} | |
.iframe-container { | |
width: 90vw; | |
max-width: 1200px; | |
height: 70vh; | |
margin-top: 2rem; | |
box-shadow: 0 2px 16px rgba(0,0,0,0.08); | |
border-radius: 12px; | |
overflow: hidden; | |
background: #fafbfc; | |
} | |
iframe { | |
width: 100%; | |
height: 100%; | |
border: none; | |
background: #fff; | |
} | |
.toggle-btn { | |
margin-top: 1rem; | |
padding: 0.5rem 1.2rem; | |
font-size: 1rem; | |
border-radius: 6px; | |
border: 1px solid #ddd; | |
background: #f5f5f5; | |
cursor: pointer; | |
transition: background 0.2s; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>AWE Concept 3D POC</h1> | |
<div class="iframe-container"> | |
<iframe id="concept-iframe" src="https://campusmap.alwmedschool.org/?id=2159&tbh&sbh#!z/18?ct/80614,80625,80626,80629,80630,80631,80632,80633,80613,80634,80635?" title="AWE Concept 3D POC"></iframe> | |
</div> | |
<button id="toggle-category-btn" class="toggle-btn">Turn on Dining Labels</button> | |
<button id="toggle-marker-btn" class="toggle-btn">Turn on Location Marker</button> | |
<script> | |
const diningoffurl = 'https://campusmap.alwmedschool.org/?id=2159&tbh&sbh#!z/18?ct/80614,80625,80626,80629,80630,80631,80632,80633,80613,80634,80635?'; | |
const diningonnurl = 'https://campusmap.alwmedschool.org/?id=2159&tbh&sbh#!z/18?ct/80614,80625,80626,80629,80630,80631,80632,80633,80613,80634,80635,85031'; | |
const markeronurl = 'https://campusmap.alwmedschool.org/?id=2159&mbh&tbh&sbh#!z/18?ct/80614,80625,80626,80629,80630,80631,80632,80633,80613,80634,80635,85031?m/998008'; | |
const categoryBtn = document.getElementById('toggle-category-btn'); | |
const markerBtn= document.getElementById('toggle-marker-btn'); | |
const iframe = document.getElementById('concept-iframe'); | |
let diningon = false; | |
categoryBtn.addEventListener('click', () => { | |
diningon = !diningon; | |
iframe.src = diningon ? diningonnurl : diningoffurl; | |
categoryBtn.textContent = diningon ? 'Turn off Dining Labels' : 'Turn on Dining Labels'; | |
}); | |
let markeron = false; | |
markerBtn.addEventListener('click', () => { | |
markeron= !markeron; | |
iframe.src = markeron ? markeronurl: diningoffurl; | |
markerBtn.textContent = diningon ? 'Turn off Location Marker' : 'Turn on Location Marker'; | |
}); | |
window.addEventListener('message', function(event) { | |
console.log('Message from iframe:', event.data.data); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment