mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-21 18:55:34 +00:00
PckStudio - Fix typo in csproj file
This commit is contained in:
46
PckStudio.ModelSupport/Json/JsonModelMetaData.cs
Normal file
46
PckStudio.ModelSupport/Json/JsonModelMetaData.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.ModelSupport
|
||||
{
|
||||
public class ModelMetaDataPart
|
||||
{
|
||||
[JsonProperty("name", Required = Required.Always)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("children", NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public ModelMetaDataPart[] Children { get; set; } = Array.Empty<ModelMetaDataPart>();
|
||||
|
||||
[JsonConstructor]
|
||||
public ModelMetaDataPart()
|
||||
{
|
||||
}
|
||||
|
||||
public ModelMetaDataPart(string name)
|
||||
: this(name, Array.Empty<ModelMetaDataPart>())
|
||||
{
|
||||
}
|
||||
|
||||
public ModelMetaDataPart(string name, params ModelMetaDataPart[] children)
|
||||
{
|
||||
Name = name;
|
||||
Children = children;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonModelMetaData
|
||||
{
|
||||
[JsonProperty("textureLocations", Required = Required.Always)]
|
||||
public string[] TextureLocations { get; set; }
|
||||
|
||||
[JsonProperty("materialName", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string MaterialName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("uv_offsets", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Vector2[] UvOffsets { get; set; } = Array.Empty<Vector2>();
|
||||
|
||||
[JsonProperty("parts", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public ModelMetaDataPart[] RootParts { get; set; } = Array.Empty<ModelMetaDataPart>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user