JSFiddle - React, Tailwind, and code Playground

by wiredprairie

HTML

<script src="http://code.createjs.com/createjs-2013.02.12.min.js"></script>
<canvas id="demoCanvas" width="500" height="400" style="background-color: black"></canvas>

JavaScript

function demo() {
    //Create a stage by getting a reference to the canvas
    var stage = new createjs.Stage("demoCanvas");
    //Create a Shape DisplayObject.
    var circle = new createjs.Shape();
    circle.graphics.beginFill("red").drawCircle(0, 0, 40);
    //Set position of Shape instance.
    circle.x = circle.y = 50;
    //Add Shape instance to stage display list.
    stage.addChild(circle);
    //Update stage will render next frame
    stage.update();
    // turn on mouseover support
    stage.enableMouseOver(20);  
    circle.addEventListener("mouseover", function() {
       circle.alpha *= .80;
       stage.update();
    });
}
demo();