Skip to content

mborecki/phaser3-typescript-template

Repository files navigation

Phaser3 template w/ TypeScript and WebPack - WIP

A simple example using Phaser with TypeScript and WebPack.

Specs

  • Phaser 3.60.0

Dependencies

For audio to work you need installed ffmped on your system. Download from https://www.ffmpeg.org/download.html

Problems/Issues

  • /src/scenes/*.ts - I have to set this.game and this.sys.settings.key manualy because....

How to use?

Setup

yarn

Developing

yarn start

Sprites

Template uses:

  1. Add files to /sprites folder
  2. Edit /sprites/spritesheets.config.js
  3. Load sprites into game in preload() in file /src/scenes/boot.ts
  4. Build altlasses using: yarn sprites

Audio

Template uses:

  • audiosprite to combine multiple audio files into one, and convert *.wav files into mp3,ogg.
  • howler to play sounds
  1. Add .wav files into ./audio folder
  2. Run yarn audio

Use:

import getAudioPlayer from "./audio"; // /src/audio.ts

(await getAudioPlayer()).play('blip');

Build

yarn build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •