Update ZenGradientGenerator.mjs

Signed-off-by: Studio Movie Girl <168581144+neurokitti@users.noreply.github.com>
This commit is contained in:
Studio Movie Girl
2025-02-16 16:53:48 -06:00
committed by GitHub
parent e2775c17de
commit baff7cb947

View File

@@ -382,7 +382,6 @@
let updatedDots = [...dots];
const centerPosition = { x: rect.width / 2, y: rect.height / 2 };
// **Get the correct harmony based on action**
const harmonyAngles = getColorHarmonyType(dots.length + (action === 'add' ? 1 : action === 'remove' ? -1 : 0));
this.useAlgo = harmonyAngles.type;
@@ -402,7 +401,7 @@
if (this.dots.length > 0) {
updatedDots = [{ ID: 0, Position: primaryDot.Position }];
}
// **Recalculate Positions for New Harmony**
harmonyAngles.angles.forEach((angleOffset, index) => {
let newAngle = (baseAngle + angleOffset) % 360;
let radian = (newAngle * Math.PI) / 180;