parseAnimStacks method
dynamic
parseAnimStacks(
- dynamic layersMap
Implementation
parseAnimStacks(layersMap) {
var rawStacks = fbxTree.objects["AnimationStack"];
// connect the stacks (clips) up to the layers
var rawClips = {};
for (var nodeID in rawStacks.keys) {
var children = connections[int.parse(nodeID.toString())]["children"];
if (children.length > 1) {
// it seems like stacks will always be associated with a single layer. But just in case there are files
// where there are multiple layers per stack, we'll display a warning
print(
'THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.');
}
var layer = layersMap[children[0]["ID"]];
rawClips[nodeID] = {
"name": rawStacks[nodeID]["attrName"],
"layer": layer,
};
}
return rawClips;
}