Update icon assets

This commit is contained in:
2026-02-01 01:54:04 +09:00
parent 6505099667
commit 9fcf06dbe4
55 changed files with 225 additions and 255 deletions

View File

@@ -1,5 +1,6 @@
using Ghost.Engine.Utilities;
using Microsoft.UI.Xaml.Data;
using Misaki.HighPerformance.Mathematics;
using System.Numerics;
namespace Ghost.Editor.Utilities.Converters;
@@ -8,20 +9,21 @@ public partial class Vector3ToQuaternionConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is Vector3 vector)
if (value is float3 vector)
{
return Quaternion.CreateFromYawPitchRoll(vector.Y, vector.X, vector.Z);
return quaternion.EulerXYZ(vector);
}
throw new ArgumentException("Value must be of type System.Numerics.Vector3.", nameof(value));
throw new ArgumentException($"Value must be of type {typeof(float3)}.", nameof(value));
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
if (value is Quaternion quaternion)
if (value is quaternion qua)
{
return VectorUtility.CreateFromQuaternion(quaternion);
return math.EulerXYZ(qua);
}
throw new ArgumentException("Value must be of type System.Numerics.Quaternion.", nameof(value));
throw new ArgumentException($"Value must be of type {typeof(quaternion)}.", nameof(value));
}
}