meo-canvas - v9.0.2
    Preparing search index...

    Function mix

    • Blends two values of the same kind, picking the right treatment for what it is given.

      Strings are treated as colours because that is the only string this library animates; anything else would have no meaningful midpoint.

      Type Parameters

      Parameters

      • from: T
      • to: T
      • t: number

      Returns T

      mix(0, 10, 0.5)                    // 5
      mix('#000000', '#ffffff', 0.5) // '#808080'
      mix([0, 10], [10, 20], 0.5) // [5, 15]