Closed simonharrisco closed 5 years ago
We haven't merged prettier in pex-renderer yet so you can revert your latest commit.
Are those actually Vec4 or Quaternions?
if (path === 'rotation') {
prevInTangent = vec4.create();
prevOutTangent = vec4.create();
prevPosition = vec4.create();
nextInTangent = vec4.create();
nextOutTangent = vec4.create();
nextPos = vec4.create();
Thats the thing right, I thought they would be quaternions but the equation has you scale them, which doesn't make sense for a quaternion (right?!)
So I just used vec4 thinking I could use vec4.scale (I mean I now realise I cant, but as I wrote it that was the logic)
It would be also good to have a look at garbage collection if target.transform.set({ position: currentOutput })
doesn't retain the vec3 then we could have preallocated temp array instead of new one every frame.
Stuff like
currentOutput = [1,1,1,1]
currentOutput = quat.copy(prevOutput)
@simonharrisco can link the interpolation docs?
the resulting p(t) quaternion
So it should be quat
There is a mistake shouldnt move backwards.
Pending pex-math vec4.scale to be released.
I should also note that i know it shouldnt be merged in this starting form up its more a proposed structure (that needs work) and some functioning maths as a foundation
Fix #168