Changes
This commit is contained in:
@@ -3,15 +3,15 @@ import { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js';
|
||||
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
||||
import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js';
|
||||
|
||||
type SupportedExt = 'glb' | 'obj' | 'stl';
|
||||
type SupportedExt = 'glb' | 'obj' | 'stl' | 'ifc';
|
||||
|
||||
export function getSupportedExtension(fileName: string): SupportedExt | null {
|
||||
const ext = fileName.split('.').pop()?.toLowerCase();
|
||||
if (ext === 'glb' || ext === 'obj' || ext === 'stl') return ext;
|
||||
if (ext === 'glb' || ext === 'obj' || ext === 'stl' || ext === 'ifc') return ext;
|
||||
return null;
|
||||
}
|
||||
|
||||
export const ACCEPTED_EXTENSIONS = '.glb,.obj,.stl';
|
||||
export const ACCEPTED_EXTENSIONS = '.glb,.obj,.stl,.ifc';
|
||||
|
||||
/**
|
||||
* Convert an OBJ or STL file (ArrayBuffer) into a GLB Blob.
|
||||
|
||||
Reference in New Issue
Block a user