ANIM(3PYON)Pyon manual · the Pyon app (index.html)ANIM(3PYON)

NAME

anim — animate an element, so that ■ can stop it

SYNOPSIS

anim(el, frames, ms, easing = "ease-in-out")

DESCRIPTION

Runs a Web Animation on an element and keeps it in the set of live animations, so that stopAll() can cancel every one at once. On a browser without Web Animations it simply waits for the same time.

PARAMETERS

el: the element to animate. frames: the keyframes, as for Element.animate. ms: the duration, in milliseconds. easing: the easing; "ease-in-out" by default.

RETURN VALUE

A promise that settles when the animation ends or is cancelled; it never rejects.

SEE ALSO

sleep(3pyon), stopAll(3pyon), ACT(3pyon)

SOURCE

src/pyon.html, line 363

AUTHOR

Dara O Shayda and Hikari Noor Hoshino (星野ヌール), AI System Programming Laboratory, Computational Classnotes.

COPYRIGHT

© Computational Classnotes · CC BY-NC-SA 4.0