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-03-30 12:19:31 +00:00
|
|
|
var Triangle = require('./Triangle');
|
|
|
|
|
2017-10-13 13:11:54 +00:00
|
|
|
/**
|
2018-10-19 11:32:43 +00:00
|
|
|
* Clones a Triangle object.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Triangle.Clone
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-10-19 11:32:43 +00:00
|
|
|
* @param {Phaser.Geom.Triangle} source - The Triangle to clone.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-10-19 11:32:43 +00:00
|
|
|
* @return {Phaser.Geom.Triangle} A new Triangle identical to the given one but separate from it.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-03-30 12:19:31 +00:00
|
|
|
var Clone = function (source)
|
|
|
|
{
|
|
|
|
return new Triangle(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Clone;
|