metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG

Home Page:https://zzz.dog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add compositeChild flag to prevent copying

desandro opened this issue · comments

A to-do for me. The composite shapes have some API weirdness:

  • Currently Box uses BoxRect class, which like a Rect only it isn't copied with copyGraph, because a Box will add its on BoxRect children when created.
  • Cone also has a Anchor which gets duplicated, it should be a ConeAnchor or something.
  • And I'm considering adding an Anchor inside Hemisphere for keeping track of its apex.

Rather than creating special classes like BoxRect, I think a cleaner solution would be to add a flag property like compositeChild. So that items with this flag will not get copied with copyGraph.