update docs and readme

This commit is contained in:
Anton Lavrenov 2020-07-16 16:02:34 -05:00
parent 68132c1efd
commit d63a7c6955
2 changed files with 18 additions and 13 deletions

View File

@ -154,8 +154,8 @@ See file `konva-node/demo.js` file in this repo as a sample.
# Backers # Backers
[myposter GmbH](https://www.myposter.de/) - [myposter GmbH](https://www.myposter.de/)
[queue.gg]()https://queue.gg/ - [queue.gg](https://queue.gg/)
# Change log # Change log

View File

@ -9,7 +9,7 @@ var blacklist = {
duration: 1, duration: 1,
easing: 1, easing: 1,
onFinish: 1, onFinish: 1,
yoyo: 1 yoyo: 1,
}, },
PAUSED = 1, PAUSED = 1,
PLAYING = 2, PLAYING = 2,
@ -159,7 +159,8 @@ class TweenEngine {
* node: node, * node: node,
* rotationDeg: 360, * rotationDeg: 360,
* duration: 1, * duration: 1,
* easing: Konva.Easings.EaseInOut * easing: Konva.Easings.EaseInOut,
* onFinish: () => console.log('finished')
* }); * });
* *
* // play tween * // play tween
@ -281,7 +282,11 @@ export class Tween {
if (end.length > start.length) { if (end.length > start.length) {
// so in this case we will increase number of starting points // so in this case we will increase number of starting points
trueStart = start; trueStart = start;
start = Util._prepareArrayForTween(start, end, (node as Line).closed()); start = Util._prepareArrayForTween(
start,
end,
(node as Line).closed()
);
} else { } else {
// in this case we will increase number of eding points // in this case we will increase number of eding points
trueEnd = end; trueEnd = end;
@ -301,7 +306,7 @@ export class Tween {
r: endRGBA.r - startRGBA.r, r: endRGBA.r - startRGBA.r,
g: endRGBA.g - startRGBA.g, g: endRGBA.g - startRGBA.g,
b: endRGBA.b - startRGBA.b, b: endRGBA.b - startRGBA.b,
a: endRGBA.a - startRGBA.a a: endRGBA.a - startRGBA.a,
}); });
} }
} }
@ -317,7 +322,7 @@ export class Tween {
r: endRGBA.r - start.r, r: endRGBA.r - start.r,
g: endRGBA.g - start.g, g: endRGBA.g - start.g,
b: endRGBA.b - start.b, b: endRGBA.b - start.b,
a: endRGBA.a - start.a a: endRGBA.a - start.a,
}; };
} else { } else {
diff = end - start; diff = end - start;
@ -328,7 +333,7 @@ export class Tween {
diff: diff, diff: diff,
end: end, end: end,
trueEnd: trueEnd, trueEnd: trueEnd,
trueStart: trueStart trueStart: trueStart,
}; };
Tween.tweens[nodeId][key] = this._id; Tween.tweens[nodeId][key] = this._id;
} }
@ -781,5 +786,5 @@ export const Easings = {
*/ */
Linear(t, b, c, d) { Linear(t, b, c, d) {
return (c * t) / d + b; return (c * t) / d + b;
} },
}; };