Skip to content

Commit

Permalink
Merge branch 'sponce_zipGLTF' of github.com:HSF/phoenix into sponce_z…
Browse files Browse the repository at this point in the history
…ipGLTF
  • Loading branch information
EdwardMoyse committed May 3, 2024
2 parents f7fc41f + c1339c9 commit 887e9b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
import { GeometryUIParameters } from '../../lib/types/geometry-ui-parameters';
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils';
import JSZip from 'jszip';
import JSZip from 'jszip';

/**
* Manager for managing event display's import related functionality.
Expand Down Expand Up @@ -235,7 +236,7 @@ export class ImportManager {
if (file.split('.').pop() == 'zip') {
try {
JSZip.loadAsync(data).then((archive) => {
const promises: Promise<GeometryUIParameters[]>[] = [];
const promises: Promise[] = [];
for (const filePath in archive.files) {
promises.push(
archive
Expand All @@ -256,9 +257,9 @@ export class ImportManager {
});
});
} catch (error) {
// this.eventDisplay
// .getInfoLogger()
// .add('Could not read zip file', 'Error');
this.eventDisplay
.getInfoLogger()
.add('Could not read zip file', 'Error');
reject(error);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,9 @@ export class ThreeManager {
}

/**
* Parses and loads a geometry in GLTF (.gltf or .glb) format.
* also supports zip files of the above
* @param file Geometry file in GLTF (.gltf or .glb) format.
* Parses and loads a geometry in GLTF (.gltf or .glb) format.
* also supports zip files of the above
* @param file Geometry file in GLTF (.gltf or .glb) format.
Expand Down

0 comments on commit 887e9b3

Please sign in to comment.