AnimeJsRails
Makes it simple to include the anime.js library in the Rails asset pipeline.
Animation example
var myAnimation = anime({
targets: ['.blue', '.green'],
translateX: '13rem',
rotate: 180,
borderRadius: 8,
duration: 2000,
loop: true
});
Live example on CodePen
Installation
Add this line to your application's Gemfile:
gem 'anime_js_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install anime_js_rails
Configuration Ruby on Rails
//= require anime
#config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( anime.js )
#or
Rails.application.config.assets.precompile += [/.*\.js/,/.*\.css/]
Contributing
- Star it
- Fork it ( https://github.com/guinslym/anime_js_rails )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request