Skip to content

Commit

Permalink
Put script in onload and updated texture of globe
Browse files Browse the repository at this point in the history
  • Loading branch information
ToonTalk committed Oct 19, 2024
1 parent 694cef7 commit 383ea1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/etymology map game.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ <h1>Etymology Globe Game</h1>

<!-- Your game script -->
<script>
window.onload = function() {
// Words data with 'continent' property added
const words = [
// [Include all your word objects here]
Expand Down Expand Up @@ -337,7 +338,7 @@ <h1>Etymology Globe Game</h1>
// Initialize the globe
const myGlobe = Globe()
.backgroundColor('#111')
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-dark.jpg') // Optional built-in texture
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-blue-marble.jpg') // Optional built-in texture
.pointOfView({ lat: 20, lng: 0, altitude: 2 });

const globeContainer = document.getElementById('globeViz');
Expand Down Expand Up @@ -451,6 +452,7 @@ <h1>Etymology Globe Game</h1>
const wordObj = words[currentWordIndex];
document.getElementById('hint').innerText = `Hint: The origin is in ${wordObj.continent}.`;
}
}
</script>
</body>
</html>

0 comments on commit 383ea1b

Please sign in to comment.