This was a simple try on WebGL long ago. Hope it offer some help to those who need the source code.