How To Scroll Up And Down In A Animation

Sometimes, code is too long to fit in one go. Adding scrolling animations is a simple way to overcome this limitation:

{
    "type": "add",
    "lines": "line 1\nline 2\nline 3",
    "start": "0",
    "end": "1"
},
{
    "type": "scroll",
    "offset": "10",
    "start": "1",
    "end": "2"
},

In this example, we scroll the scene 10 lines down.

You can also scroll up using negative integers:

{
    "type": "scroll",
    "offset": "-10",
    "start": "2",
    "end": "3"
}