working ender screen

This commit is contained in:
Mark Eaton 2023-07-26 14:11:03 -04:00
parent 996b0d3f8c
commit 11cc0db328
2 changed files with 6 additions and 2 deletions

View File

@ -23,6 +23,8 @@
<button type="button" class="btn btn-success btn-lg" id="startbutton">Start!</button>
</div>
<div id="ender" class="startend">
<p><strong>🎉 Congratulations! 🎉</strong> You've found all of the items!</p>
<p>Show this screen to the librarians at the reference desk to claim your prize!</p>
</div>
</div>
<a-scene embedded markerhandler arjs="detectionMode: mono_and_matrix; matrixCodeType: 3x3_HAMMING63;" device-orientation-permission-ui="enabled: false">

View File

@ -11,7 +11,7 @@ body { margin: auto !important; max-width: 100vw !important; }
@media screen and (orientation: portrait) {
#starter { font-size: 2.2em; }
}
#ender { display: none; }
#ender { display: none; background-color: #ccc; border-radius: 5px; padding: 30px; font-size: 2em; text-align: center; position: relative; }
#header-container { width: 100%; z-index: 50; display: none; }
#header { width: 100vw; margin: 0 auto; text-align: left; padding: 5px; }
@ -31,7 +31,7 @@ body { margin: auto !important; max-width: 100vw !important; }
<script>
function getStarted() {
document.getElementById("startend-container").style.display = "none";
document.getElementById("starter").style.display = "none";
document.getElementById("header-container").style.display = "block";
}
@ -63,6 +63,8 @@ AFRAME.registerComponent('markerhandler', {
},
check: function (markers) {
if (Object.is(JSON.stringify(markers), JSON.stringify({ reference: true, circulation: true, photocopier: true })) == true) {
document.getElementById("ender").style.display = "block";
document.getElementById("header-container").style.display = "none";
}
},
});