Skip to content

Commit

Permalink
support model loading with relative path in iframes
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Sep 5, 2024
1 parent 72f13e3 commit 7fbfe03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/display/src/displays/webgl/ObjParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ export class ObjParser extends XYZWorker {

async load(url: string): Promise<ModelData> {
return (this.inProgress[url] ||= (async () => {
const _url = new URL(url, window.location.href);
const _url = new URL(url, window.top.location.href);
// const _url = new URL(url, window.location.href);
const model: ModelData = await this.main({url: _url.href});
delete this.inProgress[url];
// if (!model.geometries || model.geometries.length === 0) return null;
Expand Down

0 comments on commit 7fbfe03

Please sign in to comment.