Skip to content

Commit c1937e7

Browse files
authored
Add tune method
1 parent 768a342 commit c1937e7

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

api/html.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ The module has `transforms/opacity` (`x`, `y`, `opacity` etc.) predefined proper
1919

2020
```javascript
2121
const html = new mojs.Html({
22-
23-
/* SHAPE PROPERTIES */
24-
2522
// HTMLElement to animate. {String, Object} [selector, HTMLElement]
2623
el: null,
2724
// ∆ :: translateX property. {String, Number, Object} [value, delta]
@@ -145,6 +142,13 @@ const html = new mojs.Html({
145142
@param options {Object} Next shape state.
146143
*/
147144
.then({ /* next state options */ })
145+
146+
147+
/*
148+
Tunes properties to new values.
149+
@param options {Object} New props to tune to.
150+
*/
151+
.tune({ /* next state options */ })
148152

149153
/*
150154
Starts playback.
@@ -165,6 +169,11 @@ const html = new mojs.Html({
165169
Pauses playback.
166170
*/
167171
.pause()
172+
/*
173+
Stops playback.
174+
@param {Number} Progress to set after the stop [0...1].
175+
*/
176+
.stop( progress = 0 )
168177
/*
169178
Restarts playback.
170179
@param shift {Number} Start progress shift in milliseconds.
@@ -184,10 +193,10 @@ const html = new mojs.Html({
184193
Sets speed of the tween.
185194
@param speed {Number} Progress to set [ 0..∞ ].
186195
*/
187-
setSpeed ( speed )
196+
.setSpeed ( speed )
188197

189198
/* Stops and resets the tween. */
190-
reset ( speed )
199+
.reset ( speed )
191200

192201
```
193202

0 commit comments

Comments
 (0)