Function
| Static Public Summary | ||
| public | Anim(cfg: *) Keyframed interpolated animation. | |
| public |  | |
| public | Framebuffer(_cgl: Context, _w: Number, _h: Number, options: Object) a framebuffer | |
| public | Framebuffer2(cgl: *, w: *, h: *, options: *): * | |
| public | Geometry(name: String): * a geometry contains all information about a mesh, vertices, texturecoordinates etc. | |
| public | Key(obj: *) | |
| public | Link(scene: Object) | |
| public | LoadingStatus(patch: *) LoadingStatus class, manages asynchronous loading jobs | |
| public | Marker(_cgl: *) | |
| public |  | |
| public | webgl renderable 3d object | |
| public | Op(): * | |
| public | Port(___op: *, name: *, type: *, uiAttribs: *): * data is coming into and out of ops through input and output ports | |
| public | TextureEffect(cgl: *, options: *) | |
| public | Timer() Measuring time | |
| public | Variable() todo: old... | |
| public | WireCube(cgl: *) | |
| public | WirePoint(cgl: *) | |
| public | ajax(url: *, cb: *, method: *, post: *, contenttype: *, jsonP: *, headers: *, options: *) make an ajax request | |
| public | ajaxSync(url: *, cb: *, method: *, post: *, contenttype: *) | |
| 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 | easeCubicInOut(t: *): * | |
| public | easeCubicOut(t: *): * | |
| public | easeExpoIn(t: *): * | |
| public | easeExpoInOut(t: *): * | |
| public | easeExpoOut(t: *): * | |
| public | escapeHTML(string: *): * | |
| public | extendMeshWithFeedback(Mesh: *) | |
| public | filename(url: String): String return the filename part of a url | |
| public | getBlurPassFragmentShader(): string | |
| public | getBlurPassVertexShader(): string | |
| public | getShadowPassFragmentShader(): string | |
| public | getShadowPassVertexShader(): string | |
| public | getShortOpName(fullname: string): * get op shortname: only last part of fullname and without version | |
| public | internalNow(): * | |
| public | keyCodeToName(keyCode: *): * | |
| 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 | now(): * current time in milliseconds | |
| public | preproc(str: *, vars: *): * | |
| public | request(options: *) | |
| 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 | |
Static Public
public Anim(cfg: *) source
import {Anim} from './core/anim.js'Keyframed interpolated animation.
Available Easings:
CONSTANTS.ANIM.EASING_LINEAR
CONSTANTS.ANIM.EASING_ABSOLUTE
CONSTANTS.ANIM.EASING_SMOOTHSTEP
CONSTANTS.ANIM.EASING_SMOOTHERSTEP
CONSTANTS.ANIM.EASING_CUBICSPLINE
CONSTANTS.ANIM.EASING_CUBIC_IN
CONSTANTS.ANIM.EASING_CUBIC_OUT
CONSTANTS.ANIM.EASING_CUBIC_INOUT
CONSTANTS.ANIM.EASING_EXPO_IN
CONSTANTS.ANIM.EASING_EXPO_OUT
CONSTANTS.ANIM.EASING_EXPO_INOUT
CONSTANTS.ANIM.EASING_SIN_IN
CONSTANTS.ANIM.EASING_SIN_OUT
CONSTANTS.ANIM.EASING_SIN_INOUT
CONSTANTS.ANIM.EASING_BACK_IN
CONSTANTS.ANIM.EASING_BACK_OUT
CONSTANTS.ANIM.EASING_BACK_INOUT
CONSTANTS.ANIM.EASING_ELASTIC_IN
CONSTANTS.ANIM.EASING_ELASTIC_OUT
CONSTANTS.ANIM.EASING_BOUNCE_IN
CONSTANTS.ANIM.EASING_BOUNCE_OUT
CONSTANTS.ANIM.EASING_QUART_IN
CONSTANTS.ANIM.EASING_QUART_OUT
CONSTANTS.ANIM.EASING_QUART_INOUT
CONSTANTS.ANIM.EASING_QUINT_IN
CONSTANTS.ANIM.EASING_QUINT_OUT
CONSTANTS.ANIM.EASING_QUINT_INOUT
Params:
| Name | Type | Attribute | Description | 
| cfg | * | 
Example:
var anim=new CABLES.Anim();
anim.setValue(0,0);  // set value 0 at 0 seconds
anim.setValue(10,1); // set value 1 at 10 seconds
anim.getValue(5);    // get value at 5 seconds - this returns 0.5public Framebuffer(_cgl: Context, _w: Number, _h: Number, options: Object) source
import {Framebuffer} from './core/cgl/cgl_framebuffer.js'a framebuffer
Params:
| Name | Type | Attribute | Description | 
| _cgl | Context | cgl | |
| _w | Number | width | |
| _h | Number | height | |
| options | Object | 
public Framebuffer2(cgl: *, w: *, h: *, options: *): * source
import {Framebuffer2} from './core/cgl/cgl_framebuffer2.js'Params:
| Name | Type | Attribute | Description | 
| cgl | * | ||
| w | * | ||
| h | * | ||
| options | * | 
Return:
| * | 
public Geometry(name: String): * source
import {Geometry} from './core/cg/cg_geom.js'a geometry contains all information about a mesh, vertices, texturecoordinates etc. etc.
Params:
| Name | Type | Attribute | Description | 
| name | String | 
Return:
| * | 
Example:
// create a triangle with all attributes
const geom=new Geometry("triangle"),
geom.vertices = [
     0.0,           sizeH.get(),  0.0,
    -sizeW.get(),  -sizeH.get(),  0.0,
     sizeW.get(),  -sizeH.get(),  0.0 ];
geom.vertexNormals = [
     0.0,  0.0,  1.0,
     0.0,  0.0,  1.0,
     0.0,  0.0,  1.0 ];
geom.tangents = [
    1,0,0,
    1,0,0,
    1,0,0 ];
geom.biTangents = [
    0,1,0,
    0,1,0,
    0,1,0 ];
geom.texCoords = [
     0.5,  0.0,
     1.0,  1.0,
     0.0,  1.0, ];
geom.verticesIndices = [
    0, 1, 2 ];public Key(obj: *) source
import {Key} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| obj | * | 
public Link(scene: Object) source
import {Link} from './core/core_link.js'Params:
| Name | Type | Attribute | Description | 
| scene | Object | The patch object | 
public LoadingStatus(patch: *) source
import {LoadingStatus} from './core/loadingstatus.js'LoadingStatus class, manages asynchronous loading jobs
Params:
| Name | Type | Attribute | Description | 
| patch | * | 
public Marker(_cgl: *) source
import {Marker} from './core/cgl/cgl_marker.js'Params:
| Name | Type | Attribute | Description | 
| _cgl | * | 
public Mesh(_cgl: Context, __geom: Geometry, _options: Number): * source
import {Mesh} from './core/cgl/cgl_mesh.js'webgl renderable 3d object
Return:
| * | 
Example:
const cgl=this._cgl
const mesh=new CGL.Mesh(cgl, geometry);
function render()
{
  mesh.render(cgl.getShader());
}public Port(___op: *, name: *, type: *, uiAttribs: *): * source
import {Port} from './core/core_port.js'data is coming into and out of ops through input and output ports
Params:
| Name | Type | Attribute | Description | 
| ___op | * | ||
| name | * | ||
| type | * | ||
| uiAttribs | * | 
Return:
| * | 
Example:
const myPort=op.inString("String Port");public TextureEffect(cgl: *, options: *) source
import {TextureEffect} from './core/cgl/cgl_textureeffect.js'Params:
| Name | Type | Attribute | Description | 
| cgl | * | ||
| options | * | 
public Variable() source
import {Variable} from './core/sessionvar.js'todo: old... remove this from ops...
public WireCube(cgl: *) source
import {WireCube} from './core/cgl/cgl_marker.js'Params:
| Name | Type | Attribute | Description | 
| cgl | * | 
public WirePoint(cgl: *) source
import {WirePoint} from './core/cgl/cgl_marker.js'Params:
| Name | Type | Attribute | Description | 
| cgl | * | 
public ajax(url: *, cb: *, method: *, post: *, contenttype: *, jsonP: *, headers: *, options: *) source
import {ajax} from './core/utils.js'make an ajax request
Params:
| Name | Type | Attribute | Description | 
| url | * | ||
| cb | * | ||
| method | * | ||
| post | * | ||
| contenttype | * | ||
| jsonP | * | ||
| headers | * | ||
| options | * | 
public ajaxSync(url: *, cb: *, method: *, post: *, contenttype: *) source
import {ajaxSync} from './core/utils.js'Params:
| Name | Type | Attribute | Description | 
| url | * | ||
| cb | * | ||
| method | * | ||
| post | * | ||
| contenttype | * | 
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 | 
Return:
| * | 
public cleanJson(obj: *): * source
import {cleanJson} from './core/utils.js'Params:
| Name | Type | Attribute | Description | 
| obj | * | 
Return:
| * | 
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 | * | 
Return:
| * | 
public easeCubicInOut(t: *): * source
import {easeCubicInOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| t | * | 
Return:
| * | 
public easeCubicOut(t: *): * source
import {easeCubicOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| t | * | 
Return:
| * | 
public easeExpoIn(t: *): * source
import {easeExpoIn} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| t | * | 
Return:
| * | 
public easeExpoInOut(t: *): * source
import {easeExpoInOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| t | * | 
Return:
| * | 
public easeExpoOut(t: *): * source
import {easeExpoOut} from './core/anim_key.js'Params:
| Name | Type | Attribute | Description | 
| t | * | 
Return:
| * | 
public escapeHTML(string: *): * source
import {escapeHTML} from './core/cgl/cgl_utils.js'Params:
| Name | Type | Attribute | Description | 
| string | * | 
Return:
| * | 
public extendMeshWithFeedback(Mesh: *) source
import {extendMeshWithFeedback} from './libs/cgl/deprecatedMeshFeedback/index.js'Params:
| Name | Type | Attribute | Description | 
| Mesh | * | 
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 getBlurPassFragmentShader(): string source
import {getBlurPassFragmentShader} from './libs/cgl/light/createshaders.js'Return:
| string | 
public getBlurPassVertexShader(): string source
import {getBlurPassVertexShader} from './libs/cgl/light/createshaders.js'Return:
| string | 
public getShadowPassFragmentShader(): string source
import {getShadowPassFragmentShader} from './libs/cgl/light/createshaders.js'Return:
| string | 
public getShadowPassVertexShader(): string source
import {getShadowPassVertexShader} from './libs/cgl/light/createshaders.js'Return:
| string | 
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 | 
Return:
| * | 
public keyCodeToName(keyCode: *): * source
import {keyCodeToName} from './core/utils.js'Params:
| Name | Type | Attribute | Description | 
| keyCode | * | 
Return:
| * | 
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 preproc(str: *, vars: *): * source
import {preproc} from './core/cg/preproc.js'Params:
| Name | Type | Attribute | Description | 
| str | * | ||
| vars | * | 
Return:
| * | 
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 | 
