Better Duplicate Op Support (json/hjson) + 1 more op (#7355)

* Better support for duplicate ops

* 'Mathf.curve' op
This commit is contained in:
MEEPofFaith
2022-08-13 03:52:46 -07:00
committed by GitHub
parent f9748b2d69
commit 25388ffe5f
2 changed files with 8 additions and 3 deletions

View File

@@ -124,6 +124,10 @@ public abstract class DrawPart{
return p -> get(p) / (1f - amount);
}
default PartProgress compress(float start, float end){
return p -> Mathf.curve(get(p), start, end);
}
default PartProgress blend(PartProgress other, float amount){
return p -> Mathf.lerp(get(p), other.get(p), amount);
}