Catch up, several fixes and QoL.
This commit is contained in:
@ -32,7 +32,7 @@ namespace RobloxFiles.DataTypes
|
||||
public Vector3 ColumnY => new Vector3(m21, m22, m23);
|
||||
public Vector3 ColumnZ => new Vector3(m31, m32, m33);
|
||||
|
||||
public static readonly CFrame Identity = new CFrame();
|
||||
public static readonly CFrame identity = new CFrame();
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using RobloxFiles.Enums;
|
||||
using RobloxFiles.Utility;
|
||||
|
||||
namespace RobloxFiles.DataTypes
|
||||
{
|
||||
@ -27,6 +28,23 @@ namespace RobloxFiles.DataTypes
|
||||
Style = style;
|
||||
}
|
||||
|
||||
public static FontFace FromEnum(Font font)
|
||||
{
|
||||
return FontUtility.FontFaces[font];
|
||||
}
|
||||
|
||||
public static FontFace FromName(string name, FontWeight weight = FontWeight.Regular, FontStyle style = FontStyle.Normal)
|
||||
{
|
||||
Content url = $"rbxasset://fonts/families/{name}.json";
|
||||
return new FontFace(url, weight, style);
|
||||
}
|
||||
|
||||
public static FontFace FromId(ulong id, FontWeight weight = FontWeight.Regular, FontStyle style = FontStyle.Normal)
|
||||
{
|
||||
Content url = $"rbxassetid://{id}";
|
||||
return new FontFace(url, weight, style);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Font {{ Family = {Family}, Weight = {Weight}, Style = {Style}}}";
|
||||
|
@ -64,8 +64,8 @@ namespace RobloxFiles.DataTypes
|
||||
public static Vector2 zero => new Vector2(0, 0);
|
||||
public static Vector2 one => new Vector2(1, 1);
|
||||
|
||||
public static Vector2 x => new Vector2(1, 0);
|
||||
public static Vector2 y => new Vector2(0, 1);
|
||||
public static Vector2 xAxis => new Vector2(1, 0);
|
||||
public static Vector2 yAxis => new Vector2(0, 1);
|
||||
|
||||
public float Dot(Vector2 other) => (X * other.X) + (Y * other.Y);
|
||||
public Vector2 Cross(Vector2 other) => new Vector2(X * other.Y, Y * other.X);
|
||||
|
Reference in New Issue
Block a user