大量指数接近动画改为基于时间而不是帧

This commit is contained in:
MrZ626
2021-12-22 02:19:42 +08:00
parent 20a1d2bcc1
commit a8628275a0
13 changed files with 49 additions and 39 deletions

View File

@@ -19,6 +19,7 @@ local sub,ins,rem=string.sub,table.insert,table.remove
local xOy=SCR.xOy
local FONT=FONT
local mStr=GC.mStr
local approach=MATH.expApproach
local downArrowIcon=GC.DO{40,25,{'fPoly',0,0,20,25,40,0}}
local upArrowIcon=GC.DO{40,25,{'fPoly',0,25,20,0,40,25}}
@@ -542,7 +543,7 @@ function slider:update(dt)
if ATV>0 then self.ATV=max(ATV-dt*30,0)end
end
if not self.hide then
self.pos=self.pos*.7+self.disp()*.3
self.pos=approach(self.pos,self.disp(),dt*26)
end
end
function slider:draw()