• Content Count

  • Joined

  • Last visited

About LordLants

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. LordLants

    Angular 5 CLI Integration

    Seems to be at a standstill. Was pointed out to me by bitm4ster that Phaser 3 at least supports typescript now, which is another fairly large "must" to use it in a framework that runs completely on Typescript.
  2. LordLants

    Bruh.io - Battle Royale in your browser!

    Wow, this is inspiring work, well done!
  3. @Doug Thank you much for all the insightful code snippets! On an off topic, I actually saw your issue thread on Github in regards to getting Phaser 3 working with Angular and am confused how you got the phaser.min.js to work without using "ng eject". If at any point I added phaser.min.js as a script in the index.html or in the scripts in the .angular-cli.json file it would blow up when trying to bundle the .frag and .vert portions of the code (with the hashtag). I eventually did get it to work with "ng eject", adding the necessary code to the ejected webpack.config.js file (both the loader and config changes), but being able to get everything working without needing to eject would be great. Thanks!
  4. LordLants

    Angular 5 CLI Integration

    Hi there. I am very partial to Angular, I use it for basically all of my personal projects and know that, in the long run, I would want to wrap any game that I make in an Angular shell eventually. Unfortunately, as far as I can tell, it is currently quite difficult to get Phaser 3 working with the Angular CLI due to two simple things: 1) if bundling with webpack (which Angular does by default) the .frag and .vert files need a raw-loader configuration, 2) the CANVAS_RENDERER and WEBGL_RENDERER need to be initialized. The Angular CLI does allow for these things by calling "ng eject" at the command line, adding module: { rules: [ { test: [ /\.vert$/, /\.frag$/ ], use: 'raw-loader' } ] }, plugins: [ new webpack.DefinePlugin({ 'CANVAS_RENDERER': JSON.stringify(true), 'WEBGL_RENDERER': JSON.stringify(true) }) ] but calling "ng eject" has its own set of adverse side effects that are not very ideal (you lose a lot of the CLI). Is there any way that these two small things can be handled so that Phaser 3 can easily be built and run in Angular without needing to use "ng eject"? Does anyone know of a way to currently use Phaser 3 with Angular without having to eject? Currently at any point if phaser.min.js is included as a script the bundler blows up, from all that I can tell. I know that part of the underlying problem is how the Angular CLI handles its webpack.config.js file in the first place, and how the CLI team doesn't want to allow more customization in the .angular-cli.json file, but that just kind of is what it is right now. Any feedback would be appreciated, thanks!
  5. Hi Doug, I actually stumbled across your comment because I am starting to use Phaser 3 with Angular and am getting the bare bones setup right now. This comment thread is the first thing that Google returns for "phaser 3 angular", funny enough. I am curious if you were able to resolve the issues you were seeing before? I have quite a bit of experience with Angular and am already planning out how I want to setup my application, unless there are some serious things that need to be worked around with Angular. I'll probably be handling what you were talking about with shared services that can be subscribed to, thus removing the need to try and access properties off of another component and allowing me to "push" whatever properties I want onto the Phaser objects from anywhere in the application.