Blend tree configuration
Current parameter value
Calculated blend weights for each animation
const config: BlendTreeConfig = {
type: '1d',
parameter: 'speed',
nodes: [
{ animation: 'idle', threshold: 0 },
{ animation: 'walk', threshold: 0.5 },
{ animation: 'run', threshold: 1.0 }
]
};
const weights = calculateBlendWeights(config, 0.75);
// { weights: { idle: 0, walk: 0.5, run: 0.5 }, hasActiveAnimations: true }
Calculates blend weights for a 1D blend tree.