<commit_before>roll
===

Roll is an unbelievably simple parallax scrolling library.  It's tiny (~5kb minified), relies on no dependencies, is very performant, and is uniquely extensible.

## Installation

As mentioned above, roll relies on no dependencies.  

```html
<script src="/roll.min.js"></script>
```

```javascript
require(['roll'], function (Roll) {
  var roll = new Roll();
});
```

## Usage

```javascript
var roll = new Roll();

var scene1 = new Roll.Scene();
scene1
  .animate('#foo', 'transform', {
    0: 'translateY(0px) scale(0)',
    50: 'translateY(50px) scale(0.5)',
    200: 'translateY(100px) scale(1)'
  });

var scene2 = new Roll.Scene();
scene2
  .animate('#bar', {
    transform: {
      0: 'translateY(0px) scale(0)',
      50: 'translateY(50px) scale(0.5)'
      200: 'translateY(100px) scale(1)'
    },
    opacity: {
      0: 0
      200: 1
    }
  });

roll
  .add('foo', scene1)
  .add('bar', scene2)
  .at(100, 'scene1')
  .at(1000, 'scene2');

// When the document is ready:
roll.init();
```

## APIs

Roll returns two classes: `Roll` and `Roll.Scene`.  An instance of `Roll` is a controller class for `Roll.Scene` instances.  All methods in `Roll` and `Roll.Scene` return the instance and thus are chainable.

#### Controller API

```javascript
var roll = new Roll();
```

##### `roll.add(name, scene)`

Adds `scene` to the controller.

##### `roll.at(Y, name)`

Asks the controller to play a scene named `name` beginning at `Y`, an integer representing a point on the window's Y-axis.

##### `roll.init()`

Creates a "storyboard" with the specifications previously applied to the controller and applies the necessary event listeners.

##### `roll.remove()`

Removes all style property values and event listeners.

##### `roll.bind()`

Applies the necessary event listeners.

##### `roll.unbind()`

Removes all event listeners.

#### Scene API

```javascript
var scene = new Roll.Scene();
```

## License & Contributing
<commit_msg>README: Add Roll.Scene() methods. - .animate() - .style() - .action()<commit_after>roll
===

Roll is an unbelievably simple parallax scrolling library.  It's tiny (~5kb minified), relies on no dependencies, is very performant, and is uniquely extensible.

## Installation

As mentioned above, roll relies on no dependencies.  

```html
<script src="/roll.min.js"></script>
```

```javascript
require(['roll'], function (Roll) {
  var roll = new Roll();
});
```

## Usage

```javascript
var roll = new Roll();

var scene1 = new Roll.Scene();
scene1
  .animate('#foo', 'transform', {
    0: 'translateY(0px) scale(0)',
    50: 'translateY(50px) scale(0.5)',
    200: 'translateY(100px) scale(1)'
  });

var scene2 = new Roll.Scene();
scene2
  .animate('#bar', {
    transform: {
      0: 'translateY(0px) scale(0)',
      50: 'translateY(50px) scale(0.5)'
      200: 'translateY(100px) scale(1)'
    },
    opacity: {
      0: 0
      200: 1
    }
  });

roll
  .add('foo', scene1)
  .add('bar', scene2)
  .at(100, 'scene1')
  .at(1000, 'scene2');

// When the document is ready:
roll.init();
```

## API

Roll returns two classes: `Roll` and `Roll.Scene`.  An instance of `Roll` is a controller class for `Roll.Scene` instances.  All methods in `Roll` and `Roll.Scene` return the instance and thus are chainable.

```javascript
var roll = new Roll();
```

##### `roll.add(name, scene)`

Adds `scene` to the controller.

##### `roll.at(Y, name)`

Asks the controller to play a scene named `name` beginning at `Y`, an integer representing a point on the window's Y-axis.

##### `roll.init()`

Creates a "storyboard" with the specifications previously applied to the controller and applies the necessary event listeners.

##### `roll.remove()`

Removes all style property values and event listeners.

##### `roll.bind()`

Applies the necessary event listeners.

##### `roll.unbind()`

Removes all event listeners.

```javascript
var scene = new Roll.Scene();
```

##### `scene.animate($, property, [points])`

Add an animation to the scene.

##### `scene.style($, property, [points])`

Add a style property to the scene.

##### `scene.action(klass, $, property, [points])`

Add any class as an action for the scene.

## License & Contributing

{'fraction_non_alphanumeric': 0.16734014737342523, 'fraction_numerical': 0.025671499881150462, 'mean_word_length': 3.853517877739331, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154559', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1346, 'n_words': 469}