mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-02-07 07:22:51 -05:00
Return Promise.reject instead of throwing error
This commit is contained in:
parent
9213047cbb
commit
81201dcd03
@ -15,6 +15,7 @@ var fsExtraOutputJson = Promise.promisify(fsExtra.outputJson);
|
|||||||
var defaultValue = Cesium.defaultValue;
|
var defaultValue = Cesium.defaultValue;
|
||||||
var defined = Cesium.defined;
|
var defined = Cesium.defined;
|
||||||
var DeveloperError = Cesium.DeveloperError;
|
var DeveloperError = Cesium.DeveloperError;
|
||||||
|
var RuntimeError = Cesium.RuntimeError;
|
||||||
|
|
||||||
module.exports = obj2gltf;
|
module.exports = obj2gltf;
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ function obj2gltf(objPath, gltfPath, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (binary && bypassPipeline) {
|
if (binary && bypassPipeline) {
|
||||||
throw new DeveloperError('--bypassPipeline does not convert to binary glTF');
|
return Promise.reject(new RuntimeError('--bypassPipeline does not convert to binary glTF'));
|
||||||
}
|
}
|
||||||
|
|
||||||
gltfPath = path.join(path.dirname(gltfPath), modelName + extension);
|
gltfPath = path.join(path.dirname(gltfPath), modelName + extension);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user