2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2018 Photon Storm Ltd.
|
|
|
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
|
|
|
*/
|
|
|
|
|
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;
|