This cut-down version of Lines you see running in your browser is created using Three.js and can be run independently by clicking here. The code is available here.