Motion
Clip Switcher
What this shows
Switch between named clips on a grouped mechanical assembly.
Loading scene…Key API excerpt
Key API excerpt
import * as EASEL from "@xsyetopz/easel";
const group = new EASEL.AnimationGroup(meshA, meshB, meshC);
const clip = new EASEL.AnimationClip("spin", 2, [
new EASEL.NumberTrack("rotation.y", [0, 1, 2], [0, Math.PI, Math.PI * 2]),
]);
const animator = new EASEL.Animator(group);
animator.clipAction(clip).setLoop(EASEL.Loop.Repeat, Number.POSITIVE_INFINITY).play();
animator.update(delta);