Timob 16180 3: Add snapshot support

Run example/3d.js, click on snapshot button.