UNPKG

phaser4-rex-plugins

Version:
24 lines (20 loc) 664 B
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2019 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ import Polygon from './Polygon.js'; /** * Create a new polygon which is a copy of the specified polygon * * @function Phaser.Geom.Polygon.Clone * @since 3.0.0 * * @param {Phaser.Geom.Polygon} polygon - The polygon to create a clone of * * @return {Phaser.Geom.Polygon} A new separate Polygon cloned from the specified polygon, based on the same points. */ var Clone = function (polygon) { return new Polygon(polygon.points); }; export default Clone;