Open yomotsu opened 1 year ago
damp3 (for Vector3) is currently handed by 3 separated damps. https://github.com/pmndrs/maath/blob/90317077d86b6aca9a5a5708bd15007b4c89c7c9/packages/maath/src/easing.ts#L131-L148
damp3
damp
but it can't be separated and should use the "magnitude (length) of the vector" for the maxSpeed.
maxSpeed
e.g. If maxSpeed is 1: speed x can be 0.999 and speed y can be 0.999. It means vec3( 0.999, 0.999, 0 ), and diagonal of 0.999 x 0.999.
1
vec3( 0.999, 0.999, 0 )
thus: Math.sqrt( Math.pow( 0.9999, 2 ) + Math.pow( 0.9999, 2 ) ); // = 1.4140721410168577
the result is larger than 1.
damp3
(for Vector3) is currently handed by 3 separateddamp
s. https://github.com/pmndrs/maath/blob/90317077d86b6aca9a5a5708bd15007b4c89c7c9/packages/maath/src/easing.ts#L131-L148but it can't be separated and should use the "magnitude (length) of the vector" for the
maxSpeed
.e.g. If
maxSpeed
is1
: speed x can be 0.999 and speed y can be 0.999. It meansvec3( 0.999, 0.999, 0 )
, and diagonal of 0.999 x 0.999.thus: Math.sqrt( Math.pow( 0.9999, 2 ) + Math.pow( 0.9999, 2 ) ); // = 1.4140721410168577
the result is larger than
1
.