@forgeax/engine-gltf 0.1.2 → 0.1.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-importer.d.ts","sourceRoot":"","sources":["../src/gltf-importer.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAEV,QAAQ,EAIR,QAAQ,EAMT,MAAM,uBAAuB,CAAC;AAiB/B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAkTlF,iFAAiF;AACjF,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,OAAO,EACZ,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,kBAAkB,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAC1D,SAAS,QAAQ,EAAE,CA+BrB;AA4hBD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,8BAA8B,GAAG,QAAQ,CAErF;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,EAAE,QAA+B,CAAC"}
1
+ {"version":3,"file":"gltf-importer.d.ts","sourceRoot":"","sources":["../src/gltf-importer.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAEV,QAAQ,EAIR,QAAQ,EAMT,MAAM,uBAAuB,CAAC;AAiB/B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAwTlF,iFAAiF;AACjF,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,OAAO,EACZ,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,kBAAkB,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAC1D,SAAS,QAAQ,EAAE,CA+BrB;AA4hBD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,8BAA8B,GAAG,QAAQ,CAMrF;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,EAAE,QAA+B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { MeshoptDecoder } from 'meshoptimizer';
2
- import { packMeshBinV4 } from '@forgeax/engine-import';
2
+ import { packMeshBinV4 } from '@forgeax/engine-import/mesh-bin';
3
3
  import { AssetGuid } from '@forgeax/engine-pack/guid';
4
4
  import { ImportError, toShared, err, ok, reconcileMeshMaterialSlotTopology, IMPORT_ERROR_HINTS, resolveMeshMaterialSlotDefaultGuid, createMaterialError } from '@forgeax/engine-types';
5
5
  import { packInterleavedVertexAttributes } from '@forgeax/engine-geometry';
@@ -2700,6 +2700,9 @@ async function parseGlbForImporter(buffer, filePath, options = {}) {
2700
2700
  function isGlbBytes(source) {
2701
2701
  return source.toLowerCase().endsWith(".glb");
2702
2702
  }
2703
+ function publishesCatalogProduct(input) {
2704
+ return input.importSettings.geometry !== "procedural";
2705
+ }
2703
2706
  function previousMaterialSlotTopology(ctx, meshSourceKey) {
2704
2707
  if (meshSourceKey === void 0) return void 0;
2705
2708
  const value = ctx.sourceOverrides?.[meshSourceKey]?.materialSlots;
@@ -3346,7 +3349,11 @@ async function importGltf(ctx, meshopt) {
3346
3349
  return { ok: true, value: { assets: out, sourceDependencies: [] } };
3347
3350
  }
3348
3351
  function createGltfImporter(meshopt) {
3349
- return { key: "gltf", import: (ctx) => importGltf(ctx, meshopt) };
3352
+ return {
3353
+ key: "gltf",
3354
+ import: (ctx) => importGltf(ctx, meshopt),
3355
+ capabilities: { catalog: { publish: publishesCatalogProduct } }
3356
+ };
3350
3357
  }
3351
3358
 
3352
3359
  // src/importer-entry.ts