The official example example of Phaser named sprites: bitmapadata draw works perfectly and without any warning / error.
But it's version converted to Haxe generates the error message
phaser.gameobjects.BitmapData should be phaser.gameobjects.RenderTexture for function argument 'key'
Official Phaser sample:
var bmd;
function create() {
bmd = game.add.bitmapData(800, 600);
bmd.context.fillStyle = 'rgba(255, 0, 0, 0.3)';
// Add the bmd as a texture to an Image object.
// If we don't do this nothing will render on screen.
game.add.sprite(0, 0, bmd);
}
Haxe code:
var bmd:BitmapData;
function create()
{
bmd = game.add.bitmapData(800, 600);
bmd.context.fillStyle = 'rgba(255, 0, 0, 0.3)';
// Add the bmd as a texture to an Image object.
// If we don't do this nothing will render on screen.
game.add.sprite(0, 0, bmd);
}
The official example example of Phaser named sprites: bitmapadata draw works perfectly and without any warning / error.
But it's version converted to Haxe generates the error message
Official Phaser sample:
Haxe code:
You can see the full haxe code here