Home Reference Source

Function

Static Public Summary
public

todo: old...

public

ajax(url: string, cb: function, method: string, post: null, contenttype: null, jsonP: boolean, headers: object, options: object)

make an ajax request

public

basename(url: String): String

return the filename part of a url without extension

public

cacheBust(url: String): String

append a unique/random parameter to a url, so the browser is forced to reload the file, even if its cached

public

clamp(value: Number, min: Number, max: Number): *

clamp number / make sure its between min/max

public

cleanJson(obj: *): *

public

copyArray(src: Array, dst: Array): Array

copy the content of an array

public

easeCubicIn(t: *): *

public
public
public

easeExpoIn(t: *): *

public
public

easeExpoOut(t: *): *

public

escapeHTML(string: *): *

public
public

filename(url: String): String

return the filename part of a url

public

float32Concat(first: Float32Array, second: Float32Array): Float32Array

Merge two Float32Arrays.

public

getShortOpName(fullname: string): *

get op shortname: only last part of fullname and without version

public
public

isNumeric(n: any): Boolean

returns true if parameter is a number

public

logErrorConsole(initiator: *)

public

output a stacktrace to the console

public

map(x: Number, _oldMin: Number, _oldMax: Number, _newMin: Number, _newMax: Number, _easing: Number): Number

map a value in a range to a value in another range

public

now(): *

public

prefixedHash(str: string, prefix: string): string

public

request(options: *)

public

shortId(): *

public

shuffleArray(array: Array | Float32Array): Array | Float32Array

randomize order of an array

public

simpleId(): *

public

smoothStep(perc: Number): Number

smoothStep a value

public

smootherStep(perc: Number): Number

smootherstep a value

public

uniqueArray(arr: Array<any>): *

public

uuid(): UUID

generate a UUID

Static Public

public Variable() source

import {Variable} from './core/sessionvar.js'

todo: old... remove this from ops...

public ajax(url: string, cb: function, method: string, post: null, contenttype: null, jsonP: boolean, headers: object, options: object) source

import {ajax} from './core/utils.js'

make an ajax request

Params:

NameTypeAttributeDescription
url string
cb function
method string
post null
contenttype null
jsonP boolean
headers object
options object

public basename(url: String): String source

import {basename} from './core/utils.js'

return the filename part of a url without extension

Params:

NameTypeAttributeDescription
url String

Return:

String

just the filename

public cacheBust(url: String): String source

import {cacheBust} from './core/utils.js'

append a unique/random parameter to a url, so the browser is forced to reload the file, even if its cached

Params:

NameTypeAttributeDescription
url String

The url to append the cachebuster parameter to.

Return:

String

url with cachebuster parameter

public clamp(value: Number, min: Number, max: Number): * source

import {clamp} from './core/utils.js'

clamp number / make sure its between min/max

Params:

NameTypeAttributeDescription
value Number

value to be mapped

min Number

minimum value

max Number

maximum value

Return:

*

public cleanJson(obj: *): * source

import {cleanJson} from './core/utils.js'

Params:

NameTypeAttributeDescription
obj *

Return:

*

public copyArray(src: Array, dst: Array): Array source

import {copyArray} from './core/utils.js'

copy the content of an array

Params:

NameTypeAttributeDescription
src Array

sourceArray

dst Array

optional

Return:

Array

dst

public easeCubicIn(t: *): * source

import {easeCubicIn} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public easeCubicInOut(t: *): * source

import {easeCubicInOut} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public easeCubicOut(t: *): * source

import {easeCubicOut} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public easeExpoIn(t: *): * source

import {easeExpoIn} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public easeExpoInOut(t: *): * source

import {easeExpoInOut} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public easeExpoOut(t: *): * source

import {easeExpoOut} from './core/anim_key.js'

Params:

NameTypeAttributeDescription
t *

Return:

*

public escapeHTML(string: *): * source

import {escapeHTML} from './core/utils.js'

Params:

NameTypeAttributeDescription
string *

Return:

*

public extendJs() source

import {extendJs} from './core/extendjs.js'

public filename(url: String): String source

import {filename} from './core/utils.js'

return the filename part of a url

Params:

NameTypeAttributeDescription
url String

Return:

String

just the filename

public float32Concat(first: Float32Array, second: Float32Array): Float32Array source

import {float32Concat} from './core/utils.js'

Merge two Float32Arrays.

Params:

NameTypeAttributeDescription
first Float32Array

Left-hand side array

second Float32Array

Right-hand side array

Return:

Float32Array

public getShortOpName(fullname: string): * source

import {getShortOpName} from './core/utils.js'

get op shortname: only last part of fullname and without version

Params:

NameTypeAttributeDescription
fullname string

full op name

Return:

*

public internalNow(): * source

import {internalNow} from './core/timer.js'

Return:

*

public isNumeric(n: any): Boolean source

import {isNumeric} from './core/utils.js'

returns true if parameter is a number

Params:

NameTypeAttributeDescription
n any

value The value to check.

Return:

Boolean

public logErrorConsole(initiator: *) source

import {logErrorConsole} from './core/utils.js'

Params:

NameTypeAttributeDescription
initiator *

public logStack() source

import {logStack} from './core/utils.js'

output a stacktrace to the console

public map(x: Number, _oldMin: Number, _oldMax: Number, _newMin: Number, _newMax: Number, _easing: Number): Number source

import {map} from './core/utils.js'

map a value in a range to a value in another range

Params:

NameTypeAttributeDescription
x Number

value to be mapped

_oldMin Number

old range minimum value

_oldMax Number

old range maximum value

_newMin Number

new range minimum value

_newMax Number

new range maximum value

_easing Number

Return:

Number

mapped value

public now(): * source

import {now} from './core/timer.js'

Return:

*

public prefixedHash(str: string, prefix: string): string source

import {prefixedHash} from './core/utils.js'

Params:

NameTypeAttributeDescription
str string
prefix string

Return:

string

See:

public request(options: *) source

import {request} from './core/utils.js'

Params:

NameTypeAttributeDescription
options *

public shortId(): * source

import {shortId} from './core/utils.js'

Return:

*

public shuffleArray(array: Array | Float32Array): Array | Float32Array source

import {shuffleArray} from './core/utils.js'

randomize order of an array

Params:

NameTypeAttributeDescription
array Array | Float32Array

{Array} original

Return:

Array | Float32Array

shuffled array

public simpleId(): * source

import {simpleId} from './core/utils.js'

Return:

*

public smoothStep(perc: Number): Number source

import {smoothStep} from './core/utils.js'

smoothStep a value

Params:

NameTypeAttributeDescription
perc Number

value value to be smoothed [0-1]

Return:

Number

smoothed value

public smootherStep(perc: Number): Number source

import {smootherStep} from './core/utils.js'

smootherstep a value

Params:

NameTypeAttributeDescription
perc Number

value to be smoothed [0-1]

Return:

Number

smoothed value

public uniqueArray(arr: Array<any>): * source

import {uniqueArray} from './core/utils.js'

Params:

NameTypeAttributeDescription
arr Array<any>

Return:

*

public uuid(): UUID source

import {uuid} from './core/utils.js'

generate a UUID

Return:

UUID

generated UUID