AnimationGroup is an attempt to port animations available in the API of retail World of Warcraft to 1.12.
OmniCC in retail uses animations and the following shows a 1.12 backport – with animations!
To embed the library into your AddOn, extract the release archive (available at
the releases branch) to libs/AnimationGroup
-or- checkout the desired tag with
git (and make sure to initialize submodules unless you embed dependencies
yourself):
git submodule add https://github.com/martinjlowm/AnimationGroup.git libs/AnimationGroup
cd libs/AnimationGroup
git tag # Note tag
git checkout [DESIRED TAG] # e.g. 1.0a
Make sure you have embedded LibStub, Classy-1.0 and Sol, otherwise add
libs\AnimationGroup\libs\LibStub\LibStub.lua
,
libs\AnimationGroup\libs\Classy-1.0\Classy-1.0.lua
,
libs\AnimationGroup\libs\Sol\Sol.lua
to your AddOn’s .toc file followed by
libs\AnimationGroup\AnimationGroup.xml
before your main files.
This library hooks into frames created by CreateFrame
and adds animation
routines to the created frame. All API calls mimic those of the retail
implementation.
Refer to http://wowwiki.wikia.com/wiki/Widget_API for the API or take a look at
the tests.lua
file for some examples.
Animations are performed using the `OnUpdate’ handler and will never perform as well as the retail World of Warcraft implementation. This library will impact your frame rate slightly and the performance loss is proportional to the number of concurrent animations.
I’ve tried to keep the `OnUpdate’ handlers as small as possible and with as little overhead as possible.
- Simplify callback notification system for animations and groups
- Make as many things private (local functions) that are not meant to be public e.g. `__’-prefixed functions
- Nest object fields into an `AnimationGroup’-namespace to avoid conflicts with other AddOns
Copyright (c) 2016-2018 by Martin Jesper Low Madsen.
AnimationGroup is licensed under the MIT License, see the LICENSE file for more information.