mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using GlitchyEngine.Core;
|
|
using GlitchyEngine.Math;
|
|
|
|
namespace GlitchyEngine.Graphics;
|
|
|
|
/// <summary>
|
|
/// Component that renders a circle.
|
|
/// </summary>
|
|
public class CircleRenderer : Component
|
|
{
|
|
// TODO: Texture2D Sprite
|
|
|
|
/// <summary>
|
|
/// Gets or sets the tint color of the circle.
|
|
/// </summary>
|
|
public ColorRGBA Color
|
|
{
|
|
get
|
|
{
|
|
ScriptGlue.CircleRenderer_GetColor(_uuid, out ColorRGBA color);
|
|
return color;
|
|
}
|
|
set => ScriptGlue.CircleRenderer_SetColor(_uuid, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the UV transform for the texture. XY are an offset, ZW are scaling
|
|
/// </summary>
|
|
public float4 UVTransform
|
|
{
|
|
get
|
|
{
|
|
ScriptGlue.CircleRenderer_GetUvTransform(_uuid, out float4 uvTransform);
|
|
return uvTransform;
|
|
}
|
|
set => ScriptGlue.CircleRenderer_SetUvTransform(_uuid, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the inner radius of the torus. 0 means a circle is rendered.
|
|
/// </summary>
|
|
public float InnerRadius
|
|
{
|
|
get
|
|
{
|
|
ScriptGlue.CircleRenderer_GetInnerRadius(_uuid, out float innerRadius);
|
|
return innerRadius;
|
|
}
|
|
set => ScriptGlue.CircleRenderer_SetInnerRadius(_uuid, value);
|
|
}
|
|
}
|