跳到主要内容

Class: BrushShapeManager

Constructors

new BrushShapeManager()

private new BrushShapeManager(): BrushShapeManager

Returns

BrushShapeManager

Properties

activeBrushShape?

optional readonly activeBrushShape: BrushShape


activeBrushVolume?

optional readonly activeBrushVolume: CompoundBlockVolume


brushShapeNames

readonly brushShapeNames: string[]

Methods

activateBrushShape()

activateBrushShape(name): CompoundBlockVolume

Parameters

ParameterType
namestring

Returns

CompoundBlockVolume

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.


getSettingsUIElements()

getSettingsUIElements(brushName): SettingsUIElement[]

Parameters

ParameterType
brushNamestring

Returns

SettingsUIElement[]

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.


registerBrushShape()

registerBrushShape(name, icon, rebuild, getSettingsUIElements): void

Parameters

ParameterType
namestring
iconstring
rebuild() => CompoundBlockVolume
getSettingsUIElements() => SettingsUIElement[]

Returns

void

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.


uiSettingValueChanged()

uiSettingValueChanged(elementName, newValue): boolean

Parameters

ParameterType
elementNamestring
newValuestring | number | boolean | Vector3

Returns

boolean

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.