diff options
author | sanine <sanine.not@pm.me> | 2022-06-05 20:38:18 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-06-05 20:38:18 -0500 |
commit | b3d9ffe8107bd7e0989c1fed2e5bdf31037134bb (patch) | |
tree | 6baaa464c8dd1e2b0e7cb4c31e897f6745edeb73 /src/Util | |
parent | b9d4c658d3561106a452d8014c4d021fe175b759 (diff) |
begin adding logical map shapes
Diffstat (limited to 'src/Util')
-rw-r--r-- | src/Util/Util.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Util/Util.js b/src/Util/Util.js index 165d1d0..88ed59f 100644 --- a/src/Util/Util.js +++ b/src/Util/Util.js @@ -17,4 +17,13 @@ function clamp(value, min, max) { function lerp(a, b, alpha) { return ((1-alpha)*a) + (alpha*b); } -export { useAverage, clamp, lerp }; + +class Enum { + constructor(prefix, name) { + this.prefix = prefix; + this.name = name; + } + toString() { return `${this.prefix}.${this.name}`; } +} + +export { useAverage, clamp, lerp, Enum }; |