Screeze Posted June 10, 2018 Share Posted June 10, 2018 I'm trying to use the Path plugin shipped with phaser-ce in a Typescript (Ionic/Angular) application. It seems like several parts of Phaser are not in the phaser-ce typescript support (e.g. plugin parts like Path, PathPoint; but also phaser core parts like src/geom/Hermite.js). I tried several ways of importing those stuff into Typescript. Only way I figured out was copying the JS files to my /assets/ folder (so it will be compiled in the app) and referencing them in the index.html, then casting Phaser to any to access those (new (<any>Phaser).Path()). But this seems extreme hacky. Is there any better way to do this, also not having to copy the JS file so they can be compiled into the app code itself? Is there any Typescript support for those plugins? Also why is Hermite.js not supported as it seems to be part of Core phaser-ce? Link to comment Share on other sites More sharing options...
Recommended Posts