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

Decode external uri during search #304

Merged
merged 1 commit into from
Sep 16, 2024
Merged
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
6 changes: 4 additions & 2 deletions src/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@

const processImage = function (gltfImage: any, continuation: (err: string, result: any) => void) {
const u: File = externalUrls.find((url) => {
return url.filename === path.normalize(gltfImage.uri || '');
return url.filename === decodeURIComponent(path.normalize(gltfImage.uri || ''))

Check failure on line 1033 in src/viewer.ts

View workflow job for this annotation

GitHub Actions / Lint (18.x)

Missing semicolon
});
if (u) {
const textureAsset = new Asset(u.filename, 'texture', {
Expand All @@ -1054,7 +1054,7 @@

const processBuffer = function (gltfBuffer: any, continuation: (err: string, result: any) => void) {
const u = externalUrls.find((url) => {
return url.filename === path.normalize(gltfBuffer.uri || '');
return url.filename === decodeURIComponent(path.normalize(gltfBuffer.uri || ''))

Check failure on line 1057 in src/viewer.ts

View workflow job for this annotation

GitHub Actions / Lint (18.x)

Missing semicolon
});
if (u) {
const bufferAsset = new Asset(u.filename, 'binary', {
Expand Down Expand Up @@ -1557,8 +1557,10 @@
entity = prevEntity;
} else {
if (asset.type === 'container') {
// container/glb
entity = asset.resource.instantiateRenderEntity();
} else {
// gaussian splat scene
entity = asset.resource.instantiate();

// render frame if gaussian splat sorter updates)
Expand Down
Loading