Error if use mutiple material types

This commit is contained in:
Omar Shehata 2018-12-04 15:05:00 -05:00
parent f417504095
commit 56a06eee2d

View File

@ -63,8 +63,8 @@ function obj2gltf(objPath, options) {
throw new DeveloperError('Either options.writer or options.outputDirectory must be defined when writing separate resources.');
}
if (options.metallicRoughness + options.specularGlossiness > 1) {
throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness].');
if (options.metallicRoughness + options.specularGlossiness + options.unlit > 1) {
throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness, unlit].');
}
if (defined(options.overridingTextures.metallicRoughnessOcclusionTexture) && defined(options.overridingTextures.specularGlossinessTexture)) {