src/camera.js
/*
 * Smoothing filter for 2D vectors.
 *
 * pos: Initial value
 */
Smoothing filter for 2D vectors.
pos: Initial value
Smoothing filter for 2D vectors . pos : Initial value
function Filter(order, time) {
	this.order = order;
	this.data = new Float64Array(order * 2);
	this.coeff = Math.pow(time, 1 / param.Rate);
	this.pos = new Float64Array(2);
	this.leading = this.order * this.coeff / ((1 - this.coeff) * param.Rate);
}
function Filter ( order , time ) { this . order = order ; this . data = new Float64Array ( order * 2 ) ; this . coeff = Math . pow ( time , 1 / param . Rate ) ; this . pos = new Float64Array ( 2 ) ; this . leading = this . order * this . coeff / ( ( 1 - this . coeff ) * param . Rate ) ; }
Smoothing filter for 2D vectors.
Smoothing filter for 2D vectors .
// Extra leading needed to compensate for the filter