Jenga – Physijs
chandlerprall.github.io
chandlerprall.github.io
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 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/
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 ));