Some basic experiments with two.js . Write in comments if getting stuck in running below example. Lets go step by step. 1. var type defines type of content delivered by the two.js drawing as per request / automatic detection using url.js javascript. var type = /(canvas|webgl)/.test(url.type) ? url.type : 'svg'; 2. Now, we are ready with content type. We can define two.js object using below code. var two = new Two({ type: Two.Types[type], fullscreen: true, autostart: true }).appendTo(document.body); This defines type of the drawing i.e. canvas/webgl. fullscreen behaviour, autostart options and many more things as described here . The last line "appendTo()" decides where our two.js drawing will be rendered. Here, we have taken webpage's body directly to render two.js drawing. <!DOCTYPE html> <html><head> <meta http-equiv="content-type" content="