Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return first geometryBuffer if no best batch found #12133

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

- Added `enableVerticalExaggeration` option to models. Set this value to `false` to prevent model exaggeration when `Scene.verticalExaggeration` is set to a value other than `1.0`. [#12141](https://github.com/CesiumGS/cesium/pull/12141)

##### Fixes :wrench:

- Use first geometryBuffer if no best match found in I3SNode [#12132](https://github.com/CesiumGS/cesium/pull/12132)

### 1.121.1 - 2024-09-04

This is an npm-only release to extra source maps included in 1.121
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,5 +407,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Vladislav Yunev](https://github.com/YunVlad)
- [Levi Montgomery](https://github.com/Levi-Montgomery)
- [Brandon Berisford](https://github.com/BeyondBelief96)
- [Lawrence Owen](https://github.com/ljowen)
- [Adam Wirth](https://https://github.com/adamwirth)
- [Javier Sanchez](https://github.com/jvrjsanchez)
10 changes: 8 additions & 2 deletions packages/engine/Source/Scene/I3SLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,15 @@ I3SLayer.prototype._findBestGeometryBuffers = function (
};
}
}
// If no match found return first geometryBuffer
if (defined(geometryDefinition[0])) {
return {
bufferIndex: 0,
definition: geometryDefinition,
geometryBufferInfo: geometryDefinition[0],
};
}
}

return 0;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/I3SNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ I3SNode.prototype.load = async function () {
const uriIndex = node.mesh.geometry.resource;
uri = `../${uriIndex}/`;
}
if (defined(uri)) {
if (defined(uri) && defined(that._parent.resource)) {
that._resource = that._parent.resource.getDerivedResource({ url: uri });
}

Expand Down