build/module/lib/materials/MeshMaterial.js
/**
 *
 * @param contextId The context identifier used when creating the WebGL rendering context. May be undefined.
 * @param options
 * @hidden
 */
@param contextId The context identifier used when creating the WebGL rendering context. May be undefined.
@param options
@hidden
@param contextId The context identifier used when creating the WebGL rendering context . May be undefined . @param options @hidden
function builder(contextId, options) {
    if (isUndefined(options) || isNull(options)) {
        options = { attributes: {}, uniforms: {} };
        defaultOptions(options);
    }
    else {
        mustBeObject('options', options);
        if (shaderPropertiesCount(options) === 0) {
            defaultOptions(options);
        }
    }
    var attributes = isDefined(options.attributes) ? options.attributes : {};
    var uniforms = isDefined(options.uniforms) ? options.uniforms : {};
    var gpb = new GraphicsProgramBuilder();
    gpb.version(glslVersionFromWebGLContextId(options.version, contextId));
    var aNames = Object.keys(attributes);
    for (var a = 0; a < aNames.length; a++) {
        var aName = aNames[a];
        var size = attributes[aName];
        gpb.attribute(aName, size);
    }
    var uNames = Object.keys(uniforms);
    for (var u = 0; u < uNames.length; u++) {
        var uName = uNames[u];
        var type = uniforms[uName];
        gpb.uniform(uName, type);
    }
    return gpb;
}
function builder ( contextId , options ) { if ( isUndefined ( options ) || isNull ( options ) ) { options = { attributes : { } , uniforms : { } } ; defaultOptions ( options ) ; } else { mustBeObject ( 'options' , options ) ; if ( shaderPropertiesCount ( options ) === 0 ) { defaultOptions ( options ) ; } } var attributes = isDefined ( options . attributes ) ? options . attributes : { } ; var uniforms = isDefined ( options . uniforms ) ? options . uniforms : { } ; var gpb = new GraphicsProgramBuilder ( ) ; gpb . version ( glslVersionFromWebGLContextId ( options . version , contextId ) ) ; var aNames = Object . keys ( attributes ) ; for ( var a = 0 ; a < aNames . length ; a ++ ) { var aName = aNames [ a ] ; var size = attributes [ aName ] ; gpb . attribute ( aName , size ) ; } var uNames = Object . keys ( uniforms ) ; for ( var u = 0 ; u < uNames . length ; u ++ ) { var uName = uNames [ u ] ; var type = uniforms [ uName ] ; gpb . uniform ( uName , type ) ; } return gpb ; }
@param contextId The context identifier used when creating the WebGL rendering context.
@param contextId The context identifier used when creating the WebGL rendering context .