Jitter Amoothing
This commit is contained in:
@@ -100,7 +100,12 @@ export class TunedDetector {
|
||||
* smoothing (kills jitter); moving fast => light smoothing (stays responsive).
|
||||
*/
|
||||
class OneEuro {
|
||||
constructor(minCutoff = 1.2, beta = 0.012, dCutoff = 1.0) {
|
||||
// minCutoff: baseline smoothing when still (lower = smoother but laggier).
|
||||
// beta: how aggressively smoothing backs off as the value moves (higher =
|
||||
// snappier tracking when you pan the phone, so ghosts follow the camera).
|
||||
// Tuned for AR panning: keep jitter down when still, but track fast motion
|
||||
// almost 1:1 so the world doesn't lag behind the camera.
|
||||
constructor(minCutoff = 1.7, beta = 0.15, dCutoff = 1.0) {
|
||||
this.minCutoff = minCutoff; this.beta = beta; this.dCutoff = dCutoff;
|
||||
this.xPrev = null; this.dxPrev = 0; this.tPrev = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user