(async () => { const sleep = (ms) => new Promise(r => setTimeout(r, ms)) for (let i = 0; i < 80 && (window.__d2web === undefined || (window.__d2web.tick ?? 0) < 5); i++) await sleep(250) const s = window.__d2web if (s === undefined) return { error: 'no state', keys: Object.keys(window).filter(k => k.startsWith('__')) } const gl = document.querySelector('canvas')?.getContext('webgl2') return { ...s, glError: gl ? gl.getError() : null, canvas: (() => { const c = document.querySelector('canvas'); return c ? [c.width, c.height] : null })() } })()