@forgeax/engine-gltf 0.1.3 → 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.
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ export { err, ok } from '@forgeax/engine-types';
3
3
  import { packInterleavedVertexAttributes } from '@forgeax/engine-geometry';
4
4
  import { box3, mat4, vec3, quat } from '@forgeax/engine-math';
5
5
  import { AssetGuid } from '@forgeax/engine-pack/guid';
6
- import { packMeshBinV4 } from '@forgeax/engine-import';
6
+ import { packMeshBinV4 } from '@forgeax/engine-import/mesh-bin';
7
7
  import { deriveAnimationTargetId } from '@forgeax/engine-animation/target-id';
8
8
 
9
9
  // src/errors.ts
@@ -2972,6 +2972,9 @@ function toAssetPack(doc, existingMeta, source) {
2972
2972
  function isGlbBytes(source) {
2973
2973
  return source.toLowerCase().endsWith(".glb");
2974
2974
  }
2975
+ function publishesCatalogProduct(input) {
2976
+ return input.importSettings.geometry !== "procedural";
2977
+ }
2975
2978
  function previousMaterialSlotTopology(ctx, meshSourceKey) {
2976
2979
  if (meshSourceKey === void 0) return void 0;
2977
2980
  const value = ctx.sourceOverrides?.[meshSourceKey]?.materialSlots;
@@ -3618,7 +3621,11 @@ async function importGltf(ctx, meshopt) {
3618
3621
  return { ok: true, value: { assets: out, sourceDependencies: [] } };
3619
3622
  }
3620
3623
  function createGltfImporter(meshopt) {
3621
- return { key: "gltf", import: (ctx) => importGltf(ctx) };
3624
+ return {
3625
+ key: "gltf",
3626
+ import: (ctx) => importGltf(ctx),
3627
+ capabilities: { catalog: { publish: publishesCatalogProduct } }
3628
+ };
3622
3629
  }
3623
3630
  var gltfImporter = createGltfImporter();
3624
3631