fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
1 lines • 17.5 kB
Source Map (JSON)
{"version":3,"file":"Point.mjs","sources":["../../src/Point.ts"],"sourcesContent":["import type { TMat2D, TRadian } from './typedefs';\nimport { cos } from './util/misc/cos';\nimport { sin } from './util/misc/sin';\n\nexport interface XY {\n x: number;\n y: number;\n}\n\n/**\n * Adaptation of work of Kevin Lindsey(kevin@kevlindev.com)\n */\nexport class Point implements XY {\n declare x: number;\n\n declare y: number;\n\n constructor();\n constructor(x: number, y: number);\n constructor(point?: XY);\n constructor(arg0: number | XY = 0, y = 0) {\n if (typeof arg0 === 'object') {\n this.x = arg0.x;\n this.y = arg0.y;\n } else {\n this.x = arg0;\n this.y = y;\n }\n }\n\n /**\n * Adds another point to this one and returns another one\n * @param {XY} that\n * @return {Point} new Point instance with added values\n */\n add(that: XY): Point {\n return new Point(this.x + that.x, this.y + that.y);\n }\n\n /**\n * Adds another point to this one\n * @param {XY} that\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n addEquals(that: XY): Point {\n this.x += that.x;\n this.y += that.y;\n return this;\n }\n\n /**\n * Adds value to this point and returns a new one\n * @param {Number} scalar\n * @return {Point} new Point with added value\n */\n scalarAdd(scalar: number): Point {\n return new Point(this.x + scalar, this.y + scalar);\n }\n\n /**\n * Adds value to this point\n * @param {Number} scalar\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n scalarAddEquals(scalar: number): Point {\n this.x += scalar;\n this.y += scalar;\n return this;\n }\n\n /**\n * Subtracts another point from this point and returns a new one\n * @param {XY} that\n * @return {Point} new Point object with subtracted values\n */\n subtract(that: XY): Point {\n return new Point(this.x - that.x, this.y - that.y);\n }\n\n /**\n * Subtracts another point from this point\n * @param {XY} that\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n subtractEquals(that: XY): Point {\n this.x -= that.x;\n this.y -= that.y;\n return this;\n }\n\n /**\n * Subtracts value from this point and returns a new one\n * @param {Number} scalar\n * @return {Point}\n */\n scalarSubtract(scalar: number): Point {\n return new Point(this.x - scalar, this.y - scalar);\n }\n\n /**\n * Subtracts value from this point\n * @param {Number} scalar\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n scalarSubtractEquals(scalar: number): Point {\n this.x -= scalar;\n this.y -= scalar;\n return this;\n }\n\n /**\n * Multiplies this point by another value and returns a new one\n * @param {XY} that\n * @return {Point}\n */\n multiply(that: XY): Point {\n return new Point(this.x * that.x, this.y * that.y);\n }\n\n /**\n * Multiplies this point by a value and returns a new one\n * @param {Number} scalar\n * @return {Point}\n */\n scalarMultiply(scalar: number): Point {\n return new Point(this.x * scalar, this.y * scalar);\n }\n\n /**\n * Multiplies this point by a value\n * @param {Number} scalar\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n scalarMultiplyEquals(scalar: number): Point {\n this.x *= scalar;\n this.y *= scalar;\n return this;\n }\n\n /**\n * Divides this point by another and returns a new one\n * @param {XY} that\n * @return {Point}\n */\n divide(that: XY): Point {\n return new Point(this.x / that.x, this.y / that.y);\n }\n\n /**\n * Divides this point by a value and returns a new one\n * @param {Number} scalar\n * @return {Point}\n */\n scalarDivide(scalar: number): Point {\n return new Point(this.x / scalar, this.y / scalar);\n }\n\n /**\n * Divides this point by a value\n * @param {Number} scalar\n * @return {Point} thisArg\n * @chainable\n * @deprecated\n */\n scalarDivideEquals(scalar: number): Point {\n this.x /= scalar;\n this.y /= scalar;\n return this;\n }\n\n /**\n * Returns true if this point is equal to another one\n * @param {XY} that\n * @return {Boolean}\n */\n eq(that: XY): boolean {\n return this.x === that.x && this.y === that.y;\n }\n\n /**\n * Returns true if this point is less than another one\n * @param {XY} that\n * @return {Boolean}\n */\n lt(that: XY): boolean {\n return this.x < that.x && this.y < that.y;\n }\n\n /**\n * Returns true if this point is less than or equal to another one\n * @param {XY} that\n * @return {Boolean}\n */\n lte(that: XY): boolean {\n return this.x <= that.x && this.y <= that.y;\n }\n\n /**\n\n * Returns true if this point is greater another one\n * @param {XY} that\n * @return {Boolean}\n */\n gt(that: XY): boolean {\n return this.x > that.x && this.y > that.y;\n }\n\n /**\n * Returns true if this point is greater than or equal to another one\n * @param {XY} that\n * @return {Boolean}\n */\n gte(that: XY): boolean {\n return this.x >= that.x && this.y >= that.y;\n }\n\n /**\n * Returns new point which is the result of linear interpolation with this one and another one\n * @param {XY} that\n * @param {Number} t , position of interpolation, between 0 and 1 default 0.5\n * @return {Point}\n */\n lerp(that: XY, t = 0.5): Point {\n t = Math.max(Math.min(1, t), 0);\n return new Point(\n this.x + (that.x - this.x) * t,\n this.y + (that.y - this.y) * t,\n );\n }\n\n /**\n * Returns distance from this point and another one\n * @param {XY} that\n * @return {Number}\n */\n distanceFrom(that: XY): number {\n const dx = this.x - that.x,\n dy = this.y - that.y;\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n /**\n * Returns the point between this point and another one\n * @param {XY} that\n * @return {Point}\n */\n midPointFrom(that: XY): Point {\n return this.lerp(that);\n }\n\n /**\n * Returns a new point which is the min of this and another one\n * @param {XY} that\n * @return {Point}\n */\n min(that: XY): Point {\n return new Point(Math.min(this.x, that.x), Math.min(this.y, that.y));\n }\n\n /**\n * Returns a new point which is the max of this and another one\n * @param {XY} that\n * @return {Point}\n */\n max(that: XY): Point {\n return new Point(Math.max(this.x, that.x), Math.max(this.y, that.y));\n }\n\n /**\n * Returns string representation of this point\n * @return {String}\n */\n toString(): string {\n return `${this.x},${this.y}`;\n }\n\n /**\n * Sets x/y of this point\n * @param {Number} x\n * @param {Number} y\n * @chainable\n */\n setXY(x: number, y: number) {\n this.x = x;\n this.y = y;\n return this;\n }\n\n /**\n * Sets x of this point\n * @param {Number} x\n * @chainable\n */\n setX(x: number) {\n this.x = x;\n return this;\n }\n\n /**\n * Sets y of this point\n * @param {Number} y\n * @chainable\n */\n setY(y: number) {\n this.y = y;\n return this;\n }\n\n /**\n * Sets x/y of this point from another point\n * @param {XY} that\n * @chainable\n */\n setFromPoint(that: XY) {\n this.x = that.x;\n this.y = that.y;\n return this;\n }\n\n /**\n * Swaps x/y of this point and another point\n * @param {XY} that\n */\n swap(that: XY) {\n const x = this.x,\n y = this.y;\n this.x = that.x;\n this.y = that.y;\n that.x = x;\n that.y = y;\n }\n\n /**\n * return a cloned instance of the point\n * @return {Point}\n */\n clone(): Point {\n return new Point(this.x, this.y);\n }\n\n /**\n * Rotates `point` around `origin` with `radians`\n * @static\n * @memberOf fabric.util\n * @param {XY} origin The origin of the rotation\n * @param {TRadian} radians The radians of the angle for the rotation\n * @return {Point} The new rotated point\n */\n rotate(radians: TRadian, origin: XY = ZERO): Point {\n // TODO benchmark and verify the add and subtract how much cost\n // and then in case early return if no origin is passed\n const sinus = sin(radians),\n cosinus = cos(radians);\n const p = this.subtract(origin);\n const rotated = new Point(\n p.x * cosinus - p.y * sinus,\n p.x * sinus + p.y * cosinus,\n );\n return rotated.add(origin);\n }\n\n /**\n * Apply transform t to point p\n * @static\n * @memberOf fabric.util\n * @param {TMat2D} t The transform\n * @param {Boolean} [ignoreOffset] Indicates that the offset should not be applied\n * @return {Point} The transformed point\n */\n transform(t: TMat2D, ignoreOffset = false): Point {\n return new Point(\n t[0] * this.x + t[2] * this.y + (ignoreOffset ? 0 : t[4]),\n t[1] * this.x + t[3] * this.y + (ignoreOffset ? 0 : t[5]),\n );\n }\n}\n\nexport const ZERO = new Point(0, 0);\n"],"names":["Point","constructor","arg0","arguments","length","undefined","y","x","add","that","addEquals","scalarAdd","scalar","scalarAddEquals","subtract","subtractEquals","scalarSubtract","scalarSubtractEquals","multiply","scalarMultiply","scalarMultiplyEquals","divide","scalarDivide","scalarDivideEquals","eq","lt","lte","gt","gte","lerp","t","Math","max","min","distanceFrom","dx","dy","sqrt","midPointFrom","toString","concat","setXY","setX","setY","setFromPoint","swap","clone","rotate","radians","origin","ZERO","sinus","sin","cosinus","cos","p","rotated","transform","ignoreOffset"],"mappings":";;;AASA;AACA;AACA;AACO,MAAMA,KAAK,CAAe;AAQ/B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