dojox/fx/text (version 1.10)

See the dojox/fx/text reference documentation for more information.

Method Summary

  • _split(args) Split a block of text into words or letters
  • backspace(args) Split a block of text into words or letters and backspace them in sequence
  • blockFadeIn(args)
  • blockFadeOut(args) Split a block of text into words or letters and fade them
  • build(args)
  • converge(args)
  • disintegrate(args) Split a block of text into words or letters and let them fall
  • explode(args) Explode a block of text into words or letters
  • type(args)

Methods

_split(args)
Defined by dojox/fx/text

Split a block of text into words or letters

Returns an animation that will split the node into a grid of pieces that move independently.

NOTE: In some rendering engines, the text will appear to "jump" from its initial position when the animation begins. To work around this bug, enclose the node's text in a <p> or <div>.

Parameter Type Description
args Object
  • args.crop: Boolean - If true, pieces will be positioned relatively rather than absolutely
  • args.text: String - Text to place inside the node (otherwise node.innerHTML is used)
  • args.words: Boolean - If true, the text will be split into words rather than characters
  • args.pieceAnimation: Function(piece, pieceCoords, nodeCoords, number, numPieces) Returns either the dojo.Animation or an array of dojo.Animation objects for the piece. The arguments:
    • pieceCoords is the result of dojo.coords(piece, true);
    • nodeCoords is the result of dojo.coords(args.node, true);
    • number is the piece's position in the array of pieces, and numPieces is the array.length
backspace(args)
Defined by dojox/fx/text

Split a block of text into words or letters and backspace them in sequence

Returns an animation that will split the text into spans of words or characters that appear as if they were being backspaced (or typed) in real-time.

Parameter Type Description
args Object
  • args.interval: Float - The number of milliseconds between each piece's animation (default is determined by text length and args.duration);
  • args.wordDelay: Integer - The number of milliseconds between each word (only effective when args.unhide = true)
  • args.fixed: Boolean - If true, only style.opacity changes; otherwise, style.display changes between none and inline, adding realism (default = false)
  • args.random: Float - If true, pieces have a random delay. The value defines how much randomness is introduced (only effective when args.unhide = true)
  • args.unhide: Boolean - If true, the animation is reversed
blockFadeIn(args)
Defined by dojox/fx/text
Parameter Type Description
args Object
blockFadeOut(args)
Defined by dojox/fx/text

Split a block of text into words or letters and fade them

Returns an animation that will split the text into spans of words or characters that fade in or out.

Parameter Type Description
args Object
  • args.words: Boolean - If true, text will be split into words rather than characters
  • args.interval: Float - The number of milliseconds between each piece's animation (default is 0)
  • args.random: Float - If true, pieces have a random delay. The value defines how much
                     randomness is introduced
  • args.reverseOrder: Boolean - If true, pieces animate in reversed order
  • args.unhide: Boolean - If true, the animation is reversed
build(args)
Defined by dojox/fx/text
Parameter Type Description
args Object
converge(args)
Defined by dojox/fx/text
Parameter Type Description
args Object
disintegrate(args)
Defined by dojox/fx/text

Split a block of text into words or letters and let them fall

Returns an animation that will split the text into spans of words or characters that drop.

Parameter Type Description
args Object
  • args.crop: Boolean - If true, pieces will be positioned relatively rather than absolutely
  • args.words: Boolean - If true, text will be split into words rather than characters
  • args.interval: Float - The number of milliseconds between each piece's animation
  • args.distance: Float - The number of the node's heights to drop (default is 1.5)
  • args.fade: Boolean - If true, pieces fade out while in motion (default is true)
  • args.random: Float - If set, pieces fall in random order. The value defines how much
                     randomness is introduced
  • args.reverseOrder: Boolean - If true, pieces animate in reversed order
  • args.unhide: Boolean - If true, the peices fall from above and land in place
explode(args)
Defined by dojox/fx/text

Explode a block of text into words or letters

Returns an animation that will split the text into a spans of words or characters that fly away from the center.

Parameter Type Description
args Object
  • args.crop: Boolean - If true, pieces will be positioned relatively rather than absolutely
  • args.words: Boolean - If true, text will be split into words rather than characters
  • args.random: Float - If set, pieces fly to random distances, for random durations,
                     and in slightly random directions. The value defines how much
                     randomness is introduced.
  • args.distance: Float - Multiplier for the distance the pieces fly (even when random)
  • args.fade: Boolean - If true, pieces fade out while in motion (default is true)
  • args.fadeEasing: Function - If args.fade is true, the fade animations use this easing function
  • args.unhide: Boolean - If true, the animation is reversed
  • args.sync: Boolean - If args.unhide is true, all the pieces converge at the same time
                     (default is true)
type(args)
Defined by dojox/fx/text
Parameter Type Description
args Object
Error in the documentation? Can’t find what you are looking for? Let us know!