Property animations track (#867)

* WiP property animations system

* Use better lerp for Angle property animations.

* Fix handling of offset in sprite component.

* Allow animating some sprite layer properties.

* Allow animating some Transform properties.

Obviously not advisable for server entities, but great for client side entities!

* Improve animation property interpolation handling.

Added a "previous" mode.
Made values that cannot be sanely interpolated fall back to this mode.

* Improve some animation docs.
This commit is contained in:
Pieter-Jan Briers
2019-09-17 22:57:12 +02:00
committed by GitHub
parent 65a8d33d0c
commit 5d5b897a9b
20 changed files with 561 additions and 176 deletions
@@ -2,6 +2,7 @@
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Graphics.Shaders;
using Robust.Shared.Animations;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Maths;
@@ -9,7 +10,7 @@ using Robust.Shared.Utility;
namespace Robust.Client.Interfaces.GameObjects.Components
{
public interface ISpriteComponent : IComponent
public interface ISpriteComponent : IComponent, IAnimationProperties
{
void FrameUpdate(float delta);
@@ -23,21 +24,25 @@ namespace Robust.Client.Interfaces.GameObjects.Components
/// <summary>
/// A scale applied to all layers.
/// </summary>
[Animatable]
Vector2 Scale { get; set; }
/// <summary>
/// A rotation applied to all layers.
/// </summary>
[Animatable]
Angle Rotation { get; set; }
/// <summary>
/// Offset applied to all layers.
/// </summary>
[Animatable]
Vector2 Offset { get; set; }
/// <summary>
/// Color to multiply all layers with.
/// </summary>
[Animatable]
Color Color { get; set; }
/// <summary>