Jump to content

[Plugin] Juicy: Simple Effects Plugin based on the "Juice it or Lose It" presentation


codevinsky
 Share

Recommended Posts

If you're not familiar with the presentation, it's vital that you go watch it: 

 

Now that you've done that, this plugin currently allows you to easily implement the following effects:

  • Camera Shake
  • Screen Flash
  • Object Trails
  • Over Scaling
  • Mouse Stretch
  • Jelly Effect

 

DEMO

 

SOURCE

 

I've made a pull request and I hope rich will merge it into the official repo.

 

 

Link to comment
Share on other sites

There are some issues though.

 

In many of the functions you accept arguments, but then you ignore them.

 
    Phaser.Plugin.Juicy.ScreenFlash = function(game, color) {
        color = color || 'white';
        var bmd = game.add.bitmapData(game.width, game.height);
        bmd.ctx.fillStyle = 'white';
 
 
Easy peasy to fix though, but it might be nice to get it fixed before a merge of the pull request.
Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...

Can you please post an example?

Thanks

 

 

Well, pretty simple code, I just created this two variables

this.juicy=this.game.plugins.add(new Phaser.Plugin.Juicy(this));this.screenFlash=this.juicy.createScreenFlash();this.add.existing(this.screenFlash);

and then I used them with this code

this.juicy.shake();

and

this.screenFlash.flash();

I didn´t try anything else but these two things are working even on mobile :)

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...