These are chat archives for openfl/programming

Feb 2018
Gary Paluk
Feb 20 2018 12:58
Hi @jgranick - I'm writing unit tests against a port of OpenFL and found a bug in the ColorTransform class, however, I'm not logging it immediately because I'd like to figure out if it has been fixed higher up in the display chain. Has anyone experienced ColorTransform issues in production?
I'm seeing some reports of inconsistency, but couldn't see anything directly relating to the colors being incorrect as a general state of the class.
Gary Paluk
Feb 20 2018 13:04

Anyway, just for your reference:

/// <summary>
/// Concatenates the ColorTranform object specified by the second parameter with the current ColorTransform object and sets the current object as the result, which is an additive combination of the two color transformations. When you apply the concatenated ColorTransform object, the effect is the same as applying the second color transformation after the original color transformation.
/// </summary>
/// <param name="t">The ColorTransform to concat.</param>
public void Concat(ColorTransform t)
            mRedOffset = t.RedOffset * mRedMultiplier + mRedOffset;
            mGreenOffset =  t.GreenOffset * mGreenMultiplier + mGreenOffset;
            mBlueOffset = t.BlueOffset * mBlueMultiplier + mBlueOffset;
            mAlphaOffset = t.AlphaOffset * mAlphaMultiplier + mAlphaOffset;

            mRedMultiplier *= t.RedMultiplier;
            mGreenMultiplier *= t.GreenMultiplier;
            mBlueMultiplier *= t.BlueMultiplier;
            mAlphaMultiplier *= t.mAlphaMultiplier;

Fixes my own inconsistencies (tested against FlashPlayer 28)

As opposed to:

public function concat (second:ColorTransform):Void {

        redMultiplier *= second.redMultiplier;   
        greenMultiplier *= second.greenMultiplier;
        blueMultiplier *= second.blueMultiplier;
        alphaMultiplier *= second.alphaMultiplier;

        redOffset = second.redMultiplier * redOffset + second.redOffset;
        greenOffset = second.greenMultiplier * greenOffset + second.greenOffset;
        blueOffset = second.blueMultiplier * blueOffset + second.blueOffset;
        alphaOffset = second.alphaMultiplier * alphaOffset + second.alphaOffset;


In OpenFL. Hope that helps.

Feb 20 2018 23:57
Hello everyone you are here for Openfl/Lime :)
Can somebody check OpenFL/Lime with Away3D RealTimeEnvMap and it crashed because it doesn't see error messages. If I test with static and release. Than I open finish built executable and it will stop working