Skip to content

Commit

Permalink
settings pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam O'Connell committed Dec 11, 2018
1 parent 8bbefec commit f251177
Show file tree
Hide file tree
Showing 11 changed files with 249 additions and 178 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,14 @@ myAnimation.resume();
```

**Set**<br>
*set path* - sets path position, second param accepts a number between 0 - 1;
*set path* - set options after initialisation
```js
myAnimation.set(num);
// progress - sets path position, second param accepts a number between 0 - 1
myAnimation.set('progress', value);

// delay - sets initial delay
myAnimation.set('delay', value);

```

**Get**<br>
Expand Down
35 changes: 26 additions & 9 deletions examples/basic.html

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions examples/callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
strokeWidth: 7,
strokeCap :'round',
strokeColor : '#b5287b',
ease: 'easeInOutQuad',
drawSequential: true,
delay: 1000
//ease: 'easeInOutQuad',
//delay: 1000
});


Expand Down
6 changes: 0 additions & 6 deletions examples/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@ body {

* {
box-sizing: border-box;

user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}

.content {
position: absolute;
top: 50%;
left: 50%;
width: 35%;
-ms-transform: translate(-50%,-50%); /* IE 9 */
-webkit-transform: translate(-50%,-50%); /* Chrome, Safari, Opera */
transform: translate(-50%,-50%);
}

Expand Down
3 changes: 2 additions & 1 deletion examples/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
strokeWidth: 8,
strokeColor: '#b5287b',
ease: 'easeInOutSine',
drawSequential: true
drawSequential: true,
delay: 1000
});


Expand Down
4 changes: 2 additions & 2 deletions examples/set.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@

function step(timestamp) {
window.requestAnimationFrame(step);
position += (target - position) * friction;
myAnimation.set(position);
position += (target - position) * friction;
myAnimation.set('progress', position);
}

window.requestAnimationFrame(step);
Expand Down
Loading

0 comments on commit f251177

Please sign in to comment.