Hi. Three has a slerp for quaterions, but doesn’t implement weighted interpolation of multiple (e.g. 4) quaternions. Not complaining, that does seem too niche of a problem for Three to tackle.
Just wondering if anyone has any experience, code, recommendations for doing this in Three.
I understand it’s possible to build a quadratic quaternion interpolation (aka “squad”) out of a few slerp calls. But I would like to calculate a quaternion based on four input quaternions and four weights.
Something like:
const inputQuats = [ q1, q2, q3, q4 ];
const inputWeights = [ 0.2, 0.5, 0.1, 0.2 ]; // adds to 1.0
const outputQuat = weightedQuaternion(inputQuats, inputWeights);
Anyone know of an implementation of the hypothetical weightedQuaternion here, or how I’d go about it?