Ported from http://shinh.skr.jp/jsdmkun/jsdmkun.html to LWF for HTML5 WebGL Renderer