fuzzyworld

dao-game / peerjs-browser-bug / files / src / animate.ts

Branch peerjs-browser-bug · default branch · all branches

animate.ts

289 B · history · blame

1require('web-animations-js');
2
3export async function poly_animate(
4 element: Element,
5 keyframes: Keyframe[],
6 options: KeyframeAnimationOptions): Promise<Animation> {
7 const animation = element.animate(keyframes, options);
8 const result = await animation.finished;
9 return result;
10}