Module: Text

Text engine. Controls all text
Author:
  • Onien
Source:

Classes

Text

Methods

(inner) constructor(element, config)

creates class
Parameters:
Name Type Description
element HTMLElement
config Object
Properties
Name Type Description
speed number typing speed
Source:

(inner) set(text, element)

just sets text
Parameters:
Name Type Description
text string text
element HTMLElement html element
Source:

(inner) setName(name)

sets text in the name element
Parameters:
Name Type Description
name string name
Source:

(inner) type(text, addedopt, afteropt, elementopt, speedopt, parserDataopt) → {number}

types in the element, skips html, parses text
Parameters:
Name Type Attributes Default Description
text string
added string <optional>
"" start string
after function <optional>
will be executed after all text typed
element HTMLElement <optional>
speed number <optional>
config.speed typing speed
parserData Object <optional>
{}
Source:
Returns:
interval
Type
number

(inner) typeMultiply(texts, elements, afteropt, idxopt)

types array of the texts
Parameters:
Name Type Attributes Default Description
texts Array.<string>
elements Array.<HTMLElement>
after function <optional>
idx number <optional>
0 start index
Source: