Various utility functions / snippets of code that GPU.JS uses internally.\ This covers various snippets of code that is not entirely gpu.js specific (ie. may find uses elsewhere)
Note that all moethods in this class is “static” by nature `GPUUtils.functionName()`
GPUUtils | Various utility functions / snippets of code that GPU.JS uses internally.\ This covers various snippets of code that is not entirely gpu.js specific (ie. |
Functions | |
systemEndianness | Gets the system endianness, and cache it |
isFunction | Return TRUE, on a JS function |
isFunctionString | Return TRUE, on a valid JS function string |
getFunctionName_fromString | Return the function name from a JS function string |
getParamNames_fromString | Return list of parameter names extracted from the JS function string |
clone | Returns a clone |
newPromise | Returns a `new Promise` object based on the underlying implmentation |
functionBinder | Limited implmentation of Function.bind, with fallback |
getArgumentType | Evaluate the argument type, to apply respective logic for it |
isCanvas | Return TRUE, on a valid DOM canvas object |
browserSupport_canvas | Return TRUE, if browser supports canvas |
init_canvas | Initiate and returns a canvas, for usage in init_webgl. |
isWebgl | Return TRUE, on a valid webgl context object |
browserSupport_webgl | Return TRUE, if browser supports webgl |
init_webgl | Initiate and returns a webgl, from a canvas object Returns only if webgl is supported by browser. |
Gets the system endianness, and cache it
function systemEndianness()
Return TRUE, on a JS function
function isFunction( funcObj )
Return TRUE, on a valid JS function string
function isFunctionString( funcStr )
Return the function name from a JS function string
function getFunctionName_fromString( funcStr )
Return list of parameter names extracted from the JS function string
function getParamNames_fromString( func )
Returns a clone
function clone( obj )
Returns a `new Promise` object based on the underlying implmentation
function newPromise( executor )
Limited implmentation of Function.bind, with fallback
function functionBinder( inFunc, thisObj )
Evaluate the argument type, to apply respective logic for it
function getArgumentType( arg )
Return TRUE, on a valid DOM canvas object
function isCanvas( canvasObj )
Return TRUE, if browser supports canvas
function browserSupport_canvas()
Initiate and returns a canvas, for usage in init_webgl.
function init_canvas()
Return TRUE, on a valid webgl context object
function isWebgl( webglObj )
Return TRUE, if browser supports webgl
function browserSupport_webgl()
Initiate and returns a webgl, from a canvas object Returns only if webgl is supported by browser.
function init_webgl( canvasObj )