Lua
made by https://0x3d.site
GitHub - rxi/flux: A fast, lightweight tweening library for LuaA fast, lightweight tweening library for Lua. Contribute to rxi/flux development by creating an account on GitHub.
Visit Site
GitHub - rxi/flux: A fast, lightweight tweening library for Lua
flux
A fast, lightweight tweening library for Lua.
Installation
The flux.lua file should be dropped into an existing project and required by it.
flux = require "flux"
The flux.update()
function should be called at the start of each frame. As
its only argument It should be given the time in seconds that has passed since
the last call.
flux.update(deltatime)
Usage
Any number of numerical values in a table can be tweened simultaneously. Tweens
are started by using the flux.to()
function. This function requires 3
arguments:
obj
The object which contains the variables to tweentime
The amount of time the tween should take to completevars
A table where the keys correspond to the keys inobj
which should be tweened, and their values correspond to the destination
-- Moves the ball object to the position 200, 300 over 4 seconds
flux.to(ball, 4, { x = 200, y = 300 })
If you try to tween a variable which is already being tweened, the original tween stops tweening the variable and the new tween begins from the current value.
Additional options
Additional options when creating a tween can be set through the use of chained
functions provided by the tween object which flux.to()
returns.
flux.to(t, 4, { x = 10 }):ease("linear"):delay(1)
:ease(type)
The easing type which should be used by the tween; type
should be a string
containing the name of the easing to be used. The library provides the
following easing types:
linear
quadin
quadout
quadinout
cubicin
cubicout
cubicinout
quartin
quartout
quartinout
quintin
quintout
quintinout
expoin
expoout
expoinout
sinein
sineout
sineinout
circin
circout
circinout
backin
backout
backinout
elasticin
elasticout
elasticinout
The default easing type is quadout
. Examples of the different easing types
can be found here.
:delay(time)
The amount of time flux should wait before starting the tween; time
should be
a number of seconds. The default delay time is 0
.
:onstart(fn)
Sets the function fn
to be called when the tween starts (once the delay has
finished). :onstart()
can be called multiple times to add more than one
function.
:onupdate(fn)
Sets the function fn
to be called each frame the tween updates a value.
onupdate()
can be called multiple times to add more than one function.
:oncomplete(fn)
Sets the function fn
to be called once the tween has finished and reached its
destination values. oncomplete()
can be called multiple times to add more
than one function.
:after([obj,] time, vars)
Creates a new tween and chains it to the end of the existing tween; the chained
tween will be called after the original one has finished. Any additional
chained function used after :after()
will effect the chained tween. There is
no limit to how many times :after()
can be used in a chain, allowing the
creation of long tween sequences. If obj
is not specified the obj
argument
from the original tween is used.
-- Tweens t.x to 10 over 2 seconds, then to 20 over 1 second
flux.to(t, 2, { x = 10 }):after(t, 1, { x = 20 })
Stopping a tween
If you want the ability to stop a tween before it has finished, the tween should be assigned to a variable when it is created.
local tween = flux.to(x, 2, { y = 20 }):delay(1)
The tween can then be stopped at any point by calling its :stop()
method.
tween:stop()
This will cause the tween to immediatly be removed from its parent group and
will leave its tweened variables at their current values. The tween's
oncomplete()
callback is not called.
Groups
flux provides the ability to create tween groups; these are objects
which can have tweens added to them, and who are in charge of updating and
handling their contained tweens. A group is created by calling the
flux.group()
function.
group = flux.group()
Once a group is created it acts independently of the flux
object, and must
be updated each frame using its own update method.
group:update(deltatime)
To add a tween to a group, the group's to()
method should be used.
group:to(t, 3, { x = 10, y = 20 })
A good example of where groups are useful is for games where you may have a set
of tweens which effect objects in the game world and which you want to pause
when the game is paused. A group's tweens can be paused by simply neglecting
to call its update()
method; when a group is destroyed its tweens are also
destroyed.
License
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.
More Resourcesto explore the angular.
mail [email protected] to add your project or resources here 🔥.
- 1Torch | Scientific computing for LuaJIT.
http://torch.ch/
Torch is a scientific computing framework for LuaJIT.
- 2OpenResty
https://github.com/openresty
A Fast and Scalable Web Platform by Extending NGINX with LuaJIT. Commercial support is provided at https://openresty.com/ - OpenResty
- 3Build software better, together
https://github.com/fperrad/lua-MessagePack
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
- 4Concurrency oriented programming in Lua
https://github.com/lefcha/concurrentlua
Concurrency oriented programming in Lua. Contribute to lefcha/concurrentlua development by creating an account on GitHub.
- 5LPeg version 1.0 Parser in pure LuaJIT
https://github.com/sacek/LPegLJ
LPeg version 1.0 Parser in pure LuaJIT. Contribute to sacek/LPegLJ development by creating an account on GitHub.
- 6New maintainer at: https://github.com/lunarmodules/lualogging
https://github.com/Neopallium/lualogging
New maintainer at: https://github.com/lunarmodules/lualogging - Neopallium/lualogging
- 7Archives of the Kepler Project
https://github.com/keplerproject
Public Archives of various modules created by the Kepler Project from 2003 to 2009. For up-to-date Lua modules, check out LuaRocks and the Lunar Modules project - Archives of the Kepler Project
- 8JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible.
https://github.com/harningt/luajson
JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible. - harningt/luajson
- 9A lightweight, dependency-free library for binding Lua to C++
https://github.com/vinniefalco/LuaBridge
A lightweight, dependency-free library for binding Lua to C++ - vinniefalco/LuaBridge
- 10Free Cross-Platform 2D Game Engine
https://coronalabs.com/
Corona is a 2D engine lets you build games & apps for all major platforms including iOS, Android, Kindle, Apple TV, Android TV, macOS, and Windows. Get the free toolset!
- 11A copy of the Lua development repository, as seen by the Lua team. Mirrored irregularly. Please DO NOT send pull requests or any other stuff. All communication should be through the Lua mailing list https://www.lua.org/lua-l.html
https://github.com/lua/lua
A copy of the Lua development repository, as seen by the Lua team. Mirrored irregularly. Please DO NOT send pull requests or any other stuff. All communication should be through the Lua mailing lis...
- 12A lightweight JSON library for Lua
https://github.com/rxi/json.lua
A lightweight JSON library for Lua. Contribute to rxi/json.lua development by creating an account on GitHub.
- 13A Lua-based Build Tool
https://github.com/stevedonovan/Lake
A Lua-based Build Tool. Contribute to stevedonovan/Lake development by creating an account on GitHub.
- 14Feature-rich command line parser for Lua
https://github.com/mpeterv/argparse
Feature-rich command line parser for Lua. Contribute to mpeterv/argparse development by creating an account on GitHub.
- 15Lua code analysis, with plugins for HTML and SciTE
https://github.com/davidm/lua-inspect
Lua code analysis, with plugins for HTML and SciTE - davidm/lua-inspect
- 16Auto-swaps changed Lua files in a running LÖVE project
https://github.com/rxi/lurker
Auto-swaps changed Lua files in a running LÖVE project - rxi/lurker
- 17Remote debugger for Lua.
https://github.com/pkulchenko/MobDebug
Remote debugger for Lua. Contribute to pkulchenko/MobDebug development by creating an account on GitHub.
- 18Asynchronous logging library for Lua
https://github.com/moteus/lua-log
Asynchronous logging library for Lua. Contribute to moteus/lua-log development by creating an account on GitHub.
- 19luaproc is a concurrent programming library for Lua
https://github.com/askyrme/luaproc
luaproc is a concurrent programming library for Lua - askyrme/luaproc
- 20A redis client for lua
https://github.com/daurnimator/lredis
A redis client for lua. Contribute to daurnimator/lredis development by creating an account on GitHub.
- 21Lua Users Foundation
https://github.com/lua-users-foundation
Lua Users Foundation has 2 repositories available. Follow their code on GitHub.
- 22Date & Time module for Lua 5.x
https://github.com/Tieske/date
Date & Time module for Lua 5.x. Contribute to Tieske/date development by creating an account on GitHub.
- 23:rocket: Pegasus.lua is an http server to work with web applications written in Lua language.
https://github.com/EvandroLG/pegasus.lua
:rocket: Pegasus.lua is an http server to work with web applications written in Lua language. - EvandroLG/pegasus.lua
- 24A self contained Lua MessagePack C implementation.
https://github.com/antirez/lua-cmsgpack
A self contained Lua MessagePack C implementation. - antirez/lua-cmsgpack
- 25Automatically exported from code.google.com/p/llvm-lua
https://github.com/neopallium/llvm-lua
Automatically exported from code.google.com/p/llvm-lua - Neopallium/llvm-lua
- 26Fork of LuaCrypto, which enables encryption and decryption through OpenSSL
https://github.com/mkottman/luacrypto
Fork of LuaCrypto, which enables encryption and decryption through OpenSSL - mkottman/luacrypto
- 27A pure c# implementation of Lua 5.2 focus on compatibility with Unity
https://github.com/xebecnan/UniLua
A pure c# implementation of Lua 5.2 focus on compatibility with Unity - xebecnan/UniLua
- 28Digital Estate Planning: The Game
https://github.com/hawkthorne/hawkthorne-journey
Digital Estate Planning: The Game. Contribute to hawkthorne/hawkthorne-journey development by creating an account on GitHub.
- 29Lua CJSON is a fast JSON encoding/parsing module for Lua
https://github.com/mpx/lua-cjson/
Lua CJSON is a fast JSON encoding/parsing module for Lua - mpx/lua-cjson
- 30Go bindings for Lua C API - in progress
https://github.com/aarzilli/golua
Go bindings for Lua C API - in progress. Contribute to aarzilli/golua development by creating an account on GitHub.
- 31Lua binding to libzip.
https://github.com/brimworks/lua-zip
Lua binding to libzip. Contribute to brimworks/lua-zip development by creating an account on GitHub.
- 32SAX-like streaming XML parser for Lua
https://github.com/Phrogz/SLAXML
SAX-like streaming XML parser for Lua. Contribute to Phrogz/SLAXML development by creating an account on GitHub.
- 33Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 to 5.4.
https://github.com/LuaLanes/lanes
Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 to 5.4. - LuaLanes/lanes
- 34Utility library for functional programming in Lua
https://github.com/Yonaba/Moses
Utility library for functional programming in Lua - Yonaba/Moses
- 35Lua Fun is a high-performance functional programming library for Lua designed with LuaJIT's trace compiler in mind.
https://github.com/luafun/luafun
Lua Fun is a high-performance functional programming library for Lua designed with LuaJIT's trace compiler in mind. - luafun/luafun
- 36Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface.
https://github.com/jmckaskill/luaffi
Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface. - jmckaskill/luaffi
- 37StackTracePlus provides enhanced stack traces for Lua.
https://github.com/ignacio/StackTracePlus
StackTracePlus provides enhanced stack traces for Lua. - ignacio/StackTracePlus
- 38A lua-based Pac-Man clone.
https://github.com/tylerneylon/pacpac
A lua-based Pac-Man clone. Contribute to tylerneylon/pacpac development by creating an account on GitHub.
- 39ANSI terminal color manipulation for Lua.
https://github.com/kikito/ansicolors.lua
ANSI terminal color manipulation for Lua. Contribute to kikito/ansicolors.lua development by creating an account on GitHub.
- 40Embedded Lua templates
https://github.com/leafo/etlua
Embedded Lua templates. Contribute to leafo/etlua development by creating an account on GitHub.
- 41Reactive Extensions for Lua
https://github.com/bjornbytes/RxLua
Reactive Extensions for Lua. Contribute to bjornbytes/RxLua development by creating an account on GitHub.
- 42File system path manipulation library
https://github.com/moteus/lua-path
File system path manipulation library. Contribute to moteus/lua-path development by creating an account on GitHub.
- 43Lua binding to ZeroMQ
https://github.com/zeromq/lzmq
Lua binding to ZeroMQ. Contribute to zeromq/lzmq development by creating an account on GitHub.
- 44Lua bindings for POSIX APIs
https://github.com/luaposix/luaposix
Lua bindings for POSIX APIs. Contribute to luaposix/luaposix development by creating an account on GitHub.
- 45Lightweight Lua test framework
https://github.com/bjornbytes/lust
Lightweight Lua test framework. Contribute to bjornbytes/lust development by creating an account on GitHub.
- 46A tool for linting and static analysis of Lua code.
https://github.com/mpeterv/luacheck
A tool for linting and static analysis of Lua code. - GitHub - mpeterv/luacheck: A tool for linting and static analysis of Lua code.
- 47A fast, lightweight tweening library for Lua
https://github.com/rxi/flux
A fast, lightweight tweening library for Lua. Contribute to rxi/flux development by creating an account on GitHub.
- 48Fast, lightweight and easy-to-use pathfinding library for grid-based games
https://github.com/Yonaba/Jumper
Fast, lightweight and easy-to-use pathfinding library for grid-based games - Yonaba/Jumper
- 49Opinionated Lua RabbitMQ client library for the ngx_lua apps based on the cosocket API
https://github.com/wingify/lua-resty-rabbitmqstomp
Opinionated Lua RabbitMQ client library for the ngx_lua apps based on the cosocket API - wingify/lua-resty-rabbitmqstomp
- 50Build a standalone executable from a Lua program.
https://github.com/ers35/luastatic
Build a standalone executable from a Lua program. Contribute to ers35/luastatic development by creating an account on GitHub.
- 51Human-readable representation of Lua tables
https://github.com/kikito/inspect.lua
Human-readable representation of Lua tables. Contribute to kikito/inspect.lua development by creating an account on GitHub.
- 52Lexing & Syntax Highlighting in Lua (using LPeg)
https://github.com/xolox/lua-lxsh
Lexing & Syntax Highlighting in Lua (using LPeg). Contribute to xolox/lua-lxsh development by creating an account on GitHub.
- 53Pure Lua Cassandra client using CQL binary protocol
https://github.com/jbochi/lua-resty-cassandra
Pure Lua Cassandra client using CQL binary protocol - jbochi/lua-resty-cassandra
- 5430 lines library for object orientation in Lua
https://github.com/Yonaba/30log
30 lines library for object orientation in Lua. Contribute to Yonaba/30log development by creating an account on GitHub.
- 55LibYAML binding for Lua.
https://github.com/gvvaughan/lyaml
LibYAML binding for Lua. Contribute to gvvaughan/lyaml development by creating an account on GitHub.
- 56A very complete i18n lib for Lua
https://github.com/kikito/i18n.lua
A very complete i18n lib for Lua. Contribute to kikito/i18n.lua development by creating an account on GitHub.
- 57A Lua 5.3 parser written with LPegLabel
https://github.com/andremm/lua-parser
A Lua 5.3 parser written with LPegLabel. Contribute to andremm/lua-parser development by creating an account on GitHub.
- 58A Lua MVC Web Framework.
https://github.com/sailorproject/sailor
A Lua MVC Web Framework. Contribute to sailorproject/sailor development by creating an account on GitHub.
- 59Intellisense and Linting for Lua in VSCode
https://github.com/trixnz/vscode-lua
Intellisense and Linting for Lua in VSCode. Contribute to trixnz/vscode-lua development by creating an account on GitHub.
- 60Lua binding to libcurl
https://github.com/Lua-cURL/Lua-cURLv3
Lua binding to libcurl. Contribute to Lua-cURL/Lua-cURLv3 development by creating an account on GitHub.
- 61Time, Date and Timezone library for lua
https://github.com/daurnimator/luatz
Time, Date and Timezone library for lua. Contribute to daurnimator/luatz development by creating an account on GitHub.
- 62Lua library for conversion between markup formats
https://github.com/jgm/lunamark
Lua library for conversion between markup formats. Contribute to jgm/lunamark development by creating an account on GitHub.
- 63Nginx image processing server with OpenResty and Lua
http://leafo.net/posts/creating_an_image_server.html
Today I'll be showing you how to create a fast on the fly image processing server. The whole system can be created in less than 100 lines of code. We'll be using OpenResty , an enhanced distribution of Nginx. We'll also need to write a...
- 64ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
https://gist.github.com/perky/2838755
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns. - ProFi.lua
- 65Batteries included Lua
https://github.com/tongson/omnia
Batteries included Lua. Contribute to tongson/omnia development by creating an account on GitHub.
- 66An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
https://github.com/koreader/koreader
An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices - koreader/koreader
- 67Tweening/Easing/Interpolating functions for lua. Inspired on jQuery's animate method.
https://github.com/kikito/tween.lua
Tweening/Easing/Interpolating functions for lua. Inspired on jQuery's animate method. - kikito/tween.lua
- 68Lua redis client driver for the ngx_lua based on the cosocket API
https://github.com/openresty/lua-resty-redis
Lua redis client driver for the ngx_lua based on the cosocket API - openresty/lua-resty-redis
- 69Technews.fr - High Tech, Tests, et Tutos
http://www.luteus.biz/Download/LoriotPro_Doc/LUA/LUA_For_Windows/lanes/comparison.html
Technews.fr est un blog High Tech avec des tests, des avis ou encore des tutos branché innovation et objets connectés. La technologie est le fil conducteur de tous les articles et l’œil critique est de rigueur.
- 70Lua string hashing library, useful for internationalization
https://github.com/Olivine-Labs/say
Lua string hashing library, useful for internationalization - lunarmodules/say
- 71An interpreter for the Lua language, written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms, including handy remote debugger facilities.
https://github.com/xanathar/moonsharp
An interpreter for the Lua language, written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms, including handy remote debugger facilities. - moonsharp-devs/moonsharp
- 72Network support for the Lua language
https://github.com/diegonehab/luasocket
Network support for the Lua language. Contribute to lunarmodules/luasocket development by creating an account on GitHub.
- 73A command-line argument parsing module for Lua.
https://github.com/amireh/lua_cliargs
A command-line argument parsing module for Lua. Contribute to lunarmodules/lua_cliargs development by creating an account on GitHub.
- 74A set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.
https://github.com/stevedonovan/Penlight
A set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management....
- 75Lua HTTP client cosocket driver for OpenResty / ngx_lua.
https://github.com/pintsized/lua-resty-http
Lua HTTP client cosocket driver for OpenResty / ngx_lua. - ledgetech/lua-resty-http
- 76Assertion library for Lua
https://github.com/Olivine-Labs/luassert
Assertion library for Lua. Contribute to lunarmodules/luassert development by creating an account on GitHub.
- 77An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
https://github.com/pintsized/ledge
An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis - ledgetech/ledge
Related Articlesto learn about angular.
- 1Getting Started with Lua: Beginner's Guide to Scripting
- 2Understanding Lua Tables: Heart of Lua Programming
- 3Game Development with Lua: Building Your First 2D Game
- 4Using Lua for Scripting in Game Engines: Roblox and Corona SDK
- 5Embedding Lua in C/C++ Applications: A Step-by-Step Guide
- 6Building Extensible Software with Lua: Adding Scripting Capabilities to Existing Apps
- 7Optimizing Lua Scripts: Techniques for Speed and Efficiency
- 8Memory Management in Lua: Avoiding Common Pitfalls
- 9Top Lua Libraries for Game Development, Web, and Scripting
- 10Building Web Applications with Lua: OpenResty
FAQ'sto learn more about Angular JS.
mail [email protected] to add more queries here 🔍.
- 1
how popular is lua programming language
- 2
what kind of programming language is lua
- 3
what type of programming language is lua
- 4
are lua and python similar
- 5
what is lua coding used for
- 6
how to make a programming language in lua
- 7
how to code lua
- 8
are lua and javascript similar
- 9
when was lua created
- 10
is lua a programming language
- 11
who created lua programming language
- 12
- 13
what can you do with lua programming
- 14
what is lua programming
- 15
how long does it take to learn lua scripting
- 16
is lua a coding language
- 17
what is lua programming language
- 18
should i learn lua or python
- 19
should i learn lua
- 20
where to learn lua coding
- 21
can lua files be dangerous
- 22
when was lua made
- 23
is roblox lua object oriented programming
- 24
when was lua invented
- 25
does lua compile
- 26
what programming language is similar to lua
- 27
who invented lua
- 28
why use lua programming language
- 29
how hard is lua programming
- 30
can lua be compiled
- 32
what is the lua programming language
- 33
where to learn lua for free
- 34
where can i learn lua
- 35
where is lua programming language used
- 36
is lua programming language
- 38
can lua be used for hacking
- 39
how to learn lua programming
- 40
what does lua stand for programming
- 41
how to learn lua programming language
- 42
what is the lua programming language used for
- 43
is lua the best programming language
- 44
who made lua language
- 45
why is lua used
- 47
what is lua programming language used for
- 48
who created lua
- 49
how long does it take to learn lua coding
- 50
is lua a good programming language
- 51
where is lua used
- 52
why is lua used in games
- 53
what can lua be used for
- 54
how to pronounce lua programming language
- 55
what is lua programming used for
- 56
is lua the easiest programming language
- 57
can lua be used for web development
- 58
was lua created by roblox
- 59
what programming language is lua based on
More Sitesto check out once you're finished browsing here.
https://www.0x3d.site/
0x3d is designed for aggregating information.
https://nodejs.0x3d.site/
NodeJS Online Directory
https://cross-platform.0x3d.site/
Cross Platform Online Directory
https://open-source.0x3d.site/
Open Source Online Directory
https://analytics.0x3d.site/
Analytics Online Directory
https://javascript.0x3d.site/
JavaScript Online Directory
https://golang.0x3d.site/
GoLang Online Directory
https://python.0x3d.site/
Python Online Directory
https://swift.0x3d.site/
Swift Online Directory
https://rust.0x3d.site/
Rust Online Directory
https://scala.0x3d.site/
Scala Online Directory
https://ruby.0x3d.site/
Ruby Online Directory
https://clojure.0x3d.site/
Clojure Online Directory
https://elixir.0x3d.site/
Elixir Online Directory
https://elm.0x3d.site/
Elm Online Directory
https://lua.0x3d.site/
Lua Online Directory
https://c-programming.0x3d.site/
C Programming Online Directory
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
https://r-programming.0x3d.site/
R Programming Online Directory
https://perl.0x3d.site/
Perl Online Directory
https://java.0x3d.site/
Java Online Directory
https://kotlin.0x3d.site/
Kotlin Online Directory
https://php.0x3d.site/
PHP Online Directory
https://react.0x3d.site/
React JS Online Directory
https://angular.0x3d.site/
Angular JS Online Directory