tstl-flux
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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";

Readme

Keywords

none

Package Sidebar

Install

npm i tstl-flux

Weekly Downloads

3

Version

0.0.2

License

ISC

Unpacked Size

9.76 kB

Total Files

4

Last publish

Collaborators

  • maxiy01