Written by

Gaelic AR Adventure https://aframe.io/releases/1.2.0/aframe.min.js https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js body { margin: 0; padding: 0; overflow: hidden; font-family: Arial, sans-serif; background: #000; } #browserHelp { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #0065FF 0%, #00B2FF 100%); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10000; text-align: center; padding: 20px; } .help-card { background: rgba(255,255,255,0.9); color: #0065FF; padding: 20px; border-radius: 20px; margin: 15px 0; max-width: 400px; } .start-btn { background: #FFD700; color: black; border: none; padding: 18px 35px; margin: 20px 10px; border-radius: 30px; font-size: 1.2em; font-weight: bold; cursor: pointer; } #welcomeScreen, #gameScreen, #collectionScreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: none; } #welcomeScreen { background: linear-gradient(135deg, #0065FF 0%, #00B2FF 100%); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; } .hud { position: fixed; top: 20px; left: 20px; background: rgba(0,0,0,0.8); color: white; padding: 15px; border-radius: 15px; z-index: 1000; } .collection-panel { position: fixed; bottom: 20px; left: 20px; right: 20px; background: rgba(0,0,0,0.9); color: white; padding: 15px; border-radius: 15px; z-index: 1000; max-height: 150px; overflow-y: auto; } .word-bubble { display: inline-block; margin: 5px; padding: 8px 15px; background: #4CAF50; border-radius: 20px; font-size: 14px; } .btn { background: #FFD700; color: #000; border: none; padding: 15px 30px; font-size: 1.1em; border-radius: 25px; cursor: pointer; margin: 10px; font-weight: bold; }

🏴󠁧󠁒󠁳󠁣󠁴󠁿 Gaelic AR Adventure

Ready to play! Here’s how:

Quick Start Guide

1. Tap the button below

2. Allow camera access

3. Collect floating words!

Start Gaelic AR Game
Need Help?
If the game doesn’t start, find this file in your Downloads and tap “Open with Chrome”

🏴󠁧󠁒󠁳󠁣󠁴󠁿 Gaelic AR Adventure

Learn Scottish Gaelic through Augmented Reality!

Start Adventure View Words

🏴󠁧󠁒󠁳󠁣󠁴󠁿 Gaelic AR

Collected: 0/5
Move around and tap floating words!
← Back

Word Collection

Progress: 0/10
function startApp() { document.getElementById(‘browserHelp’).style.display = ‘none’; showScreen(‘welcomeScreen’); } const GAELIC_DATABASE = [ { word: “madainn mhath”, translation: “good morning”, emoji: “β˜€οΈ”, pronunciation: “MAH-teen vah” }, { word: “tapadh leat”, translation: “thank you”, emoji: “πŸ™”, pronunciation: “TAH-pah let” }, { word: “slΓ inte”, translation: “cheers”, emoji: “🍻”, pronunciation: “SLAWN-chuh” }, { word: “cΓΉ”, translation: “dog”, emoji: “πŸ•”, pronunciation: “koo” }, { word: “cat”, translation: “cat”, emoji: “🐈”, pronunciation: “kaht” } ]; let collectedWords = []; let currentGameWords = []; function showScreen(screenId) { document.getElementById(‘welcomeScreen’).style.display = ‘none’; document.getElementById(‘gameScreen’).style.display = ‘none’; document.getElementById(‘collectionScreen’).style.display = ‘none’; document.getElementById(screenId).style.display = ‘flex’; } function startGame() { currentGameWords = […GAELIC_DATABASE].sort(() => 0.5 – Math.random()).slice(0, 3); collectedWords = []; document.getElementById(‘count’).textContent = ‘0’; initializeARScene(); showScreen(‘gameScreen’); } function initializeARScene() { const scene = document.querySelector(‘a-scene’); scene.querySelectorAll(‘[gaelic-word]’).forEach(word => word.remove()); currentGameWords.forEach((wordData) => { const wordEntity = document.createElement(‘a-entity’); wordEntity.setAttribute(‘gaelic-word’, `word:${wordData.word};translation:${wordData.translation};emoji:${wordData.emoji}`); const text = document.createElement(‘a-text’); text.setAttribute(‘value’, `${wordData.emoji}\n${wordData.word}\n${wordData.translation}`); text.setAttribute(‘align’, ‘center’); text.setAttribute(‘color’, ‘white’); text.setAttribute(‘position’, ‘0 0.5 0’); const bg = document.createElement(‘a-plane’); bg.setAttribute(‘color’, ‘#0065FF’); bg.setAttribute(‘height’, ‘0.8’); bg.setAttribute(‘width’, ‘1.8’); bg.setAttribute(‘position’, ‘0 0.3 0’); wordEntity.appendChild(bg); wordEntity.appendChild(text); const x = (Math.random() – 0.5) * 3; const y = Math.random() * 1 + 0.5; const z = -1.5 – Math.random(); wordEntity.setAttribute(‘position’, `${x} ${y} ${z}`); wordEntity.addEventListener(‘click’, function() { if (!collectedWords.find(w => w.word === wordData.word)) { collectedWords.push(wordData); document.getElementById(‘count’).textContent = collectedWords.length; document.getElementById(‘collectedWords’).innerHTML = collectedWords.map(word => `
${word.emoji} ${word.word}
` ).join(”); this.parentNode.removeChild(this); } }); scene.appendChild(wordEntity); }); } function showCollection() { document.getElementById(‘collectionCount’).textContent = collectedWords.length; document.getElementById(‘totalCollection’).textContent = GAELIC_DATABASE.length; document.getElementById(‘collectionGrid’).innerHTML = GAELIC_DATABASE.map(word => { const isCollected = collectedWords.some(collected => collected.word === word.word); return `
${word.emoji}
${word.word}
${word.translation}
${isCollected ? ‘
βœ“ Collected
‘ : ”}
`; }).join(”); showScreen(‘collectionScreen’); } function backToGame() { showScreen(‘gameScreen’); } document.addEventListener(‘DOMContentLoaded’, function() { document.getElementById(‘browserHelp’).style.display = ‘flex’; });


Leave a Reply