@forgeax/engine-gltf 0.1.28 → 0.1.29

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,4 +1,4 @@
1
- import { err, ok, ImportError, IMPORT_ERROR_HINTS } from '@forgeax/engine-types';
1
+ import { err, ok, ImportError, IMPORT_ERROR_HINTS, parseConservativeAnimatedBounds } from '@forgeax/engine-types';
2
2
  import { vec3, quat, mat4 } from '@forgeax/engine-math';
3
3
  import { deriveAnimationTargetId } from '@forgeax/engine-animation/target-id';
4
4
 
@@ -1292,8 +1292,6 @@ function parseGlbChunks(buffer, filePath) {
1292
1292
  ...binChunk === void 0 ? {} : { binChunk }
1293
1293
  });
1294
1294
  }
1295
-
1296
- // src/parse-skin.ts
1297
1295
  var MAX_JOINTS = 256;
1298
1296
  var SKIN_ACCESSOR_TYPES = ["MAT4"];
1299
1297
  function identityMat4() {
@@ -1374,10 +1372,14 @@ function parseSkin(skinsJson, nodesJson, accessors, bufferViews, buffers) {
1374
1372
  if (!pathResult.ok) return err(pathResult.error);
1375
1373
  jointPaths.push(pathResult.value.join("/"));
1376
1374
  }
1375
+ const bounds = parseConservativeAnimatedBounds(
1376
+ skin.extras?.forgeax?.conservativeAnimatedBounds
1377
+ );
1377
1378
  records.push({
1378
1379
  jointCount: joints.length,
1379
1380
  inverseBindMatrices: ibm,
1380
- jointPaths
1381
+ jointPaths,
1382
+ ...bounds === void 0 ? {} : { bounds }
1381
1383
  });
1382
1384
  }
1383
1385
  return ok(records);