Skip to main content

LerpedPointsCFrameTrack

CFrames with a set "length" lerped linearly. Implemented this way as it is recommended you use the recorder api to tween instead of the track.

Properties

hasher

LerpedPointsCFrameTrack.hasher: TrackDataHasher

length

LerpedPointsCFrameTrack.length: number

isCircuited

LerpedPointsCFrameTrack.isCircuited: boolean

circuitRemainder

LerpedPointsCFrameTrack.circuitRemainder: number

lengthWithoutCircuitRemainder

LerpedPointsCFrameTrack.lengthWithoutCircuitRemainder: boolean

Functions

new

Constructor
LerpedPointsCFrameTrack.new(
points{PointData},
hashIntervalnumber?,--

see TrackDataHasher for default

isCircuitedboolean?--

defaults to false

) → LerpedPointsCFrameTrack

Types

interface PointData {
cframeCFrame--

CFrame position

lengthnumber--

Length of this keyframe in seconds

}

Default constructor

fromInstance

Constructor
LerpedPointsCFrameTrack.fromInstance(instanceInstance) → Result<LerpedPointsCFrameTrack,string>

Creates from an Instance

Children

{
	Points: PointsInstance<PointData>, // see PointsUtil and PointData for more info
	HashInterval: NumberValue,
	IsCircuited: BoolValue,
}

PointData

{
	Length: NumberValue, // .Value must be greater than `0`
	CFrame: CFrameInstance,
}

getDataFromModel

LerpedPointsCFrameTrack.getDataFromModel(instanceInstance) → Result<LerpedPointsData,string>

Static

getCFrame

override
LerpedPointsCFrameTrack:getCFrame(positionnumber) → CFrame

Gets CFrame from position

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Default constructor",
            "params": [
                {
                    "name": "points",
                    "desc": "",
                    "lua_type": "{PointData}"
                },
                {
                    "name": "hashInterval",
                    "desc": "see TrackDataHasher for default",
                    "lua_type": "number?"
                },
                {
                    "name": "isCircuited",
                    "desc": "defaults to `false`",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "LerpedPointsCFrameTrack"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 94,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "fromInstance",
            "desc": "Creates from an Instance\n### Children\n```ts\n{\n\tPoints: PointsInstance<PointData>, // see PointsUtil and PointData for more info\n\tHashInterval: NumberValue,\n\tIsCircuited: BoolValue,\n}\n```\n### PointData\n```ts\n{\n\tLength: NumberValue, // .Value must be greater than `0`\n\tCFrame: CFrameInstance,\n}\n```",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Result<LerpedPointsCFrameTrack, string>"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 148,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "getDataFromModel",
            "desc": "Static",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Result<LerpedPointsData, string>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 185,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "getCFrame",
            "desc": "Gets CFrame from position",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CFrame"
                }
            ],
            "function_type": "method",
            "tags": [
                "override"
            ],
            "source": {
                "line": 246,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "hasher",
            "desc": "",
            "lua_type": "TrackDataHasher",
            "source": {
                "line": 71,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "length",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 74,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "isCircuited",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 77,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "circuitRemainder",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 80,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        },
        {
            "name": "lengthWithoutCircuitRemainder",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 83,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        }
    ],
    "types": [
        {
            "name": "PointData",
            "desc": "",
            "fields": [
                {
                    "name": "cframe",
                    "lua_type": "CFrame",
                    "desc": "CFrame position"
                },
                {
                    "name": "length",
                    "lua_type": "number",
                    "desc": "Length of this keyframe in seconds"
                }
            ],
            "source": {
                "line": 27,
                "path": "src/shared/cframeTrack/LerpedPoints.lua"
            }
        }
    ],
    "name": "LerpedPointsCFrameTrack",
    "desc": "CFrames with a set \"length\" lerped linearly.\nImplemented this way as it is recommended you use the recorder api to tween instead of the track.",
    "source": {
        "line": 68,
        "path": "src/shared/cframeTrack/LerpedPoints.lua"
    }
}