mirror of https://github.com/CesiumGS/obj2gltf.git
Error if use mutiple material types
This commit is contained in:
parent
f417504095
commit
56a06eee2d
|
@ -63,8 +63,8 @@ function obj2gltf(objPath, options) {
|
||||||
throw new DeveloperError('Either options.writer or options.outputDirectory must be defined when writing separate resources.');
|
throw new DeveloperError('Either options.writer or options.outputDirectory must be defined when writing separate resources.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.metallicRoughness + options.specularGlossiness > 1) {
|
if (options.metallicRoughness + options.specularGlossiness + options.unlit > 1) {
|
||||||
throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness].');
|
throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness, unlit].');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined(options.overridingTextures.metallicRoughnessOcclusionTexture) && defined(options.overridingTextures.specularGlossinessTexture)) {
|
if (defined(options.overridingTextures.metallicRoughnessOcclusionTexture) && defined(options.overridingTextures.specularGlossinessTexture)) {
|
||||||
|
|
Loading…
Reference in New Issue