Class: IExtension

IExtension

Class for creating modules Accessed via ISystem.extensionInterface

Methods

registerAndCompileWebGlProgram(programName, vertexShader, fragmentShader, uVars, aVars) → {Promise.<void>}

Used to register a new draw program
Parameters:
Name Type Description
programName string
vertexShader string raw vertex shader program
fragmentShader string raw fragment shader program
uVars Array.<string> program uniform variables names
aVars Array.<string> program attribute variables names
Source:
Returns:
Type
Promise.<void>

registerDrawObject(createInstanceKey, createInstanceMethod)

Is used for registering new Object in DrawObjectFactory, \ registered method could be then called with this.draw[createInstanceKey]
Parameters:
Name Type Description
createInstanceKey string a key for calling method from DrawObjectFactory
createInstanceMethod function method
Source:

registerObjectRender(objectClassName, objectRenderMethod, objectWebGlDrawProgramopt)

Register render method for class.
Parameters:
Name Type Attributes Description
objectClassName string object name registered to DrawObjectFactory
objectRenderMethod function should be promise based returns vertices number and draw program
objectWebGlDrawProgram string <optional>
a webgl program name previously registered with iExtension.registerAndCompileWebGlProgram()
Source:

registerRenderInit(method) → {void}

Inject method to render.init stage. Should be Promise based.
Parameters:
Name Type Description
method function
Source:
Returns:
Type
void