Show raw api
{
"functions": [
{
"name": "weldModel",
"desc": "Welds all descendant parts to the primary part.\n\nThis requires the model to have a PrimaryPart set.",
"params": [
{
"name": "model",
"desc": "The model to prepare",
"lua_type": "Model"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 88,
"path": "src/Animation/init.luau"
}
},
{
"name": "setDefaultConfig",
"desc": "Sets the default animation configuration.",
"params": [
{
"name": "config",
"desc": "The default animation configuration",
"lua_type": "AnimationConfig"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 108,
"path": "src/Animation/init.luau"
}
},
{
"name": "promise",
"desc": "Animates an instance and returns a promise.",
"params": [
{
"name": "config",
"desc": "The animation configuration",
"lua_type": "AnimationConfig"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise.Promise"
}
],
"function_type": "static",
"source": {
"line": 123,
"path": "src/Animation/init.luau"
}
},
{
"name": "play",
"desc": "Animates an instance.",
"params": [
{
"name": "config",
"desc": "The animation configuration",
"lua_type": "AnimationConfig"
}
],
"returns": [
{
"desc": "The tween instance",
"lua_type": "Tween"
}
],
"function_type": "static",
"source": {
"line": 145,
"path": "src/Animation/init.luau"
}
},
{
"name": "promiseAll",
"desc": "Animates multiple instances and returns a promise.",
"params": [
{
"name": "instances",
"desc": "The instances to animate",
"lua_type": "{ Instance }"
},
{
"name": "config",
"desc": "The animation configuration",
"lua_type": "AnimationConfig"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise.Promise"
}
],
"function_type": "static",
"source": {
"line": 162,
"path": "src/Animation/init.luau"
}
},
{
"name": "new",
"desc": "Constructs a tween",
"params": [
{
"name": "config",
"desc": "The animation configuration",
"lua_type": "AnimationConfig"
}
],
"returns": [
{
"desc": "The tween instance",
"lua_type": "Tween"
}
],
"function_type": "static",
"source": {
"line": 184,
"path": "src/Animation/init.luau"
}
}
],
"properties": [
{
"name": "defaultConfig",
"desc": "The default animation configuration.\n\nExample:\n```lua\nAnimation.setDefaultConfig({\n\ttweenInfo = TweenInfo.new(1),\n\tstart = {\n\t\tTransparency = 1\n\t},\n\tgoal = {\n\t\tTransparency = 0\n\t}\n})\n\nAnimation.weldModel(model)\n\n-- Animate the model\nAnimation.animate({\n\tsource = model.PrimaryPart,\n})\n```",
"lua_type": "AnimationConfig",
"source": {
"line": 48,
"path": "src/Animation/init.luau"
}
}
],
"types": [
{
"name": "AnimationConfig",
"desc": "Animation configuration.\n\nWarning: setting loop, reverse, or delay will overwrite tweenInfo if it's defined.",
"fields": [
{
"name": "source",
"lua_type": "Instance",
"desc": "The instance to animate"
},
{
"name": "start",
"lua_type": "{ [string]: any }?",
"desc": "Starting properties (this will overwrite the current properties)"
},
{
"name": "goal",
"lua_type": "{ [string]: any }",
"desc": "Properties to animate to"
},
{
"name": "tweenInfo",
"lua_type": "TweenInfo?",
"desc": "TweenInfo for the animation"
},
{
"name": "frameCallback",
"lua_type": "() -> ()?",
"desc": "Callback that runs on each RunService step"
},
{
"name": "stopped",
"lua_type": "(Enum.PlaybackState) -> ()?",
"desc": "Callback for when the animation is stopped"
},
{
"name": "await",
"lua_type": "boolean?",
"desc": "Wait for the animation to complete"
},
{
"name": "loop",
"lua_type": "number?",
"desc": "Times to loop the animation"
},
{
"name": "reverse",
"lua_type": "boolean?",
"desc": "Reverse the animation after it's done"
},
{
"name": "delay",
"lua_type": "number?",
"desc": "Delay before starting the animation"
}
],
"source": {
"line": 68,
"path": "src/Animation/init.luau"
}
}
],
"name": "Animation",
"desc": "Animation library for animating instances.\n\nInstall with wally by adding the following to your `wally.toml`:\n```toml\nAnimation = \"dig1t/animation@1.0.8\"\n```",
"source": {
"line": 20,
"path": "src/Animation/init.luau"
}
}