UNPKG

phaser4-rex-plugins

Version:
12 lines (11 loc) 279 B
var Offset = function (polygon, x, y) { var points = polygon.points, point; for (var i = 0, cnt = points.length; i < cnt; i++) { point = points[i]; point.x += x; point.y += y; } return polygon; }; export default Offset;