Skip to content

Declarations for flux, a fast, lightweight tweening library for Lua.

License

Notifications You must be signed in to change notification settings

maxiy01/tstl-flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TSTL Flux

Declarations for flux, a fast, lightweight tweening library for Lua.

Command Description
yarn add -D tstl-flux Install these declarations
yarn add rxi/flux Install flux

Upon installation these declarations can be linked to a tsconfig.json file.

{
    "compilerOptions": {
        "types": [
            "tstl-flux"
        ]
    }
}

And used within any .ts file.

import * as flux from "flux"

const R = 30;
let pos = {
    x: 0,
    y: 0
}

flux.to(pos, 4, {
    x: 100,
    y: 200
})


love.update = (dt: number) => {
    flux.update(dt);
}
love.draw = () => {
    love.graphics.circle('fill', pos.x, pos.y);
}

Make sure to append ";./node_modules/?/?.lua" to your package.path in a conf.ts file (this is run first) to assist where Lua looks for modules.

package.path += ";./node_modules/?/?.lua";

About

Declarations for flux, a fast, lightweight tweening library for Lua.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published