News for hackers. Stuff that matters.
Re:Jenga – Physijs by killertypo on Wednesday September 10, 2014 @03:44PM (#8298637)
improve gravity and friction, a bit too floaty and the lack of friction means i can pull out entire mid sections in one fell swoop without loosing the tower.
Re:Jenga – Physijs by allworknoplay on Thursday September 11, 2014 @01:20PM (#8303800)
I just did this, it was thrilling, like ripping a table cloth out from under a table setting. I wish I could do that in regular jenga.
Re:Jenga – Physijs by SchizoDuckie on Wednesday September 10, 2014 @03:29PM (#8298546)
Needs to be able to rotate the view and a bit more gravity. Other than that awesome!

little bug: if you swipe one of the bottom blocks really fast it'll stick to the mouse and not let go. This way you can swipe the whole stack from the bottom.

Re:Jenga – Physijs by drhodes on Wednesday September 10, 2014 @04:14PM (#8298831)
I ran into the same bug, I think there is an easy fix. When swiping one of the blocks out, my cursor left the window. The event system missed the mouseup that happened out-of-window. So, add another handler. onMouseLeaveContext(dropBlock())
Re:Jenga – Physijs by petepete on Wednesday September 10, 2014 @04:03PM (#8298743)
Wow, this is great. Was struggling with my touchpad for a few seconds until I remembered I have a touchscreen (which, other than this, I use for nothing).
Re:Jenga – Physijs by mataug on Wednesday September 10, 2014 @03:06PM (#8298396)
Impressive!

I can swipe away the bottom row easily without toppling the entire tower. I guess you don't take into account friction associated.

Re:Jenga – Physijs by tmoullet on Wednesday September 10, 2014 @03:20PM (#8298485)
The gravity constant (or the density of the blocks) seems to be a little low. Like playing Jenga on the moon.
Re:Jenga – Physijs by mikeash on Wednesday September 10, 2014 @03:46PM (#8298647)
You could do that in real life if you did it fast enough. It's basically the same as the classic trick with yanking a tablecloth off of a table.

It's much easier here as it looks like the gravity is quite a bit lower (alternately, the simulation is much slower than realtime) which makes the friction forces substantially weaker.

For an example of the principle in action with a real Jenga game, see: http://woodgears.ca/jenga_pistol/

Re:Jenga – Physijs by xbmcuser on Wednesday September 10, 2014 @10:28PM (#8300562)
Give more control allow to move the block over other axis as I would love to set a falling domino with this.
Re:Jenga – Physijs by aikah on Wednesday September 10, 2014 @03:48PM (#8298659)
3fps on my macbook pro(chrome latest)
Re:Jenga – Physijs by barsonme on Thursday September 11, 2014 @03:07AM (#8301249)
Yeah. I have a standard dell inspiron n5040 and using the latest Firefox on #! debian stable I topped out at round 8 fps.
Re:Jenga – Physijs by spyder on Wednesday September 10, 2014 @09:41PM (#8300424)
It shows 60 and 40 fps but the movement's are slow for me and have a strange pulsing effect.
Re:Jenga – Physijs by ebbv on Wednesday September 10, 2014 @03:14PM (#8298451)
Doesn't work in Safari 7.0.6
Re:Jenga – Physijs by MBCook on Wednesday September 10, 2014 @03:43PM (#8298630)
Works fine for me. Slow as hell if I have integrated graphics on, but that's to be expected. Works great when on discreet.
Re:Jenga – Physijs by sramsay on Wednesday September 10, 2014 @05:43PM (#8299359)
This is amazing, but I'm definitely able to do some impossible things with it.
Re:Jenga – Physijs by huborg on Wednesday September 10, 2014 @03:32PM (#8298563)
Try picking up a block in the middle, you can get the whole tower to float on it.
Re:Jenga – Physijs by namuol on Wednesday September 10, 2014 @05:45PM (#8299371)
Why do so many physics demos seem to use the Moon's gravity constant?
Re:Jenga – Physijs by walrus on Wednesday September 10, 2014 @11:24PM (#8300707)
It's a trick to make the simulation more stable. Stacking in physics engines is difficult. It's a careful balance between speed and stability.

If this demo took place on Earth, the Jenga blocks would have to be 1.96 meters long in order for the gravity to be realistic. Alternatively, if the Jenga blocks were the standard length of 7.5 cm, this would take place on a planet where gravity is 0.375 m/s² (less than the Moon).

If you want to see what the simulation looks like with Earth's gravity, change line 46 of examples/jenga.html (at commit e067679006a92dbbd02a81e990a69a86a5812e81) to

  scene.setGravity(new THREE.Vector3( 0, -784, 0 ));
Re:Jenga – Physijs by bluedino on Wednesday September 10, 2014 @04:22PM (#8298872)
Does not work on FireFox 33. Game shows but I can't grab pieces.
Re:Jenga – Physijs by thespace123 on Wednesday September 10, 2014 @03:23PM (#8298502)
Needs the ability to rotate the table. Other than that really fun
Re:Jenga – Physijs by LukeB_UK on Wednesday September 10, 2014 @02:56PM (#8298334)
Getting a blank page on Chrome 37.0.2062.94 on Linux Mint
Re:Jenga – Physijs by terminalcommand on Wednesday September 10, 2014 @03:15PM (#8298456)
Mozilla Firefox 27.0 works on Linux Mint.
Re:Jenga – Physijs by spacefight on Wednesday September 10, 2014 @04:19PM (#8298854)
27.0? Update...
Re:Jenga – Physijs by _random_ on Wednesday September 10, 2014 @03:44PM (#8298632)
Not bad, just like OpenGL in 90s.
Re:Jenga – Physijs by msl on Wednesday September 10, 2014 @03:59PM (#8298724)
But quite unlike modern OpenGL, which does not simulate physics at all.
Re:Jenga – Physijs by ygra on Wednesday September 10, 2014 @04:22PM (#8298869)
Apparently wood got very bouncy and lost a lot of friction since last time I played this in real.