Jump to content

Metaballs ???


trasheater
 Share

Recommended Posts

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 :D

metabals.jpg

Link to comment
Share on other sites

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-shaderscreate-a-glowing-flowing-lava-river-using-bezier-curves-and-shaders).

Link to comment
Share on other sites

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

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

 Share

  • Recently Browsing   0 members

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