UNPKG

motion-and-tween

Version:
31 lines (30 loc) 696 B
var Position = /** @class */ (function () { function Position(x, y) { if (x) { this.x = x; } else { this.x = null; } if (y) { this.y = y; } else { this.y = null; } } Position.prototype.toString = function () { return "Position[".concat(this.x, ",").concat(this.y, "]"); }; Position.prototype.addVector = function (vector) { if (this.x && vector.x) { this.x += vector.x; } if (this.y && vector.y) { this.y += vector.y; } }; return Position; }()); export { Position }; export default Position;