phaserjs-build-ui
Implement Phaser HUD scenes, drawn controls and DOM companions with safe-area layout, focus navigation and synchronized game state.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 4
- Forks
- 3
01 前言 Front Matter
- name
- phaserjs-build-ui
- engines
- [ "PHASERJS" ]
- description
- Implement Phaser HUD scenes, drawn controls and DOM companions with safe-area layout, focus navigation and synchronized game state.
02 资源文件 1
- 参考文档agents/openai.yaml256 B
03 SKILL.md 正文
Build Phaser UI
When to use
Build Phaser menus, HUDs, modal screens or world prompts. Compose with build-game-ui for engine-independent hierarchy and interaction rules.
Engine and dependencies
Before edits or tool launches, run resolve-engine.sh and resolve-skill.sh phaserjs-build-ui; require compatibility and honor task override scope. Read the Phaser revision, Scale Manager settings, screen/input contract, browser targets and art pipeline. Use selected host packages; third-party widget libraries and DOM integrations are explicit choices.
Workflow
- Choose dedicated HUD/menu scenes,
Text/BitmapText, images and containers, or semantic DOM according to layout/accessibility needs. Containers group transforms, not automatic layout, focus or accessibility. Treat font/atlas load failure explicitly. - Define a logical UI coordinate space, viewport/safe-area constraints and resize/orientation policy. A fixed-camera HUD and world-space prompt need different camera/scroll-factor handling. Measure long text, text scale, touch target sizes and localization.
- Build navigation and focus models for keyboard/controller input. Route actions to the top active modal; coordinate scene Input Plugins and world controls to prevent click-through. Restore focus or a valid fallback after close, scene replacement or data removal.
- Provide DOM semantic controls/companions for essential drawn interactions when required. Keep labels, values, disabled state and activation synchronized. If using Phaser's
DOMElement, verify its configured DOM container, scaling and camera limitations in the host revision. - Initialize the HUD from a gameplay snapshot and subscribe to bounded updates. Unsubscribe on shutdown; reopen must show current state. Bind prompts to the active player's remapped controls and guard against duplicate event subscriptions after restart.
- Own UI animations, textures and external listeners; closing a screen cancels its pending effects without resetting unrelated gameplay timers.
Output and verification
Deliver UI/state adapters and screen/input ownership evidence. Test keyboard-only/controller paths, nested modals, portrait/landscape, browser zoom, long labels and HUD reopen after background state changes. Inspect semantic roles and focus; a screenshot cannot certify navigation or accessibility. Use the Phaser input contract and selected version's Game Object APIs.
04 同仓库更多 Skills
verify-web3-game-lifecycle
Verify a game's selected Web3 asset, wallet, ownership and trading lifecycle with contract properties, canonical recovery, actual target evidence and separate release readiness.
verify-onchain-game-assets
Verify exact on-chain game collection ownership and quantities at canonical blocks, reconcile inventory events, and design honest match admission. Use for ERC721/ERC1155 inventory, reorg recovery, reservations, or transfer-during-match rules.
plan-web3-game-assets
Define an opt-in Ethereum, Base or Immutable game-asset lifecycle, including token identity, supply, rights, custody, game eligibility and chain-specific dependencies.
integrate-game-wallets
Integrate explicit player-wallet connection, scoped SIWE authentication, authority invalidation and reviewed target-specific handoff without application-held player keys.
integrate-game-asset-trading
Integrate explicitly selected game asset settlement with exact unsigned intents, scoped approvals, idempotent operations and canonical receipt reconciliation. Use for NFT listing, buying, cancellation, retries or marketplace integration.
build-evm-game-contracts
Author and verify host-owned EVM game collections and explicit mint, burn, craft or admin rules with pinned Solidity tooling. Use for contract source and deployment candidates; deployment and player signing require separate authorization.