Arian Fornaris

Phaser Chains (a different way to explore phaser docs)

45 posts in this topic

Nice work - showing your love for Phaser!  I second the notion for looking into what you can do for intelliJ IDEA (jetbrains) IDEs.  But nevertheless, this is handy for everyone.

Share this post


Link to post
Share on other sites

Hi @rsadwick let's see if I can deliver it to IDEA this weekend, I did Eclipse first because I have many years of experience with Eclipse plugins but I can reuse must of the code for IDEA.

Share this post


Link to post
Share on other sites

Here we go... PhaserChains IntelliJ IDEA plugin is done :)

 

This is the plugin's page in the JetBrains plugin registry:

 

https://plugins.jetbrains.com/plugin/7737

 

However I cannot see it in the IDE settings, I don't know if it has to be approved or something (I have no previous experience with IDEA, any help is welcome).

 

Anyway, you can install it very easy from this ZIP file:

 

https://bitbucket.org/boniatillo/phaserchains/downloads/IntelliJ_IDEA_com.boniatillo.phaserchains_1.0.0.zip

 

To open the Phaser Chains tool window go to the main menu Tool > Phaser Chains or type CTRL+SHIFT+I

As usual, double click on a chain to open the JSDoc, and double click on an example to see the code on the default browser of your OS.

 

The code and instructions are here:

 

https://bitbucket.org/boniatillo/phaserchains

 

And this is the screenshot:

 

post-8392-0-54062700-1428082223_thumb.pn

 

 

Share this post


Link to post
Share on other sites

Just installed the Brackets plugin...including the example snippets was a great idea!

I think this compares rather favorably with my old practice, which was to type the function into the Chrome debugger and read it there. =P

Arian Fornaris likes this

Share this post


Link to post
Share on other sites

Thanks @Raicuparta!

 

New fuatures...

 

Together with the Phaser API and docs, the tool shows the matching lines of the official Phaser examples. It is very nice because in this way the new developer gets in a first glance how to use that API.

 

For example, if you are looking for:

animations.add
you will find the API of the

AnimationManager.add(...)
method, but also you will see, in the examples panel, a demonstration of how to use them:

bot.animations.add('run');s.animations.add('spin', [0,1,2,3]);s.animations.add('spin', [0,1,2,3]);
But you will not find only examples of the API, else you can discover "new" API, or the API need for a specific purpose. Let's say you want to know when a key is down, but you are not very familiar with the API, then you can find for:

key*down
You will see, in the API panel, some methods like:

Phaser.Key.onDown : Phaser.Signal;Phaser.GameObjectFactory.button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame, group) : Phaser.Button;Phaser.GameObjectCreator.button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame) : Phaser.Button;Phaser.Key.processKeyDown(event.) : void;Phaser.Key.timeDown : number;Phaser.Key.isDown : boolean;
It gives you an idea of how to listen for a key down, but in the example panel you will discover the path to that method, or not the path, else the different paths:

if (game.input.keyboard.isDown(Keys.LEFT))spaceKey.onDown.add(togglePause, this);if (upKey.isDown)
At the same time, at the end of each matching line of the examples, you get a link to the complete example in the official github repo, so you can see the API you are looking for in a context.

 

Because now there are more panels, you can play with the "layout" button, it has 3 different layouts.

 

Ah, I missed to say, just now I implemented an "updating website" message. The website uses the application cache, so if this is not your first time, you should wait a bit and then refresh, to get the last changes. Next time it will advice you automatically.

 

Thanks,

@boniatillo_com

Hi ariana please add content of this post as a tutorial to your website and extensions, that could be very useful, for example i was not aware of usage of * , but this is awesome and im really happy about this feature

Arian Fornaris likes this

Share this post


Link to post
Share on other sites

Hi ariana please add content of this post as a tutorial to your website and extensions, that could be very useful, for example i was not aware of usage of * , but this is awesome and im really happy about this feature

 

Hi @Pooya72, thanks for the suggestion, I will do it this weekend.

Pooya72 likes this

Share this post


Link to post
Share on other sites

This is a really great tool, and thank you for it!!!

 

Are you going to continue updating it for Phaser 3? or does it just self update itself?

Arian Fornaris likes this

Share this post


Link to post
Share on other sites

This is absolutely awesome. And thank you for releasing the source too. In fact, I just signed up on this forum to say KUDOS! to you :)

 

PhaserChains is very very helpful for me as I am just starting out in Phaser. The help system is indeed superior to the static docs as an API reference and guide, plus the discovery of new APIs is also wonderful, just like you mentioned in an earlier post in this thread.

 

Thanks!

Arian Fornaris likes this

Share this post


Link to post
Share on other sites

Thanks jasnob...

 

yes, I should updated it manually. Actually I should do it in these days to update to the new 2.4.2 version.

 

This is a really great tool, and thank you for it!!!

 

Are you going to continue updating it for Phaser 3? or does it just self update itself?

Share this post


Link to post
Share on other sites

Hi all,

 

Phaser Chains was updated to support Phaser v2.4.3

 

I did some work to read the Phaser API directly from the Phaser source code and not from the JSON files generated by jsdoc (they are outdated in the phaser repo), so next Phaser releases will be easier to include in Chains.

 

If there is any issue, you are welcome to write it here.

 

Thanks

Arian

 

 

P.S. Phaser Chains uses the Offline Cache of your browser, so you have to wait it to be updated, in any case you can try refreshing your browser. You can know if it was updated if you look for the "game.load.video" method ;-)

Share this post


Link to post
Share on other sites

I missed to say that the Brackets plugin is just a frame of the online website, so it will get the last changes too.

 

The Eclipse plugin will be deprecated since now you can enjoy Phaser Editor, where Chains is included and up to date.

 

The IntelliJ plugin will be updated in the near future, with the same code base of Phaser Editor.

Pooya72 likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.