JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head></head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.4.8/phaser.js"></script>
</body>
</html>
JavaScript
(function(){
var game = new Phaser.Game(400, 400, Phaser.WEBGL, null, {
create: function(){
var graphic = this.game.add.graphics(0, 0);
var rect = new Phaser.RoundedRectangle(0, 0, 100, 100, 10);
graphic.beginFill(0xff0000);
graphic.drawShape(rect);
graphic.endFill();
this.add.tween(rect).to({width: 400, radius: 0}, 4000, Phaser.Easing.Linear.None, true);
}
});
}())