flixel icon indicating copy to clipboard operation
flixel copied to clipboard

FlxCamera.color is not functional

Open DetectiveBaldi opened this issue 1 year ago • 1 comments

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;
    }
}

image-11.png

DetectiveBaldi avatar Jul 06 '24 17:07 DetectiveBaldi

Thanks I'll take a look!

Geokureli avatar Jul 06 '24 17:07 Geokureli

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

Geokureli avatar Nov 25 '24 18:11 Geokureli