diff --git a/app.js b/app.js
index 3534984..9135074 100644
--- a/app.js
+++ b/app.js
@@ -37,6 +37,78 @@ document.addEventListener('DOMContentLoaded', function () {
const widescreenBgs = document.getElementById('check-widescreen-bgs');
const outroFmv = document.getElementById('check-outro');
const badEnding = document.getElementById('check-ending');
+ const logo = document.getElementById('island-logo-img');
+
+ // --- Debug Mode Activation (5 taps on logo) ---
+ let debugTapCount = 0;
+ let debugTapTimeout = null;
+ let debugEnabled = false;
+
+ // Pizza celebration animation for OGEL mode
+ function celebratePizza(originElement) {
+ const rect = originElement.getBoundingClientRect();
+ const centerX = rect.left + rect.width / 2;
+ const centerY = rect.top + rect.height / 2;
+ const sliceCount = 12;
+
+ for (let i = 0; i < sliceCount; i++) {
+ const slice = document.createElement('div');
+ slice.className = 'pizza-slice';
+ slice.textContent = '🍕';
+
+ // Calculate direction for this slice
+ const angle = (i / sliceCount) * Math.PI * 2;
+ const distance = 150 + Math.random() * 100;
+ const tx = Math.cos(angle) * distance;
+ const ty = Math.sin(angle) * distance;
+ const rotation = (Math.random() - 0.5) * 720;
+
+ slice.style.left = centerX + 'px';
+ slice.style.top = centerY + 'px';
+ slice.style.setProperty('--tx', tx + 'px');
+ slice.style.setProperty('--ty', ty + 'px');
+ slice.style.setProperty('--rot', rotation + 'deg');
+ slice.style.animationDelay = (Math.random() * 0.2) + 's';
+
+ document.body.appendChild(slice);
+
+ // Remove after animation completes
+ setTimeout(function() {
+ slice.remove();
+ }, 1700);
+ }
+ }
+
+ logo.addEventListener('click', function() {
+ if (debugEnabled) {
+ // Replay pizza animation on subsequent clicks
+ celebratePizza(logo);
+ return;
+ }
+
+ debugTapCount++;
+ clearTimeout(debugTapTimeout);
+
+ if (debugTapCount >= 5) {
+ // Enable debug mode
+ debugEnabled = true;
+ logo.src = 'ogel.webp';
+ logo.alt = 'OGEL Mode Enabled';
+
+ // Celebrate with pizza!
+ celebratePizza(logo);
+
+ // Dynamically load debug.js
+ const script = document.createElement('script');
+ script.src = 'debug.js';
+ document.body.appendChild(script);
+ } else {
+ // Reset tap count after 1 second of no taps
+ debugTapTimeout = setTimeout(function() {
+ debugTapCount = 0;
+ }, 1000);
+ }
+ });
// --- Sound Toggle ---
function updateSoundEmojiState() {
@@ -96,11 +168,24 @@ document.addEventListener('DOMContentLoaded', function () {
});
let progressUpdates = 0;
+ const debugUI = document.getElementById('debug-ui');
+ let debugUIVisible = false;
+
+ // MutationObserver to prevent Emscripten from hiding the debug UI
+ const debugUIObserver = new MutationObserver(function(mutations) {
+ if (debugUIVisible && debugUI.style.display === 'none') {
+ debugUI.style.setProperty('display', 'block', 'important');
+ }
+ });
+ debugUIObserver.observe(debugUI, { attributes: true, attributeFilter: ['style'] });
+
emscriptenCanvas.addEventListener('presenterProgress', function (event) {
// Intro animation is ready
if (event.detail.objectName == 'Lego_Smk' && event.detail.tickleState == 1) {
loadingGifOverlay.style.display = 'none';
emscriptenCanvas.style.setProperty('display', 'block', 'important');
+ debugUIVisible = true;
+ debugUI.style.setProperty('display', 'block', 'important');
}
else if (progressUpdates < 1003) {
progressUpdates++;
diff --git a/debug.html b/debug.html
new file mode 100644
index 0000000..0f5c100
--- /dev/null
+++ b/debug.html
@@ -0,0 +1,533 @@
+⚙
+
+
+
+
General
+
Pause/Resume
+
Return to Infocenter
+
Skip Animation
+
Save Game
+
+
+
Debug Mode (OGEL)
+
Enter Debug Mode
+
Toggle FPS
+
Toggle Music
+
Reset/Load Plants
+
+
+
Camera/View
+
Move Up
+
Move Down
+
+
+
LOD (Level of Detail)
+
LOD 0.0 (Lowest)
+
LOD 3.6 (Default)
+
LOD 5.0 (Highest)
+
+
+
Misc
+
Make Plants Dance
+
+
+
Switch Act
+
Act 2
+
Act 3
+
Good Ending
+
Bad Ending
+
+
+
Locations
+
+ -- Select Location --
+ LCAMBA1 (01)
+ LCAMBA2 (02)
+ LCAMBA3 (03)
+ LCAMBA4 (04)
+ LCAMCA1 (05)
+ LCAMCA2 (06)
+ LCAMCA3 (07)
+ LCAMGS1 (08)
+ LCAMGS2 (09)
+ LCAMGS3 (10)
+ LCAMHO1 (11)
+ LCAMHO2 (12)
+ LCAMHO3 (13)
+ LCAMIS1 (14)
+ LCAMIS2 (15)
+ LCAMIS3 (16)
+ LCAMIS4 (17)
+ LCAMIS5 (18)
+ LCAMJA1 (19)
+ LCAMJA2 (20)
+ LCAMPO1 (21)
+ LCAMPO2 (22)
+ LCAMPO3 (23)
+ LCAMPZ1 (24)
+ LCAMPZ2 (25)
+ LCAMRA1 (26)
+ LCAMRA2 (27)
+ LCAMRA3 (28)
+ LCAMRA4 (29)
+ LCAMRT1 (30)
+ LCAMRT2 (31)
+ LCAMRT3 (32)
+ LCAMRT4 (33)
+ LCAMRT5 (34)
+ LCAMRT6 (35)
+ LCAMRT7 (36)
+ LCAMRT8 (37)
+ LCAMRT9 (38)
+ LCAMRT10 (39)
+ LCAMRT11 (40)
+ LCAMRT12 (41)
+ LCAMRT13 (42)
+ LCAMRT14 (43)
+ LCAMRT15 (44)
+ LCAMRT16 (45)
+ LCAMRT17 (46)
+ LCAMRT18 (47)
+ LCAMRT19 (48)
+ LCAMRT20 (49)
+ LCAMRT21 (50)
+ LCAMRT22 (51)
+ LCAMRT23 (52)
+ LCAMRT24 (53)
+ LCAMRT25 (54)
+ LCAMRT26 (55)
+ LCAMRT27 (56)
+ LCAMRT28 (57)
+ LCAMRT29 (58)
+ LCAMRT30 (59)
+ LCAMRT31 (60)
+ LCAMRT32 (61)
+ LCAMRT33 (62)
+ LCAMRT34 (63)
+ LCAMRT35 (64)
+ LCAMRT36 (65)
+ LCAMRT37 (66)
+ LCAMRT38 (67)
+ LCAMRT39 (68)
+ LCAMRT40 (69)
+
+
Go to Location
+
+
+
Animations
+
Play all cam animations
+
+ -- Select Animation --
+
+ wns050p1 (400)
+ wns049p1 (401)
+ wns048p1 (402)
+ wns057rd (403)
+ pns123pr (404)
+ wns045di (405)
+ wns053pr (406)
+ wns046mg (407)
+ wns051bd (408)
+ pnsx48pr (409)
+ pnsx69pr (410)
+ pns125ni (411)
+ pns122pr (412)
+ pns050p1 (413)
+ pns069pr (414)
+ pns066db (415)
+ pns065rd (416)
+ pns067gd (417)
+ pns099pr (418)
+ pns098pr (419)
+ pns097pr (420)
+ pns096pr (421)
+ pns042bm (422)
+ pns045p1 (423)
+ pns048pr (424)
+ pns043en (425)
+ pns022pr (426)
+ pns018rd (427)
+ pns019pr (428)
+ pns021dl (429)
+
+
+ sba001bu (500)
+ sba002bu (501)
+ sba003bu (502)
+ bns146rd (503)
+ bns144rd (504)
+ fns017la (505)
+ bns005p1 (506)
+ bns147rd (507)
+ igs001na (508)
+ sns003nu (509)
+ sgs001na (510)
+ sns001nu (511)
+ sns002nu (512)
+ sgs002na (513)
+ sgs003na (514)
+ fns001re (515)
+ fns0x1re (516)
+ fns007re (517)
+ fns011re (518)
+ sns001cl (519)
+ sns002cl (520)
+ sns003cl (521)
+ bns191en (522)
+ bho142en (523)
+ bic143sy (524)
+ sja004br (525)
+ sja005br (526)
+ sja006br (527)
+ sja007br (528)
+ sja008br (529)
+ sja009br (530)
+ sja010br (531)
+ sja011br (532)
+ sja012br (533)
+ sja013br (534)
+ sja014br (535)
+ sja015br (536)
+ sja016br (537)
+ sja017br (538)
+ sja018br (539)
+ sja001br (540)
+ sja002br (541)
+ sja003br (542)
+ ijs001sn (543)
+ fjs148gd (544)
+ fjs149va (545)
+ sjs001va (546)
+ sjs002va (547)
+ sjs003va (548)
+ sjs004va (549)
+ fjs019rd (550)
+ bjs009gd (551)
+ sjs001sn (552)
+ sjs002sn (553)
+ sjs003sn (554)
+ sjs004sn (555)
+ sjs005sn (556)
+ snsx31sh (557)
+ bns007gd (558)
+ fns001l1 (559)
+ fns001l2 (560)
+ fra157bm (561)
+ bns145rd (562)
+ ips001ro (563)
+ sns010ni (564)
+ sns003la (565)
+ fps181ni (566)
+ ipz001rd (567)
+ spz004ma (568)
+ spz005ma (569)
+ spz006ma (570)
+ spz004pa (571)
+ spz013ma (572)
+ spz006pa (573)
+ spz014ma (574)
+ spz005pa (575)
+ spz015ma (576)
+ spz007ma (577)
+ spz013pa (578)
+ spz008ma (579)
+ spz014pa (580)
+ spz009ma (581)
+ spz015pa (582)
+ spz007pa (583)
+ spz011pe (584)
+ spz008pa (585)
+ spz009pa (586)
+ spz010ma (587)
+ spz010pa (588)
+ spz011ma (589)
+ spz011pa (590)
+ spz012pa (591)
+ spz001ma (592)
+ spz002ma (593)
+ spz003ma (594)
+ spz003pa (595)
+ fpz166p1 (596)
+ fpz172rd (597)
+ spz001pa (598)
+ spz002pa (599)
+
+
+ ppz086bs (600)
+ ppz008rd (601)
+ ppz009pg (602)
+ ivo918in (603)
+ spz004pe (604)
+ spz005pe (605)
+ srp006pe (606)
+ spz013pe (607)
+ sns001pe (608)
+ fra192pe (609)
+ fra163mg (610)
+ fns185gd (611)
+ irt001in (612)
+ irtx01sl (613)
+ frt135df (614)
+ frt137df (615)
+ frt139df (616)
+ frt025rd (617)
+ frt132rd (618)
+ srt001rd (619)
+ srt003bd (620)
+ sst001mg (621)
+ sns004la (622)
+ sns005la (623)
+ sns006la (624)
+ sps004ni (625)
+ sps005ni (626)
+ sps006ni (627)
+ sns007la (628)
+ sns008la (629)
+ sns009la (630)
+ sns007ni (631)
+ sns008ni (632)
+ sns009ni (633)
+ pns017ml (634)
+ sns010la (635)
+ sns010pe (636)
+ sns011la (637)
+ sns012la (638)
+ sns007pe (639)
+ sns008pe (640)
+ sns013la (641)
+ sns013ni (642)
+ sns014la (643)
+ sns014ni (644)
+ sns015la (645)
+ sns015ni (646)
+ sns011ni (647)
+ sns012ni (648)
+ sns014pe (649)
+ sns015pe (650)
+ sns003pe (651)
+ sns017ni (652)
+ sps001ni (653)
+ sps002ni (654)
+ sps003ni (655)
+ sns017la (656)
+ sps001la (657)
+ sps002la (658)
+ bns005pg (659)
+ sns001ml (660)
+ sns002mg (661)
+ sns002ml (662)
+ sns002pe (663)
+ sns003mg (664)
+ sns004mg (665)
+ sns004rd (666)
+ sns006bd (667)
+ sns006ro (668)
+ sns011in (669)
+ sps001ro (670)
+ sps002ro (671)
+ sps003ro (672)
+ sps004ro (673)
+ srt005pg (674)
+ pns100ml (675)
+ ppz029rd (676)
+ sns007sy (677)
+ cnsx12la (678)
+ cnsx12ni (679)
+ ijs006sn (680)
+ igs008na (681)
+ irt007in (682)
+ ips002ro (683)
+ hho142cl (684)
+ hho143cl (685)
+ hho144cl (686)
+ hho027en (687)
+ hps116bd (688)
+ hps117bd (689)
+ hps118re (690)
+ hps120en (691)
+ hps122en (692)
+ hpz047pe (693)
+ hpz048pe (694)
+ hpz049bd (695)
+ hpz050bd (696)
+ hpz052ma (697)
+ hpz053pa (698)
+ hpz055pa (699)
+
+
+ hpz057ma (700)
+ hpza51gd (701)
+ hpzb51gd (702)
+ hpzc51gd (703)
+ hpzf51gd (704)
+ hpzw51gd (705)
+ hpzx51gd (706)
+ hpzy51gd (707)
+ hpzz51gd (708)
+ nic002pr (709)
+ nic003pr (710)
+ nic004pr (711)
+ pps025ni (712)
+ pps026ni (713)
+ pps027ni (714)
+ ppz001pe (715)
+ ppz006pa (716)
+ ppz007pa (717)
+ ppz010pa (718)
+ ppz011pa (719)
+ ppz013pa (720)
+ ppz014pe (721)
+ ppz015pe (722)
+ ppz016pe (723)
+ pgs050nu (724)
+ pgs051nu (725)
+ pgs052nu (726)
+ ppz031ma (727)
+ ppz035pa (728)
+ ppz036pa (729)
+ ppz037ma (730)
+ ppz038ma (731)
+ ppz054ma (732)
+ ppz055ma (733)
+ ppz056ma (734)
+ ppz059ma (735)
+ ppz060ma (736)
+ ppz061ma (737)
+ ppz064ma (738)
+ prt072sl (739)
+ prt073sl (740)
+ prt074sl (741)
+ pho104re (742)
+ pho105re (743)
+ pho106re (744)
+ ppz075pa (745)
+ ppz082pa (746)
+ ppz084pa (747)
+ ppz088ma (748)
+ ppz089ma (749)
+ ppz090ma (750)
+ ppz093pe (751)
+ ppz094pe (752)
+ ppz095pe (753)
+ prp101pr (754)
+ pja126br (755)
+ pja127br (756)
+ pja129br (757)
+ pja130br (758)
+ pja131br (759)
+ pja132br (760)
+ ppz107ma (761)
+ ppz114pa (762)
+ ppz117ma (763)
+ ppz118ma (764)
+ ppz119ma (765)
+ ppz120pa (766)
+ wgs083nu (767)
+ wgs085nu (768)
+ wgs086nu (769)
+ wgs087nu (770)
+ wgs088nu (771)
+ wgs089nu (772)
+ wgs090nu (773)
+ wgs091nu (774)
+ wgs092nu (775)
+ wgs093nu (776)
+ wgs094nu (777)
+ wgs095nu (778)
+ wgs096nu (779)
+ wgs097nu (780)
+ wgs098nu (781)
+ wgs099nu (782)
+ wgs100nu (783)
+ wgs101nu (784)
+ wgs102nu (785)
+ wgs103nu (786)
+ wrt060bm (787)
+ wrt074sl (788)
+ wrt075rh (789)
+ wrt076df (790)
+ wrt078ni (791)
+ wrt079bm (792)
+ npz001bd (793)
+ npz002bd (794)
+ npz003bd (795)
+ npz004bd (796)
+ npz005bd (797)
+ npz006bd (798)
+ npz007bd (799)
+
+
+ nca001ca (800)
+ nca002sk (801)
+ nca003gh (802)
+ nla001ha (803)
+ nla002sd (804)
+ npa001ns (805)
+ npa002ns (806)
+ npa003ns (807)
+ npa004ns (808)
+ npa005dl (809)
+ npa007dl (810)
+ npa009dl (811)
+ npa010db (812)
+ npa012db (813)
+ npa014db (814)
+ npa015ca (815)
+ npa017ca (816)
+ npa019ca (817)
+ npa020p1 (818)
+ npa022p1 (819)
+ npa024p1 (820)
+ npa025sh (821)
+ npa027sh (822)
+ npa029sh (823)
+ npa030fl (824)
+ npa031fl (825)
+ npa032fl (826)
+ npa034bh (827)
+ npa035bh (828)
+ npa036bh (829)
+ npa038pn (830)
+ npa039pn (831)
+ npa040pn (832)
+ npa042pm (833)
+ npa043pm (834)
+ npa044pm (835)
+ npa046sr (836)
+ npa047sr (837)
+ npa048sr (838)
+ npa050ba (839)
+ npa051ba (840)
+ npa052ba (841)
+ npa054po (842)
+ npa055po (843)
+ npa056po (844)
+ npa058r1 (845)
+ npa059r1 (846)
+ npa060r1 (847)
+ npa061r3 (848)
+ npa062r2 (849)
+ npa062r3 (850)
+ npa063r2 (851)
+ npa063r3 (852)
+ npa065r2 (853)
+ nja001pr (854)
+ nja002pr (855)
+ sjs007in (856)
+ sns005in (857)
+ sns006in (858)
+ sns008in (859)
+ sjs012in (860)
+ sjs013in (861)
+ sjs014in (862)
+ sjs015in (863)
+ srt001in (864)
+ srt002in (865)
+ srt003in (866)
+ srt004in (867)
+ nrtflag0 (868)
+
+
+
Play Animation
+
+
diff --git a/debug.js b/debug.js
new file mode 100644
index 0000000..0cb3b37
--- /dev/null
+++ b/debug.js
@@ -0,0 +1,214 @@
+(async function() {
+ const debugUI = document.getElementById('debug-ui');
+ const canvas = document.getElementById('canvas');
+
+ // Fetch and inject debug panel HTML
+ try {
+ const response = await fetch('debug.html');
+ const html = await response.text();
+ debugUI.innerHTML = html;
+ } catch (error) {
+ console.error('Failed to load debug panel:', error);
+ return;
+ }
+
+ // Now get references to elements after they've been injected
+ const debugToggle = document.getElementById('debug-toggle');
+ const debugPanel = document.getElementById('debug-panel');
+ const debugPasswordBtn = document.querySelector('.debug-password');
+ const requiresDebugBtns = document.querySelectorAll('.requires-debug');
+
+ let debugModeActive = false;
+
+ // Key code mapping for special keys
+ const keyCodeMap = {
+ 'Pause': { key: 'Pause', code: 'Pause', keyCode: 19 },
+ 'Escape': { key: 'Escape', code: 'Escape', keyCode: 27 },
+ ' ': { key: ' ', code: 'Space', keyCode: 32 },
+ 'Tab': { key: 'Tab', code: 'Tab', keyCode: 9 },
+ 'F11': { key: 'F11', code: 'F11', keyCode: 122 },
+ 'F12': { key: 'F12', code: 'F12', keyCode: 123 },
+ '+': { key: '+', code: 'NumpadAdd', keyCode: 107 },
+ '-kp': { key: '-', code: 'NumpadSubtract', keyCode: 109 },
+ '*': { key: '*', code: 'NumpadMultiply', keyCode: 106 },
+ '/': { key: '/', code: 'NumpadDivide', keyCode: 111 },
+ // Digit keys
+ '0': { key: '0', code: 'Digit0', keyCode: 48 },
+ '1': { key: '1', code: 'Digit1', keyCode: 49 },
+ '2': { key: '2', code: 'Digit2', keyCode: 50 },
+ '3': { key: '3', code: 'Digit3', keyCode: 51 },
+ '4': { key: '4', code: 'Digit4', keyCode: 52 },
+ '5': { key: '5', code: 'Digit5', keyCode: 53 },
+ '6': { key: '6', code: 'Digit6', keyCode: 54 },
+ '7': { key: '7', code: 'Digit7', keyCode: 55 },
+ '8': { key: '8', code: 'Digit8', keyCode: 56 },
+ '9': { key: '9', code: 'Digit9', keyCode: 57 },
+ };
+
+ // Toggle debug panel
+ debugToggle.addEventListener('click', function(e) {
+ e.stopPropagation();
+ debugPanel.classList.toggle('open');
+ debugToggle.classList.toggle('active');
+ });
+
+ // Dispatch a keyboard event to the canvas
+ function sendKey(key) {
+ let keyInfo = keyCodeMap[key];
+
+ if (!keyInfo) {
+ // Regular character key (letters)
+ const char = key.toLowerCase();
+ const charCode = char.charCodeAt(0);
+ keyInfo = {
+ key: char,
+ code: 'Key' + char.toUpperCase(),
+ keyCode: charCode >= 97 && charCode <= 122 ? charCode - 32 : charCode
+ };
+ }
+
+ const eventInit = {
+ key: keyInfo.key,
+ code: keyInfo.code,
+ keyCode: keyInfo.keyCode,
+ which: keyInfo.keyCode,
+ bubbles: true,
+ cancelable: true
+ };
+
+ canvas.dispatchEvent(new KeyboardEvent('keydown', eventInit));
+ canvas.dispatchEvent(new KeyboardEvent('keyup', eventInit));
+ }
+
+ // Send a sequence of keys with delay (longer delay for multi-stage commands)
+ function sendKeySequence(keys, delay = 100) {
+ let index = 0;
+ function sendNext() {
+ if (index < keys.length) {
+ sendKey(keys[index]);
+ index++;
+ setTimeout(sendNext, delay);
+ } else {
+ canvas.focus();
+ }
+ }
+ sendNext();
+ }
+
+ // Update button states based on debug mode
+ function updateDebugModeUI() {
+ if (debugModeActive) {
+ debugPasswordBtn.classList.add('active');
+ debugPasswordBtn.textContent = 'Debug Mode Active';
+ requiresDebugBtns.forEach(btn => btn.classList.add('enabled'));
+ } else {
+ debugPasswordBtn.classList.remove('active');
+ debugPasswordBtn.textContent = 'Enter Debug Mode';
+ requiresDebugBtns.forEach(btn => btn.classList.remove('enabled'));
+ }
+ }
+
+ // Handle button clicks
+ debugPanel.addEventListener('click', function(e) {
+ const btn = e.target.closest('button');
+ if (!btn || btn === debugToggle) return;
+
+ const keys = btn.dataset.keys;
+ if (!keys) return;
+
+ e.preventDefault();
+ e.stopPropagation();
+
+ // Handle special cases
+ if (keys === 'ogel') {
+ // Enter debug password
+ sendKeySequence(['o', 'g', 'e', 'l']);
+ debugModeActive = true;
+ updateDebugModeUI();
+ return;
+ }
+
+ // For requires-debug buttons, ensure debug mode is active
+ if (btn.classList.contains('requires-debug') && !debugModeActive) {
+ // Auto-enter debug mode first
+ sendKeySequence(['o', 'g', 'e', 'l']);
+ debugModeActive = true;
+ updateDebugModeUI();
+ // Then send the actual keys after a delay
+ setTimeout(() => {
+ sendKeySequence(keys.split(''));
+ }, 500);
+ return;
+ }
+
+ // Handle multi-key sequences (like 'g1' for act switch or 'c00' for locations)
+ if (keys.length > 1 && !keyCodeMap[keys]) {
+ sendKeySequence(keys.split(''));
+ } else {
+ sendKey(keys);
+ canvas.focus();
+ }
+ });
+
+ // Handle location teleport
+ const locationSelect = document.getElementById('debug-location-select');
+ const gotoLocationBtn = document.getElementById('debug-goto-location');
+
+ gotoLocationBtn.addEventListener('click', function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ const locationValue = locationSelect.value;
+ if (!locationValue) return;
+
+ // Ensure debug mode is active
+ if (!debugModeActive) {
+ sendKeySequence(['o', 'g', 'e', 'l']);
+ debugModeActive = true;
+ updateDebugModeUI();
+ // Then send location keys after a delay
+ setTimeout(() => {
+ sendKeySequence(locationValue.split(''));
+ }, 500);
+ return;
+ }
+
+ sendKeySequence(locationValue.split(''));
+ });
+
+ // Handle animation playback
+ const animationSelect = document.getElementById('debug-animation-select');
+ const playAnimationBtn = document.getElementById('debug-play-animation');
+
+ playAnimationBtn.addEventListener('click', function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ const animationId = animationSelect.value;
+ if (!animationId) return;
+
+ // Ensure debug mode is active
+ if (!debugModeActive) {
+ sendKeySequence(['o', 'g', 'e', 'l']);
+ debugModeActive = true;
+ updateDebugModeUI();
+ // Then send animation keys after a delay
+ setTimeout(() => {
+ playAnimation(animationId);
+ }, 500);
+ return;
+ }
+
+ playAnimation(animationId);
+ });
+
+ function playAnimation(animationId) {
+ // Animation command: 'v' + 3 digits (padded with leading zeros)
+ const paddedId = animationId.toString().padStart(3, '0');
+ const keys = ['v', ...paddedId.split('')];
+ sendKeySequence(keys);
+ }
+
+ // Initialize UI
+ updateDebugModeUI();
+})();
diff --git a/index.html b/index.html
index 762ee47..3d3ecc6 100644
--- a/index.html
+++ b/index.html
@@ -155,6 +155,12 @@
Changelog
+
+ January 2026
+
+ New: Debug menu for developers and power users. Tap the LEGO Island logo 5 times to unlock OGEL mode and access debug features like teleporting to locations, switching acts, and playing animations
+
+
December 2025
@@ -751,6 +757,9 @@
+
+
+