add new date style and bunch of new animations

This commit is contained in:
darksignal7
2025-10-05 13:38:53 +03:00
parent cd3b8b5bab
commit 5787e95c51
4 changed files with 160 additions and 76 deletions
@@ -8,6 +8,7 @@ Item {
id: root
property int sides: 12
property real animatedSides: 12
property int implicitSize: 100
property real amplitude: implicitSize / 50
property int renderPoints: 360
@@ -32,6 +33,13 @@ Item {
}
}
onSidesChanged: NumberAnimation {
target: root
property: "animatedSides"
to: root.sides
duration: 100
easing.type: Easing.InOutQuad
}
Shape {
id: shape
@@ -53,7 +61,7 @@ Item {
var radius = root.implicitSize / 2 - root.amplitude
for (var i = 0; i <= steps; i++) {
var angle = (i / steps) * 2 * Math.PI
var wave = waveAnimation ? Math.sin(angle * root.sides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude
var wave = waveAnimation ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude
var x = Math.cos(angle) * (radius + wave) + cx
var y = Math.sin(angle) * (radius + wave) + cy
points.push(Qt.point(x, y))