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.
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.
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())
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.
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).
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
27 comments
[ 3.9 ms ] story [ 61.7 ms ] threadI can swipe away the bottom row easily without toppling the entire tower. I guess you don't take into account friction associated.
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/
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.
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