0.1.0 • Published 7 years ago

ember-slow-motion v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

ember-slow-motion

Build Status

Ember tagless component for handling value transitions in handlebars. Inspired by the api of react-motion https://github.com/chenglou/react-motion

Usage

Use the {{slow-motion}} component like so:

{{#slow-motion
  transitionValue=myValue
  transitionTimingFunction=myBezierCurve
  transitionDuration=500 as |animatedValue|}}

  <div class='animate-me'
    style={{html-safe
      (concat 'transform: translateX(' animatedValue 'px);' )}}>
      {{animatedValue}}
  </div>
{{/slow-motion}}

{{slow-motion}} receives changes to myValue, it will continuously yield out the interpolated in-between values to animatedValue during the entire transitionDuration

Play with the demo here: https://foxnewsnetwork.github.io/ember-slow-motion

Installation

  • git clone <repository-url> this repository
  • cd ember-slow-motion
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.