@OPEN-KAPPA/COLORS
    Preparing search index...

    Class AlphaMixerAbstract

    Class for different alpha blending strategies.

    Index

    Methods

    • Smooth "Ease-In-Out" transition (Sine). The alpha change accelerates in the middle and decelerates at the ends. Creates the most natural-looking fade.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • weight: number

        The mixing weight.

      Returns AlphaResults

      The result.

    • Accelerating transition (Quadratic). Starts changing slowly and speeds up towards the end.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • weight: number

        The mixing weight.

      Returns AlphaResults

      The result.

    • Decelerating transition (Quadratic). Starts changing quickly and slows down towards the end.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • weight: number

        The mixing weight.

      Returns AlphaResults

      The result.

    • Standard linear interpolation. The transparency changes at a constant rate from start to finish. Default behavior.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • weight: number

        The mixing weight.

      Returns AlphaResults

      The result.

    • Keeps the highest opacity value between source and destination. Prevents the object from looking "washed out" or transparent during the transition. Ideal for morphing between two solid colors.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • _weight: number

        The mixing weight. Ignored.

      Returns AlphaResults

      The result.

    • Keeps the lowest opacity. Useful for "stealth" transitions where you don't want visibility to increase until the very end.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • targetAlpha: number

        The alpha of the blending color.

      • _weight: number

        The mixing weight.

      Returns AlphaResults

      The result.

    • No alpha interpolation. Preserve the source alpha.

      Parameters

      • sourceAlpha: number

        The alpha of the original color.

      • _targetAlpha: number

        The alpha of the blending color. Ignored.

      • _weight: number

        The mixing weight. Ignored.

      Returns AlphaResults

      The result.