flixel
flixel copied to clipboard
FlxCamera.color is not functional
Using the following sample results in a untinted white graphic, the expected output is for it to be tinted red:
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.util.FlxColor;
class PlayState extends FlxState
{
override function create():Void
{
super.create();
add(new FlxSprite().makeGraphic(640, 480, FlxColor.WHITE));
FlxG.camera.color = FlxColor.RED;
}
}
Thanks I'll take a look!
Sorry for the late reply, this is an issue with openfl's colorTransform on non-flash targets: https://github.com/openfl/openfl/issues/2071
I'll escalate this issue, but we should consider adding documentation informing that camera.color doesn't work on those targets, fixing the openfl issue, or making a workaround. I don't have any ideas at the moment. I'm removing this from 5.9.0, and will jump back in later