@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.
- package/README.md +1 -1
- package/dist/bridge.d.ts +7 -0
- package/dist/bridge.d.ts.map +1 -1
- package/dist/cli-gltf.mjs +6 -4
- package/dist/cli-gltf.mjs.map +1 -1
- package/dist/gltf-importer.d.ts.map +1 -1
- package/dist/importer-entry.mjs +44 -18
- package/dist/importer-entry.mjs.map +1 -1
- package/dist/index.mjs +44 -18
- package/dist/index.mjs.map +1 -1
- package/dist/node-file-entry.mjs +6 -4
- package/dist/node-file-entry.mjs.map +1 -1
- package/dist/parse-gltf.d.ts.map +1 -1
- package/dist/parse-skin.d.ts +8 -16
- package/dist/parse-skin.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/bridge.unit.test.ts +70 -51
- package/src/__tests__/gltf.unit.test.ts +95 -15
- package/src/__tests__/morph-import.integration.test.ts +1 -1
- package/src/bridge.ts +34 -10
- package/src/gltf-importer.ts +29 -11
- package/src/parse-gltf.ts +5 -0
- package/src/parse-skin.ts +14 -41
package/dist/node-file-entry.mjs
CHANGED
|
@@ -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);
|