mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
update docs and readme
This commit is contained in:
parent
68132c1efd
commit
d63a7c6955
@ -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
|
||||||
|
19
src/Tween.ts
19
src/Tween.ts
@ -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;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user