This is what I was able to do by converting the implementation found on Wikipedia.
Rx.Observable.prototype.highpass = function (rc) {
return this
.timestamp()
.bufferWithCount(2, 1)
.scan(0, function (acc, x) {
var dt = x[1].timestamp - x[0].timestamp;
var a = rc / (rc + dt);
return a * (acc + (x[1].value - x[0].value));
});
};
The following example doesn't work super great. Anyway, it still serves a purpose, assuming you keep the mouse moving.