Abstract Class: BrushShape experimental
Beta
Base for creating new brush shapes
Extended by
ConeBrushShapeCuboidBrushShapeCylinderBrushShapeEllipsoidBrushShapePyramidBrushShapeSingleBlockBrushShape
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()
abstractapplySetting(brushSettings):void
Beta
Parameters
brushSettings
Returns
void
calculateBounds()
abstractcalculateBounds():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()
abstractcreateSettingsPane(parentPane,onSettingsChange?,flatLayout?):ISubPanePropertyItem|undefined
Beta
Parameters
parentPane
onSettingsChange?
() => void
flatLayout?
boolean
Returns
ISubPanePropertyItem | undefined
createShape()
abstractcreateShape():RelativeVolumeListBlockVolume
Beta
Returns
createShapeAsync()
abstractcreateShapeAsync(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()
abstractestimateBlockCount():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()
abstractgetSettings():BrushShapeSettings
Beta
