Skip to content

Commit

Permalink
Added default value generation in API
Browse files Browse the repository at this point in the history
  • Loading branch information
lasalvavida committed Dec 5, 2016
1 parent 3517766 commit 965677f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/generateModelMaterialsCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module.exports = generateModelMaterialsCommon;
* @see loadGltfUris
*/
function generateModelMaterialsCommon(gltf, kmcOptions) {
kmcOptions = defaultValue(kmcOptions, {});
kmcOptions.doubleSided = defaultValue(kmcOptions.doubleSided, false);
kmcOptions.technique = defaultValue(kmcOptions.technique, 'PHONG');
addExtensionsUsed(gltf, 'KHR_materials_common');
var materialsCommon;
var materials = gltf.materials;
Expand Down

0 comments on commit 965677f

Please sign in to comment.