phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.
35 lines (29 loc) • 777 B
JavaScript
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2025 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Provides methods used for setting the mass properties of an Arcade Physics Body.
*
* @namespace Phaser.Physics.Arcade.Components.Mass
* @since 3.0.0
*/
var Mass = {
/**
* Sets the mass of the physics body
*
* @method Phaser.Physics.Arcade.Components.Mass#setMass
* @since 3.0.0
*
* @param {number} value - New value for the mass of the body.
*
* @return {this} This Game Object.
*/
setMass: function (value)
{
this.body.mass = value;
return this;
}
};
module.exports = Mass;