svelte-phaser
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-beta.2 • Public • Published

Documentation

Check out the documentation

Getting Started

Creating a new project

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

# or if you prefer typescript:

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

There are some other templates available as well

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>

Readme

Keywords

Package Sidebar

Install

npm i svelte-phaser

Weekly Downloads

5

Version

0.1.0-beta.2

License

none

Unpacked Size

1.33 MB

Total Files

359

Last publish

Collaborators

  • mattjennings