Skip to main content

CubicTweenUtils

Utility functions to do a cubic spline. Don't use this directly.

Functions

getConstants

CubicTweenUtils.getConstants(
lnumber,
tnumber
) → (
number,--

a0

number,--

a1

number,--

a2

number--

a3

)

Constants to be multiplied as p0a0 + v0a1 + p1a2 + v1a3

getDerivativeConstants

CubicTweenUtils.getDerivativeConstants(
lnumber,
tnumber
) → (
number,--

a0

number,--

a1

number,--

a2

number--

a3

)

applyConstants

CubicTweenUtils.applyConstants(
c0number,
c1number,
c2number,
c3number,
aT,
uT,
bT,
vT
) → T

Applies the constants for the given nodes

tween

CubicTweenUtils.tween(
aT,
uT,
bT,
vT,
lnumber,
tnumber
) → T

Tweens betweeen nodes

getAcceleration

CubicTweenUtils.getAcceleration(
aT,
uT,
bT,
vT,
lnumber
) → T

Computes acceleration

Show raw api
{
    "functions": [
        {
            "name": "getConstants",
            "desc": "Constants to be multiplied as p0*a0 + v0*a1 + p1*a2 + v1*a3",
            "params": [
                {
                    "name": "l",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "a0",
                    "lua_type": "number"
                },
                {
                    "desc": "a1",
                    "lua_type": "number"
                },
                {
                    "desc": "a2",
                    "lua_type": "number"
                },
                {
                    "desc": "a3",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
            }
        },
        {
            "name": "getDerivativeConstants",
            "desc": "",
            "params": [
                {
                    "name": "l",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "a0",
                    "lua_type": "number"
                },
                {
                    "desc": "a1",
                    "lua_type": "number"
                },
                {
                    "desc": "a2",
                    "lua_type": "number"
                },
                {
                    "desc": "a3",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 35,
                "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
            }
        },
        {
            "name": "applyConstants",
            "desc": "Applies the constants for the given nodes",
            "params": [
                {
                    "name": "c0",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "c1",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "c2",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "c3",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "a",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "u",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "b",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "v",
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 57,
                "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
            }
        },
        {
            "name": "tween",
            "desc": "Tweens betweeen nodes",
            "params": [
                {
                    "name": "a",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "u",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "b",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "v",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "l",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 71,
                "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
            }
        },
        {
            "name": "getAcceleration",
            "desc": "Computes acceleration",
            "params": [
                {
                    "name": "a",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "u",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "b",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "v",
                    "desc": "",
                    "lua_type": "T"
                },
                {
                    "name": "l",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 86,
                "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CubicTweenUtils",
    "desc": "Utility functions to do a cubic spline. Don't use this directly.",
    "source": {
        "line": 5,
        "path": "src/cubicspline/src/Shared/CubicTweenUtils.lua"
    }
}