Skip to content

Anime (/ˈæn.ə.meɪ/) is a flexible yet lightweight JavaScript animation library. It works with CSS, Individual Transforms, SVG, DOM attributes and JS Objects

License

Notifications You must be signed in to change notification settings

Milia-yuuta/anime_js_rails

 
 

Repository files navigation

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
});

Basic animation

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

#app/assets/javascript/application.js
//= require anime
#config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( anime.js )
#or
Rails.application.config.assets.precompile += [/.*\.js/,/.*\.css/]

Contributing

  1. Star it
  2. Fork it ( https://github.com/guinslym/anime_js_rails )
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

About

Anime (/ˈæn.ə.meɪ/) is a flexible yet lightweight JavaScript animation library. It works with CSS, Individual Transforms, SVG, DOM attributes and JS Objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%