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

Conversation

ljowen
Copy link
Contributor

@ljowen ljowen commented Aug 19, 2024

Description

If no exact match by attribute is found in _findBestGeometryBuffers return the first one. I believe this was the original intention with this function returning 0 for the index.

This allows I3S Scenes to render with geometries missing either ["position", "uv0"] (See issue / sandcastle).

Issue number and link

Fixes #12114

Testing plan

  • Create sandcastle with the following added as an I3S dataProvider:
    • https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer?layers=ca0470dbbddb4db28bad74ed39949e25
  • Verify the scene renders and errors are no longer thrown
  • Confirm other I3S scenes are rendering fine

Sandcastle Link

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

- Check parent resource is defined
Copy link

Thank you for the pull request, @ljowen!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Aug 19, 2024

Thanks for the PR @ljowen! The fix looks good to me.

Is it possible to add a unit test for this case? We can provide guidance as needed.

@ggetz
Copy link
Contributor

ggetz commented Sep 10, 2024

I'm going to go ahead and merge as it does fix the issue at hand.

@ggetz ggetz merged commit da804fe into CesiumGS:main Sep 10, 2024
4 checks passed
@ljowen
Copy link
Contributor Author

ljowen commented Sep 11, 2024

Thanks @ggetz I did begin working on a unit test, will add it in a separate PR

@ggetz
Copy link
Contributor

ggetz commented Sep 11, 2024

Thanks @ljowen, that would be very much appreciated! Let us know if you'd like any input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I3SNode requesting 'undefined' geometry buffer
2 participants