1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-01 10:13:30 +00:00

Clean up tweening

This commit is contained in:
SpoinkyNL 2017-01-19 12:54:48 +01:00
parent 201e65b3b5
commit 039593c6fe

View File

@ -42,7 +42,7 @@ namespace Artemis.Profiles.Layers.Models
private void UpdateWidth() private void UpdateWidth()
{ {
if (Math.Abs(_layerModel.Properties.WidthEaseTime) < 0.001) if (_layerModel.Properties.WidthEaseTime < 0.001)
return; return;
// Width // Width
@ -67,7 +67,7 @@ namespace Artemis.Profiles.Layers.Models
private void UpdateHeight() private void UpdateHeight()
{ {
if (Math.Abs(_layerModel.Properties.HeightEaseTime) < 0.001) if (_layerModel.Properties.HeightEaseTime < 0.001)
return; return;
// Height // Height
@ -91,7 +91,7 @@ namespace Artemis.Profiles.Layers.Models
private void UpdateOpacity() private void UpdateOpacity()
{ {
if (Math.Abs(_layerModel.Properties.OpacityEaseTime) < 0.001) if (_layerModel.Properties.OpacityEaseTime < 0.001)
return; return;
// Opacity // Opacity
@ -108,15 +108,6 @@ namespace Artemis.Profiles.Layers.Models
_layerModel.Opacity = _opacityTweener.Value; _layerModel.Opacity = _opacityTweener.Value;
} }
private void StoreCurrentValues()
{
_x = (float) _layerModel.X;
_y = (float) _layerModel.Y;
_width = (float) _layerModel.Width;
_height = (float) _layerModel.Height;
_opacity = (float) _layerModel.Opacity;
}
private static EaseFunc GetEaseFunction(string functionName) private static EaseFunc GetEaseFunction(string functionName)
{ {
switch (functionName) switch (functionName)