diff --git a/core.d.ts b/core.d.ts index f79f7b7b..464db8b5 100644 --- a/core.d.ts +++ b/core.d.ts @@ -152,6 +152,7 @@ export type FileExtension = | 'ace' | 'avro' | 'icc' + | 'fbx' ; // eslint-disable-line semi-style export type MimeType = @@ -300,6 +301,7 @@ export type MimeType = | 'application/x-ace-compressed' | 'application/avro' | 'application/vnd.iccprofile' + | 'application/x.autodesk.fbx' ; // eslint-disable-line semi-style export type FileTypeResult = { diff --git a/core.js b/core.js index 9a2cb2ac..ba48ff04 100644 --- a/core.js +++ b/core.js @@ -1433,6 +1433,13 @@ class FileTypeParser { }; } + if (this.checkString('Kaydara FBX Binary \u0000')) { + return { + ext: 'fbx', + mime: 'application/x.autodesk.fbx', // Invented by us + }; + } + if ( this.check([0x4C, 0x50], {offset: 34}) && ( diff --git a/fixture/fixture.fbx b/fixture/fixture.fbx new file mode 100644 index 00000000..12e963b9 Binary files /dev/null and b/fixture/fixture.fbx differ diff --git a/package.json b/package.json index ad155899..41b66edd 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,8 @@ "cpio", "ace", "avro", - "icc" + "icc", + "fbx" ], "dependencies": { "readable-web-to-node-stream": "^3.0.2", diff --git a/readme.md b/readme.md index cd50d930..bccf5612 100644 --- a/readme.md +++ b/readme.md @@ -359,6 +359,7 @@ Returns a `Set` of supported MIME types. - [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player - [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player - [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player +- [`fbx`](https://en.wikipedia.org/wiki/FBX) - Filmbox is a proprietary file format used to provide interoperability between digital content creation apps. - [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec - [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format - [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video diff --git a/supported.js b/supported.js index 6b2545f9..e73a5ba7 100644 --- a/supported.js +++ b/supported.js @@ -149,6 +149,7 @@ export const extensions = [ 'ace', 'avro', 'icc', + 'fbx', ]; export const mimeTypes = [ @@ -297,4 +298,5 @@ export const mimeTypes = [ 'application/x-ace-compressed', 'application/avro', 'application/vnd.iccprofile', + 'application/x.autodesk.fbx', // Invented by us ];