Animation - NoodleExtensionsCommunity/How-to-Noodle GitHub Wiki

Animation

When we are animating one object we use something called _animation. Animation happens over the course of the object's lifetime. We can affect it with any type of animation we want.

While I did say not to use the node editor, this is a case where using it will be a lot better than writing some code to affect only 1 block. If you still haven't looked at how to use it, read that here.

ALL ANIMATION PROPERTIES CAN BE FOUND HERE!

Examples of animation

Node editor

{
  "_time" : 53,
  "_lineIndex" : 2,
  "_lineLayer" : 0,
  "_type" : 1,
  "_cutDirection" : 8,
  "_customData" : {
    "_noteJumpStartBeatOffset" : 5,
    "_animation" : {
      "_position" : [
        [0, 100, 0, 0],
        [0, 0, 0, 0.45, "easeOutBounce"]
      ],
      "_dissolve" : [
        [0, 0.05],
        [1, 0.1]
      ],
      "_dissolveArrow" : [
        [0, 0.05],
        [1, 0.1]
      ]
    }
  }
}

This is a note's JSON. The _animation property always comes last and the animation time is the note's lifetime.

Animation in a script

If you read the guide from the start you already know that you can use _animation in functions so I won't be explaining how to do that in this part too. If you haven't read it yet though, I advise you to read up on functions, they are quite the lifesavers.

Animation using the object spawners

In object spawners we are basically just writing out the full JSON of an object, so the same logic applies as with the node editor.