@babylonjs/loaders 9.32.0 → 9.32.1
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.
|
@@ -2441,18 +2441,22 @@ export class FBXFileLoader {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
2443
|
const rigCurveNodes = rig.bones.filter((bone) => sampledModelIds.has(bone.modelId)).flatMap((bone) => boneCurves.get(bone.modelId) ?? []);
|
|
2444
|
-
|
|
2445
|
-
if (
|
|
2444
|
+
const baseTimes = collectAnimationSampleTimes(rigCurveNodes, fps, startTime, stopTime);
|
|
2445
|
+
if (baseTimes.length === 0) {
|
|
2446
2446
|
return [];
|
|
2447
2447
|
}
|
|
2448
|
+
const refinedTimes = new Set(baseTimes);
|
|
2448
2449
|
for (const boneData of rig.bones) {
|
|
2449
2450
|
const md = modelIdToData.get(boneData.modelId);
|
|
2450
2451
|
const cn = boneCurves.get(boneData.modelId) ?? [];
|
|
2451
2452
|
if (!sampledModelIds.has(boneData.modelId) || !md || cn.length === 0) {
|
|
2452
2453
|
continue;
|
|
2453
2454
|
}
|
|
2454
|
-
|
|
2455
|
+
for (const time of FBXFileLoader._refineSampleTimes(baseTimes, (time) => this._sampleModelLocalMatrix(md, cn, time))) {
|
|
2456
|
+
refinedTimes.add(time);
|
|
2457
|
+
}
|
|
2455
2458
|
}
|
|
2459
|
+
const times = Array.from(refinedTimes).sort((a, b) => a - b);
|
|
2456
2460
|
const keysByBone = rig.bones.map(() => ({
|
|
2457
2461
|
posKeys: [],
|
|
2458
2462
|
rotKeys: [],
|