Skip to content

Commit d8d9eb1

Browse files
committed
Added the Friction Matter component to set the static, air and normal friction a body receives.
1 parent 93d246e commit d8d9eb1

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
var Friction = {
2+
3+
setFriction: function (value)
4+
{
5+
this.body.friction = value;
6+
7+
return this;
8+
},
9+
10+
setFrictionAir: function (value)
11+
{
12+
this.body.frictionAir = value;
13+
14+
return this;
15+
},
16+
17+
setFrictionStatic: function (value)
18+
{
19+
this.body.frictionStatic = value;
20+
21+
return this;
22+
}
23+
24+
};
25+
26+
module.exports = Friction;

0 commit comments

Comments
 (0)