JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/2.2.5/pixi.js"></script>
JavaScript
var stage = new PIXI.Stage(0x444444);
var renderer = PIXI.autoDetectRenderer(500, 400);
document.body.appendChild(renderer.view);
requestAnimFrame( animate );
var pic = stage.addChild(new PIXI.DisplayObjectContainer());
var graph = pic.addChild(new PIXI.Graphics);
pic.addChild(new PIXI.Sprite.fromImage('../../../../img/initializing.png'));
graph.beginFill(0x000000).drawRect(0,0,200,250);
pic.x = 210; pic.y = 0;
pic.interactive = true;
pic.mouseover = function (e) {
this.cacheAsBitmap=false;
this.alpha=.5;
};
pic.mouseout = function (e) {
this.alpha=1;
this.cacheAsBitmap=true;
};
function animate() {
requestAnimFrame( animate );
renderer.render(stage);
}