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.hitArea = new PIXI.Rectangle(0,0,200,250);
pic.mouseover = function (e) {
var _ = this;
this.alpha=.5;
setTimeout(function(){
_.cacheAsBitmap=false;
},0);
};
pic.mouseout = function (e) {
var _ = this;
this.alpha=1;
setTimeout(function(){
_.cacheAsBitmap=true;
},0);
};
function animate() {
requestAnimFrame( animate );
renderer.render(stage);
}