JSFiddle - React, Tailwind, and code Playground

by Eric Blanchette

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/two.js/0.1.0-alpha/two.min.js"></script>
<div id="draw-shapes"></div>

CSS

#draw-shapes {
    width:400px;
    height:400px;
    border:solid 1px;
}

JavaScript

var elem = document.getElementById('renderdiv');
var two = new Two({
    fullscreen: false
}).appendTo(elem);
var el = document.getElementById('assets').children[0];
var shape = two.interpret(el).center();
two.update();