Gets the string describing the uniforms used by shaders of this type.
@param ctx GVFContext shader is associated with
@return uniform descriptor string
@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()
187593
public String getUniformDescriptor(GVRContext ctx)
    {
        if (mShaderTemplate == null)
        {
            mShaderTemplate = makeTemplate(ID, ctx);
            ctx.getShaderManager().addShaderID(this);
        }
        return mShaderTemplate.getUniformDescriptor();
    }
685923
public static Drawable getPlaceHolder(Context ctx) {
        return new IconicsDrawable(ctx, MaterialDrawerFont.Icon.mdf_person).colorRes(R.color.accent).backgroundColorRes(R.color.primary).sizeDp(56).paddingDp(16);
    }
55380
function loadUniformsMatrices ( uniforms, object ) {

		_gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, object._modelViewMatrix.elements );

		if ( uniforms.normalMatrix ) {

			_gl.uniformMatrix3fv( uniforms.normalMatrix, false, object._normalMatrix.elements );

		}

	}
775383
public int getIconColor(Context ctx) {
        int iconColor;
        if (this.isEnabled()) {
            iconColor = ColorHolder.color(getIconColor(), ctx, R.attr.material_drawer_primary_icon, R.color.material_drawer_primary_icon);
        } else {
            iconColor = ColorHolder.color(getDisabledIconColor(), ctx, R.attr.material_drawer_hint_icon, R.color.material_drawer_hint_icon);
        }
        return iconColor;
    }
942670
public static String getMavenPath(PluginCoordinates coordinates) {
        StringBuilder artifactSubPath = new StringBuilder();
        artifactSubPath.append(coordinates.getGroupId().replace('.', '/'));
        artifactSubPath.append('/');
        artifactSubPath.append(coordinates.getArtifactId());
        artifactSubPath.append('/');
        artifactSubPath.append(coordinates.getVersion());
        artifactSubPath.append('/');
        artifactSubPath.append(coordinates.getArtifactId());
        artifactSubPath.append('-');
        artifactSubPath.append(coordinates.getVersion());
        if (coordinates.getClassifier() != null) {
            artifactSubPath.append('-');
            artifactSubPath.append(coordinates.getClassifier());
        }
        artifactSubPath.append('.');
        artifactSubPath.append(coordinates.getType());
        return artifactSubPath.toString();
    }
534700
public static Drawable getSelectableBackground(Context ctx) {
        int selectableBackgroundRes = getSelectableBackgroundRes(ctx);
        return ContextCompat.getDrawable(ctx, selectableBackgroundRes);
    }
1189011
function(){

    var gl = this.gl,
        prg = this.program;

    var context = {
      texIndex    : 0,
      ublockIndex : 0
    };

    // Uniforms
    // ========

    var numUniforms = gl.getProgramParameter( prg, gl.ACTIVE_UNIFORMS );

    for ( var uniformIndex = 0; uniformIndex < numUniforms; ++uniformIndex )
    {
      var uniform = gl.getActiveUniform( prg, uniformIndex );

      // safari 8.0 issue,
      // when recompiling shader and link the progam again, old uniforms are kept in ACTIVE_UNIFORMS count but return null here
      if( uniform === null ){
        gl.getError(); // also flush error
        continue;
      }

      var uName   = uniform.name,
          n       = uName.indexOf('[');

      if( n >= 0 ){
        uName = uName.substring(0, n);
      }

      var uLocation = gl.getUniformLocation( prg, uniform.name );
      
      // in Webgl2 location can be null here if uniform is member of a uniform block
      if( uLocation !== null ) 
      {
        this[uName] = getUniformSetter( uniform.type, uLocation, gl, context );
        this.dyns.push( uName );
      }
    }

    // Attributes
    // ==========

    var numAttribs = gl.getProgramParameter( prg, gl.ACTIVE_ATTRIBUTES );

    for (var aIndex = 0; aIndex < numAttribs; ++aIndex )
    {
      var attribName = gl.getActiveAttrib( prg, aIndex ).name;
      var aLocation  = gl.getAttribLocation( prg, attribName );
      this[attribName] = getAttribAccess( aLocation );
      this.dyns.push( attribName );
    }


    // UniformBlock
    // ============

    if( gl.ACTIVE_UNIFORM_BLOCKS !== undefined ) {

      var numBlocks = gl.getProgramParameter( prg, gl.ACTIVE_UNIFORM_BLOCKS );

      for ( var blockIndex = 0; blockIndex < numBlocks; ++blockIndex )
      {
        var blockName = gl.getActiveUniformBlockName( prg, blockIndex );
        this[blockName] = getUniformBufferSetFunction( blockIndex, gl, context );
        this.dyns.push( blockName );
      }

    }

    this.ready   = true;
  }
168588
public static CudaContext getBlasContext() {
        CudaContext context = (CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext();
        //context.syncOldStream(false);
        return context;
    }
909021
@Nullable
  public static XDesktop getCurrentDesktop(XComponentContext xContext) {
    try {
      if (xContext == null) {
        return null;
      }
      XMultiComponentFactory xMCF = UnoRuntime.queryInterface(XMultiComponentFactory.class,
              xContext.getServiceManager());
      if (xMCF == null) {
        return null;
      }
      Object desktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xContext);
      if (desktop == null) {
        return null;
      }
      return UnoRuntime.queryInterface(XDesktop.class, desktop);
    } catch (Throwable t) {
      MessageHandler.printException(t);     // all Exceptions thrown by UnoRuntime.queryInterface are caught
      return null;           // Return null as method failed
    }
  }
127655
function getFilterFn(layer, symbolizer) {
    const symbolizers = Object.keys(layer.shader)
        .filter(property => layer.shader[property].symbolizer === symbolizer);

    //No need to set a callback when at least one property is not filtered (i.e. it always activates the symbolizer)
    const alwaysActive = symbolizers
        .reduce((a, property) => a || !layer.shader[property].filtered, false);

    if (alwaysActive) {
        return undefined;
    }

    const fn = symbolizers
        .map((property) => layer.shader[property].js)
        .reduce((all, arr) => all.concat(arr), [])
        .join('');

    return wrapFn(`var _value = null; ${fn} return _value !== null;`);
}
113030
public TilePreparationInfo call() {
        return this.context.mdcContext(() -> {
            try {
                final ReferencedEnvelope mapGeoBounds = this.bounds.toReferencedEnvelope(this.paintArea);
                final CoordinateReferenceSystem mapProjection = mapGeoBounds.getCoordinateReferenceSystem();
                Dimension tileSizeOnScreen = this.tiledLayer.getTileSize();

                final double resolution = this.tiledLayer.getResolution();
                Coordinate tileSizeInWorld = new Coordinate(tileSizeOnScreen.width * resolution,
                                                            tileSizeOnScreen.height * resolution);

                // The minX minY of the first (minY, minY) tile
                Coordinate gridCoverageOrigin =
                        this.tiledLayer.getMinGeoCoordinate(mapGeoBounds, tileSizeInWorld);

                final String commonUrl = this.tiledLayer.createCommonUrl();

                ReferencedEnvelope tileCacheBounds = this.tiledLayer.getTileCacheBounds();
                double rowFactor = 1 / (resolution * tileSizeOnScreen.height);
                double columnFactor = 1 / (resolution * tileSizeOnScreen.width);

                int imageWidth = 0;
                int imageHeight = 0;
                int xIndex;
                int yIndex = (int) Math.floor((mapGeoBounds.getMaxY() - gridCoverageOrigin.y) /
                                                      tileSizeInWorld.y) + 1;

                double gridCoverageMaxX = gridCoverageOrigin.x;
                double gridCoverageMaxY = gridCoverageOrigin.y;

                List<SingleTilePreparationInfo> tiles = new ArrayList<>();

                for (double geoY = gridCoverageOrigin.y; geoY < mapGeoBounds.getMaxY();
                     geoY += tileSizeInWorld.y) {
                    yIndex--;
                    imageHeight += tileSizeOnScreen.height;
                    imageWidth = 0;
                    xIndex = -1;

                    gridCoverageMaxY = geoY + tileSizeInWorld.y;
                    for (double geoX = gridCoverageOrigin.x; geoX < mapGeoBounds.getMaxX();
                         geoX += tileSizeInWorld.x) {
                        xIndex++;
                        imageWidth += tileSizeOnScreen.width;
                        gridCoverageMaxX = geoX + tileSizeInWorld.x;

                        ReferencedEnvelope tileBounds = new ReferencedEnvelope(
                                geoX, gridCoverageMaxX, geoY, gridCoverageMaxY, mapProjection);

                        int row = (int) Math.round((tileCacheBounds.getMaxY() -
                                tileBounds.getMaxY()) * rowFactor);
                        int column = (int) Math.round((tileBounds.getMinX() -
                                tileCacheBounds.getMinX()) * columnFactor);

                        ClientHttpRequest tileRequest =
                                this.tiledLayer.getTileRequest(this.httpRequestFactory,
                                                               commonUrl, tileBounds,
                                                               tileSizeOnScreen, column,
                                                               row);
                        if (isInTileCacheBounds(tileCacheBounds, tileBounds)) {
                            if (isTileVisible(tileBounds)) {
                                tileRequest = this.requestCache.register(tileRequest);
                                tiles.add(new SingleTilePreparationInfo(xIndex, yIndex, tileRequest));
                            }
                        } else {
                            LOGGER.debug("Tile out of bounds: {}", tileRequest);
                            tiles.add(new SingleTilePreparationInfo(xIndex, yIndex, null));
                        }
                    }
                }

                return new TilePreparationInfo(tiles, imageWidth, imageHeight, gridCoverageOrigin,
                                               gridCoverageMaxX, gridCoverageMaxY, mapProjection);
            } catch (Exception e) {
                throw ExceptionUtils.getRuntimeException(e);
            }
        });
    }
868671
function createUniformWrapper(gl, program, uniforms, locations) {

  function makeGetter(index) {
    var proc = new Function('gl', 'prog', 'locations', 
      'return function(){return gl.getUniform(prog,locations[' + index + '])}') 
    return proc(gl, program, locations)
  }

  function makePropSetter(path, index, type) {
    switch(type) {
      case 'bool':
      case 'int':
      case 'sampler2D':
      case 'samplerCube':
        return 'gl.uniform1i(locations[' + index + '],obj' + path + ')'
      case 'float':
        return 'gl.uniform1f(locations[' + index + '],obj' + path + ')'
      default:
        var vidx = type.indexOf('vec')
        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid data type')
          }
          switch(type.charAt(0)) {
            case 'b':
            case 'i':
              return 'gl.uniform' + d + 'iv(locations[' + index + '],obj' + path + ')'
            case 'v':
              return 'gl.uniform' + d + 'fv(locations[' + index + '],obj' + path + ')'
            default:
              throw new Error('gl-shader: Unrecognized data type for vector ' + name + ': ' + type)
          }
        } else if(type.indexOf('mat') === 0 && type.length === 4) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid uniform dimension type for matrix ' + name + ': ' + type)
          }
          return 'gl.uniformMatrix' + d + 'fv(locations[' + index + '],false,obj' + path + ')'
        } else {
          throw new Error('gl-shader: Unknown uniform data type for ' + name + ': ' + type)
        }
      break
    }
  }

  function enumerateIndices(prefix, type) {
    if(typeof type !== 'object') {
      return [ [prefix, type] ]
    }
    var indices = []
    for(var id in type) {
      var prop = type[id]
      var tprefix = prefix
      if(parseInt(id) + '' === id) {
        tprefix += '[' + id + ']'
      } else {
        tprefix += '.' + id
      }
      if(typeof prop === 'object') {
        indices.push.apply(indices, enumerateIndices(tprefix, prop))
      } else {
        indices.push([tprefix, prop])
      }
    }
    return indices
  }

  function makeSetter(type) {
    var code = [ 'return function updateProperty(obj){' ]
    var indices = enumerateIndices('', type)
    for(var i=0; i<indices.length; ++i) {
      var item = indices[i]
      var path = item[0]
      var idx  = item[1]
      if(locations[idx]) {
        code.push(makePropSetter(path, idx, uniforms[idx].type))
      }
    }
    code.push('return obj}')
    var proc = new Function('gl', 'prog', 'locations', code.join('\n'))
    return proc(gl, program, locations)
  }

  function defaultValue(type) {
    switch(type) {
      case 'bool':
        return false
      case 'int':
      case 'sampler2D':
      case 'samplerCube':
        return 0
      case 'float':
        return 0.0
      default:
        var vidx = type.indexOf('vec')
        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid data type')
          }
          if(type.charAt(0) === 'b') {
            return dup(d, false)
          }
          return dup(d)
        } else if(type.indexOf('mat') === 0 && type.length === 4) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid uniform dimension type for matrix ' + name + ': ' + type)
          }
          return dup([d,d])
        } else {
          throw new Error('gl-shader: Unknown uniform data type for ' + name + ': ' + type)
        }
      break
    }
  }

  function storeProperty(obj, prop, type) {
    if(typeof type === 'object') {
      var child = processObject(type)
      Object.defineProperty(obj, prop, {
        get: identity(child),
        set: makeSetter(type),
        enumerable: true,
        configurable: false
      })
    } else {
      if(locations[type]) {
        Object.defineProperty(obj, prop, {
          get: makeGetter(type),
          set: makeSetter(type),
          enumerable: true,
          configurable: false
        })
      } else {
        obj[prop] = defaultValue(uniforms[type].type)
      }
    }
  }

  function processObject(obj) {
    var result
    if(Array.isArray(obj)) {
      result = new Array(obj.length)
      for(var i=0; i<obj.length; ++i) {
        storeProperty(result, i, obj[i])
      }
    } else {
      result = {}
      for(var id in obj) {
        storeProperty(result, id, obj[id])
      }
    }
    return result
  }

  //Return data
  var coallesced = coallesceUniforms(uniforms, true)
  return {
    get: identity(processObject(coallesced)),
    set: makeSetter(coallesced),
    enumerable: true,
    configurable: true
  }
}
203405
function GLTFMaterialsPbrSpecularGlossinessExtension() {

    return {

        name: EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,

        specularGlossinessParams: [
            'color',
            'map',
            'lightMap',
            'lightMapIntensity',
            'aoMap',
            'aoMapIntensity',
            'emissive',
            'emissiveIntensity',
            'emissiveMap',
            'bumpMap',
            'bumpScale',
            'normalMap',
            'displacementMap',
            'displacementScale',
            'displacementBias',
            'specularMap',
            'specular',
            'glossinessMap',
            'glossiness',
            'alphaMap',
            'envMap',
            'envMapIntensity',
            'refractionRatio',
        ],

        getMaterialType: function () {

            return THREE.ShaderMaterial;

        },

        extendParams: function ( params, material, parser ) {

            var pbrSpecularGlossiness = material.extensions[ this.name ];

            var shader = THREE.ShaderLib[ 'standard' ];

            var uniforms = THREE.UniformsUtils.clone( shader.uniforms );

            var specularMapParsFragmentChunk = [
                '#ifdef USE_SPECULARMAP',
                '    uniform sampler2D specularMap;',
                '#endif'
            ].join( '\n' );

            var glossinessMapParsFragmentChunk = [
                '#ifdef USE_GLOSSINESSMAP',
                '    uniform sampler2D glossinessMap;',
                '#endif'
            ].join( '\n' );

            var specularMapFragmentChunk = [
                'vec3 specularFactor = specular;',
                '#ifdef USE_SPECULARMAP',
                '    vec4 texelSpecular = texture2D( specularMap, vUv );',
                '    texelSpecular = sRGBToLinear( texelSpecular );',
                '    // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture',
                '    specularFactor *= texelSpecular.rgb;',
                '#endif'
            ].join( '\n' );

            var glossinessMapFragmentChunk = [
                'float glossinessFactor = glossiness;',
                '#ifdef USE_GLOSSINESSMAP',
                '    vec4 texelGlossiness = texture2D( glossinessMap, vUv );',
                '    // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture',
                '    glossinessFactor *= texelGlossiness.a;',
                '#endif'
            ].join( '\n' );

            var lightPhysicalFragmentChunk = [
                'PhysicalMaterial material;',
                'material.diffuseColor = diffuseColor.rgb;',
                'material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );',
                'material.specularColor = specularFactor.rgb;',
            ].join( '\n' );

            var fragmentShader = shader.fragmentShader
                .replace( '#include <specularmap_fragment>', '' )
                .replace( 'uniform float roughness;', 'uniform vec3 specular;' )
                .replace( 'uniform float metalness;', 'uniform float glossiness;' )
                .replace( '#include <roughnessmap_pars_fragment>', specularMapParsFragmentChunk )
                .replace( '#include <metalnessmap_pars_fragment>', glossinessMapParsFragmentChunk )
                .replace( '#include <roughnessmap_fragment>', specularMapFragmentChunk )
                .replace( '#include <metalnessmap_fragment>', glossinessMapFragmentChunk )
                .replace( '#include <lights_physical_fragment>', lightPhysicalFragmentChunk );

            delete uniforms.roughness;
            delete uniforms.metalness;
            delete uniforms.roughnessMap;
            delete uniforms.metalnessMap;

            uniforms.specular = { value: new THREE.Color().setHex( 0x111111 ) };
            uniforms.glossiness = { value: 0.5 };
            uniforms.specularMap = { value: null };
            uniforms.glossinessMap = { value: null };

            params.vertexShader = shader.vertexShader;
            params.fragmentShader = fragmentShader;
            params.uniforms = uniforms;
            params.defines = { 'STANDARD': '' };

            params.color = new THREE.Color( 1.0, 1.0, 1.0 );
            params.opacity = 1.0;

            var pending = [];

            if ( Array.isArray( pbrSpecularGlossiness.diffuseFactor ) ) {

                var array = pbrSpecularGlossiness.diffuseFactor;

                params.color.fromArray( array );
                params.opacity = array[ 3 ];

            }

            if ( pbrSpecularGlossiness.diffuseTexture !== undefined ) {

                pending.push( parser.assignTexture( params, 'map', pbrSpecularGlossiness.diffuseTexture.index ) );

            }

            params.emissive = new THREE.Color( 0.0, 0.0, 0.0 );
            params.glossiness = pbrSpecularGlossiness.glossinessFactor !== undefined ? pbrSpecularGlossiness.glossinessFactor : 1.0;
            params.specular = new THREE.Color( 1.0, 1.0, 1.0 );

            if ( Array.isArray( pbrSpecularGlossiness.specularFactor ) ) {

                params.specular.fromArray( pbrSpecularGlossiness.specularFactor );

            }

            if ( pbrSpecularGlossiness.specularGlossinessTexture !== undefined ) {

                var specGlossIndex = pbrSpecularGlossiness.specularGlossinessTexture.index;
                pending.push( parser.assignTexture( params, 'glossinessMap', specGlossIndex ) );
                pending.push( parser.assignTexture( params, 'specularMap', specGlossIndex ) );

            }

            return Promise.all( pending );

        },

        createMaterial: function ( params ) {

            // setup material properties based on MeshStandardMaterial for Specular-Glossiness

            var material = new THREE.ShaderMaterial( {
                defines: params.defines,
                vertexShader: params.vertexShader,
                fragmentShader: params.fragmentShader,
                uniforms: params.uniforms,
                fog: true,
                lights: true,
                opacity: params.opacity,
                transparent: params.transparent
            } );

            material.isGLTFSpecularGlossinessMaterial = true;

            material.color = params.color;

            material.map = params.map === undefined ? null : params.map;

            material.lightMap = null;
            material.lightMapIntensity = 1.0;

            material.aoMap = params.aoMap === undefined ? null : params.aoMap;
            material.aoMapIntensity = 1.0;

            material.emissive = params.emissive;
            material.emissiveIntensity = 1.0;
            material.emissiveMap = params.emissiveMap === undefined ? null : params.emissiveMap;

            material.bumpMap = params.bumpMap === undefined ? null : params.bumpMap;
            material.bumpScale = 1;

            material.normalMap = params.normalMap === undefined ? null : params.normalMap;
            if ( params.normalScale ) material.normalScale = params.normalScale;

            material.displacementMap = null;
            material.displacementScale = 1;
            material.displacementBias = 0;

            material.specularMap = params.specularMap === undefined ? null : params.specularMap;
            material.specular = params.specular;

            material.glossinessMap = params.glossinessMap === undefined ? null : params.glossinessMap;
            material.glossiness = params.glossiness;

            material.alphaMap = null;

            material.envMap = params.envMap === undefined ? null : params.envMap;
            material.envMapIntensity = 1.0;

            material.refractionRatio = 0.98;

            material.extensions.derivatives = true;

            return material;

        },

        /**
         * Clones a GLTFSpecularGlossinessMaterial instance. The ShaderMaterial.copy() method can
         * copy only properties it knows about or inherits, and misses many properties that would
         * normally be defined by MeshStandardMaterial.
         *
         * This method allows GLTFSpecularGlossinessMaterials to be cloned in the process of
         * loading a glTF model, but cloning later (e.g. by the user) would require these changes
         * AND also updating `.onBeforeRender` on the parent mesh.
         *
         * @param  {THREE.ShaderMaterial} source
         * @return {THREE.ShaderMaterial}
         */
        cloneMaterial: function ( source ) {

            var target = source.clone();

            target.isGLTFSpecularGlossinessMaterial = true;

            var params = this.specularGlossinessParams;

            for ( var i = 0, il = params.length; i < il; i++ ) {

                target[ params[ i ] ] = source[ params[ i ] ];

            }

            return target;

        },

        // Here's based on refreshUniformsCommon() and refreshUniformsStandard() in WebGLRenderer.
        refreshUniforms: function ( renderer, scene, camera, geometry, material, group ) {

            var uniforms = material.uniforms;
            var defines = material.defines;

            uniforms.opacity.value = material.opacity;

            uniforms.diffuse.value.copy( material.color );
            uniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity );

            uniforms.map.value = material.map;
            uniforms.specularMap.value = material.specularMap;
            uniforms.alphaMap.value = material.alphaMap;

            uniforms.lightMap.value = material.lightMap;
            uniforms.lightMapIntensity.value = material.lightMapIntensity;

            uniforms.aoMap.value = material.aoMap;
            uniforms.aoMapIntensity.value = material.aoMapIntensity;

            // uv repeat and offset setting priorities
            // 1. color map
            // 2. specular map
            // 3. normal map
            // 4. bump map
            // 5. alpha map
            // 6. emissive map

            var uvScaleMap;

            if ( material.map ) {

                uvScaleMap = material.map;

            } else if ( material.specularMap ) {

                uvScaleMap = material.specularMap;

            } else if ( material.displacementMap ) {

                uvScaleMap = material.displacementMap;

            } else if ( material.normalMap ) {

                uvScaleMap = material.normalMap;

            } else if ( material.bumpMap ) {

                uvScaleMap = material.bumpMap;

            } else if ( material.glossinessMap ) {

                uvScaleMap = material.glossinessMap;

            } else if ( material.alphaMap ) {

                uvScaleMap = material.alphaMap;

            } else if ( material.emissiveMap ) {

                uvScaleMap = material.emissiveMap;

            }

            if ( uvScaleMap !== undefined ) {

                // backwards compatibility
                if ( uvScaleMap.isWebGLRenderTarget ) {

                    uvScaleMap = uvScaleMap.texture;

                }

                var offset;
                var repeat;

                if ( uvScaleMap.matrix !== undefined ) {

                    // > r88.

                    if ( uvScaleMap.matrixAutoUpdate === true ) {

                        offset = uvScaleMap.offset;
                        repeat = uvScaleMap.repeat;
                        var rotation = uvScaleMap.rotation;
                        var center = uvScaleMap.center;

                        uvScaleMap.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, rotation, center.x, center.y );

                    }

                    uniforms.uvTransform.value.copy( uvScaleMap.matrix );

                } else {

                    // <= r87. Remove when reasonable.

                    offset = uvScaleMap.offset;
                    repeat = uvScaleMap.repeat;

                    uniforms.offsetRepeat.value.set( offset.x, offset.y, repeat.x, repeat.y );

                }

            }

            uniforms.envMap.value = material.envMap;
            uniforms.envMapIntensity.value = material.envMapIntensity;
            uniforms.flipEnvMap.value = ( material.envMap && material.envMap.isCubeTexture ) ? -1 : 1;

            uniforms.refractionRatio.value = material.refractionRatio;

            uniforms.specular.value.copy( material.specular );
            uniforms.glossiness.value = material.glossiness;

            uniforms.glossinessMap.value = material.glossinessMap;

            uniforms.emissiveMap.value = material.emissiveMap;
            uniforms.bumpMap.value = material.bumpMap;
            uniforms.normalMap.value = material.normalMap;

            uniforms.displacementMap.value = material.displacementMap;
            uniforms.displacementScale.value = material.displacementScale;
            uniforms.displacementBias.value = material.displacementBias;

            if ( uniforms.glossinessMap.value !== null && defines.USE_GLOSSINESSMAP === undefined ) {

                defines.USE_GLOSSINESSMAP = '';
                // set USE_ROUGHNESSMAP to enable vUv
                defines.USE_ROUGHNESSMAP = '';

            }

            if ( uniforms.glossinessMap.value === null && defines.USE_GLOSSINESSMAP !== undefined ) {

                delete defines.USE_GLOSSINESSMAP;
                delete defines.USE_ROUGHNESSMAP;

            }

        }

    };

}
242499
public int color(Context ctx, @AttrRes int colorStyle, @ColorRes int colorDefaultRes) {
        //get the color from the holder else from the theme
        int color = color(ctx);
        if (color == 0) {
            return UIUtils.getThemeColorFromAttrOrRes(ctx, colorStyle, colorDefaultRes);
        } else {
            return color;
        }
    }
608158
function AsciiFilter()
{
    core.AbstractFilter.call(this,
        // vertex shader
        null,
        // fragment shader
        fs.readFileSync(__dirname + '/ascii.frag', 'utf8'),
        // custom uniforms
        {
            dimensions: { type: '4fv', value: new Float32Array([0, 0, 0, 0]) },
            pixelSize:  { type: '1f', value: 8 }
        }
    );
}
1297485
@SuppressWarnings("static-method")
	protected String getGeneratedMemberAccessor(MemberDescription description) {
		return "get" //$NON-NLS-1$
				+ Strings.toFirstUpper(description.getElementDescription().getElementType().getSimpleName()) + "()"; //$NON-NLS-1$
	}
1127109
public static int getColor(GraphicFactory graphicFactory, String colorString, ThemeCallback themeCallback, RenderInstruction origin) {
        if (colorString.isEmpty() || colorString.charAt(0) != '#') {
            throw new IllegalArgumentException(UNSUPPORTED_COLOR_FORMAT + colorString);
        } else if (colorString.length() == 7) {
            return getColor(graphicFactory, colorString, 255, 1, themeCallback, origin);
        } else if (colorString.length() == 9) {
            return getColor(graphicFactory, colorString, Integer.parseInt(colorString.substring(1, 3), 16), 3, themeCallback, origin);
        } else {
            throw new IllegalArgumentException(UNSUPPORTED_COLOR_FORMAT + colorString);
        }
    }