{"id":"grunionnn/animationmanager","name":"animationmanager","scope":"grunionnn","platform":"roblox","description":"A lightweight Roblox animation manager for Wally that handles loading, unloading, playback, preloading, markers, and cleanup for animation sets and individual animations","version":"1.0.4","latest":"1.0.4","versions":["1.0.2","1.0.3","1.0.4"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{"stravant/goodsignal":{"version":"^0.3.1","alias":"GoodSignal"},"grunionnn/networker":{"version":"^0.3.1","alias":"Networker"},"sleitnick/trove":{"version":"^1.8.0","alias":"Trove"}},"integrity":"523abfd8be816a258c4ab2f71f6ff42046d2ba509e3590c23818590235be68d1","likes":0,"downloads":0,"install":"forest install grunionnn/animationmanager","url":"https://forest.dev/p/roblox/grunionnn/animationmanager","files":"https://api.forest.dev/ai/package/roblox/grunionnn/animationmanager/files","readme":"# AnimationManager\r\n\r\nA lightweight Roblox animation manager that supports dynamic loading, unloading, playback, preloading, animation markers, and automatic cleanup for animation sets and individual animations.\r\n\r\n## Features\r\n\r\n* Dynamic animation set loading\r\n* Individual animation loading and unloading\r\n* Animation preloading\r\n* Simple playback API\r\n* Marker reached callbacks\r\n* Track stopped callbacks\r\n* Automatic cleanup with Trove\r\n* Local player manager support\r\n* Runtime animation swapping\r\n\r\n## Installation\r\n\r\nAdd the package to your `wally.toml`:\r\n\r\n```toml\r\nAnimationManager = \"grunion/animationmanager@version\"\r\n```\r\n\r\nThen install your dependencies:\r\n\r\n```sh\r\nwally install\r\n```\r\n\r\n## Basic Usage\r\n\r\n```lua\r\nlocal AnimationManager = require(Packages.AnimationManager)\r\n\r\nlocal manager = AnimationManager.new(character)\r\n\r\nmanager:LoadAnimations(\"Combat\")\r\nmanager:Play(\"Idle\")\r\n```\r\n\r\n## Remote Animation Events\r\n\r\nThis package uses a remote named `AnimationEvent` so the server can tell a client to play or stop specific animations.\r\n\r\nThis is mainly useful for PvP/server-authoritative combat. For example, if the server detects that a player was stunned, it can tell that player’s client to play the stun animation without requiring animation managers to also exist on the server.\r\n\r\nThis keeps animation tracks client-sided and avoids forcing the server to load animations it does not need.\r\n\r\nThe animation event NEEDS to be made before this can function, all you need to do is either use networker on the server to make it quickly or just manually make the remote in studio itself.\r\n\r\n## API\r\n\r\n### Constructor\r\n\r\n```lua\r\nAnimationManager.new(character)\r\n```\r\n\r\nCreates a new animation manager for a character.\r\n\r\n### Loading\r\n\r\n```lua\r\nmanager:LoadCore()\r\nmanager:LoadAnimations(setName)\r\nmanager:LoadIndividualAnimation(name)\r\nmanager:Preload()\r\n```\r\n\r\n### Playback\r\n\r\n```lua\r\nmanager:Play(name, fadeTime?)\r\nmanager:Stop(name, fadeTime?)\r\nmanager:StopAll(fadeTime?)\r\nmanager:AdjustSpeed(name, speed)\r\nmanager:IsPlaying(name)\r\nmanager:GetLength(name)\r\n```\r\n\r\n### Unloading\r\n\r\n```lua\r\nmanager:UnloadAll()\r\nmanager:UnloadNormalTracks()\r\nmanager:UnloadIndividualTracks()\r\nmanager:UnloadAnimation(name)\r\n```\r\n\r\n### Information\r\n\r\n```lua\r\nmanager:GetCurrentSet()\r\nmanager:IsSet(setName)\r\nmanager:GetCurrentPlayingAnimations()\r\n```\r\n\r\n### Events\r\n\r\n```lua\r\nmanager:OnSetChanged(callback)\r\nmanager:OnTrackStopped(name, callback)\r\nmanager:MarkerReached(animationName, markerName, callback)\r\n```\r\n\r\n### Cleanup\r\n\r\n```lua\r\nmanager:Destroy()\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n","readmeTruncated":false}