@ariii/r

A light JavaScript library.

Usage no npm install needed!

<script type="module">
  import ariiiR from 'https://cdn.skypack.dev/@ariii/r';
</script>

README

R
npm version dev dependencies minified size license

A light JavaScript library.

Installation

$ npm install @ariii/r --dev

Usage

Look at the src folder for more information.

Import

import R from '@ariii/r'

Return the body node of the document

const body = R.Dom.body

Add a click event listener

R.L(element, 'a', 'click', callback)

Check if a variable is an object

const isObj = R.Is.obj(variable)

Play animations with Merom

const animation = new R.M({el: '#id', p: {x: [0, 600, 'px']}, d: 2000, e: 'io4'})
animation.play()

animation.play({p: {x: {newEnd: 50}}, reverse: true})

Build sequences of Merom with Timeline

const tl = new R.TL()
tl.from({el: '#id0', p: {x: [0, 600, 'px'], rotate: [0, 360]}, d: 300, e: 'i3', delay: 300})
tl.from({el: '#id1', p: {x: [0, 600, 'px'], rotate: [0, 360]}, d: 500, e: 'o6', cb: callback})

tl.play()

tl.pause()

Author

Aristide Benoist

License

MIT

Copyright (c) 2019-present, Aristide Benoist.