Skip to content
Document Authoring DA  API Docs v1.16.0
npmGitHub

ShapeGeometry

ShapeGeometry:

{
type: "preset";
}

The geometry of a Shape.

A union keyed on type. The only variant today is a built-in ShapePreset ({ type: 'preset' }); custom (free-form) shape paths are not yet available. Branch on type to read it:

const geometry = shape.geometry();
if (geometry.type === 'preset') {
console.log(geometry.preset); // e.g. 'ellipse'
}

type: "preset"

Discriminant for the geometry variant.


preset: ShapePreset

The built-in preset geometry name.