Animator is a helper class to animate stuff using lerp.
It can be color, position, size, and even sound volume. Any property that's either a number or implements a static 'lerp' method can be used.
The following shows a minimal code example on how to init Shaku and create a main loop.
// create repeating animation that move sprite from position x=0 to x=700 while turning it red, over 5 seconds:
let sprite1 = new Shaku.gfx.Sprite();
sprite1.position.set(50, 150);
(new Shaku.utils.Animator(sprite1)).repeats(true).to({'position.x': 700, 'color': Shaku.utils.Color.red}).duration(5).play();
// create repeating animation that move and scale, but instead of "jumping" back to the starting state, it will lerp back to it
let sprite2 = new Shaku.gfx.Sprite();
sprite2.position.set(50, 340);
(new Shaku.utils.Animator(sprite2)).repeats(true, true).to({'position.x': 700, 'size': new Shaku.utils.Vector2(150, 150)}).duration(5).smoothDamp(true).play();
// do "heartbeat" effect that pump once when we call the method "beat()"
let sprite3 = new Shaku.gfx.Sprite();
sprite3.position.set(50, 540);
let heartbeat = (new Shaku.utils.Animator(sprite3)).to({'size': new Shaku.utils.Vector2(170, 170)}).repeats(1, true).duration(0.5).smoothDamp(true);
function beat() {
heartbeat.reset().play();
}