build/module/lib/materials/ShaderMaterial.js
/**
     * 1. Creates a subscription to WebGL rendering context events but does not synchronize.
     * 2. Constructs vertex and fragment shader sources.
     * 3. Synchronizes with the WebGL rendering context if this is a top-level class (levelUp is zero).
     *
     * The contextManager must be defined.
     *
     * @param vertexShaderSrc The vertex shader source code.
     * @param fragmentShaderSrc The fragment shader source code.
     * @param attribs The attribute ordering.
     * @param contextManager The <code>ContextManager</code> to subscribe to for WebGL rendering context events.
     * @param levelUp The level of this class in the implementation inheritance hierarchy.
     */
1. Creates a subscription to WebGL rendering context events but does not synchronize.
2. Constructs vertex and fragment shader sources.
3. Synchronizes with the WebGL rendering context if this is a top-level class (levelUp is zero).

The contextManager must be defined.

@param vertexShaderSrc The vertex shader source code.
@param fragmentShaderSrc The fragment shader source code.
@param attribs The attribute ordering.
@param contextManager The ContextManager to subscribe to for WebGL rendering context events.
@param levelUp The level of this class in the implementation inheritance hierarchy.
1 . Creates a subscription to WebGL rendering context events but does not synchronize . 2 . Constructs vertex and fragment shader sources . 3 . Synchronizes with the WebGL rendering context if this is a top - level class ( levelUp is zero ) . The contextManager must be defined . @param vertexShaderSrc The vertex shader source code . @param fragmentShaderSrc The fragment shader source code . @param attribs The attribute ordering . @param contextManager The ContextManager to subscribe to for WebGL rendering context events . @param levelUp The level of this class in the implementation inheritance hierarchy .
function ShaderMaterial(vertexShaderSrc, fragmentShaderSrc, attribs, contextManager, levelUp) {
        if (levelUp === void 0) { levelUp = 0; }
        var _this = _super.call(this, contextManager) || this;
        _this._attributesByName = {};
        _this._attributesByIndex = [];
        _this._uniforms = {};
        _this.setLoggingName('ShaderMaterial');
        if (isDefined(vertexShaderSrc) && !isNull(vertexShaderSrc)) {
            _this._vertexShaderSrc = mustBeString('vertexShaderSrc', vertexShaderSrc);
        }
        if (isDefined(fragmentShaderSrc) && !isNull(fragmentShaderSrc)) {
            _this._fragmentShaderSrc = mustBeString('fragmentShaderSrc', fragmentShaderSrc);
        }
        _this._attribs = mustBeArray('attribs', attribs);
        if (levelUp === 0) {
            _this.synchUp();
        }
        return _this;
    }
function ShaderMaterial ( vertexShaderSrc , fragmentShaderSrc , attribs , contextManager , levelUp ) { if ( levelUp === void 0 ) { levelUp = 0 ; } var _this = _super . call ( this , contextManager ) || this ; _this . _attributesByName = { } ; _this . _attributesByIndex = [ ] ; _this . _uniforms = { } ; _this . setLoggingName ( 'ShaderMaterial' ) ; if ( isDefined ( vertexShaderSrc ) && ! isNull ( vertexShaderSrc ) ) { _this . _vertexShaderSrc = mustBeString ( 'vertexShaderSrc' , vertexShaderSrc ) ; } if ( isDefined ( fragmentShaderSrc ) && ! isNull ( fragmentShaderSrc ) ) { _this . _fragmentShaderSrc = mustBeString ( 'fragmentShaderSrc' , fragmentShaderSrc ) ; } _this . _attribs = mustBeArray ( 'attribs' , attribs ) ; if ( levelUp === 0 ) { _this . synchUp ( ) ; } return _this ; }
1.
1 .
/**
         *
         */ /**
         *
         */