JSFiddle - React, Tailwind, and code Playground
by easter bunny
HTML
<script src="http://code.createjs.com/easeljs-0.7.1.min.js"></script>
<canvas id="mycanvas" width="1000" height="500" style="border:1px solid black;"></canvas>
JavaScript
function makeit(){
function simpleBall(color,radius){
this.color=color;
this.radius=radius;
this.initialize();
}
simpleBall.prototype.initialize=function(){
this.s=this.getGraphics();
}
simpleBall.prototype.getGraphics=function(){
var s=new createjs.Shape();
s.graphics.beginFill(this.color).drawCircle(0,0,this.radius);
return s;
}
var canvas=document.getElementById("mycanvas");
var stage=new createjs.Stage(canvas);
var ball=new simpleBall("red",10);
ball.x=100;
ball.y=100;
stage.addChild(ball);
stage.update();
}
window.onload=makeit;