Animation Blending
Two clips on the same Animator: crossFadeFrom switches smoothly between Bounce and Spin.
Controls
import * as EASEL from "easel";
import { LoopRepeat } from "easel";
const animator = new EASEL.Animator(box);
const bounceAction = animator.clipAction(bounceClip);
bounceAction.setLoop(LoopRepeat, Infinity);
const spinAction = animator.clipAction(spinClip);
spinAction.setLoop(LoopRepeat, Infinity);
bounceAction.play();
function switchTo(next, current) {
next.reset();
next.crossFadeFrom(current, 0.4);
next.play();
}
animator.update(dt);