controllerBrownMovement

brownMovement(position, rotation, opacity) brownMovement.messages = [] brownMovement.events = []

Description

Element

Applies a translate and a rotate transforms with small random values on each frame, making the element look as if vibrating/shaking very quickly. The parameters position and rotation supply the amplitude (maximal values) of vibration.

If parameter opacity is different than 0, the element's opacity also vibrates with the supplied amplitude.

Parameters

Visit page Controller # Common Parameters for documentation on the parameters, common to all controllers: id, paused and disabled.

Parameters of brownMovement():

position
Supplies the maximum displacement in pixels. Default value: 2
rotation
Supplies the maximum rotation in degrees. Default value: 20
opacity
Supplies how much bellow the value of 1 opacity can get. A value of 0.3 means that opacity will oscillate in the range 0.7 - 1. Default value: 0

Accepted Messages

Visit page Controller # Common Messages for documentation on the messages, accepted by all controllers: pause, unpause, enable, disable, params and remove.

Messages specific to brownMovement(): none

Generated Events

Visit page Controller # Common Events for documentation on the events, generated by all controllers: frame, remove, paused, unpaused enabled and disabled.

Events fired by brownMovement(): none

Interaction with DOM

Changes Log

  1. Controller introduced in v.0.80

See Also