Skip to content

Commit

Permalink
Update yoyo function in user guide
Browse files Browse the repository at this point in the history
The yoyo function currently has no code block example. This leaves it up to the user to guess whether calling the function sets yoyo to true or if a value needs to be passed in without referring to the code. Added lines to show that boolean values should be passed in to the function.
  • Loading branch information
JackParkes1 authored Nov 2, 2020
1 parent ae24c58 commit 53bb909
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ Check the [Repeat](../examples/08_repeat.html) example.

### `yoyo`

This function only has effect if used along with `repeat`. When active, the behaviour of the tween will be _like a yoyo_, i.e. it will bounce to and from the start and end values, instead of just repeating the same sequence from the beginning.
This function only has effect if used along with `repeat`. When active, the behaviour of the tween will be _like a yoyo_, i.e. it will bounce to and from the start and end values, instead of just repeating the same sequence from the beginning:

```
tween.yoyo(false) // default value, animation will only go from start to end value
tween.yoyo(true) // tween will 'yoyo' between start and end values
```

### `delay`

Expand Down

0 comments on commit 53bb909

Please sign in to comment.