trasheater Posted June 21, 2016 Share Posted June 21, 2016 Recently I seen an example made with paperJS ( http://paperjs.org/examples/meta-balls/ ) and I was trying to think of ways to duplicate this with phaser. Does anyone have any idea where to start with this one? I suck at trigonometry too so my desire to replicate this with phaser might be misplaced. I would love to hear any ideas anyone might have. I might even make it into a game. Not sure how I would do that either. But its possible Link to comment Share on other sites More sharing options...
Milton Posted June 21, 2016 Share Posted June 21, 2016 Why not just include Paper.js? It won't bite, just pass it the Phaser canvas context. But Paper seems to use Graphics, which is pretty awful for vector graphics on Canvas. Much better would be to use a SVG renderer (Snap.svg?), or use a shader so you could use Phaser/WebGL. (how-to-draw-a-bezier-line-with-shaders, create-a-glowing-flowing-lava-river-using-bezier-curves-and-shaders). Link to comment Share on other sites More sharing options...
trasheater Posted June 21, 2016 Author Share Posted June 21, 2016 Thats an idea. I don't really understand why I would include paper.js when the same thing could be done with phaser. I know it wouldn't bite(or could it?) but it seems like a shortcut that could cause issues. I have never looked at using an SVG renderer. This looks interesting! I will have a peep at this for sure! Link to comment Share on other sites More sharing options...
Milton Posted June 21, 2016 Share Posted June 21, 2016 23 minutes ago, trasheater said: I don't really understand why I would include paper.js when the same thing could be done with phaser. Phaser isn't a vector graphics library, Paper is. You use it just like you might include Sound.js, Box2d.js or whatever. Saying it could be done with Phaser means in the end you get something very similar to Paper.js, and you just reinvented the wheel. Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted June 21, 2016 Share Posted June 21, 2016 http://gamemechanicexplorer.com/#fluid-1 Link to comment Share on other sites More sharing options...
Milton Posted June 21, 2016 Share Posted June 21, 2016 I agree, shaders are the way to go. The 'Canvas Graphics' renderer is useless. Link to comment Share on other sites More sharing options...
trasheater Posted June 21, 2016 Author Share Posted June 21, 2016 @VitaZheltyakov That is a great example! I have never looked at shaders for WebGL. really interesting! Link to comment Share on other sites More sharing options...
Recommended Posts