Skip to content

sdedovic/easings-clj

Repository files navigation

easings-clj

Clojars Project

A Clojure port of the easings.net easing functions. Orignal source code may be found at ai/easings.net.

Install

Leiningen/Boot

[com.dedovic/easings-clj "0.2.0"]

Clojure CLI/deps.edn

com.dedovic/easings-clj {:mvn/version "0.2.0"}

Gradle

compile 'com.dedovic:easings-clj:0.2.0'

Maven

<dependency>
  <groupId>com.dedovic</groupId>
  <artifactId>easings-clj</artifactId>
  <version>0.2.0</version>
</dependency>

Using

(require 'easings.core :as ease)

(ease/ease-in-sine 0.2)

Included Functions

  • ease-[in|out|in-out]-sine
  • ease-[in|out|in-out]-quad
  • ease-[in|out|in-out]-cubic
  • ease-[in|out|in-out]-quart
  • ease-[in|out|in-out]-quint
  • ease-[in|out|in-out]-expo
  • ease-[in|out|in-out]-circ
  • ease-[in|out|in-out]-back

Changelog

[Unreleased]

[0.2.0] - 2024-07-03

Added

  • support Clojurescript via shadow-cljs
  • better example using Quil

Changed

  • Renamed core easing functions to .cljc file extension to support cross-platform usage
  • Replaced hard-coded Math functions with math.cljc namespace that uses reader conditional to either consume Java or JavaScript standard libraries
  • Added Changelog, Included Functions sections to README

[0.1.0] - 2021-06-23

Added:

  • initial release

Contributing

Testing

Clojure

lein test

Clojurescript

npx shadow-cljs compile tests

TODO:

  • (2021-06-21): Elastic functions
  • (2021-06-21): Bounce functions

Proof it Works

docs/render.jpg

About

A Clojure port of the easings.net easing functions.

Resources

License

Stars

Watchers

Forks

Packages