Skip to content

Commit

Permalink
Make visualizer smooth and slightly more on sync
Browse files Browse the repository at this point in the history
by delaying the animation ...
  • Loading branch information
poco0317 committed Feb 15, 2019
1 parent 4ac9bce commit 9be3fa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Themes/_fallback/Scripts/10 AudioVisualizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function audioVisualizer:new(params)
CurrentSongChangedMessageCommand = function(self)
self:RunCommandsOnChildren(
function(self)
self:zoomtoheight(0)
self:finishtweening():smooth(0.3):zoomtoheight(0)
end
)
end
Expand All @@ -123,12 +123,12 @@ function audioVisualizer:new(params)
local maxHeight = (params.maxHeight or 120) - minHeight
if params.onBarUpdate then
frame.updater = params.barUpdater or function(actor, value)
actor:zoomtoheight(minHeight + value * maxHeight)
actor:hurrytweening(0.15):smooth(0.22):zoomtoheight(minHeight + value * maxHeight)
params.onBarUpdate(actor, value)
end
else
frame.updater = params.barUpdater or function(actor, value)
actor:zoomtoheight(minHeight + value * maxHeight)
actor:hurrytweening(0.15):smooth(0.22):zoomtoheight(minHeight + value * maxHeight)
end
end
end
Expand Down

0 comments on commit 9be3fa5

Please sign in to comment.