Skip to content

Commit

Permalink
Animation branch (#44)
Browse files Browse the repository at this point in the history
Animation branch
  • Loading branch information
Cooltomten authored Dec 15, 2023
2 parents 3c81ff7 + 3ae4ca5 commit 6d6e1a9
Show file tree
Hide file tree
Showing 111 changed files with 4,278 additions and 458 deletions.
3 changes: 3 additions & 0 deletions Engine/Editor/Textures/Icons/icon_graph_pin_anim_pose.dds
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Metadata:
assetHandle: 5946711586121204777
filePath: Editor/Textures/Icons/icon_graph_pin_anim_pose.dds
type: 16
Dependencies:
[]
Properties:
{}
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Metadata:
assetHandle: 564425915908266328
filePath: Editor/Textures/Icons/icon_graph_pin_anim_pose_filled.dds
type: 16
Dependencies:
[]
Properties:
{}
Git LFS file not shown
Git LFS file not shown
20 changes: 19 additions & 1 deletion Engine/Volt-ScriptCore/Source/Volt/Math/Mathf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,33 @@ public static Vector3 Clamp(Vector3 value, Vector3 min, Vector3 max)
public static float Abs(float value) => Math.Abs(value);
public static int Abs(int value) => Math.Abs(value);

public static float Pow(float value, float power) => (float)Math.Pow(value, power);




public static Vector3 Abs(Vector3 value)
{
return new Vector3(Math.Abs(value.x), Math.Abs(value.y), Math.Abs(value.z));
}

public static float Lerp(float p1, float p2, float t) => Interpolate.Linear(p1, p2, t);
//lerp angle
public static float LerpAngle(float p1, float p2, float t)
{
float num = Repeat(p2 - p1, 360.0f);
if (num > 180.0f)
{
num -= 360.0f;
}
return p1 + num * Clamp(t, 0.0f, 1.0f);
}

public static float Repeat(float t, float length) => t - Floor(t / length) * length;


public static float BounceOut(float p1, float p2, float t, float duration) => Interpolate.BounceOut(t, p1, p2, duration);
public static float BounceIn(float p1, float p2, float t, float duration)
public static float BounceIn(float p1, float p2, float t, float duration)
{
return p2 - BounceOut(p1, p2, duration - t, duration);
}
Expand Down
Loading

0 comments on commit 6d6e1a9

Please sign in to comment.