API: forms
Function: groupByPart()
lifecycle-kit
lifecycle-kit / forms / groupByPart
Function: groupByPart()
groupByPart(
path):object[]
Defined in: forms/path.ts:322
Group a path's shapes into parts, preserving draw order.
This is what the assemblage stage calls to assign a depth band per part
and light each one against the parts behind it. Shapes with no tag are
grouped under untagged, so a path built by a rule that says nothing about
anatomy still round-trips through the assembler rather than vanishing.
Order is preserved twice over: the parts come back in the order their first shape appears, and each part's shapes stay in their original relative order. Both matter, because order is draw order and draw order is what a directional light reads as depth.
Parameters
path
Returns
object[]
