Animations
An animation is a page with an animation: section and keyframes. Make one in the
editor (Make animation, then the + buttons on the timeline) or by hand:
animation:
length: 40 # ticks (20 = 1 second)
elements:
black:
type: box
anchor: center
x: -2040
width: 4080
height: 1080
color: "#000000"
keyframes:
- {t: 0, opacity: 0}
- {t: 10, opacity: 100, ease: in} # linear, in, out, in-out, step
- {t: 40, opacity: 0}
Playing animations
- Command:
/novaui play <animation> [player|all]and/novaui stop <animation> [player|all]. - API:
NovaUIAPI.play(player, "anim_fade", () -> ...)runs your code when it ends. - Automatically, in
config.yml:animations.on-join,on-teleport,on-world-change(teleport-min-distanceskips short teleports).
The shipped animations are anim_teleport, anim_title (also /welcome) and anim_fade.
Good to know
Animations update 20 times a second. Position, box size, head size and opacity move smoothly. Text size and image size step between the sizes the pack has.