diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 089f762d9b52..119d7c8ecb62 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -86,6 +86,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Jason Crow](https://github.com/jason-crow) * [Flightradar24 AB](https://www.flightradar24.com) * [Aleksei Kalmykov](https://github.com/kalmykov) +* [virtualcitySYSTEMS GmbH](https://www.virtualcitysystems.de) + * [Jannes Bolling](https://github.com/jbo023) ## [Individual CLA](Documentation/Contributors/CLAs/individual-cla-agi-v1.0.txt) * [Victor Berchet](https://github.com/vicb) diff --git a/Source/ThirdParty/GltfPipeline/addPipelineExtras.js b/Source/ThirdParty/GltfPipeline/addPipelineExtras.js index 26770de6b816..0d008dd8ddb9 100644 --- a/Source/ThirdParty/GltfPipeline/addPipelineExtras.js +++ b/Source/ThirdParty/GltfPipeline/addPipelineExtras.js @@ -56,6 +56,11 @@ define([ gltf.extras._pipeline = defaultValue(gltf.extras._pipeline, {}); gltf.asset = defaultValue(gltf.asset, {}); gltf.asset.extras = defaultValue(gltf.asset.extras, {}); + if (defined(gltf.asset.extras) && typeof(gltf.asset.extras) !== 'object'){ + gltf.asset.extras = { + extras : gltf.asset.extras + }; + } gltf.asset.extras._pipeline = defaultValue(gltf.asset.extras._pipeline, {}); return gltf; } diff --git a/Source/ThirdParty/GltfPipeline/updateVersion.js b/Source/ThirdParty/GltfPipeline/updateVersion.js index d6d42ea1535b..680951f3a4db 100644 --- a/Source/ThirdParty/GltfPipeline/updateVersion.js +++ b/Source/ThirdParty/GltfPipeline/updateVersion.js @@ -225,7 +225,7 @@ define([ var value = object[id]; mapping[id] = array.length; array.push(value); - if (!defined(value.name)) { + if (!defined(value.name) && typeof(value) === 'object') { value.name = id; } } @@ -737,7 +737,7 @@ define([ bufferViewsToDelete[oldBufferViewId] = true; } var bufferView = clone(bufferViews[oldBufferViewId]); - var accessorByteStride = getAccessorByteStride(gltf, accessor); + var accessorByteStride = (defined(accessor.byteStride) && accessor.byteStride !== 0) ? accessor.byteStride : getAccessorByteStride(gltf, accessor); if (defined(accessorByteStride)) { bufferView.byteStride = accessorByteStride; if (bufferView.byteStride !== 0) {