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

Remove # hash params from SceneViewer source #4004

Merged

Conversation

milesgreen
Copy link
Contributor

Reference Issue

Fixes: #3992

Issue

In some circumstances, when auto generating USDZ and appending # hash parameters to the model src path to configure ARQL, these can conflict with the constructed SceneViewer intent, causing SceneViewer to fail to load the model.

Solution

When opening AR to SceneViewer, this update will check the model src path for presence of hash params and remove if needed.

Demo

A variety of tests utilising SceneViewer and Auto USDZ, with a mix of query and hash params, can be seen here:
https://modelviewer-auto-usdz-params.glitch.me
Tested on a variety of Android and iOS devices, but any additional testers would be welcome.

Tests

Added two tests to check that hash params for configuring ARQL are completely removed from the model src path and that it also does not remove any query params that may still be used for SceneViewer configuration.

  • 'strips hash params from SceneViewer model src'
  • 'strips hash params but preserves query params'

Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elalish elalish merged commit 71766b6 into google:master Dec 12, 2022
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
* remove hash from sceneviewer src url

* tests
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.

Scene viewer can't load object due to AR QuickLook parameters when auto generating USDZ blob
2 participants