本文へスキップ
Kitbay
スキル

audio-and-sound

MIT2026年8月21日 更新40,693GitHubスター

A reference skill published in the Phaser game framework's own repository for adding sound and music to a Phaser 4 game through its shared sound manager.

スキルの内容

A reference skill published in the Phaser game framework's own repository for adding sound and music to a Phaser 4 game through its shared sound manager. It explains how Phaser chooses between Web Audio, HTML5 Audio and a silent fallback and what each supports, then covers loading audio with format fallbacks, one-off and retained sounds, volume, rate, detune, looping, seeking and stereo panning, audio sprites and named markers, background music, positional audio that follows a game object, decoding audio at runtime and an analyser for visualisations. Event lists and a source file map follow, and pitfalls cover browser autoplay unlocking, Safari's lack of panning, simultaneous playback limits in HTML5 Audio and looping sounds that outlive a scene.

できること

  • Load and play sounds and music
  • Use audio sprites and markers
  • Add positional audio to game objects
  • Handle browser autoplay unlocking