Skip to content

notYou263/svelte-phaser

 
 

Repository files navigation

Documentation

Check out the documentation

Getting Started

Creating a new project

The easiest way to get started is to create a new project using the blank template:

npx degit mattjennings/svelte-phaser/templates/blank my-first-game
cd my-first-game
npm install
npm run dev

If a blank project is too boring, feel free to look through the examples.

Adding to an existing project

If you have an existing svelte project you can just install svelte-phaser:

npm install phaser svelte-phaser

and then import it:

<script>
  import { Game, Scene, Text } from 'svelte-phaser'
</script>

<Game width={400} height={400}>
  <Scene key="main">
    <Text x={140} y={180} text="hello world" />
  </Scene>
</Game>

About

Create Phaser 3 games with Svelte

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Svelte 85.9%
  • JavaScript 13.7%
  • Other 0.4%