移除一些非必要默认值
This commit is contained in:
@@ -237,7 +237,7 @@ namespace Spine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否使用预乘 Alpha
|
/// 是否使用预乘 Alpha
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UsePma { get; set; } = false;
|
public bool UsePma { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物理约束更新方式
|
/// 物理约束更新方式
|
||||||
@@ -247,7 +247,7 @@ namespace Spine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启用渲染调试, 将会使所有 <c>DebugXXX</c> 属性生效
|
/// 启用渲染调试, 将会使所有 <c>DebugXXX</c> 属性生效
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnableDebug { get; set; } = false;
|
public bool EnableDebug { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示纹理
|
/// 显示纹理
|
||||||
@@ -257,47 +257,47 @@ namespace Spine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示包围盒
|
/// 显示包围盒
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugBounds { get; set; } = false;
|
public bool DebugBounds { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示骨骼
|
/// 显示骨骼
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugBones { get; set; } = false;
|
public bool DebugBones { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示区域附件边框
|
/// 显示区域附件边框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugRegions { get; set; } = false;
|
public bool DebugRegions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示网格附件边框线
|
/// 显示网格附件边框线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugMeshHulls { get; set; } = false;
|
public bool DebugMeshHulls { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示网格附件网格线
|
/// 显示网格附件网格线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugMeshes { get; set; } = false;
|
public bool DebugMeshes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示碰撞盒附件边框线
|
/// 显示碰撞盒附件边框线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugBoundingBoxes { get; set; } = false;
|
public bool DebugBoundingBoxes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示路径附件网格线
|
/// 显示路径附件网格线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugPaths { get; set; } = false;
|
public bool DebugPaths { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示点附件
|
/// 显示点附件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugPoints { get; set; } = false;
|
public bool DebugPoints { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示剪裁附件网格线
|
/// 显示剪裁附件网格线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugClippings { get; set; } = false;
|
public bool DebugClippings { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取某个插槽上的附件名, 插槽不存在或者无附件均返回 null
|
/// 获取某个插槽上的附件名, 插槽不存在或者无附件均返回 null
|
||||||
|
|||||||
@@ -26,17 +26,17 @@ namespace Spine.SpineWrappers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 在读取纹理时强制进行通道预乘操作
|
/// 在读取纹理时强制进行通道预乘操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ForcePremul { get; set; } = false;
|
public bool ForcePremul { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 强制使用 Nearest
|
/// 强制使用 Nearest
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ForceNearest { get; set; } = false;
|
public bool ForceNearest { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 强制启用 Mipmap
|
/// 强制启用 Mipmap
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ForceMipmap { get; set; } = false;
|
public bool ForceMipmap { get; set; }
|
||||||
|
|
||||||
private SFML.Graphics.Texture ReadTexture(string path)
|
private SFML.Graphics.Texture ReadTexture(string path)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,48 @@ namespace SpineViewer.Models
|
|||||||
{
|
{
|
||||||
public class SpineObjectConfigModel
|
public class SpineObjectConfigModel
|
||||||
{
|
{
|
||||||
|
public bool UsePma { get; set; }
|
||||||
|
|
||||||
|
public string Physics { get; set; } = ISkeleton.Physics.Update.ToString();
|
||||||
|
|
||||||
|
public float Scale { get; set; } = 1f;
|
||||||
|
|
||||||
|
public bool FlipX { get; set; }
|
||||||
|
|
||||||
|
public bool FlipY { get; set; }
|
||||||
|
|
||||||
|
public float X { get; set; }
|
||||||
|
|
||||||
|
public float Y { get; set; }
|
||||||
|
|
||||||
|
public List<string> LoadedSkins { get; set; } = [];
|
||||||
|
|
||||||
|
public Dictionary<string, string?> SlotAttachment { get; set; } = [];
|
||||||
|
|
||||||
|
public List<string?> Animations { get; set; } = [];
|
||||||
|
|
||||||
|
public bool DebugTexture { get; set; } = true;
|
||||||
|
|
||||||
|
public bool DebugBounds { get; set; }
|
||||||
|
|
||||||
|
public bool DebugBones { get; set; }
|
||||||
|
|
||||||
|
public bool DebugRegions { get; set; }
|
||||||
|
|
||||||
|
public bool DebugMeshHulls { get; set; }
|
||||||
|
|
||||||
|
public bool DebugMeshes { get; set; }
|
||||||
|
|
||||||
|
public bool DebugBoundingBoxes { get; set; }
|
||||||
|
|
||||||
|
public bool DebugPaths { get; set; }
|
||||||
|
|
||||||
|
public bool DebugPoints { get; set; }
|
||||||
|
|
||||||
|
public bool DebugClippings { get; set; }
|
||||||
|
|
||||||
|
#region 序列化与反序列
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存 Json 文件的格式参数
|
/// 保存 Json 文件的格式参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -36,7 +78,7 @@ namespace SpineViewer.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存预设至文件, 概率抛出异常
|
/// 保存至文件, 可能抛出异常
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Serialize(string path)
|
public void Serialize(string path)
|
||||||
{
|
{
|
||||||
@@ -45,44 +87,6 @@ namespace SpineViewer.Models
|
|||||||
File.WriteAllText(path, json, Encoding.UTF8);
|
File.WriteAllText(path, json, Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UsePma { get; set; }
|
#endregion
|
||||||
|
|
||||||
public string Physics { get; set; } = ISkeleton.Physics.Update.ToString();
|
|
||||||
|
|
||||||
public float Scale { get; set; } = 1f;
|
|
||||||
|
|
||||||
public bool FlipX { get; set; }
|
|
||||||
|
|
||||||
public bool FlipY { get; set; }
|
|
||||||
|
|
||||||
public float X { get; set; }
|
|
||||||
|
|
||||||
public float Y { get; set; }
|
|
||||||
|
|
||||||
public List<string> LoadedSkins { get; set; } = [];
|
|
||||||
|
|
||||||
public Dictionary<string, string?> SlotAttachment { get; set; } = [];
|
|
||||||
|
|
||||||
public List<string?> Animations { get; set; } = [];
|
|
||||||
|
|
||||||
public bool DebugTexture { get; set; } = true;
|
|
||||||
|
|
||||||
public bool DebugBounds { get; set; } = true;
|
|
||||||
|
|
||||||
public bool DebugBones { get; set; }
|
|
||||||
|
|
||||||
public bool DebugRegions { get; set; }
|
|
||||||
|
|
||||||
public bool DebugMeshHulls { get; set; }
|
|
||||||
|
|
||||||
public bool DebugMeshes { get; set; }
|
|
||||||
|
|
||||||
public bool DebugBoundingBoxes { get; set; }
|
|
||||||
|
|
||||||
public bool DebugPaths { get; set; }
|
|
||||||
|
|
||||||
public bool DebugPoints { get; set; }
|
|
||||||
|
|
||||||
public bool DebugClippings { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user