Difference between revisions of "Flux"

Line 5: Line 5:
  
 
Flux allows the user to easily interpolate a numerical value field of an object between its current value to a new value over a specified duration, using a specified easing type. If you want to do something like fade a sprite in or out, slide something onto the screen, gradually enlarge something or fade something from one color to another, Flux provides a means of doing this with a single function call.
 
Flux allows the user to easily interpolate a numerical value field of an object between its current value to a new value over a specified duration, using a specified easing type. If you want to do something like fade a sprite in or out, slide something onto the screen, gradually enlarge something or fade something from one color to another, Flux provides a means of doing this with a single function call.
 +
 +
<source lang=lua>
 +
-- Moves the ball object to the position 200, 300 over 4 seconds
 +
flux.to(ball, 4, { x = 200, y = 300 })
 +
</source>
  
 
Check out the [https://github.com/rxi/flux/blob/master/README.md README] for instructions on setting up and using Flux in your projects. The github page for Flux is [https://github.com/rxi/flux/ over here].
 
Check out the [https://github.com/rxi/flux/blob/master/README.md README] for instructions on setting up and using Flux in your projects. The github page for Flux is [https://github.com/rxi/flux/ over here].
  
  
'''Links'''
+
===Links===
 +
* [https://github.com/rxi/flux/blob/master/flux.lua?raw=1 flux.lua]
 
* [https://github.com/rxi/flux/ Github]
 
* [https://github.com/rxi/flux/ Github]
 
* [https://github.com/rxi/flux/blob/master/README.md Readme]
 
* [https://github.com/rxi/flux/blob/master/README.md Readme]

Revision as of 07:36, 15 May 2014


Flux is a fast, lightweight tweening library for lua.

Flux allows the user to easily interpolate a numerical value field of an object between its current value to a new value over a specified duration, using a specified easing type. If you want to do something like fade a sprite in or out, slide something onto the screen, gradually enlarge something or fade something from one color to another, Flux provides a means of doing this with a single function call.

-- Moves the ball object to the position 200, 300 over 4 seconds
flux.to(ball, 4, { x = 200, y = 300 })

Check out the README for instructions on setting up and using Flux in your projects. The github page for Flux is over here.


Links