Exemple #1
0
        void GenerateFunction(CurveKeyframe a, CurveKeyframe b)
        {
            var key = new Vector2(a.Time, b.Time);

            if (beziers.ContainsKey(key))
            {
                return;
            }
            float p1y = AlchemyEasing.Ease(EasingTypes.Linear, b.InTangent, a.Value, b.Value, 0, 1);

            float p2y = AlchemyEasing.Ease(EasingTypes.Linear, a.OutTangent, a.Value, b.Value, 0, 1);

            beziers.Add(key, CubicBezier.Bezier(0.5, p1y, 0.5, 1 - p2y));
        }