phaser/src/geom/ellipse/CopyFrom.js

27 lines
829 B
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
2019-01-15 16:20:22 +00:00
* @copyright 2019 Photon Storm Ltd.
2019-05-10 15:15:04 +00:00
* @license {@link https://opensource.org/licenses/MIT|MIT License}
2018-02-12 16:01:20 +00:00
*/
2017-10-13 13:11:54 +00:00
/**
2018-01-26 04:53:16 +00:00
* Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse
* into the given `dest` Ellipse, then returns the `dest` Ellipse.
2017-10-13 13:11:54 +00:00
*
* @function Phaser.Geom.Ellipse.CopyFrom
* @since 3.0.0
*
2018-03-27 13:27:08 +00:00
* @generic {Phaser.Geom.Ellipse} O - [dest,$return]
*
2018-01-26 04:53:16 +00:00
* @param {Phaser.Geom.Ellipse} source - The source Ellipse to copy the values from.
* @param {Phaser.Geom.Ellipse} dest - The destination Ellipse to copy the values to.
2017-10-13 13:11:54 +00:00
*
* @return {Phaser.Geom.Ellipse} The destination Ellipse.
2017-10-13 13:11:54 +00:00
*/
var CopyFrom = function (source, dest)
{
return dest.setTo(source.x, source.y, source.width, source.height);
};
module.exports = CopyFrom;