diff --git a/MLEM.Data/DataTextureAtlas.cs b/MLEM.Data/DataTextureAtlas.cs index e9b8e0b..e67bd54 100644 --- a/MLEM.Data/DataTextureAtlas.cs +++ b/MLEM.Data/DataTextureAtlas.cs @@ -30,8 +30,8 @@ namespace MLEM.Data { /// /// /// - /// To see a Data Texture Atlas in action, you can check out the sandbox project: . - /// Additionally, if you are using Aseprite, there is a script to automatically populate it: . + /// To see a Data Texture Atlas in action, you can check out the sandbox project: https://github.com/Ellpeck/MLEM/blob/main/Sandbox/Content/Textures/Furniture.atlas. + /// Additionally, if you are using Aseprite, there is a script to automatically populate it: https://github.com/Ellpeck/MLEM/blob/main/Utilities/Populate%20Data%20Texture%20Atlas.lua. /// public class DataTextureAtlas { diff --git a/MLEM.Ui/UiSystem.cs b/MLEM.Ui/UiSystem.cs index 71a378f..9bc00c7 100644 --- a/MLEM.Ui/UiSystem.cs +++ b/MLEM.Ui/UiSystem.cs @@ -16,7 +16,7 @@ namespace MLEM.Ui { /// /// A ui system is the central location for the updating and rendering of all ui s. /// Each element added to the root of the ui system is assigned a that has additional data like a transformation matrix. - /// For more information on how ui systems work, check out + /// For more information on how ui systems work, check out https://mlem.ellpeck.de/articles/ui.html. /// public class UiSystem : GameComponent { diff --git a/MLEM/Misc/AutoTiling.cs b/MLEM/Misc/AutoTiling.cs index 04c33ef..ff844ed 100644 --- a/MLEM/Misc/AutoTiling.cs +++ b/MLEM/Misc/AutoTiling.cs @@ -13,7 +13,7 @@ namespace MLEM.Misc { /// This allows, for example, a grass patch on a tilemap to have nice looking edges that transfer over into a path without any hard edges between tiles. /// /// For auto-tiling in this way to work, the tiles have to be laid out in a specific order. This order is shown in the auto-tiling demo's textures. - /// For more information and an example, see + /// For more information and an example, see https://github.com/Ellpeck/MLEM/blob/main/Demos/AutoTilingDemo.cs#L20-L28. /// /// /// diff --git a/MLEM/Misc/Easings.cs b/MLEM/Misc/Easings.cs index 16261f3..93f9deb 100644 --- a/MLEM/Misc/Easings.cs +++ b/MLEM/Misc/Easings.cs @@ -2,64 +2,64 @@ using System; namespace MLEM.Misc { /// - /// This class contains a set of easing functions, adapted from . + /// This class contains a set of easing functions, adapted from https://easings.net. /// These can be used for ui elements or any other kind of animations. /// By default, each function takes an input that ranges between 0 and 1, and produces an output that roughly ranges between 0 and 1. To change this behavior, you can use and . /// public static class Easings { - /// + /// https://easings.net/#easeInSine public static readonly Easing InSine = p => 1 - (float) Math.Cos(p * Math.PI / 2); - /// + /// https://easings.net/#easeOutSine public static readonly Easing OutSine = p => (float) Math.Sin(p * Math.PI / 2); - /// + /// https://easings.net/#easeInOutSine public static readonly Easing InOutSine = p => -((float) Math.Cos(p * Math.PI) - 1) / 2; - /// + /// https://easings.net/#easeInQuad public static readonly Easing InQuad = p => p * p; - /// + /// https://easings.net/#easeOutQuad public static readonly Easing OutQuad = p => 1 - (1 - p) * (1 - p); - /// + /// https://easings.net/#easeInOutQuad public static readonly Easing InOutQuad = p => p < 0.5F ? 2 * p * p : 1 - (-2 * p + 2) * (-2 * p + 2) / 2; - /// + /// https://easings.net/#easeInCubic public static readonly Easing InCubic = p => p * p * p; - /// + /// https://easings.net/#easeOutCubic public static readonly Easing OutCubic = p => 1 - (1 - p) * (1 - p) * (1 - p); - /// + /// https://easings.net/#easeInOutCubic public static readonly Easing InOutCubic = p => p < 0.5F ? 4 * p * p * p : 1 - (-2 * p + 2) * (-2 * p + 2) * (-2 * p + 2) / 2; - /// + /// https://easings.net/#easeInExpo public static readonly Easing InExpo = p => p == 0 ? 0 : (float) Math.Pow(2, 10 * p - 10); - /// + /// https://easings.net/#easeOutExpo public static readonly Easing OutExpo = p => p == 1 ? 1 : 1 - (float) Math.Pow(2, -10 * p); - /// + /// https://easings.net/#easeInOutExpo public static readonly Easing InOutExpo = p => p == 0 ? 0 : p == 1 ? 1 : p < 0.5F ? (float) Math.Pow(2, 20 * p - 10) / 2 : (2 - (float) Math.Pow(2, -20 * p + 10)) / 2; - /// + /// https://easings.net/#easeInCirc public static readonly Easing InCirc = p => 1 - (float) Math.Sqrt(1 - p * p); - /// + /// https://easings.net/#easeOutCirc public static readonly Easing OutCirc = p => (float) Math.Sqrt(1 - (p - 1) * (p - 1)); - /// + /// https://easings.net/#easeInOutCirc public static readonly Easing InOutCirc = p => p < 0.5F ? (1 - (float) Math.Sqrt(1 - 2 * p * (2 * p))) / 2 : ((float) Math.Sqrt(1 - (-2 * p + 2) * (-2 * p + 2)) + 1) / 2; - /// + /// https://easings.net/#easeInBack public static readonly Easing InBack = p => 2.70158F * p * p * p - 1.70158F * p * p; - /// + /// https://easings.net/#easeOutBack public static readonly Easing OutBack = p => 1 + 2.70158F * (p - 1) * (p - 1) * (p - 1) + 1.70158F * (p - 1) * (p - 1); - /// + /// https://easings.net/#easeInOutBack public static readonly Easing InOutBack = p => p < 0.5 ? 2 * p * (2 * p) * ((2.594909F + 1) * 2 * p - 2.594909F) / 2 : ((2 * p - 2) * (2 * p - 2) * ((2.594909F + 1) * (p * 2 - 2) + 2.594909F) + 2) / 2; - /// + /// https://easings.net/#easeInElastic public static readonly Easing InElastic = p => p == 0 ? 0 : p == 1 ? 1 : -(float) Math.Pow(2, 10 * p - 10) * (float) Math.Sin((p * 10 - 10.75) * 2.094395F); - /// + /// https://easings.net/#easeOutElastic public static readonly Easing OutElastic = p => p == 0 ? 0 : p == 1 ? 1 : (float) Math.Pow(2, -10 * p) * (float) Math.Sin((p * 10 - 0.75) * 2.0943951023932F) + 1; - /// + /// https://easings.net/#easeInOutElastic public static readonly Easing InOutElastic = p => p == 0 ? 0 : p == 1 ? 1 : p < 0.5 ? -((float) Math.Pow(2, 20 * p - 10) * (float) Math.Sin((20 * p - 11.125) * 1.39626340159546F)) / 2 : (float) Math.Pow(2, -20 * p + 10) * (float) Math.Sin((20 * p - 11.125) * 1.39626340159546F) / 2 + 1; - /// + /// https://easings.net/#easeInBounce public static readonly Easing InBounce = p => 1 - OutBounce(1 - p); - /// + /// https://easings.net/#easeOutBounce public static readonly Easing OutBounce = p => { const float n1 = 7.5625F; const float d1 = 2.75F; @@ -73,7 +73,7 @@ namespace MLEM.Misc { return n1 * (p -= 2.625F / d1) * p + 0.984375F; } }; - /// + /// https://easings.net/#easeInOutBounce public static readonly Easing InOutBounce = p => p < 0.5 ? (1 - OutBounce(1 - 2 * p)) / 2 : (1 + OutBounce(2 * p - 1)) / 2; /// diff --git a/MLEM/Misc/MlemPlatform.cs b/MLEM/Misc/MlemPlatform.cs index a53fac8..66e52a5 100644 --- a/MLEM/Misc/MlemPlatform.cs +++ b/MLEM/Misc/MlemPlatform.cs @@ -10,7 +10,7 @@ namespace MLEM.Misc { /// /// MlemPlatform is a wrapper around some of MonoGame's platform-dependent behavior to allow for MLEM to stay platform-independent. /// See , and for information on the specific platforms. - /// The MLEM demos' main classes also make use of this functionality: and . + /// The MLEM demos' main classes also make use of this functionality: https://github.com/Ellpeck/MLEM/blob/main/Demos.DesktopGL/Program.cs#L8 and https://github.com/Ellpeck/MLEM/blob/main/Demos.Android/Activity1.cs#L33. /// public abstract class MlemPlatform {