animatrix
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

animatrix

Create DOM Animations.

npm i animatrix pnpm add animatrix yarn add animatrix

API

# AnimSettings
# Easing

    [ number, number, number, number ]

# KeyframeAnimation

}
# KeyframeAnimationDetails
}
# ManualAnimation

    {

    # current
    # from
    # last
    # set

      # (values)

        # values

        (values)  =>

# state
# stop

    # (values)

      # values

      (values)  =>

# to
# update

    # (values)

      # values

      (values)  =>

}
# ManualAnimationState

    "preparing" | "running" | "finished"

# StepAnimation

    {

    # current
    # from
    # set

      # (values)

        # values

        (values)  =>

# state
# t

    number

# to
# update

    # (values)

      # values

      (values)  =>

}
# StepAnimationState

    "preparing" | "running" | "finished"

# Easing
# BezierEasing(mX1, mY1, mX2, mY2)

    # mX1

      any

    # mY1

      any

    # mX2

      any

    # mY2

      any

    BezierEasing(mX1, mY1, mX2, mY2)  =>

      # (x)

        # x

          any

        (x)  =>

          any
# createKeyframeAnimation(animSettings, target, getKeyframes, current)

    # animSettings
    # target

      HTMLElement | SVGElement

    # getKeyframes()

      getKeyframes()  =>

        Keyframe []

# current

createKeyframeAnimation(animSettings, target, getKeyframes, current)  =>

# createManualAnimation(anim)
# createStepAnimation(AnimSettings, anim)

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas

Readme

Keywords

none

Package Sidebar

Install

npm i animatrix

Weekly Downloads

21

Version

1.1.0

License

MIT

Unpacked Size

253 kB

Total Files

38

Last publish

Collaborators

  • stagas