Skip to content

Instantly share code, notes, and snippets.

@theothermattm
Created June 20, 2025 00:29
Show Gist options
  • Save theothermattm/202fec90ff358b363a8e2cdb3e8d56cf to your computer and use it in GitHub Desktop.
Save theothermattm/202fec90ff358b363a8e2cdb3e8d56cf to your computer and use it in GitHub Desktop.
Concept 3D POC
<!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;
}
.button-row {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
justify-content: center;
}
.toggle-btn {
padding: 0.6rem 1.5rem;
font-size: 1.05rem;
border-radius: 8px;
border: none;
background: linear-gradient(90deg, #f5f5f5 60%, #e9ecef 100%);
color: #222;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
cursor: pointer;
transition: background 0.2s, box-shadow 0.2s, color 0.2s;
outline: none;
}
.toggle-btn:hover, .toggle-btn:focus {
background: linear-gradient(90deg, #e9ecef 60%, #f5f5f5 100%);
color: #0078d4;
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
</style>
</head>
<body>
<h1>AWE Concept 3D POC</h1>
<div class="iframe-container">
<iframe id="concept-iframe" src="" title="AWE Concept 3D POC"></iframe>
</div>
<div class="button-row">
<button id="toggle-category-btn" class="toggle-btn">Turn on Dining Labels</button>
<button id="toggle-marker-btn" class="toggle-btn">Turn on AWSOM Location Markers</button>
</div>
<div id="message-output" style="margin-top:2rem;max-width:900px;width:90vw;padding:1rem;background:#f8fafd;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,0.03);color:#333;font-size:1rem;word-break:break-word;"></div>
<script>
const diningoffurl = 'https://campusmap.alwmedschool.org/?id=2159&mbh&tbh&sbh#!z/18?ct/80614,80625,80626,80629,80630,80631,80632,80633,80613,80634,80635?';
const diningonnurl = 'https://campusmap.alwmedschool.org/?id=2159&mbh&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/80613,80614,80625,80626,80634,80635,80629,80630,80631,80632,80633,91522,85028,85104,85105,85106,85107,85895,88880';
const categoryBtn = document.getElementById('toggle-category-btn');
const markerBtn= document.getElementById('toggle-marker-btn');
const iframe = document.getElementById('concept-iframe');
iframe.src = diningoffurl;
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 = markeron ? 'Turn off AWSOM Location Markers' : 'Turn on AWSOM Location Markers';
});
window.addEventListener('message', function(event) {
const outputDiv = document.getElementById('message-output');
let display;
try {
if (event.data && event.data.type === "c3dMarkerClick") {
display = "Clicked Location Marker ID: " + event.data.id + " \n This would be replaced with API calls to get more information about the location marker.";
}
} catch (e) {
display = "Error: " + String(event.data);
}
outputDiv.textContent = display;
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment