Initial commit

This commit is contained in:
2026-03-03 00:39:30 +05:00
commit fc01f07d9b
29933 changed files with 5353098 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using System;
namespace UnityEngine.Timeline
{
// Utility class for editing animation clips from serialized properties
static class CurveEditUtility
{
// Creates an opposing blend curve that matches the given curve to make sure the result is normalized
public static AnimationCurve CreateMatchingCurve(AnimationCurve curve)
{
Keyframe[] keys = curve.keys;
for (var i = 0; i != keys.Length; i++)
{
if (!Single.IsPositiveInfinity(keys[i].inTangent))
keys[i].inTangent = -keys[i].inTangent;
if (!Single.IsPositiveInfinity(keys[i].outTangent))
keys[i].outTangent = -keys[i].outTangent;
keys[i].value = 1.0f - keys[i].value;
}
return new AnimationCurve(keys);
}
}
}