Skip to content

Commit 53bb909

Browse files
authored
Update yoyo function in user guide
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.
1 parent ae24c58 commit 53bb909

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/user_guide.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ Check the [Repeat](../examples/08_repeat.html) example.
176176

177177
### `yoyo`
178178

179-
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.
179+
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:
180+
181+
```
182+
tween.yoyo(false) // default value, animation will only go from start to end value
183+
tween.yoyo(true) // tween will 'yoyo' between start and end values
184+
```
180185

181186
### `delay`
182187

0 commit comments

Comments
 (0)