Skip to content

Comments

Fix nested groups#249

Merged
pearmini merged 1 commit intonextfrom
fix-group
Oct 12, 2024
Merged

Fix nested groups#249
pearmini merged 1 commit intonextfrom
fix-group

Conversation

@pearmini
Copy link
Member

image
import * as cm from "@charming-art/charming";

export function circles2() {
  return cm.render({
    width: 640,
    height: 640,
    setup: cm.flow(
      cm.range(120),
      cm.map((_, i, data) => (i * Math.PI) / data.length),
      cm.group(
        {x: (t) => Math.cos(t) * Math.cos(t * 3) * 250 + 280},
        cm.group(
          {y: (t) => Math.sin(t) * Math.cos(t * 3) * 250 + 320},
          cm.group(cm.circle({r: 10, x: 0, y: 0}), cm.circle({r: 3, x: 0, y: 0, fill: "white"})),
        ),
      ),
    ),
  });
}

@pearmini pearmini merged commit f543044 into next Oct 12, 2024
@pearmini pearmini deleted the fix-group branch October 12, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant