Update asset database
This commit is contained in:
22
Ghost.Editor.Core/AssetHandle/Models/Asset.cs
Normal file
22
Ghost.Editor.Core/AssetHandle/Models/Asset.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
75
Ghost.Editor.Core/AssetHandle/Models/TextureAsset.cs
Normal file
75
Ghost.Editor.Core/AssetHandle/Models/TextureAsset.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user