utils

lumin. utils

Classes

AttributeType
CallbackID
Filter
Format
LayoutLocation
LightType
LocaleHelper
Params2d
Params3d
PrimitiveType
ShaderType
Wrap

Methods

(static) BuildTexCoords(coordsMin, coordsMax) → {Array.<vec2>}

Given the lower-left and upper-right corners of an un-rotated quad,
builds the texture coordinates for rendering it in full.

Parameters:
Name Type Description
coordsMin vec2

Min texture coordinates (lower-left corner).

coordsMax vec2

Max texture coordinates (upper-right corner).

Returns:

Texture coordinates for rendering the quad geometry.

Type
Array.<vec2>

(static) ToAscii(unicode) → {string}

Truncates all characters to the range of char.

Parameters:
Name Type Description
unicode string
Returns:
Type
string

(static) ToLower(str) → {string}

Applies std::tolower to every character of the input string.

Parameters:
Name Type Description
str string

string of ASCII characters (UTF-8 doesn't work with this function).

Returns:

a new string containing the characters of str with std::tolower applied.

Type
string

(static) ToUnicode(ascii) → {string}

Converts from ASCII to unicode.

Parameters:
Name Type Description
ascii string
Returns:
Type
string

(static) ToUpper(str) → {string}

Applies std::toupper to every character of the input string.

Parameters:
Name Type Description
str string

string of ASCII characters (UTF-8 doesn't work with this function).

Returns:

a new string containing the characters of str with std::toupper applied.

Type
string

(static) Utf8ToUtf32(utf8String) → {string}

Converts a UTF8 string into the UTF32 equivalent.

Parameters:
Name Type Description
utf8String string
Returns:
Type
string

(static) Utf32ToUtf8(utf32String) → {string}

Converts a UTF32 string into the UTF8 equivalent.

Parameters:
Name Type Description
utf32String string
Returns:
Type
string