Function
| Static Public Summary | ||
| public |
Variable() 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 number / make sure its between min/max |
|
| public |
|
|
| public |
copyArray(src: Array, dst: Array): Array copy the content of an array |
|
| public |
easeCubicIn(t: *): * |
|
| public |
easeCubicInOut(t: *): * |
|
| public |
easeCubicOut(t: *): * |
|
| public |
easeExpoIn(t: *): * |
|
| public |
easeExpoInOut(t: *): * |
|
| public |
easeExpoOut(t: *): * |
|
| public |
escapeHTML(string: *): * |
|
| public |
extendJs() |
|
| 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 |
internalNow(): * |
|
| public |
isNumeric(n: any): Boolean returns true if parameter is a number |
|
| public |
logErrorConsole(initiator: *) |
|
| public |
logStack() 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 |
|
|
| public |
prefixedHash(str: string, prefix: string): string |
|
| public |
|
|
| public |
|
|
| public |
shuffleArray(array: Array | Float32Array): Array | Float32Array randomize order of an array |
|
| public |
|
|
| public |
smoothStep(perc: Number): Number smoothStep a value |
|
| public |
smootherStep(perc: Number): Number smootherstep a value |
|
| public |
uniqueArray(arr: Array<any>): * |
|
| public |
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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| value | Number | value to be mapped |
|
| min | Number | minimum value |
|
| max | Number | maximum value |
public cleanJson(obj: *): * source
import {cleanJson} from './core/utils.js'Params:
| Name | Type | Attribute | Description |
| obj | * |
public copyArray(src: Array, dst: Array): Array source
import {copyArray} from './core/utils.js'copy the content of an array
Params:
| Name | Type | Attribute | Description |
| src | Array | sourceArray |
|
| dst | Array | optional |
Return:
| Array | dst |
public easeCubicIn(t: *): * source
import {easeCubicIn} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public easeCubicInOut(t: *): * source
import {easeCubicInOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public easeCubicOut(t: *): * source
import {easeCubicOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public easeExpoIn(t: *): * source
import {easeExpoIn} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public easeExpoInOut(t: *): * source
import {easeExpoInOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public easeExpoOut(t: *): * source
import {easeExpoOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description |
| t | * |
public escapeHTML(string: *): * source
import {escapeHTML} from './core/utils.js'Params:
| Name | Type | Attribute | Description |
| string | * |
public filename(url: String): String source
import {filename} from './core/utils.js'return the filename part of a url
Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| fullname | string | full op name |
public isNumeric(n: any): Boolean source
import {isNumeric} from './core/utils.js'returns true if parameter is a number
Params:
| Name | Type | Attribute | Description |
| n | any | value The value to check. |
Return:
| Boolean |
public logErrorConsole(initiator: *) source
import {logErrorConsole} from './core/utils.js'Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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 prefixedHash(str: string, prefix: string): string source
import {prefixedHash} from './core/utils.js'Params:
| Name | Type | Attribute | Description |
| str | string | ||
| prefix | string |
Return:
| string |
public request(options: *) source
import {request} from './core/utils.js'Params:
| Name | Type | Attribute | Description |
| options | * |
public shuffleArray(array: Array | Float32Array): Array | Float32Array source
import {shuffleArray} from './core/utils.js'randomize order of an array
Params:
| Name | Type | Attribute | Description |
| array | Array | Float32Array | {Array} original |
Return:
| Array | Float32Array | shuffled array |
public smoothStep(perc: Number): Number source
import {smoothStep} from './core/utils.js'smoothStep a value
Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| arr | Array<any> |