From cbdf2a27cd626783114cde11ce7553fc88490bad Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Thu, 26 Dec 2024 17:05:55 -0800 Subject: [PATCH] fast quadratic exit feels better --- rearm_prototype.p8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rearm_prototype.p8 b/rearm_prototype.p8 index 18dbf81..62252b3 100644 --- a/rearm_prototype.p8 +++ b/rearm_prototype.p8 @@ -156,14 +156,14 @@ end -- rearm pane objects easing_pane = mknew{ -- to enter: pos = -1; to exit: pos = 1 - -- runs for 16 frames + -- runs for 16 frames in, 8 frames out } function easing_pane:frac() local pos = self.pos if (not pos) return if (pos < 0) return 1-easeoutbounce(1+pos) - if (pos > 0) return easeoutbounce(1-pos) + if (pos > 0) return (1-pos)*(1-pos) return 0 end @@ -173,7 +173,7 @@ function easing_pane:update() -- increment is 0x0.1 -- 1/16th of pos if (pos < 0) pos = min(pos + 0x0.1, 0) if pos > 0 then - pos -= 0x0.1 + pos -= 0x0.2 if (pos <= 0) pos = nil end self.pos = pos