Matter.js – A 2D rigid body physics engine for the web
21–30 of 64 posts
Re: Matter.js – A 2D rigid body physics engine for the web
#22Pros: The samples play well, look fun, and it looks like a great solution to small physics demos in JS. Great job! Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun. Edit: Significantly better w/ WebGL render, @32fps, and with s…
Have you seen PixiJS? http://www.pixijs.com/ It's used by PhaserJS, a very promising JS Game Framework
Re: Matter.js – A 2D rigid body physics engine for the web
#23Re: Matter.js – A 2D rigid body physics engine for the web
#24http://i.imgur.com/QcKoWLj.png Doesn't seem to render correctly on Chrome 39. Works fine on latest Firefox.
Re: Matter.js – A 2D rigid body physics engine for the web
#25Re: Matter.js – A 2D rigid body physics engine for the web
#26I want a demo where the user can control a soft body ball such that the ball is comprised of chain segments, connected with string constant k. The pressure of the ball would be calculated depending on the area enclosed by the chain's polygon and would be applied to each segment equally, to the outwards side. Controls would be left/right as a simple added force to all segments of the ball. Jump would be increased air amount (target surface area) and crouch would be decreased k. In my imagination, the ball would be low friction and would grow throughout the game, to take on bigger adversaries.
(Sharing it here cause I didn't get to code it in years but I would really love to see if the control would work.)
Re: Matter.js – A 2D rigid body physics engine for the web
#27http://i.imgur.com/QcKoWLj.png Doesn't seem to render correctly on Chrome 39. Works fine on latest Firefox.
Windows 7 AMD HD 7970 3GB
Re: Matter.js – A 2D rigid body physics engine for the web
#28Earlier quoted context omitted.
GPU acceleration isn't going to be practical until >WebGL2, when we get access to compute shaders. You can technically do compute now by expressing your data as textures and performing rendering passes over it, but trying to do anything non-trivial that way will quickly lead to madness.
I mean, this is what I'm looking for. Sure it would be madness, but if you have 450 bodies represented by, say, 10 floats each (random number), that comes to about 4500 pixels of values- something a GPU is fine at.
Re: Matter.js – A 2D rigid body physics engine for the web
#29There are some bugs with "enable sleeping" turned on. Occasionally an object that is sleeping seems to fail to have external forces act upon it. For example, you can end up with a sleeping object sitting on top of another object, and when the object falls out from under it, the sleeping object stays stuck in midair. I can reliably make this happen by toggling "enable sleeping" on and off (example: load up "wrecking b…
Re: Matter.js – A 2D rigid body physics engine for the web
#30demo request: I want a demo where the user can control a soft body ball such that the ball is comprised of chain segments, connected with string constant k. The pressure of the ball would be calculated depending on the area enclosed by the chain's polygon and would be applied to each segment equally, to the outwards side. Controls would be left/right as a simple added force to all segments of the ball. Jump would be…