@babylonjs/loaders 7.33.0 → 7.34.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -415,9 +415,11 @@ export declare class GLTFFileLoader extends GLTFLoaderOptions implements IDispos
415
415
  readonly extensions: {
416
416
  readonly ".gltf": {
417
417
  readonly isBinary: false;
418
+ readonly mimeType: "model/gltf+json";
418
419
  };
419
420
  readonly ".glb": {
420
421
  readonly isBinary: true;
422
+ readonly mimeType: "model/gltf-binary";
421
423
  };
422
424
  };
423
425
  /**
@@ -4,9 +4,11 @@ export declare const GLTFFileLoaderMetadata: {
4
4
  readonly extensions: {
5
5
  readonly ".gltf": {
6
6
  readonly isBinary: false;
7
+ readonly mimeType: "model/gltf+json";
7
8
  };
8
9
  readonly ".glb": {
9
10
  readonly isBinary: true;
11
+ readonly mimeType: "model/gltf-binary";
10
12
  };
11
13
  };
12
14
  readonly canDirectLoad: (data: string) => boolean;
@@ -3,9 +3,9 @@ export const GLTFFileLoaderMetadata = {
3
3
  name: "gltf",
4
4
  extensions: {
5
5
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
- ".gltf": { isBinary: false },
6
+ ".gltf": { isBinary: false, mimeType: "model/gltf+json" },
7
7
  // eslint-disable-next-line @typescript-eslint/naming-convention
8
- ".glb": { isBinary: true },
8
+ ".glb": { isBinary: true, mimeType: "model/gltf-binary" },
9
9
  },
10
10
  canDirectLoad(data) {
11
11
  return ((data.indexOf("asset") !== -1 && data.indexOf("version") !== -1) ||
@@ -1 +1 @@
1
- {"version":3,"file":"glTFFileLoader.metadata.js","sourceRoot":"","sources":["../../../../dev/loaders/src/glTF/glTFFileLoader.metadata.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,CAAC,8CAA8C;AAE9F,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,IAAI,EAAE,MAAM;IAEZ,UAAU,EAAE;QACR,gEAAgE;QAChE,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC5B,gEAAgE;QAChE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KACmB;IAEjD,aAAa,CAAC,IAAY;QACtB,OAAO,CACH,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YAChE,IAAI,CAAC,UAAU,CAAC,cAAc,GAAG,sBAAsB,CAAC,IAAI,8EAA8E;YAC1I,IAAI,CAAC,UAAU,CAAC,eAAe,GAAG,sBAAsB,CAAC;YACzD,IAAI,CAAC,UAAU,CAAC,uCAAuC,GAAG,sBAAsB,CAAC;YACjF,IAAI,CAAC,UAAU,CAAC,gCAAgC,GAAG,sBAAsB,CAAC,CAC7E,CAAC;IACN,CAAC;CAC0C,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { ISceneLoaderPluginExtensions, ISceneLoaderPluginMetadata } from \"core/index\";\r\n\r\nexport const GLTFMagicBase64Encoded = \"Z2xURg\"; // \"glTF\" base64 encoded (without the quotes!)\r\n\r\nexport const GLTFFileLoaderMetadata = {\r\n name: \"gltf\",\r\n\r\n extensions: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \".gltf\": { isBinary: false },\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \".glb\": { isBinary: true },\r\n } as const satisfies ISceneLoaderPluginExtensions,\r\n\r\n canDirectLoad(data: string): boolean {\r\n return (\r\n (data.indexOf(\"asset\") !== -1 && data.indexOf(\"version\") !== -1) ||\r\n data.startsWith(\"data:base64,\" + GLTFMagicBase64Encoded) || // this is technically incorrect, but will continue to support for backcompat.\r\n data.startsWith(\"data:;base64,\" + GLTFMagicBase64Encoded) ||\r\n data.startsWith(\"data:application/octet-stream;base64,\" + GLTFMagicBase64Encoded) ||\r\n data.startsWith(\"data:model/gltf-binary;base64,\" + GLTFMagicBase64Encoded)\r\n );\r\n },\r\n} as const satisfies ISceneLoaderPluginMetadata;\r\n"]}
1
+ {"version":3,"file":"glTFFileLoader.metadata.js","sourceRoot":"","sources":["../../../../dev/loaders/src/glTF/glTFFileLoader.metadata.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,CAAC,8CAA8C;AAE9F,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,IAAI,EAAE,MAAM;IAEZ,UAAU,EAAE;QACR,gEAAgE;QAChE,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE;QACzD,gEAAgE;QAChE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE;KACZ;IAEjD,aAAa,CAAC,IAAY;QACtB,OAAO,CACH,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YAChE,IAAI,CAAC,UAAU,CAAC,cAAc,GAAG,sBAAsB,CAAC,IAAI,8EAA8E;YAC1I,IAAI,CAAC,UAAU,CAAC,eAAe,GAAG,sBAAsB,CAAC;YACzD,IAAI,CAAC,UAAU,CAAC,uCAAuC,GAAG,sBAAsB,CAAC;YACjF,IAAI,CAAC,UAAU,CAAC,gCAAgC,GAAG,sBAAsB,CAAC,CAC7E,CAAC;IACN,CAAC;CAC0C,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { ISceneLoaderPluginExtensions, ISceneLoaderPluginMetadata } from \"core/index\";\r\n\r\nexport const GLTFMagicBase64Encoded = \"Z2xURg\"; // \"glTF\" base64 encoded (without the quotes!)\r\n\r\nexport const GLTFFileLoaderMetadata = {\r\n name: \"gltf\",\r\n\r\n extensions: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \".gltf\": { isBinary: false, mimeType: \"model/gltf+json\" },\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \".glb\": { isBinary: true, mimeType: \"model/gltf-binary\" },\r\n } as const satisfies ISceneLoaderPluginExtensions,\r\n\r\n canDirectLoad(data: string): boolean {\r\n return (\r\n (data.indexOf(\"asset\") !== -1 && data.indexOf(\"version\") !== -1) ||\r\n data.startsWith(\"data:base64,\" + GLTFMagicBase64Encoded) || // this is technically incorrect, but will continue to support for backcompat.\r\n data.startsWith(\"data:;base64,\" + GLTFMagicBase64Encoded) ||\r\n data.startsWith(\"data:application/octet-stream;base64,\" + GLTFMagicBase64Encoded) ||\r\n data.startsWith(\"data:model/gltf-binary;base64,\" + GLTFMagicBase64Encoded)\r\n );\r\n },\r\n} as const satisfies ISceneLoaderPluginMetadata;\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "7.33.0",
3
+ "version": "7.34.0",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@babylonjs/core": "^7.33.0",
21
+ "@babylonjs/core": "^7.34.0",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^7.33.0"
24
+ "babylonjs-gltf2interface": "^7.34.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^7.0.0",