Skip to content

Commit

Permalink
feat: allow to customize the property files name
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Oct 21, 2024
1 parent c6ff41f commit 53253a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fragments/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/fragments",
"description": "Simple geometric system built on top of Three.js to display 3D BIM data efficiently.",
"version": "2.4.0-alpha.2",
"version": "2.4.0-alpha.3",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down
5 changes: 5 additions & 0 deletions packages/fragments/src/fragments-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class FragmentsGroup extends THREE.Group {
return fetch(`${FragmentsGroup.url}${url}`);
};

static constructFileName: ((id: number) => string) | null = null;

/**
* Default URL for requesting property tiles. Feel free to change this, or override the FragmentsGroup.fetch method for more granular control.
*/
Expand Down Expand Up @@ -584,6 +586,9 @@ export class FragmentsGroup extends THREE.Group {
}

private constructFileName(fileID: number) {
if (FragmentsGroup.constructFileName) {
return FragmentsGroup.constructFileName(fileID);
}
const { baseFileName } = this.streamSettings;
return `${baseFileName}-${fileID}`;
}
Expand Down

0 comments on commit 53253a5

Please sign in to comment.