Once activated, the addon will add the Anima singleton class to your project.

Custom nodes

Anima provides those two additional nodes:

  • AnimaNode, used to handle the setup of all the animations supported by the addon
  • AnimaTween, is the custom Tween used that allows the magic to happen :)

Syntax

Reference

begin

This method is used to programmatically add the AnimaNode to the scene as a child of the specified node one. It will return the AnimaNode added attached to the specified node.

Syntax

  begin(node: Node, animation_name = 'Anima', is_single_shot := false) -> AnimaNode:
  
ParameterTypeDefaultDescription
nodeNodeThe node where to attache the AnimaNode generated during the process
animation_nameStringAnima(optional) The animation name.
is_single_shotboolfalse(optional) If true automatically frees the AnimaNode created by the scene once the animation completes

NOTE: Anytime this method is called Anima will check if an AnimaNode already exists with the given name and, if not, creates one. So, calling begin multiple times using the same name will result in reusing the same AnimaNode over and over.

The node created is not freed by default once an animation has completed unless is_singl_shot is set to true.

Example

  var anima: AnimaNode = Anima.begin(self)
var anima: AnimaNode = Anima.begin(self, 'my cool animation')
var anima: AnimaNode = Anima.begin(self, 'my cool animation', true)
  

begin_single_shot

This method is syntax sugar for the begin one automatically sets is_single_shot to true.

Syntax

  begin(node: Node, animation_name = 'Anima') -> AnimaNode:
  
ParameterTypeDefaultDescription
nodeNodeThe node where to attache the AnimaNode generated during the process
animation_nameStringAnima(optional) The animation name.

Example

  var anima: AnimaNode = Anima.begin(self, 'my cool animation')
var anima: AnimaNode = Anima.begin(self)