Skip to content

Commit

Permalink
Merge pull request #34 from Carifio24/higher-res-edenhofer
Browse files Browse the repository at this point in the history
Add higher resolution version of Edenhofer dustmap isosurfaces
  • Loading branch information
Carifio24 authored Jul 19, 2024
2 parents f0d4a4e + 205acb0 commit 6e5c949
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
Binary file added examples/edenhofer-isosurface-256.glb
Binary file not shown.
101 changes: 101 additions & 0 deletions examples/edenhofer-isosurface-256.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

<html>
<body>
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.3.0/model-viewer.min.js"></script>
<style>
model-viewer {
width: 100%;
height: 100%;
}

/* This keeps child nodes hidden while the element loads */
:not(:defined) > * {
display: none;
}
.ar-button {
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: 12px 50%;
background-color: #fff;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 16px;
padding: 0px 16px 0px 40px;
font-family: Roboto Regular, Helvetica Neue, sans-serif;
font-size: 14px;
color:#4285f4;
height: 36px;
line-height: 36px;
border-radius: 18px;
border: 1px solid #DADCE0;
}
.ar-button:active {
background-color: #E8EAED;
}
.ar-button:focus {
outline: none;
}
.ar-button:focus-visible {
outline: 1px solid #4285f4;
}
.hotspot {
position: relative;
background: #ddd;
border-radius: 32px;
box-sizing: border-box;
border: 0;
--min-hotspot-opacity: 0.5;
width: 24px;
height: 24px;
padding: 8px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.hotspot:focus {
border: 4px solid rgb(0, 128, 200);
width: 32px;
height: 32px;
outline: none;
}
.hotspot > * {
transform: translateY(-50%);
opacity: 1;
}
.hotspot:not([data-visible]) > * {
pointer-events: none;
opacity: 0;
transform: translateY(calc(-50% + 4px));
transition: transform 0.3s, opacity 0.3s;
}
.info {
display: block;
position: absolute;
font-family: Futura, Helvetica Neue, sans-serif;
color: rgba(0, 0, 0, 0.8);
font-weight: 700;
font-size: 18px;
max-width: 128px;
padding: 0.5em 1em;
background: #ddd;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
left: calc(100% + 1em);
top: 50%;
}
</style>
<model-viewer
src="edenhofer-isosurface-256.glb"
ios-src="edenhofer-isosurface-256.usdz"
camera-orbit="0.9677rad 1.2427rad auto"
shadow-intensity="1"
ar
ar-modes="webxr quick-look"
camera-controls
alt="None"
>
<button slot="ar-button" class="ar-button">View in your space</button>
</model-viewer>
</body>
</html>

Binary file added examples/edenhofer-isosurface-256.usdz
Binary file not shown.

0 comments on commit 6e5c949

Please sign in to comment.