Skip to content

Commit a372ad8

Browse files
committed
feat: allow file as response type for tiles fetching
1 parent 5156341 commit a372ad8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/fragments/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@thatopen/fragments",
33
"description": "Simple geometric system built on top of Three.js to display 3D BIM data efficiently.",
4-
"version": "2.3.0-alpha.1",
4+
"version": "2.3.0-alpha.2",
55
"author": "That Open Company",
66
"contributors": [
77
"Antonio Gonzalez Viegas (https://github.com/agviegas)",

packages/fragments/src/fragments-group.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { IfcProperties, IfcMetadata, FragmentIdMap } from "./base-types";
77
* A class representing a group of 3D fragments. This class extends THREE.Group and adds additional properties and methods for managing and interacting with the fragments it contains.
88
*/
99
export class FragmentsGroup extends THREE.Group {
10-
static fetch = async (url: string) => {
10+
static fetch = async (url: string): Promise<File | Response> => {
1111
return fetch(`${FragmentsGroup.url}${url}`);
1212
};
1313

@@ -513,9 +513,6 @@ export class FragmentsGroup extends THREE.Group {
513513
}
514514

515515
const fetched = await FragmentsGroup.fetch(name);
516-
if (fetched.json) {
517-
return fetched.json();
518-
}
519516
if (fetched.text) {
520517
const text = await fetched.text();
521518
return JSON.parse(text);

0 commit comments

Comments
 (0)