-
Notifications
You must be signed in to change notification settings - Fork 216
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
Obtain Base Url for Texture Requests within Reality Tile Loader #7450
Conversation
does this need to be backported to 4.10? or can it go in 4.11? |
No backport is needed, 4.11 is fine, thanks. |
…twinjs-core into andremig/texture-baseurl
An update on this PR - Due to the fragility of the tree id parsing method, the methods of obtaining the base url for this PR have changed. Now, all tree id parsing has been removed, and instead, the id has been passed down through the creation of the Tests have been added to a new file, Finally, we were able to test the case where a base url is passed in to the gltf reader for a tileset with full texture urls - the case discussed in my comment above. The texture requests worked as expected with no issues, so that edge case is a non-issue. |
Co-authored-by: Paul Connelly <[email protected]>
test progress test progress add reader tests
This pull request is now in conflicts. Could you fix it @andremig-bentley? 🙏 |
Currently, there is a bug attaching a 3dTiles tileset to the itwin viewer using
attachRealityModel
where if that model has textures, and the tileset has relative URIs for those textures, they will not be requested. This is because the base url for those requests was not being passed along to the gltf reader, and so an attempt to resolve the images for these textures would fail. This PR addresses that issue by creating the new optionalbaseUrl
parameter passed down through the creation of theRealityTileTree
.baseUrl
is created using the newgetTilesetUrlFromTilesetUrlImpl
inRealityDataSource
, which obtains the tileset url from a source which is an instance ofRealityDataSourceTilesetUrlImpl
. InRealityTileLoader.ts
, the url is checked to determine if it's a valid url, and if so, it is passed in to the creation of theGltfReaderProps
, and therefore, to the gltf reader.