Boolean Operations
Overview
Boolean operations combine two or more shapes into a single vector result. The operation hides the source shapes, creates a new shape, and selects the result.
Boolean Operation API
editor.booleanOperation([shapeAId, shapeBId], 'union')
Supported operations:
union→ merge all shapesintersect→ overlap onlysubtract→ subtract later shapes from the firstexclude→ xor (symmetric difference)
Notes
- Provide at least two shape IDs.
- The result shape is marked with
isBooleanResultmetadata. - Source shapes are hidden, but their IDs are stored on the result for toggling.