For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/classes/BrushShape.md.

Abstract Class: BrushShape experimental

Beta

Base for creating new brush shapes

Extended by

Constructors

Constructor

new BrushShape(_id, _displayName, _icon): BrushShape

Beta

Parameters

_id

string

_displayName

string

_icon

string

Returns

BrushShape

Remarks

Constructs a new instance of the BrushShape class

Accessors

displayName

Get Signature

get displayName(): string

Beta

Returns

string


icon

Get Signature

get icon(): string

Beta

Returns

string


id

Get Signature

get id(): string

Beta

Returns

string

Methods

applySetting()

abstract applySetting(brushSettings): void

Beta

Parameters

brushSettings

BrushShapeSettings

Returns

void


calculateBounds()

abstract calculateBounds(): BlockBoundingBox

Beta

Returns

BlockBoundingBox

Object with min and max Vector3 bounds

Remarks

Calculates the bounding box of the shape in local coordinates. Used for region allocation before shape placement.


createSettingsPane()

abstract createSettingsPane(parentPane, onSettingsChange?, flatLayout?): ISubPanePropertyItem | undefined

Beta

Parameters

parentPane

IPropertyPane

onSettingsChange?

() => void

flatLayout?

boolean

Returns

ISubPanePropertyItem | undefined


createShape()

abstract createShape(): RelativeVolumeListBlockVolume

Beta

Returns

RelativeVolumeListBlockVolume


createShapeAsync()

abstract createShapeAsync(cancelToken?, yieldInterval?): Promise<RelativeVolumeListBlockVolume>

Beta

Parameters

cancelToken?

Optional token to cancel the operation. Set cancelled to true to abort.

cancelled

boolean

yieldInterval?

number

Number of blocks to process before yielding. Default is 10000.

Returns

Promise<RelativeVolumeListBlockVolume>

Promise that resolves to the shape positions as Vector3 array.

Remarks

Asynchronously creates the shape, yielding control periodically to avoid timeouts. Use this for large shapes where createShape() may timeout.


estimateBlockCount()

abstract estimateBlockCount(): number

Beta

Returns

number

Estimated block count

Remarks

Returns a mathematical estimate of the number of blocks in the shape. Used for UI display and validation before shape creation.


getSettings()

abstract getSettings(): BrushShapeSettings

Beta

Returns

BrushShapeSettings