mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Added the Bounce Matter component for an easier way to set restitution.
This commit is contained in:
parent
2e11c18470
commit
dff633cc62
1 changed files with 12 additions and 0 deletions
12
v3/src/physics/matter-js/components/Bounce.js
Normal file
12
v3/src/physics/matter-js/components/Bounce.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
var Bounce = {
|
||||
|
||||
setBounce: function (value)
|
||||
{
|
||||
this.body.restitution = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
module.exports = Bounce;
|
Loading…
Add table
Reference in a new issue