diff --git a/PckStudio.Core/Extensions/AnimationExtensions.cs b/PckStudio.Core/Extensions/AnimationExtensions.cs index fc80a08c..4229ba26 100644 --- a/PckStudio.Core/Extensions/AnimationExtensions.cs +++ b/PckStudio.Core/Extensions/AnimationExtensions.cs @@ -14,11 +14,11 @@ namespace PckStudio.Core.Extensions return null; } var ms = new System.IO.MemoryStream(); - var generateor = new AnimatedGifCreator(ms, GameConstants.GameTickInMilliseconds, 0); + var generateor = new AnimatedGifCreator(ms, GameConstants.GAMETICK_IN_MILLISECONDS, 0); foreach (Animation.Frame frame in animation.GetInterpolatedFrames()) { Image texture = (blendColor == Color.Black || blendColor == Color.White) ? frame.Texture : frame.Texture.Blend(blendColor, BlendMode.Multiply); - generateor.AddFrame(texture, frame.Ticks * GameConstants.GameTickInMilliseconds, GifQuality.Bit8); + generateor.AddFrame(texture, frame.Ticks * GameConstants.GAMETICK_IN_MILLISECONDS, GifQuality.Bit8); } ms.Position = 0; return Image.FromStream(ms); diff --git a/PckStudio.Core/GameConstants.cs b/PckStudio.Core/GameConstants.cs index a8b4b05e..12978348 100644 --- a/PckStudio.Core/GameConstants.cs +++ b/PckStudio.Core/GameConstants.cs @@ -15,6 +15,8 @@ namespace PckStudio.Core // 16777215 being the uint24 max value public const int MAX_PACK_ID = 0xffffff; + public const int GAMETICK_IN_MILLISECONDS = 50; + public static readonly Vector3 SkinHeadTranslation = Vector3.Zero; public static readonly Vector3 SkinHeadPivot = Vector3.Zero; @@ -55,7 +57,6 @@ namespace PckStudio.Core public static Vector3 GetSkinPartTranslation(string partName) => GetPositioningInfo(partName).Translation; - public const int GameTickInMilliseconds = 50; // See: https://minecraft.fandom.com/wiki/Dye#Color_values for more information. public static readonly Color[] DyeColors = [