Skip to main content

AnimationGroupUtils

An animation group is a group of animations, such as the idle animations that Roblox plays. This utility functions are intended to help recreate a custom animation playback system with weighted values.

Types

WeightedAnimation

interface WeightedAnimation {
animationIdstring
weightnumber
}

WeightedTrack

interface WeightedTrack {
trackTrack
weightnumber
}

Functions

createdWeightedTracks

AnimationGroupUtils.createdWeightedTracks(
animatorOrHumanoidHumanoid | Animator,
weightedAnimationList{WeightedAnimation}
) → {WeightedTrack}

Creates a new weighted track list.

createdWeightedAnimation

AnimationGroupUtils.createdWeightedAnimation(
animationIdstring,
weightnumber
) → WeightedAnimation

Creates a new weighted animation.

createdWeightedTrack

AnimationGroupUtils.createdWeightedTrack(
trackTrack,
weightnumber
) → WeightedTrack

Creates a new weighted track.

selectFromWeightedTracks

AnimationGroupUtils.selectFromWeightedTracks(weightedTracks{WeightedTrack}) → WeightedTrack?

Picks a weighted track for playback.

Show raw api
{
    "functions": [
        {
            "name": "createdWeightedTracks",
            "desc": "Creates a new weighted track list.",
            "params": [
                {
                    "name": "animatorOrHumanoid",
                    "desc": "",
                    "lua_type": "Humanoid | Animator"
                },
                {
                    "name": "weightedAnimationList",
                    "desc": "",
                    "lua_type": "{ WeightedAnimation }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ WeightedTrack }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        },
        {
            "name": "createdWeightedAnimation",
            "desc": "Creates a new weighted animation.",
            "params": [
                {
                    "name": "animationId",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WeightedAnimation"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 59,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        },
        {
            "name": "createdWeightedTrack",
            "desc": "Creates a new weighted track.",
            "params": [
                {
                    "name": "track",
                    "desc": "",
                    "lua_type": "Track"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WeightedTrack"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 76,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        },
        {
            "name": "selectFromWeightedTracks",
            "desc": "Picks a weighted track for playback.",
            "params": [
                {
                    "name": "weightedTracks",
                    "desc": "",
                    "lua_type": "{ WeightedTrack }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WeightedTrack?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 92,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "WeightedAnimation",
            "desc": "",
            "fields": [
                {
                    "name": "animationId",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "weight",
                    "lua_type": "number",
                    "desc": ""
                }
            ],
            "source": {
                "line": 20,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        },
        {
            "name": "WeightedTrack",
            "desc": "",
            "fields": [
                {
                    "name": "track",
                    "lua_type": "Track",
                    "desc": ""
                },
                {
                    "name": "weight",
                    "lua_type": "number",
                    "desc": ""
                }
            ],
            "source": {
                "line": 27,
                "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
            }
        }
    ],
    "name": "AnimationGroupUtils",
    "desc": "An animation group is a group of animations, such as the idle animations that Roblox plays.\nThis utility functions are intended to help recreate a custom animation playback system with\nweighted values.",
    "source": {
        "line": 7,
        "path": "src/animationgroup/src/Shared/AnimationGroupUtils.lua"
    }
}