friction

Controls the friction of the collider. This friction value determines how quickly the collider slows down over time.

Examples

const A = $.makeCircleCollider(30,$.h/2-30,20);
A.fill = "#54d89f";
A.direction = 90;
A.speed = 30;
A.friction = 10;

const B = $.makeCircleCollider(30,$.h/2,20);
B.fill = "#333333";
B.direction = 90;
B.speed = 30;
B.friction = 5;

const C = $.makeCircleCollider(30,$.h/2+30,20);
C.fill = "rgba(160,54,68,1)";
C.direction = 90;
C.speed = 30;
C.friction = 20;

function update() {
    A.draw();
    B.draw();
    C.draw();
}