@webxr-jp/mtoon-atlas 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -409,6 +409,9 @@ interface GLTFParser {
409
409
  }
410
410
  interface GLTFWriter {
411
411
  json: any;
412
+ extensionsUsed: {
413
+ [name: string]: boolean;
414
+ };
412
415
  nodeMap: Map<any, number>;
413
416
  pending: Promise<void>[];
414
417
  byteOffset: number;
package/dist/index.d.ts CHANGED
@@ -409,6 +409,9 @@ interface GLTFParser {
409
409
  }
410
410
  interface GLTFWriter {
411
411
  json: any;
412
+ extensionsUsed: {
413
+ [name: string]: boolean;
414
+ };
412
415
  nodeMap: Map<any, number>;
413
416
  pending: Promise<void>[];
414
417
  byteOffset: number;
package/dist/index.js CHANGED
@@ -1314,10 +1314,7 @@ var MToonAtlasExporterPlugin = class {
1314
1314
  }
1315
1315
  }
1316
1316
  });
1317
- json.extensionsUsed = json.extensionsUsed || [];
1318
- if (!json.extensionsUsed.includes("KHR_texture_basisu")) {
1319
- json.extensionsUsed.push("KHR_texture_basisu");
1320
- }
1317
+ this.writer.extensionsUsed.KHR_texture_basisu = true;
1321
1318
  return { textureIndex, imageDef };
1322
1319
  }
1323
1320
  /**
@@ -1650,10 +1647,7 @@ var MToonAtlasExporterPlugin = class {
1650
1647
  }
1651
1648
  this.updateMeshPrimitive(mesh, materials, materialIndexMap);
1652
1649
  }
1653
- json.extensionsUsed = json.extensionsUsed || [];
1654
- if (!json.extensionsUsed.includes(MTOON_ATLAS_EXTENSION_NAME)) {
1655
- json.extensionsUsed.push(MTOON_ATLAS_EXTENSION_NAME);
1656
- }
1650
+ this.writer.extensionsUsed[MTOON_ATLAS_EXTENSION_NAME] = true;
1657
1651
  const updateMaterialDefsPromise = this.waitForAllTextureIndices().then(() => {
1658
1652
  for (const [material, materialDef] of materialDefMap) {
1659
1653
  const indices = this.textureIndices.get(material);