PhaserEditor2D 374099c08d Updates templates. 2 years ago
..
assets 0c011927f2 Adds starter templates. 4 years ago
phasereditor2d_scripts_core 374099c08d Updates templates. 2 years ago
phasereditor2d_scripts_simple_animations 374099c08d Updates templates. 2 years ago
src d0f6532e7f Updates with latest project templates. 2 years ago
.gitignore 4a1e0fa07d Updates with the latest starter templates. 2 years ago
.gitpod.yml d0f6532e7f Updates with latest project templates. 2 years ago
README.md d0f6532e7f Updates with latest project templates. 2 years ago
events.txt 5a5a763b86 Get starter templates 2 years ago
game.js d0f6532e7f Updates with latest project templates. 2 years ago
index.html d0f6532e7f Updates with latest project templates. 2 years ago
main.ts 0718dcd238 Updates built-in project templates. 2 years ago
package-lock.json d0f6532e7f Updates with latest project templates. 2 years ago
package.json d0f6532e7f Updates with latest project templates. 2 years ago
phasereditor2d.config.json 7219492c78 Get latest starter-templates. 4 years ago
tsconfig.json d0f6532e7f Updates with latest project templates. 2 years ago

README.md

Basic TypeScript project template

Gitpod ready-to-code

This is a Phaser Editor 2D v3 project template.

Configuration

  • It includes the latest Phaser v3 runtime as a node package.
  • It is coded in TypeScript. The tsc is included as a node package.
  • It includes a VS Code project configuration (jsconfig.json file).

Compiles the source code

This project is based on TypeScript so for getting the game, first, you need to install TypeScript and other dependencies:

$ npm install
$ npm update

Then, for running the game, you need to compile the TypeScript files:

$ npm run build

It outputs the JavaScript code into the game.js file.

Often, you would like to run the TypeScript compiler in watch mode:

$ npm start

Run the editor

  • If you have NodeJS installed, you can run the editor using the editor NPM script, defined in the package.json file:

    $ npm install
    $ npm run editor
    
  • If you are in a remote environment (like the Gitpod.io IDE), then run the editor like this:

    $ npm run editor-remote
    
  • If you want to see all the editor options, run:

    $ npx phasereditor2d-launcher -help
    
  • If Phaser Editor 2D Core is globally installed, you can run:

    $ PhaserEditor2D -project .
    

Gitpod

This repository is ready for start coding in Gitpod, a Cloud Development Environment. You only need to click on this link for starting a new workspace.

This is what Gitpod does:

  • Creates a workspace for this project.
  • Opens VS Code to edit this repo.
  • Installs & updates the dependencies of this repo.
  • Runs Phaser Editor 2D Core server in port 1959.

In the Ports panel in VS Code, it shows the links for opening the editor (port 1959). It gives you the options of copy the URL, open the URL in a preview panel, or open the URL in a new tab.