Skip to content

Neovim plugin that animates the change in a value for use in animations.

Notifications You must be signed in to change notification settings

RRethy/nvim-animator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

nvim-animator

Usage

Print values 0 to 1000 to maintain 30fps over 5000ms.

local value_animator = require('value_animator')
local anim = value_animator:new()
-- anim:animate(start_val, finish_val, duration_ms, callback)
anim:animate(0, 1000, 5000, function(val)
    print(val)
end)

Output:

6.6
13.2                                                                                                                
19.8                                                                                                                
26.4                                                                                                                
33                                                                                                                  
39.6                                                                                                                
46.2                                                                                                                
52.8                                                                                                                
59.4                                                                                                                
66                                                                                                                  
72.6                                                                                                                
79.2                                                                                                                
85.8                                                                                                                
92.4                                                                                                                
99                                                                                                                  
105.6                                                                                                               
112.2                                                                                                               
118.8                                                                                                               
125.4
...

About

Neovim plugin that animates the change in a value for use in animations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages