Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Physijs - Physics plugin for three.js (bonus: jenga example included) (chandlerprall.github.com)
62 points by minikomi on April 30, 2012 | hide | past | favorite | 10 comments


That's pretty cool, but their framerate tracker doesn't work correctly in chrome. Not sure what it's measuring but the rendering of the shapes on some demos visibly starts to tank at sub 20fps, but the counter still says 60.


Strange. What's your system?


It's rendering @ 60hz

The physics is being performed in a WebWorker which is able to operate at a different frequency.


I like in my Chrome how the box generation keeps going on while the tab is blurred/deselected, but simulation is halted... then, when focusing back on the tab, a bunch of on-the-same-spot generated boxes get simulated again and explode in all directions.


Chrome limits setTimeout() to 1 call per second when the tab loses focus. I haven't gotten a chance to look at the code, but if three.js uses requestAnimationFrame and the physics uses setTimeout, things might get out of sync.


All of this is really cool, but why even bother running this in a web browser when a desktop application will run it without turning my MacBook air into a jet engine?


That has to be the least forward thinking stance on this technology I've heard.

Why hook a bunch of computers together? I can just put my files on a floppy and give them to a friend.

Why do we need wireless internet? I can just run a cat5 cable without sacrificing bandwidth.

To take any emerging technology at face value in it's infancy is doing a disservice to not only the technology but yourself. The quality of graphics and performance you're seeing here is comparable to late 90's early 00's 3d performance. If you put in a little more thought you'll see that in the relatively near future you'll be running full blown games via WebGL with WebSockets and such directly in your browser. No need to install, no need to compile, etc.

It's coming, I'm willing to bet we'll see it become common place within the next decade.


Because not everyone knows how to code and compile an application that runs on Windows, MacOS and Linux? Neither people tend to download desktop applications nowadays... or is it just me?

Hopefully WebCL will get some traction and the simulation could be moved to the GPU in... a year? That way JavaScript will just have to do a bit of wiring.


I'm really excited about this; three.js brought 3D graphics to the casual developer in a painless process, and now they'll get physics too. Great work everyone!


It crashes the browser (Chrome on W7) when i open them all and try to play with them for a bit; also, in the "jenga" example i can go across other blocks without touching them if i move the mouse fast enough. Really cool nonetheless.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: