fix: enlarge cardioid (heart) shape mask for better visibility
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1a0abaa453
commit
8fb5caef07
|
|
@ -82,9 +82,9 @@ function createShapeMask(shape: string, size: number): HTMLCanvasElement | null
|
||||||
case 'cardioid': {
|
case 'cardioid': {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
for (let angle = 0; angle < Math.PI * 2; angle += 0.01) {
|
for (let angle = 0; angle < Math.PI * 2; angle += 0.01) {
|
||||||
const rr = r * 0.5 * (1 - Math.sin(angle));
|
const rr = r * 0.85 * (1 - Math.sin(angle));
|
||||||
const x = cx + rr * Math.cos(angle);
|
const x = cx + rr * Math.cos(angle);
|
||||||
const y = cy - rr * Math.sin(angle) + r * 0.15;
|
const y = cy - rr * Math.sin(angle) + r * 0.3;
|
||||||
if (angle === 0) ctx.moveTo(x, y);
|
if (angle === 0) ctx.moveTo(x, y);
|
||||||
else ctx.lineTo(x, y);
|
else ctx.lineTo(x, y);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue