deepsky88 Posted June 18, 2017 Share Posted June 18, 2017 hi, i want to a shaped fade out, like the star one in the simpson:https://www.youtube.com/watch?v=72bUheqRE5o. I tried to attach a fully transparent image of 800 x 600 than adding animations to hit with a spreetsheet of 12 frames (all 800 x 600), but when the animations should start nothing happened and chrome don't reveal any error, is it because of the large spreetsheet or what? Link to comment Share on other sites More sharing options...
Jammy Posted June 18, 2017 Share Posted June 18, 2017 https://phaser.io/examples/v2/sprites/mask Link to comment Share on other sites More sharing options...
deepsky88 Posted June 18, 2017 Author Share Posted June 18, 2017 25 minutes ago, Jammy said: https://phaser.io/examples/v2/sprites/mask thx it seems the right way, however is there any way to add animation on that mask? Link to comment Share on other sites More sharing options...
Jammy Posted June 18, 2017 Share Posted June 18, 2017 Just now, deepsky88 said: thx it seems the right way, however is there any way to add animation on that mask? Animate the width+height of the sprite that the mask is applied to, should do the trick Link to comment Share on other sites More sharing options...
deepsky88 Posted June 18, 2017 Author Share Posted June 18, 2017 3 minutes ago, Jammy said: Animate the width+height of the sprite that the mask is applied to, should do the trick yep but my shapes of mask is drawn with gimp, i saw that is possible to draw polygon but u need an array with coords, is there a way to make the mask filled with a png? my spreatsheet with frames of fade out Link to comment Share on other sites More sharing options...
Jammy Posted June 18, 2017 Share Posted June 18, 2017 3 minutes ago, deepsky88 said: yep but my shapes of mask is drawn with gimp, i saw that is possible to draw polygon but u need an array with coords, is there a way to make the mask filled with a png? I believe what you need is a black sprite that acts as the transparent shape, that is used as a mask. Theres a demo here: https://phaser.io/examples/v2/bitmapdata/alpha-mask deepsky88 1 Link to comment Share on other sites More sharing options...
deepsky88 Posted June 18, 2017 Author Share Posted June 18, 2017 nice ^^ thx for quickly answers, i tried a little but i don't like it; i'll go to make one time event that make frames visible in cascade within a second or two, i appreciated your help =) Link to comment Share on other sites More sharing options...
Recommended Posts