controllerBrownMovement
brownMovement(position, rotation, opacity)
brownMovement.messages = []
brownMovement.events = []
Description
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
1opacity can get. A value of0.3means that opacity will oscillate in the range0.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
- Transforms: Applies one
translateand onerotatetransform. - CSS: Works with any styling. Modifies the element's
style.opacity. - Events: Does not set event listeners.
Changes Log
- Controller introduced in v.0.80