Update asset database

This commit is contained in:
2026-01-29 14:03:24 +09:00
parent 8a5795069f
commit e71851550b
16 changed files with 879 additions and 646 deletions

View File

@@ -0,0 +1,22 @@
namespace Ghost.Editor.Core.AssetHandle;
/// <summary>
/// The base class for all asset types in the Ghost Editor.
/// </summary>
public abstract class Asset
{
public abstract string Name
{
get; set;
}
public Guid ID
{
get;
}
protected Asset(Guid id)
{
ID = id;
}
}

View File

@@ -0,0 +1,75 @@
namespace Ghost.Editor.Core.AssetHandle;
/// <summary>
/// Represents a texture asset.
/// </summary>
public class TextureAsset : Asset
{
public override string Name
{
get;
set;
}
/// <summary>
/// Width of the texture in pixels.
/// </summary>
public uint Width
{
get;
set;
}
/// <summary>
/// Height of the texture in pixels.
/// </summary>
public uint Height
{
get;
set;
}
/// <summary>
/// Number of mipmap levels.
/// </summary>
public uint MipLevels
{
get;
set;
}
/// <summary>
/// Texture format (e.g., "RGBA8", "BC1", "BC7").
/// </summary>
public string Format
{
get;
set;
}
/// <summary>
/// Whether the texture uses sRGB color space.
/// </summary>
public bool IsSRGB
{
get;
set;
}
/// <summary>
/// Relative path to the source image file.
/// </summary>
public string SourcePath
{
get;
set;
}
public TextureAsset(Guid id, string name) : base(id)
{
Name = name;
Format = "RGBA8";
IsSRGB = true;
SourcePath = string.Empty;
}
}