CreateShapeOptions: Partial<ShapeConstructorOptions> & CommonCreationOptions & {
    closeRing?: boolean;
    constraints?: Permissions;
    maxPoints?: number;
    minPoints?: number;
    onPointCreated?: ((shape: entities.Shape, index: number, position: Vector3) => void);
}

Options for the DrawTool.createShape method.

Type declaration

  • OptionalcloseRing?: boolean

    If true, the shape's line will be closed just before being returned to the caller.

  • Optionalconstraints?: Permissions

    An optional list of permitted operations.

  • OptionalmaxPoints?: number

    The maximum number of points to create before the shape is automatically completed.

  • OptionalminPoints?: number

    The minimum number of points to create before the shape can be completed.

  • OptionalonPointCreated?: ((shape: entities.Shape, index: number, position: Vector3) => void)

    An optional callback to be called when a point has been added to the shape.

      • (shape, index, position): void
      • Parameters

        • shape: entities.Shape

          The shape being created.

        • index: number

          The index of the point.

        • position: Vector3

          The position of the point.

        Returns void