BodyControlModel

Controls the morph's "body" which comprises all of the dynamic effect properties.

Constructor

new BodyControlModel()

Methods

activate()

If no effects are applied to the current morph this will add a first default effect to the morph which can in turn be configured as needed.

addDynamicProperty(selectedProp, refresh)

Applies an additional effect(property) to the current morph.

Parameters:
NameTypeDescription
selectedPropString

The name of the property this effect is controlled by.

refreshBoolean

Wether or not the selectable items of all the other dynamic properties should be updated. Skipping this can make sense for bulk updates.

deactivate()

This is only invoked when all applied effects are removed from a morph or if the morph does not have any applied effects to begin with. Ensures that the appearance of the body control is faded out.

ensureDynamicControls()

Ensure that the dynamic controls applicable to the currently focused morph are displayed. These are essentially alle the effect-properties that diverge from the default value.

focusOn()

Sets the current morph the effects control is focused on.

refreshItemLists()

The set of items selectable in the drop downs of the dynamic controls varies depending on the currently applied effects. This method ensure that only the available items can be selected inside the drop downs. It needs to be invoked any time the set of applied effects changes.