phaser/typescript
2016-07-08 15:46:26 +01:00
..
box2d.d.ts Fixed defs (#2568) and added in Box2D defs. 2016-06-17 11:52:46 +01:00
p2.d.ts split p2 definitions into its own file 2015-03-18 11:44:11 -07:00
phaser.comments.d.ts Phaser 2.6.0 Release. 2016-07-08 15:46:26 +01:00
phaser.d.ts Groups now have the following properties, which are getters and setters: centerX, centerY, left, right, top and bottom. These calculate the bounds of the Group, based on all visible children, and then allow you to apply positioning based on that. This means you can, for example, now get the horizontal center of a Group by called Group.centerX. These properties are also setters, so you can position the Groups, and it will take scale and rotation into consideration. 2016-07-08 01:33:42 +01:00
phaser_box2d.d.ts Fixed defs (#2568) and added in Box2D defs. 2016-06-17 11:52:46 +01:00
pixi.comments.d.ts Phaser 2.6.0 Release. 2016-07-08 15:46:26 +01:00
pixi.d.ts TypeScript updates. 2016-07-06 22:19:17 +01:00
readme.md Merge pull request #2576 from monagames/typings_support 2016-06-21 22:05:15 +01:00
tslint.json Rebuilt Phaser Comments TypeScript defs. 2016-06-17 02:28:57 +01:00
typings.json Testing typings field in package.json 2016-06-19 18:50:05 +02:00

TypeScript Definitions

Reference the phaser.d.ts in your project.

Please use TypeScript 1.4+

  • phaser.d.ts contains a reference to pixi.d.ts and p2.d.ts and so both these files must remain siblings in the same directory.
  • pixi.d.ts has deviated from the official project. If you are a pixi user, pick up the ball over at the official pixi typescript repo.

Including typescript definitions in your project using Typings

You can now use typings, the TypeScript Definition Manager, to include Phaser's typescript definitions in your project:

  • Make sure that typings is installed in your system: npm install -g typings
  • Install phaser typescript definitions as a global dependency:
typings install github:photonstorm/phaser/typescript/typings.json -GD

This will make phaser typescript definitions available for your compiler so that there is no need to reference them from your source files. For more information, check the official typings site.

Contributing

If you find any mistakes in these definitions or you feel they can be improved in any way, please make a pull request against the dev branch.

Note

Creature defs are not yet provided.

The Box2D defs come from https://github.com/SBCGames/Phaser-Box2D-Typescript-defs