godot-platform-web
БесплатноЗапускает вложенные скриптыНе проверенExpert blueprint for HTML5/web export on Compatibility (WebGL 2.0): JavaScriptBridge, localStorage wrapper, custom loading shells, COOP/COEP hosts, relative…
от thedivergentai★ 1 019 звёзд на GitHubОб этом скилле
NEVER Do (Expert Web Rules)
Persistence & Storage
- NEVER use FileAccess alone for persistent web saves — Prefer web_local_storage_wrapper.gd (
localStorage/ IndexedDB viaJavaScriptBridge). - NEVER assume localStorage is permanent — Implement cloud-save fallback for production.
Rendering & Logic
- NEVER use the Forward+ renderer for web — Use Compatibility (WebGL 2.0).
- NEVER block the browser event loop — Long sync work → "Kill the Page." Use
await/ threaded workers where available. - NEVER ignore COOP/COEP — Threads/
SharedArrayBufferneed cross-origin isolation.
UX & Security
- NEVER forget tab focus loss — Pause audio on
visibilitychange. - NEVER trigger Fullscreen/Mouse Lock without a click — Must be inside a user gesture.
- NEVER use absolute paths in HTML shells — Relative paths for subdirectory hosting.
Host checklist (procedure)
- HTTPS — Required for many browser APIs (clipboard, some storage policies, secure contexts).
- COOP / COEP — Serve isolation headers when enabling threads /
SharedArrayBuffer(see exporting-for-web docs). - Relative shell paths — Custom
index.html/ PCK/WASM URLs must be relative so/game/subpaths work. beforeunload— Wire web_navigation_guard.gd when unsaved progress exists.- Compatibility renderer + texture compression — Desktop browsers: S3TC/BPTC as appropriate; keep particle/draw budgets low.
Available Scripts
MANDATORY: For saves, load web_local_storage_wrapper.gd — do not paste
JavaScriptBridge.eval("localStorage.setItem...")string recipes.
web_local_storage_wrapper.gd
Quota-safe localStorage via get_interface + JSON (no eval string interpolation).
web_javascript_bridge_callback.gd
Two-way JS↔GD with create_callback (keep callback refs alive).
web_responsive_canvas_adaptor.gd
Canvas resize to browser viewport.
web_browser_input_guard.gd
Suppress context menu / spacebar scroll defaults.
web_resource_lazy_loader.gd
Remote PCK/resource fetch patterns.
web_clipboard_interface.gd
Async clipboard via Navigator API.
web_visibility_auto_pause.gd
Pause engine/audio on tab hide.
web_navigation_guard.gd
beforeunload unsaved-progress guard.
web_external_url_opener.gd
window.open with noopener.
web_performance_profiler.gd
VRAM/draw stats to JS console.
Also in scripts/
- platform_web_patterns.gd — Misc web feature gates.
- web_bridge_sync.gd — Structured bridge sync helper.
- web_json_rpc_bridge.gd — JSON-RPC
create_callbackbridge (keep refs alive).
Expert WHY (critical)
CAUTION: Never persist via
JavaScriptBridge.eval("localStorage.setItem('%s')" % data)— injection/escaping bugs. Use web_local_storage_wrapper.gd.
- PWA updates —
pwa_update_available→pwa_update()whenpwa_needs_update(). - WebGPU — not a Godot 4.x web renderer; ship Compatibility (WebGL 2.0).
- JSON-RPC host page — structured bidirectional bridge: web_json_rpc_bridge.gd.
Deep dive (load on demand)
PWA lifecycle, JSON-RPC bridge, localStorage anti-patterns, size knobs — references/web-elite-patterns.md.
Loading shell (custom HTML)
<!-- index.html custom loading — keep asset URLs relative -->
<div id="loading-screen">
<div class="progress-bar"><div id="progress" style="width: 0%"></div></div>
<p id="status-text">Loading...</p>
</div>
<script>
const engine = new Engine(CONFIG);
engine.startGame({
onProgress: function(current, total) {
const percent = Math.floor((current / total) * 100);
document.getElementById('progress').style.width = percent + '%';
document.getElementById('status-text').innerText = `Loading ${percent}%`;
}
}).then(() => {
document.getElementById('loading-screen').style.display = 'none';
});
</script>
Feature gate
if OS.has_feature("web"):
# Web-only: storage wrapper, visibility pause, navigation guard
pass
Size / perf knobs
[rendering]
textures/vram_compression/import_s3tc_bptc=true
textures/vram_compression/import_etc2_astc=true
- Target ~60 FPS mid-range browsers; cut particles, draw calls, huge textures.
- Keep download under a practical budge
Установить godot-platform-web в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл godot-platform-web?
Expert blueprint for HTML5/web export on Compatibility (WebGL 2.0): JavaScriptBridge, localStorage wrapper, custom loading shells, COOP/COEP hosts, relative paths, beforeunload, visibility pause, and size optimization. WebGPU is out of scope. Keywords: web, HTML5, WebGL, Compatibility, JavaScriptBridge, localStorage, COOP, COEP, canvas, browser API.
Как установить скилл godot-platform-web?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-platform-web запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic