JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.createjs.com/easeljs-0.4.2.min.js"></script>
<center><canvas style="margin-top:50px" id="shadow" width="500" height="450"></canvas></center>

JavaScript

var stage = new Stage(document.getElementById("shadow"));

var shadow = new Shadow("#000000", 10, 10, 15);
var shadowTarget = new Bitmap("http://upload.wikimedia.org/wikipedia/ru/9/9d/Comic_Book_Guy.png");

shadowTarget.shadow = shadow;

stage.addChild(shadowTarget);

shadowTarget.x = 500 / 2;
shadowTarget.y = 450 / 2;

shadowTarget.regX = shadowTarget.image.width/2;
shadowTarget.regY = shadowTarget.image.height/2;

setInterval(tick, 10);

var i = 0;
function tick()
{
    shadow.offsetX = Math.sin(i/10) * 25;
    shadow.offsetY = Math.cos(i/10) * 25;
    i++;
    
    shadowTarget.rotation++;
    
    stage.update();
}