Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material
429256
function createDefaultMaterial() {

    return new THREE.MeshStandardMaterial( {
        color: 0xFFFFFF,
        emissive: 0x000000,
        metalness: 1,
        roughness: 1,
        transparent: false,
        depthTest: true,
        side: THREE.FrontSide
    } );

}
605096
function processMaterial(material) {
      if (cachedData.materials.has(material)) {
        return cachedData.materials.get(material);
      }

      if (!outputJSON.materials) {
        outputJSON.materials = [];
      }

      if (material.isShaderMaterial) {
        console.warn('GLTFExporter: THREE.ShaderMaterial not supported.');
        return null;
      }

      // @QUESTION Should we avoid including any attribute that has the default value?
      var gltfMaterial = {
        pbrMetallicRoughness: {}
      };

      if (material.isMeshBasicMaterial) {
        gltfMaterial.extensions = { KHR_materials_unlit: {} };

        extensionsUsed['KHR_materials_unlit'] = true;
      } else if (!material.isMeshStandardMaterial) {
        console.warn(
          'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.'
        );
      }

      // pbrMetallicRoughness.baseColorFactor
      var color = material.color.toArray().concat([material.opacity]);

      if (!equalArray(color, [1, 1, 1, 1])) {
        gltfMaterial.pbrMetallicRoughness.baseColorFactor = color;
      }

      if (material.isMeshStandardMaterial) {
        gltfMaterial.pbrMetallicRoughness.metallicFactor = material.metalness;
        gltfMaterial.pbrMetallicRoughness.roughnessFactor = material.roughness;
      } else if (material.isMeshBasicMaterial) {
        gltfMaterial.pbrMetallicRoughness.metallicFactor = 0.0;
        gltfMaterial.pbrMetallicRoughness.roughnessFactor = 0.9;
      } else {
        gltfMaterial.pbrMetallicRoughness.metallicFactor = 0.5;
        gltfMaterial.pbrMetallicRoughness.roughnessFactor = 0.5;
      }

      // pbrMetallicRoughness.metallicRoughnessTexture
      if (material.metalnessMap || material.roughnessMap) {
        if (material.metalnessMap === material.roughnessMap) {
          gltfMaterial.pbrMetallicRoughness.metallicRoughnessTexture = {
            index: processTexture(material.metalnessMap)
          };
        } else {
          console.warn(
            'THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.'
          );
        }
      }

      // pbrMetallicRoughness.baseColorTexture
      if (material.map) {
        gltfMaterial.pbrMetallicRoughness.baseColorTexture = {
          index: processTexture(material.map)
        };
      }

      if (
        material.isMeshBasicMaterial ||
        material.isLineBasicMaterial ||
        material.isPointsMaterial
      ) {
      } else {
        // emissiveFactor
        var emissive = material.emissive
          .clone()
          .multiplyScalar(material.emissiveIntensity)
          .toArray();

        if (!equalArray(emissive, [0, 0, 0])) {
          gltfMaterial.emissiveFactor = emissive;
        }

        // emissiveTexture
        if (material.emissiveMap) {
          gltfMaterial.emissiveTexture = {
            index: processTexture(material.emissiveMap)
          };
        }
      }

      // normalTexture
      if (material.normalMap) {
        gltfMaterial.normalTexture = {
          index: processTexture(material.normalMap)
        };

        if (material.normalScale.x !== -1) {
          if (material.normalScale.x !== material.normalScale.y) {
            console.warn(
              'THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.'
            );
          }

          gltfMaterial.normalTexture.scale = material.normalScale.x;
        }
      }

      // occlusionTexture
      if (material.aoMap) {
        gltfMaterial.occlusionTexture = {
          index: processTexture(material.aoMap)
        };

        if (material.aoMapIntensity !== 1.0) {
          gltfMaterial.occlusionTexture.strength = material.aoMapIntensity;
        }
      }

      // alphaMode
      if (material.transparent || material.alphaTest > 0.0) {
        gltfMaterial.alphaMode = material.opacity < 1.0 ? 'BLEND' : 'MASK';

        // Write alphaCutoff if it's non-zero and different from the default (0.5).
        if (material.alphaTest > 0.0 && material.alphaTest !== 0.5) {
          gltfMaterial.alphaCutoff = material.alphaTest;
        }
      }

      // doubleSided
      if (material.side === THREE.DoubleSide) {
        gltfMaterial.doubleSided = true;
      }

      if (material.name !== '') {
        gltfMaterial.name = material.name;
      }

      if (Object.keys(material.userData).length > 0) {
        gltfMaterial.extras = serializeUserData(material);
      }

      outputJSON.materials.push(gltfMaterial);

      var index = outputJSON.materials.length - 1;
      cachedData.materials.set(material, index);

      return index;
    }
512962
function rawData() {
  return {
    DocumentationGeneration: {
      name: 'DocumentationGeneration',
      submodules: {},
      elements: {},
      classes: {
        'Some.Class.ClassItem': 1,
        'SomeOther.Class.Description': 1
      },
      fors: {},
      namespaces: {},
      tag: 'module',
      file: 'lib/parse-markdown.js',
      line: 4,
      description: '# An H1\nAnd a paragraph'
    },
    CreateDirs: {
      name: 'CreateDirs',
      submodules: {},
      elements: {},
      classes: {
        'Some.Class.ClassItem': 1,
        'SomeOther.Class.Description': 1
      },
      fors: {},
      namespaces: {},
      tag: 'module',
      file: 'lib/create-dirs.js',
      line: 7,
      description: '`some code`'
    }
  };
}
1087829
function getDefaultModules() {
  return {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        include: srcPath,
        loader: 'tslint-loader',
        enforce: 'pre',
        exclude: '/node_modules/'
      },
      {
        test: /\.(ts|tsx)$/,
        include: srcPath,
        loader: 'ts-loader',
        exclude: '/node_modules/'
      },
      {
        test: /\.(js|jsx)$/,
        include: srcPath,
        loader: 'tslint-loader',
        enforce: 'pre',
        exclude: '/node_modules/'
      },
      {
        test: /\.(js|jsx)$/,
        loader: 'babel-loader',
        exclude: '/node_modules/'
      },
      {
        test: /\.css$/,
        use: [
          'style-loader',
          'css-loader',
        ]
      },
      {
        test: /\.sass/,
        use: [
          'style-loader',
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              outputStyle: 'expanded',
              indentedSyntax: true
            }
          }
        ]
      },
      {
        test: /\.scss/,
        use: [
          'style-loader',
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              outputStyle: 'expanded'
            }
          }
        ]
      },
      {
        test: /\.less/,
        use: [
          'style-loader',
          'css-loader',
          'less-loader'
        ]
      },
      {
        test: /\.styl/,
        use: [
          'style-loader',
          'css-loader',
          'stylus-loader'
        ]
      },
      {
        test: /\.(png|jpg|gif|woff|woff2)$/,
        loader: 'url-loader',
        options: {
          limit: 8192
        }
      },
      {
        test: /\.svg/,
        loader: 'raw-loader',
      },
      {
        test: /\.(mp4|ogg)$/,
        loader: 'file-loader'
      }
    ]
  };
}
418766
def default_fg(self) -> Tuple[int, int, int]:
        """"""
        color = self._console_data.fore
        return color.r, color.g, color.b
803384
function(opts) {
      log('texture2D', opts)
      opts.target = gl.TEXTURE_2D
      return this.resource(createTexture(this, opts))
    }
404081
public void setMaterial(GVRMaterial material, int passIndex)
    {
        if (passIndex < mRenderPassList.size())
        {
            mRenderPassList.get(passIndex).setMaterial(material);
        }
        else
        {
            Log.e(TAG, "Trying to set material from invalid pass. Pass " + passIndex + " was not created.");
        }
    }
1111947
def getDefaultItems(self):
        
        return [
            RtiRegItem('HDF-5 file',
                       'argos.repo.rtiplugins.hdf5.H5pyFileRti',
                       extensions=['hdf5', 'h5', 'h5e', 'he5', 'nc']), # hdf extension is for HDF-4

            RtiRegItem('MATLAB file',
                       'argos.repo.rtiplugins.scipyio.MatlabFileRti',
                       extensions=['mat']),

            RtiRegItem('NetCDF file',
                       'argos.repo.rtiplugins.ncdf.NcdfFileRti',
                       #extensions=['nc', 'nc3', 'nc4']),
                       extensions=['nc', 'nc4']),
                       #extensions=[]),

            RtiRegItem('NumPy binary file',
                       'argos.repo.rtiplugins.numpyio.NumpyBinaryFileRti',
                       extensions=['npy']),

            RtiRegItem('NumPy compressed file',
                       'argos.repo.rtiplugins.numpyio.NumpyCompressedFileRti',
                       extensions=['npz']),

            RtiRegItem('NumPy text file',
                       'argos.repo.rtiplugins.numpyio.NumpyTextFileRti',
                       #extensions=['txt', 'text']),
                       extensions=['dat']),

            RtiRegItem('IDL save file',
                       'argos.repo.rtiplugins.scipyio.IdlSaveFileRti',
                       extensions=['sav']),

            RtiRegItem('Pandas CSV file',
                       'argos.repo.rtiplugins.pandasio.PandasCsvFileRti',
                        extensions=['csv']),

            RtiRegItem('Pillow image',
                       'argos.repo.rtiplugins.pillowio.PillowFileRti',
                        extensions=['bmp', 'eps', 'im', 'gif', 'jpg', 'jpeg', 'msp', 'pcx',
                                    'png', 'ppm', 'spi', 'tif', 'tiff', 'xbm', 'xv']),

            RtiRegItem('Wav file',
                       'argos.repo.rtiplugins.scipyio.WavFileRti',
                       extensions=['wav'])]
842061
void defaultGBMs() {
    Algo algo = Algo.GBM;
    WorkAllocations.Work work = workAllocations.getAllocation(algo, JobType.ModelBuild);
    if (work == null) return;

    Job gbmJob;

    GBMParameters gbmParameters = new GBMParameters();
    setCommonModelBuilderParams(gbmParameters);
    gbmParameters._score_tree_interval = 5;
    gbmParameters._histogram_type = SharedTreeParameters.HistogramType.AUTO;

    gbmParameters._ntrees = 1000;
    gbmParameters._sample_rate = 0.8;
    gbmParameters._col_sample_rate = 0.8;
    gbmParameters._col_sample_rate_per_tree = 0.8;

    // Default 1:
    gbmParameters._max_depth = 6;
    gbmParameters._min_rows = 1;

    gbmJob = trainModel(null, work, gbmParameters);
    pollAndUpdateProgress(Stage.ModelTraining, "GBM 1", work, this.job(), gbmJob);

    // Default 2:
    gbmParameters._max_depth = 7;
    gbmParameters._min_rows = 10;

    gbmJob = trainModel(null, work, gbmParameters);
    pollAndUpdateProgress(Stage.ModelTraining, "GBM 2", work, this.job(), gbmJob);

    // Default 3:
    gbmParameters._max_depth = 8;
    gbmParameters._min_rows = 10;

    gbmJob = trainModel(null, work, gbmParameters);
    pollAndUpdateProgress(Stage.ModelTraining, "GBM 3", work, this.job(), gbmJob);

    // Default 4:
    gbmParameters._max_depth = 10;
    gbmParameters._min_rows = 10;

    gbmJob = trainModel(null, work, gbmParameters);
    pollAndUpdateProgress(Stage.ModelTraining, "GBM 4", work, this.job(), gbmJob);

    // Default 5:
    gbmParameters._max_depth = 15;
    gbmParameters._min_rows = 100;

    gbmJob = trainModel(null, work, gbmParameters);
    pollAndUpdateProgress(Stage.ModelTraining, "GBM 5", work, this.job(), gbmJob);
  }
1171493
def toConsole(self):
        '''
        
        '''
        fmt_spec = {
            "class":     utils.AnsiColors.BOLD_MAGENTA,
            "struct":    utils.AnsiColors.BOLD_CYAN,
            "define":    utils.AnsiColors.BOLD_YELLOW,
            "enum":      utils.AnsiColors.BOLD_MAGENTA,
            "enumvalue": utils.AnsiColors.BOLD_RED,     # red means unused in framework
            "function":  utils.AnsiColors.BOLD_CYAN,
            "file":      utils.AnsiColors.BOLD_YELLOW,
            "dir":       utils.AnsiColors.BOLD_MAGENTA,
            "group":     utils.AnsiColors.BOLD_RED,     # red means unused in framework
            "namespace": utils.AnsiColors.BOLD_CYAN,
            "typedef":   utils.AnsiColors.BOLD_YELLOW,
            "union":     utils.AnsiColors.BOLD_MAGENTA,
            "variable":  utils.AnsiColors.BOLD_CYAN
        }

        self.consoleFormat(
            "{0} and {1}".format(
                utils._use_color("Classes", fmt_spec["class"],  sys.stderr),
                utils._use_color("Structs", fmt_spec["struct"], sys.stderr),
            ),
            self.class_like,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Defines", fmt_spec["define"], sys.stderr),
            self.defines,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Enums", fmt_spec["enum"], sys.stderr),
            self.enums,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Enum Values (unused)", fmt_spec["enumvalue"], sys.stderr),
            self.enum_values,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Functions", fmt_spec["function"], sys.stderr),
            self.functions,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Files", fmt_spec["file"], sys.stderr),
            self.files,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Directories", fmt_spec["dir"], sys.stderr),
            self.dirs,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Groups (unused)", fmt_spec["group"], sys.stderr),
            self.groups,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Namespaces", fmt_spec["namespace"], sys.stderr),
            self.namespaces,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Typedefs", fmt_spec["typedef"], sys.stderr),
            self.typedefs,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Unions", fmt_spec["union"], sys.stderr),
            self.unions,
            fmt_spec
        )
        self.consoleFormat(
            utils._use_color("Variables", fmt_spec["variable"], sys.stderr),
            self.variables,
            fmt_spec
        )
1067071
function () {
		var materialsJSON = {};
		var material;
		for ( var materialName in this.materials ) {

			material = this.materials[ materialName ];
			materialsJSON[ materialName ] = material.toJSON();
		}

		return materialsJSON;
	}
438919
public function getMaterial() : ?string 
    {
        if ( ! $this->hasMaterial()) {
            $this->setMaterial($this->getDefaultMaterial());
        }
        return $this->material;
    }
1366827
function( format, type, internal ){
    var t = new Texture( this.gl, format, type, internal );
    return this.attach( 0x8CE0, t );
  }
674362
function ( materialNode, textureMap ) {

			var ID = materialNode.id;
			var name = materialNode.attrName;
			var type = materialNode.ShadingModel;

			// Case where FBX wraps shading model in property object.
			if ( typeof type === 'object' ) {

				type = type.value;

			}

			// Ignore unused materials which don't have any connections.
			if ( ! connections.has( ID ) ) return null;

			var parameters = this.parseParameters( materialNode, textureMap, ID );

			var material;

			switch ( type.toLowerCase() ) {

				case 'phong':
					material = new THREE.MeshPhongMaterial();
					break;
				case 'lambert':
					material = new THREE.MeshLambertMaterial();
					break;
				default:
					console.warn( 'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.', type );
					material = new THREE.MeshPhongMaterial( { color: 0x3300ff } );
					break;

			}

			material.setValues( parameters );
			material.name = name;

			return material;

		}
153741
function default_1(opts = {}) {
    return Object.assign({}, ['get', 'head'].reduce((prev, cur) => (prev[cur] = ({ name, meta, url, options }) => request(Object.assign({}, opts, { url, method: cur.toUpperCase(), options })), prev), {}), ['post', 'put', 'patch', 'delete', 'options'].reduce((prev, cur) => (prev[cur] = ({ name, meta, url, body, options, type }) => request(Object.assign({}, opts, { url,
        type,
        options, method: cur.toUpperCase(), data: body })), prev), {}));
}
513326
function DefaultSkillResolutionStrategyFn() {
    const util = require('util');
    const extend = util._extend;
    const skillsMap = {};
    const undefinedSkills = [];

    this.addSkill = function(skill, options) {
        var minConfidence = 0;
        if(options instanceof Number) {
            minConfidence = options;
        } else if (options && options.minConfidence !== undefined) {
            minConfidence = options.minConfidence;
        }

        var skillClone = extend({}, skill);
        var botSkillObject = {skill: skillClone, minConfidence: minConfidence};

        if (skillClone.topic === undefined || skillClone.topic === 'undefined') {
            skillClone.topic = undefined;
            undefinedSkills.push(botSkillObject);
        }

        if(skillClone.topic instanceof Array) {
            skillClone.topic.forEach(function(topic) {
                if(skillsMap[topic] === undefined) skillsMap[topic] = [];
                skillsMap[topic].push(skillClone);
            });
        } else {
            if (skillsMap[skillClone.topic] === undefined) {
                skillsMap[skillClone.topic] = [];
            }

            skillsMap[skillClone.topic].push(botSkillObject);
        }
    };

    this.getSkills = function() {
        var topics = Object.keys(skillsMap);
        var skills = [];

        topics.forEach(function (topic) {
            skills.push(skillsMap[topic]);
        });

        return skills;
    };

    var _resolveSkillFromTopicWithConfidence = function ResolveSkillFromTopicWithConfidenceFn(topic) {
        if (topic.name === undefined) {
            if (undefinedSkills && undefinedSkills.length > 0) {
                return undefinedSkills[0];
            }

            return;
        }

        var botSkills = skillsMap[topic.name];
        var minConfidenceSkill = undefinedSkills[0];
        var minDistance = 999;
        if (botSkills !== undefined && botSkills.length > 0) {
            for (var i = 0; i < botSkills.length; i++) {
                var botSkill = botSkills[i];
                var distance = topic.confidence - botSkill.minConfidence;
                if (distance < 0) continue;
                if (distance < minDistance) {
                    minDistance = distance;
                    minConfidenceSkill = botSkill;
                }
                if (distance === 0) break;
            }
        }

        return minConfidenceSkill;
    };

    this.resolve = function(err, resolutionContext, callback) {
        var topics = resolutionContext.topics;
        var sentence = resolutionContext.sentence;
        var mostConfidentTopic = topics[0];
        var resolvedBotSkill = _resolveSkillFromTopicWithConfidence(mostConfidentTopic);
        var skill = resolvedBotSkill ? resolvedBotSkill.skill : undefined;

        if (skill === undefined) {
            return callback(new Error("could not resolve any skills"));
        }

        var clonedSkill = extend({}, skill);
        clonedSkill.sentence = sentence;
        clonedSkill.topic = mostConfidentTopic;

        return callback(undefined, clonedSkill);
    };

    return this;
}
327007
function ( MaterialNode ) {

			var mappingType = MaterialNode.MappingInformationType;
			var referenceType = MaterialNode.ReferenceInformationType;

			if ( mappingType === 'NoMappingInformation' ) {

				return {
					dataSize: 1,
					buffer: [ 0 ],
					indices: [ 0 ],
					mappingType: 'AllSame',
					referenceType: referenceType
				};

			}

			var materialIndexBuffer = MaterialNode.Materials.a;

			// Since materials are stored as indices, there's a bit of a mismatch between FBX and what
			// we expect.So we create an intermediate buffer that points to the index in the buffer,
			// for conforming with the other functions we've written for other data.
			var materialIndices = [];

			for ( var i = 0; i < materialIndexBuffer.length; ++ i ) {

				materialIndices.push( i );

			}

			return {
				dataSize: 1,
				buffer: materialIndexBuffer,
				indices: materialIndices,
				mappingType: mappingType,
				referenceType: referenceType
			};

		}