UNPKG

arcade-physics

Version:
26 lines 931 B
"use strict"; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Rectangle_1 = __importDefault(require("./Rectangle")); /** * Creates a new Rectangle which is identical to the given one. * * @function Phaser.Geom.Rectangle.Clone * @since 3.0.0 * * @param {Phaser.Geom.Rectangle} source - The Rectangle to clone. * * @return {Phaser.Geom.Rectangle} The newly created Rectangle, which is separate from the given one. */ const Clone = source => { return new Rectangle_1.default(source.x, source.y, source.width, source.height); }; exports.default = Clone; //# sourceMappingURL=Clone.js.map