Closed chenzhutian closed 8 years ago
Are you talking about for UI purposes? There's nothing in matter.js for this type of thing, it's a rigid body engine. It doesn't look too difficult to just reproduce it yourself though if you'd rather not use that library?
Sorry for the bad example. I mean ripple effect for animation, such as http://bl.ocks.org/mbostock/9539958, and http://jsfiddle.net/esteewhy/5ht3b/6/. As you mentioned that matter.js is not appropriate for this type of thing.
BTW, is it possible to use matter.js to simulate force direct layout, just like http://bl.ocks.org/mbostock/3231307 ?
All of these examples show very different things... Either way, there's no support for fluids like this (although I'd love to implement SPH if I had time!).
If you're just looking for a visual animations like this, rather than physical simulation, then d3, velocity.js, mo.js, GSAP etc. are good options. You could also look into CSS animations.
Yes I used to use d3 to implement my animations but this time I need some physical simulation which isn't covered in d3. Anyway, thanks for your great help!
Is it possible to create ripple effect by using matter.js? I need some ripple effect for click, but I don't want to use other physics engine. Here is an example of ripple effect. http://git.blivesta.com/rippler/