mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
added step easing (#678)
* added snap easing * moved step function to the bottom of the list Co-authored-by: Robert <mail@rbeekman.nl>
This commit is contained in:
parent
ddcb2cfcdb
commit
8b1ce4e0ec
@ -54,6 +54,7 @@ namespace Artemis.Core
|
|||||||
case Functions.BounceEaseIn: return BounceEaseIn(p);
|
case Functions.BounceEaseIn: return BounceEaseIn(p);
|
||||||
case Functions.BounceEaseOut: return BounceEaseOut(p);
|
case Functions.BounceEaseOut: return BounceEaseOut(p);
|
||||||
case Functions.BounceEaseInOut: return BounceEaseInOut(p);
|
case Functions.BounceEaseInOut: return BounceEaseInOut(p);
|
||||||
|
case Functions.Step: return Step (p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,6 +359,13 @@ namespace Artemis.Core
|
|||||||
return 0.5 * BounceEaseOut(p * 2 - 1) + 0.5;
|
return 0.5 * BounceEaseOut(p * 2 - 1) + 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An snappy animation that moves instantly to the next destination on the next keyframe
|
||||||
|
/// </summary>
|
||||||
|
public static double Step (double p) {
|
||||||
|
return Math.Floor (p);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Easing Functions enumeration
|
/// Easing Functions enumeration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -393,7 +401,8 @@ namespace Artemis.Core
|
|||||||
BackEaseInOut,
|
BackEaseInOut,
|
||||||
BounceEaseIn,
|
BounceEaseIn,
|
||||||
BounceEaseOut,
|
BounceEaseOut,
|
||||||
BounceEaseInOut
|
BounceEaseInOut,
|
||||||
|
Step
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user