All Projects β†’ tmanderson β†’ Easytransform

tmanderson / Easytransform

Enhancing CSS transform with a little bit of JavaScript.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Easytransform

Sunset.css
This library offers a collection of different CSS-powered transitions.
Stars: ✭ 99 (+890%)
Mutual labels:  animations, transition, transitions
animated
🌊 Implicit animations for JavaFX.
Stars: ✭ 79 (+690%)
Mutual labels:  transition, animations, transitions
Hamburger React
Animated hamburger menu icons for React (1.5 KB) πŸ”
Stars: ✭ 391 (+3810%)
Mutual labels:  animations, transition, transitions
Css Animations Pocket Guide
A pocket guide to get started writing CSS Animations. ✨
Stars: ✭ 94 (+840%)
Mutual labels:  animations, transition, css-animations
highway
Highway - A Modern Javascript Transitions Manager
Stars: ✭ 1,349 (+13390%)
Mutual labels:  animations, transitions
angular-super-gallery
AngularJS super image gallery
Stars: ✭ 46 (+360%)
Mutual labels:  transition, transitions
ionic-modal-custom-transitions
Add Custom Transitions to Ionic Modals.
Stars: ✭ 22 (+120%)
Mutual labels:  animations, transitions
Music Player
From UI Proposal to Code πŸŽΆβ–ΆοΈ
Stars: ✭ 3,459 (+34490%)
Mutual labels:  transition, transitions
React Overdrive
Super easy magic-move transitions for React apps
Stars: ✭ 3,001 (+29910%)
Mutual labels:  animations, transitions
React Awesome Reveal
React components to add reveal animations using the Intersection Observer API and CSS Animations.
Stars: ✭ 346 (+3360%)
Mutual labels:  animations, css-animations
Xamanimation
Xamarin Forms Animation Library
Stars: ✭ 389 (+3790%)
Mutual labels:  animations, transitions
React Burger Menu
πŸ” An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
Stars: ✭ 4,544 (+45340%)
Mutual labels:  animations, transitions
Swiftui Animation Library
SwiftUI Animation Library. Useful SwiftUI animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can directly implement in your next iOS application or project. The library also contains huge examples of spring animations such as Inertial Bounce, Shake, Twirl, Jelly, Jiggle, Rubber Band, Kitchen Sink and Wobble effects. Browse, find and download the animation that fits your needs.
Stars: ✭ 898 (+8880%)
Mutual labels:  animations, transitions
react-awesome-reveal
React components to add reveal animations using the Intersection Observer API and CSS Animations.
Stars: ✭ 564 (+5540%)
Mutual labels:  css-animations, animations
learn-css-animation
Learn CSS animation with fun. It is simple, easy to use, and fun to learn.
Stars: ✭ 54 (+440%)
Mutual labels:  css-animations, animations
transitionable-routes
Perform transitions when changing routes with React Router
Stars: ✭ 26 (+160%)
Mutual labels:  animations, transitions
Epic Spinners
Easy to use css spinners collection with Vue.js integration
Stars: ✭ 3,548 (+35380%)
Mutual labels:  animations, css-animations
Awesome Web Animation
A list of awesome web animation libraries, books, apps etc.
Stars: ✭ 904 (+8940%)
Mutual labels:  transitions, css-animations
Material-Design-Android
My stash for all things material, animations, typography, iconography, transitions, Animated VD, Color Palette API, UI design, and more.
Stars: ✭ 38 (+280%)
Mutual labels:  animations, transitions
aholachek.github.io
My website
Stars: ✭ 53 (+430%)
Mutual labels:  animations, transitions

Easy Transform v0.9.0

Easy Transform allows animation-like capabilities on HTML elements through the power of CSS transitions.

What does "animation-like" mean? Internally, EZT uses transition events to advance frames from one transform to another. Doing this, certain transitions can acquire an near-animation (keyframed) appearance.

Both 2D and 3D CSS transforms can be used with EZT.

EZT provides interfaces through JavaScript and HTML datasets.

View the API documentation below or checkout the examples.

HTML Example

<div
  data-ezt-loop
  data-ezt-alternate
  data-ezt-autostart
  data-ezt="
    duration(1s),
    rotate(80) scale(2, 2), // frame 1, duration = 1s
    wait(500),              // frame 2, duration = 500
    duration(100ms),
    rotate(-45)             // frame 3, duration = 100ms
    scale(1),               // frame 4 duration = 100ms
  "
>
</div>

JS Example

  const t = new EZT(document.querySelector('div'));

  t.loop()
    .duration(100)
    .rotate(25)
    .wait(500)
    .duration(500)
    .skew(20)
    .wait(500)
    .duration(1000)
    .transform({
      rotate: 45,
      translate: [50, 50]
    })
    .call(function() { console.log('AT THE END!') })
    .start();

API

HTML Attributes

data-ezt-loop (boolean attribute)

Loop the animation sequence

data-ezt-alternate (boolean attribute)

Alternate the animation (once the end is reached, play back to the beginning)

data-ezt-autostart (boolean attribute)

Auto play the sequence

data-ezt="transform, transform..."

Each transform within the value is a non-prefixed method invocation.

NOTE: Commas (outside of argument lists, of course) delimit animation frames. The newlines in the example above are just for clarity. Whitespace is ignored.

example

data-ezt="
  duration(100),            // set the frame duration to 100ms
  rotate(-20) scale(2),     // rotate the element -20 degrees and scale by 2 (over 100ms)
  duration(1000),           // set the frame duration to 1s
  rotate(45) skew(10),      // rotate 45 degrees and skew the x-axis by 10 degrees (over 1s)
  wait(500)                 // wait 500ms
  rotate()                  // rotate back to 0, 0
"

Static methods

EZT.run

Finds all data-ezt elements on the page and creates their EZT instances.

Instance methods

EZT(HTMLElement) => EZTInstance

Create an EZT instance on the given HTMLElement.

loop() => EZTInstance

Toggle animation looping

alternate() => EZTInstance

Toggle alternation of the animations direction (only applies to loopd animations)

duration(CSSDuration) => EZTInstance

Set the duration for the following transforms

example

EZT(document.querySelector('div'))
  .duration(500)
  .scale(2) // this scale will take 500 ms
  .duration(1000)
  .scale(1) // this scale (down) will take 1s
  .duration('2s')
  .translate(100, 100) // this translation will take 2s

easing(CSSTransitionTimingFunction) => EZTInstance

Set the easing for the following transforms

example

EZT(document.querySelector('div'))
  .easing('linear')
  .scale(2) // this scale will have linear easing
  .easing('east-out')
  .scale(1) // this scale (down) will have `ease-in` easing
  .easing('ease-in-out')
  .translate(100, 100) // this translation will have `ease-in-out` easing

rotate() => EZTInstance

No arguments will reset the rotation.

rotate(z=0, x=0, y=0, add=true) => EZTInstance

Rotate the element around a given set of axes (in degrees)

scale(x=1, y=x, z=y) => EZTInstance

Scale the element. With only one argument, the elements proportions are held.

skew(x=0, y=0) => EZTInstance

Skew the element.

translate(x=0, y=0, z=0, add=true) => EZTInstance

Translate (move) the element.

transform({ ...transforms }) => EZTInstance

To set multiple properties at once, the transform method can be used.

example

EZT(document.querySelector('div'))
  .loop()
  .duration(500)
  .transform({   // Simultaneously rotate and scale over 500ms
    rotate: 45,
    scale: 2
  })
  .duration(1000)
  .transform({   // Simultaneously rotate and scale over 1s
    rotate: -45,
    scale: 0.2
  })

EZTInstance.wait(t) => EZTInstance

Wait t milliseconds before advancing to the next transform.

example

EZT(document.querySelector('div'))
  .loop()
  .duration(1000)
  .transform({   // Simultaneously rotate and scale over 500ms
    rotate: 45,
    scale: 2
  })
  .wait(500)
  .scale(2) // scale 2x after 500ms

EZTInstance.call(fn) => EZTInstance

Call the function fn.

example

EZT(document.querySelector('div'))
  .loop()
  .duration(1000)
  .transform({   // Simultaneously rotate and scale over 500ms
    rotate: 45,
    scale: 2
  })
  .call(() => console.log('DONE!')); // function called after 1s

EZTInstance.reset() => EZTInstance

Reset the instance to its original appearance.

EZTInstance.start() => EZTInstance

Start the animation sequence.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].