Skip to content

Commit

Permalink
Deploying to gh-pages from @ Carifio24/glue-ar@057e32f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Dec 6, 2023
1 parent 3abc5ab commit 763019f
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions leike.gltf

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions leike.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

<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="leike.gltf"
camera-orbit="0.9677rad 1.2427rad auto"
shadow-intensity="1"
ar
ar-modes="webxr scene-viewer quick-look fallback"
camera-controls
alt="Testing visualization"
>
<button slot="ar-button" class="ar-button">View in your space</button>
</model-viewer>
</body>
</html>

0 comments on commit 763019f

Please sign in to comment.