make constantlyRotate, rotate in clockwise

This commit is contained in:
darksignal7
2025-10-06 17:08:15 +03:00
parent 70a5343d60
commit 1ec94aa2a6
@@ -51,7 +51,7 @@ Item {
var radius = root.implicitSize / 2 - root.amplitude var radius = root.implicitSize / 2 - root.amplitude
for (var i = 0; i <= steps; i++) { for (var i = 0; i <= steps; i++) {
var angle = (i / steps) * 2 * Math.PI var angle = (i / steps) * 2 * Math.PI
var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * root.constantlyRotate) var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * -root.constantlyRotate)
var wave = Math.sin(rotatedAngle) * root.amplitude var wave = Math.sin(rotatedAngle) * root.amplitude
var x = Math.cos(angle) * (radius + wave) + cx var x = Math.cos(angle) * (radius + wave) + cx
var y = Math.sin(angle) * (radius + wave) + cy var y = Math.sin(angle) * (radius + wave) + cy