class RoughSpriteGenerator
{
  constructor(game) {
    this.game = game;
  }

  getRectangle(bmd, width, height, config) {
    let rc = rough.canvas(bmd.canvas);
    console.log(config)
    rc.rectangle(0, 0, width, height, config);
  }

  getCircle(bmd, radius, config) {
    let rc = rough.canvas(bmd.canvas);
    rc.circle(radius/2, radius/2, radius, config);
  }

  getCircleSprite(x, y, radius, config = {}) {
    const defaultConfig = {
      fill: "rgb(10,150,10)",
      fillWeight: 3 // thicker lines for hachure
    };
    const configs = Object.assign({}, defaultConfig, config);
    const realRadius = radius + (config.fillWeight|| 0);

    let bmd = this.game.add.bitmapData(realRadius, realRadius);
    this.getCircle(bmd, radius, configs);
    return this.game.add.sprite(x, y, bmd);
  }

  getRectangleSprite(x, y, width, height, config = {}) {
    let bmd = this.game.add.bitmapData(width, height);
    const defaultConfig = {
        fill: 'orange',
        stroke: 'black',
        hachureAngle: 60,
        hachureGap: 10,
        fillWeight: 5,
        strokeWidth: 5
      };
    const configs = Object.assign({}, defaultConfig, config);
    this.getRectangle(bmd, width, height, configs);
    return this.game.add.sprite(x, y, bmd);
  }
}
export default RoughSpriteGenerator;
@@ -167,33 +167,8 @@
 );%0D%0A
-    console.log(config)%0D%0A
     
@@ -761,37 +761,45 @@
  return 
-this.game.add.sprite(
+new Phaser.Sprite(this.game, 
 x, y, bm
@@ -1245,29 +1245,37 @@
 urn 
-this.game.add.sprite(
+new Phaser.Sprite(this.game, 
 x, y

return sprite instead of add it in game