UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

1 lines 40.2 kB
{"version":3,"file":"Rectangle.mjs","sources":["../../../src/maths/shapes/Rectangle.ts"],"sourcesContent":["// import { SHAPES } from '../const';\nimport { Point } from '../point/Point';\n\nimport type { Bounds } from '../../scene/container/bounds/Bounds';\nimport type { Matrix } from '../matrix/Matrix';\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\nconst tempPoints = [new Point(), new Point(), new Point(), new Point()];\n\n// eslint-disable-next-line max-len\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type, requireExport/require-export-jsdoc, requireMemberAPI/require-member-api-doc\nexport interface Rectangle extends PixiMixins.Rectangle { }\n\n/**\n * The `Rectangle` object represents a rectangular area defined by its position and dimensions.\n * Used for hit testing, bounds calculation, and general geometric operations.\n * @example\n * ```ts\n * // Basic rectangle creation\n * const rect = new Rectangle(100, 100, 200, 150);\n *\n * // Use as container bounds\n * container.hitArea = new Rectangle(0, 0, 100, 100);\n *\n * // Check point containment\n * const isInside = rect.contains(mouseX, mouseY);\n *\n * // Manipulate dimensions\n * rect.width *= 2;\n * rect.height += 50;\n * ```\n * @remarks\n * - Position defined by top-left corner (x,y)\n * - Dimensions defined by width and height\n * - Supports point and rectangle containment\n * - Common in UI and layout calculations\n * @see {@link Circle} For circular shapes\n * @see {@link Polygon} For complex shapes\n * @see {@link RoundedRectangle} For rounded corners\n * @category maths\n * @standard\n */\nexport class Rectangle implements ShapePrimitive\n{\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @example\n * ```ts\n * // Check shape type\n * const shape = new Rectangle(0, 0, 100, 100);\n * console.log(shape.type); // 'rectangle'\n *\n * // Use in type guards\n * if (shape.type === 'rectangle') {\n * console.log(shape.width, shape.height);\n * }\n * ```\n * @readonly\n * @default 'rectangle'\n * @see {@link SHAPE_PRIMITIVE} For all shape types\n */\n public readonly type: SHAPE_PRIMITIVE = 'rectangle';\n\n /**\n * The X coordinate of the upper-left corner of the rectangle\n * @example\n * ```ts\n * // Basic x position\n * const rect = new Rectangle();\n * rect.x = 100;\n * ```\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the upper-left corner of the rectangle\n * @example\n * ```ts\n * // Basic y position\n * const rect = new Rectangle();\n * rect.y = 100;\n * ```\n * @default 0\n */\n public y: number;\n\n /**\n * The overall width of this rectangle\n * @example\n * ```ts\n * // Basic width setting\n * const rect = new Rectangle();\n * rect.width = 200;\n * ```\n * @default 0\n */\n public width: number;\n\n /**\n * The overall height of this rectangle\n * @example\n * ```ts\n * // Basic height setting\n * const rect = new Rectangle();\n * rect.height = 150;\n * ```\n * @default 0\n */\n public height: number;\n\n /**\n * @param x - The X coordinate of the upper-left corner of the rectangle\n * @param y - The Y coordinate of the upper-left corner of the rectangle\n * @param width - The overall width of the rectangle\n * @param height - The overall height of the rectangle\n */\n constructor(x: string | number = 0, y: string | number = 0, width: string | number = 0, height: string | number = 0)\n {\n this.x = Number(x);\n this.y = Number(y);\n this.width = Number(width);\n this.height = Number(height);\n }\n\n /**\n * Returns the left edge (x-coordinate) of the rectangle.\n * @example\n * ```ts\n * // Get left edge position\n * const rect = new Rectangle(100, 100, 200, 150);\n * console.log(rect.left); // 100\n *\n * // Use in alignment calculations\n * sprite.x = rect.left + padding;\n *\n * // Compare positions\n * if (point.x > rect.left) {\n * console.log('Point is right of rectangle');\n * }\n * ```\n * @readonly\n * @returns The x-coordinate of the left edge\n * @see {@link Rectangle.right} For right edge position\n * @see {@link Rectangle.x} For direct x-coordinate access\n */\n get left(): number\n {\n return this.x;\n }\n\n /**\n * Returns the right edge (x + width) of the rectangle.\n * @example\n * ```ts\n * // Get right edge position\n * const rect = new Rectangle(100, 100, 200, 150);\n * console.log(rect.right); // 300\n *\n * // Align to right edge\n * sprite.x = rect.right - sprite.width;\n *\n * // Check boundaries\n * if (point.x < rect.right) {\n * console.log('Point is inside right bound');\n * }\n * ```\n * @readonly\n * @returns The x-coordinate of the right edge\n * @see {@link Rectangle.left} For left edge position\n * @see {@link Rectangle.width} For width value\n */\n get right(): number\n {\n return this.x + this.width;\n }\n\n /**\n * Returns the top edge (y-coordinate) of the rectangle.\n * @example\n * ```ts\n * // Get top edge position\n * const rect = new Rectangle(100, 100, 200, 150);\n * console.log(rect.top); // 100\n *\n * // Position above rectangle\n * sprite.y = rect.top - sprite.height;\n *\n * // Check vertical position\n * if (point.y > rect.top) {\n * console.log('Point is below top edge');\n * }\n * ```\n * @readonly\n * @returns The y-coordinate of the top edge\n * @see {@link Rectangle.bottom} For bottom edge position\n * @see {@link Rectangle.y} For direct y-coordinate access\n */\n get top(): number\n {\n return this.y;\n }\n\n /**\n * Returns the bottom edge (y + height) of the rectangle.\n * @example\n * ```ts\n * // Get bottom edge position\n * const rect = new Rectangle(100, 100, 200, 150);\n * console.log(rect.bottom); // 250\n *\n * // Stack below rectangle\n * sprite.y = rect.bottom + margin;\n *\n * // Check vertical bounds\n * if (point.y < rect.bottom) {\n * console.log('Point is above bottom edge');\n * }\n * ```\n * @readonly\n * @returns The y-coordinate of the bottom edge\n * @see {@link Rectangle.top} For top edge position\n * @see {@link Rectangle.height} For height value\n */\n get bottom(): number\n {\n return this.y + this.height;\n }\n\n /**\n * Determines whether the Rectangle is empty (has no area).\n * @example\n * ```ts\n * // Check zero dimensions\n * const rect = new Rectangle(100, 100, 0, 50);\n * console.log(rect.isEmpty()); // true\n * ```\n * @returns True if the rectangle has no area\n * @see {@link Rectangle.width} For width value\n * @see {@link Rectangle.height} For height value\n */\n public isEmpty(): boolean\n {\n return this.left === this.right || this.top === this.bottom;\n }\n\n /**\n * A constant empty rectangle. This is a new object every time the property is accessed.\n * @example\n * ```ts\n * // Get fresh empty rectangle\n * const empty = Rectangle.EMPTY;\n * console.log(empty.isEmpty()); // true\n * ```\n * @returns A new empty rectangle instance\n * @see {@link Rectangle.isEmpty} For empty state testing\n */\n static get EMPTY(): Rectangle\n {\n return new Rectangle(0, 0, 0, 0);\n }\n\n /**\n * Creates a clone of this Rectangle\n * @example\n * ```ts\n * // Basic cloning\n * const original = new Rectangle(100, 100, 200, 150);\n * const copy = original.clone();\n *\n * // Clone and modify\n * const modified = original.clone();\n * modified.width *= 2;\n * modified.height += 50;\n *\n * // Verify independence\n * console.log(original.width); // 200\n * console.log(modified.width); // 400\n * ```\n * @returns A copy of the rectangle\n * @see {@link Rectangle.copyFrom} For copying into existing rectangle\n * @see {@link Rectangle.copyTo} For copying to another rectangle\n */\n public clone(): Rectangle\n {\n return new Rectangle(this.x, this.y, this.width, this.height);\n }\n\n /**\n * Converts a Bounds object to a Rectangle object.\n * @example\n * ```ts\n * // Convert bounds to rectangle\n * const bounds = container.getBounds();\n * const rect = new Rectangle().copyFromBounds(bounds);\n * ```\n * @param bounds - The bounds to copy and convert to a rectangle\n * @returns Returns itself\n * @see {@link Bounds} For bounds object structure\n * @see {@link Rectangle.getBounds} For getting rectangle bounds\n */\n public copyFromBounds(bounds: Bounds): this\n {\n this.x = bounds.minX;\n this.y = bounds.minY;\n this.width = bounds.maxX - bounds.minX;\n this.height = bounds.maxY - bounds.minY;\n\n return this;\n }\n\n /**\n * Copies another rectangle to this one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Rectangle(100, 100, 200, 150);\n * const target = new Rectangle();\n * target.copyFrom(source);\n *\n * // Chain with other operations\n * const rect = new Rectangle()\n * .copyFrom(source)\n * .pad(10);\n * ```\n * @param rectangle - The rectangle to copy from\n * @returns Returns itself\n * @see {@link Rectangle.copyTo} For copying to another rectangle\n * @see {@link Rectangle.clone} For creating new rectangle copy\n */\n public copyFrom(rectangle: Rectangle): Rectangle\n {\n this.x = rectangle.x;\n this.y = rectangle.y;\n this.width = rectangle.width;\n this.height = rectangle.height;\n\n return this;\n }\n\n /**\n * Copies this rectangle to another one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Rectangle(100, 100, 200, 150);\n * const target = new Rectangle();\n * source.copyTo(target);\n *\n * // Chain with other operations\n * const result = source\n * .copyTo(new Rectangle())\n * .getBounds();\n * ```\n * @param rectangle - The rectangle to copy to\n * @returns Returns given parameter\n * @see {@link Rectangle.copyFrom} For copying from another rectangle\n * @see {@link Rectangle.clone} For creating new rectangle copy\n */\n public copyTo(rectangle: Rectangle): Rectangle\n {\n rectangle.copyFrom(this);\n\n return rectangle;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rectangle\n * @example\n * ```ts\n * // Basic containment check\n * const rect = new Rectangle(100, 100, 200, 150);\n * const isInside = rect.contains(150, 125); // true\n * // Check edge cases\n * console.log(rect.contains(100, 100)); // true (on edge)\n * console.log(rect.contains(300, 250)); // false (outside)\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Rectangle\n * @see {@link Rectangle.containsRect} For rectangle containment\n * @see {@link Rectangle.strokeContains} For checking stroke intersection\n */\n public contains(x: number, y: number): boolean\n {\n if (this.width <= 0 || this.height <= 0)\n {\n return false;\n }\n\n if (x >= this.x && x < this.x + this.width)\n {\n if (y >= this.y && y < this.y + this.height)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this rectangle including the stroke.\n * @example\n * ```ts\n * // Basic stroke check\n * const rect = new Rectangle(100, 100, 200, 150);\n * const isOnStroke = rect.strokeContains(150, 100, 4); // 4px line width\n *\n * // Check with different alignments\n * const innerStroke = rect.strokeContains(150, 100, 4, 0); // Inside\n * const centerStroke = rect.strokeContains(150, 100, 4, 0.5); // Centered\n * const outerStroke = rect.strokeContains(150, 100, 4, 1); // Outside\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @param alignment - The alignment of the stroke (0 = inner, 0.5 = centered, 1 = outer)\n * @returns Whether the x/y coordinates are within this rectangle's stroke\n * @see {@link Rectangle.contains} For checking fill containment\n * @see {@link Rectangle.getBounds} For getting stroke bounds\n */\n public strokeContains(x: number, y: number, strokeWidth: number, alignment: number = 0.5): boolean\n {\n const { width, height } = this;\n\n if (width <= 0 || height <= 0) return false;\n\n const _x = this.x;\n const _y = this.y;\n\n const strokeWidthOuter = strokeWidth * (1 - alignment);\n const strokeWidthInner = strokeWidth - strokeWidthOuter;\n\n const outerLeft = _x - strokeWidthOuter;\n const outerRight = _x + width + strokeWidthOuter;\n const outerTop = _y - strokeWidthOuter;\n const outerBottom = _y + height + strokeWidthOuter;\n\n const innerLeft = _x + strokeWidthInner;\n const innerRight = _x + width - strokeWidthInner;\n const innerTop = _y + strokeWidthInner;\n const innerBottom = _y + height - strokeWidthInner;\n\n return (x >= outerLeft && x <= outerRight && y >= outerTop && y <= outerBottom)\n && !(x > innerLeft && x < innerRight && y > innerTop && y < innerBottom);\n }\n /**\n * Determines whether the `other` Rectangle transformed by `transform` intersects with `this` Rectangle object.\n * Returns true only if the area of the intersection is >0, this means that Rectangles\n * sharing a side are not overlapping. Another side effect is that an arealess rectangle\n * (width or height equal to zero) can't intersect any other rectangle.\n * @param {Rectangle} other - The Rectangle to intersect with `this`.\n * @param {Matrix} transform - The transformation matrix of `other`.\n * @returns {boolean} A value of `true` if the transformed `other` Rectangle intersects with `this`; otherwise `false`.\n */\n /**\n * Determines whether the `other` Rectangle transformed by `transform` intersects with `this` Rectangle object.\n *\n * Returns true only if the area of the intersection is greater than 0.\n * This means that rectangles sharing only a side are not considered intersecting.\n * @example\n * ```ts\n * // Basic intersection check\n * const rect1 = new Rectangle(0, 0, 100, 100);\n * const rect2 = new Rectangle(50, 50, 100, 100);\n * console.log(rect1.intersects(rect2)); // true\n *\n * // With transformation matrix\n * const matrix = new Matrix();\n * matrix.rotate(Math.PI / 4); // 45 degrees\n * console.log(rect1.intersects(rect2, matrix)); // Checks with rotation\n *\n * // Edge cases\n * const zeroWidth = new Rectangle(0, 0, 0, 100);\n * console.log(rect1.intersects(zeroWidth)); // false (no area)\n * ```\n * @remarks\n * - Returns true only if intersection area is > 0\n * - Rectangles sharing only a side are not intersecting\n * - Zero-area rectangles cannot intersect anything\n * - Supports optional transformation matrix\n * @param other - The Rectangle to intersect with `this`\n * @param transform - Optional transformation matrix of `other`\n * @returns True if the transformed `other` Rectangle intersects with `this`\n * @see {@link Rectangle.containsRect} For containment testing\n * @see {@link Rectangle.contains} For point testing\n */\n public intersects(other: Rectangle, transform?: Matrix): boolean\n {\n if (!transform)\n {\n const x0 = this.x < other.x ? other.x : this.x;\n const x1 = this.right > other.right ? other.right : this.right;\n\n if (x1 <= x0)\n {\n return false;\n }\n\n const y0 = this.y < other.y ? other.y : this.y;\n const y1 = this.bottom > other.bottom ? other.bottom : this.bottom;\n\n return y1 > y0;\n }\n\n const x0 = this.left;\n const x1 = this.right;\n const y0 = this.top;\n const y1 = this.bottom;\n\n if (x1 <= x0 || y1 <= y0)\n {\n return false;\n }\n\n const lt = tempPoints[0].set(other.left, other.top);\n const lb = tempPoints[1].set(other.left, other.bottom);\n const rt = tempPoints[2].set(other.right, other.top);\n const rb = tempPoints[3].set(other.right, other.bottom);\n\n if (rt.x <= lt.x || lb.y <= lt.y)\n {\n return false;\n }\n\n const s = Math.sign((transform.a * transform.d) - (transform.b * transform.c));\n\n if (s === 0)\n {\n return false;\n }\n\n transform.apply(lt, lt);\n transform.apply(lb, lb);\n transform.apply(rt, rt);\n transform.apply(rb, rb);\n\n if (Math.max(lt.x, lb.x, rt.x, rb.x) <= x0\n || Math.min(lt.x, lb.x, rt.x, rb.x) >= x1\n || Math.max(lt.y, lb.y, rt.y, rb.y) <= y0\n || Math.min(lt.y, lb.y, rt.y, rb.y) >= y1)\n {\n return false;\n }\n\n const nx = s * (lb.y - lt.y);\n const ny = s * (lt.x - lb.x);\n const n00 = (nx * x0) + (ny * y0);\n const n10 = (nx * x1) + (ny * y0);\n const n01 = (nx * x0) + (ny * y1);\n const n11 = (nx * x1) + (ny * y1);\n\n if (Math.max(n00, n10, n01, n11) <= (nx * lt.x) + (ny * lt.y)\n || Math.min(n00, n10, n01, n11) >= (nx * rb.x) + (ny * rb.y))\n {\n return false;\n }\n\n const mx = s * (lt.y - rt.y);\n const my = s * (rt.x - lt.x);\n const m00 = (mx * x0) + (my * y0);\n const m10 = (mx * x1) + (my * y0);\n const m01 = (mx * x0) + (my * y1);\n const m11 = (mx * x1) + (my * y1);\n\n if (Math.max(m00, m10, m01, m11) <= (mx * lt.x) + (my * lt.y)\n || Math.min(m00, m10, m01, m11) >= (mx * rb.x) + (my * rb.y))\n {\n return false;\n }\n\n return true;\n }\n\n /**\n * Pads the rectangle making it grow in all directions.\n *\n * If paddingY is omitted, both paddingX and paddingY will be set to paddingX.\n * @example\n * ```ts\n * // Basic padding\n * const rect = new Rectangle(100, 100, 200, 150);\n * rect.pad(10); // Adds 10px padding on all sides\n *\n * // Different horizontal and vertical padding\n * const uiRect = new Rectangle(0, 0, 100, 50);\n * uiRect.pad(20, 10); // 20px horizontal, 10px vertical\n * ```\n * @remarks\n * - Adjusts x/y by subtracting padding\n * - Increases width/height by padding * 2\n * - Common in UI layout calculations\n * - Chainable with other methods\n * @param paddingX - The horizontal padding amount\n * @param paddingY - The vertical padding amount\n * @returns Returns itself\n * @see {@link Rectangle.enlarge} For growing to include another rectangle\n * @see {@link Rectangle.fit} For shrinking to fit within another rectangle\n */\n public pad(paddingX = 0, paddingY = paddingX): this\n {\n this.x -= paddingX;\n this.y -= paddingY;\n\n this.width += paddingX * 2;\n this.height += paddingY * 2;\n\n return this;\n }\n\n /**\n * Fits this rectangle around the passed one.\n * @example\n * ```ts\n * // Basic fitting\n * const container = new Rectangle(0, 0, 100, 100);\n * const content = new Rectangle(25, 25, 200, 200);\n * content.fit(container); // Clips to container bounds\n * ```\n * @param rectangle - The rectangle to fit around\n * @returns Returns itself\n * @see {@link Rectangle.enlarge} For growing to include another rectangle\n * @see {@link Rectangle.pad} For adding padding around the rectangle\n */\n public fit(rectangle: Rectangle): this\n {\n const x1 = Math.max(this.x, rectangle.x);\n const x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width);\n const y1 = Math.max(this.y, rectangle.y);\n const y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height);\n\n this.x = x1;\n this.width = Math.max(x2 - x1, 0);\n this.y = y1;\n this.height = Math.max(y2 - y1, 0);\n\n return this;\n }\n\n /**\n * Enlarges rectangle so that its corners lie on a grid defined by resolution.\n * @example\n * ```ts\n * // Basic grid alignment\n * const rect = new Rectangle(10.2, 10.6, 100.8, 100.4);\n * rect.ceil(); // Aligns to whole pixels\n *\n * // Custom resolution grid\n * const uiRect = new Rectangle(5.3, 5.7, 50.2, 50.8);\n * uiRect.ceil(0.5); // Aligns to half pixels\n *\n * // Use with precision value\n * const preciseRect = new Rectangle(20.001, 20.999, 100.001, 100.999);\n * preciseRect.ceil(1, 0.01); // Handles small decimal variations\n * ```\n * @param resolution - The grid size to align to (1 = whole pixels)\n * @param eps - Small number to prevent floating point errors\n * @returns Returns itself\n * @see {@link Rectangle.fit} For constraining to bounds\n * @see {@link Rectangle.enlarge} For growing dimensions\n */\n public ceil(resolution = 1, eps = 0.001): this\n {\n const x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution;\n const y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution;\n\n this.x = Math.floor((this.x + eps) * resolution) / resolution;\n this.y = Math.floor((this.y + eps) * resolution) / resolution;\n\n this.width = x2 - this.x;\n this.height = y2 - this.y;\n\n return this;\n }\n\n /**\n * Enlarges this rectangle to include the passed rectangle.\n * @example\n * ```ts\n * // Basic enlargement\n * const rect = new Rectangle(50, 50, 100, 100);\n * const other = new Rectangle(0, 0, 200, 75);\n * rect.enlarge(other);\n * // rect is now: x=0, y=0, width=200, height=150\n *\n * // Use for bounding box calculation\n * const bounds = new Rectangle();\n * objects.forEach((obj) => {\n * bounds.enlarge(obj.getBounds());\n * });\n * ```\n * @param rectangle - The rectangle to include\n * @returns Returns itself\n * @see {@link Rectangle.fit} For shrinking to fit within another rectangle\n * @see {@link Rectangle.pad} For adding padding around the rectangle\n */\n public enlarge(rectangle: Rectangle): this\n {\n const x1 = Math.min(this.x, rectangle.x);\n const x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width);\n const y1 = Math.min(this.y, rectangle.y);\n const y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height);\n\n this.x = x1;\n this.width = x2 - x1;\n this.y = y1;\n this.height = y2 - y1;\n\n return this;\n }\n\n /**\n * Returns the framing rectangle of the rectangle as a Rectangle object\n * @example\n * ```ts\n * // Basic bounds retrieval\n * const rect = new Rectangle(100, 100, 200, 150);\n * const bounds = rect.getBounds();\n *\n * // Reuse existing rectangle\n * const out = new Rectangle();\n * rect.getBounds(out);\n * ```\n * @param out - Optional rectangle to store the result\n * @returns The framing rectangle\n * @see {@link Rectangle.copyFrom} For direct copying\n * @see {@link Rectangle.clone} For creating new copy\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out ||= new Rectangle();\n out.copyFrom(this);\n\n return out;\n }\n\n /**\n * Determines whether another Rectangle is fully contained within this Rectangle.\n *\n * Rectangles that occupy the same space are considered to be containing each other.\n *\n * Rectangles without area (width or height equal to zero) can't contain anything,\n * not even other arealess rectangles.\n * @example\n * ```ts\n * // Check if one rectangle contains another\n * const container = new Rectangle(0, 0, 100, 100);\n * const inner = new Rectangle(25, 25, 50, 50);\n *\n * console.log(container.containsRect(inner)); // true\n *\n * // Check overlapping rectangles\n * const partial = new Rectangle(75, 75, 50, 50);\n * console.log(container.containsRect(partial)); // false\n *\n * // Zero-area rectangles\n * const empty = new Rectangle(0, 0, 0, 100);\n * console.log(container.containsRect(empty)); // false\n * ```\n * @param other - The Rectangle to check for containment\n * @returns True if other is fully contained within this Rectangle\n * @see {@link Rectangle.contains} For point containment\n * @see {@link Rectangle.intersects} For overlap testing\n */\n public containsRect(other: Rectangle): boolean\n {\n if (this.width <= 0 || this.height <= 0) return false;\n\n const x1 = other.x;\n const y1 = other.y;\n const x2 = other.x + other.width;\n const y2 = other.y + other.height;\n\n return x1 >= this.x && x1 < this.x + this.width\n && y1 >= this.y && y1 < this.y + this.height\n && x2 >= this.x && x2 < this.x + this.width\n && y2 >= this.y && y2 < this.y + this.height;\n }\n\n /**\n * Sets the position and dimensions of the rectangle.\n * @example\n * ```ts\n * // Basic usage\n * const rect = new Rectangle();\n * rect.set(100, 100, 200, 150);\n *\n * // Chain with other operations\n * const bounds = new Rectangle()\n * .set(0, 0, 100, 100)\n * .pad(10);\n * ```\n * @param x - The X coordinate of the upper-left corner of the rectangle\n * @param y - The Y coordinate of the upper-left corner of the rectangle\n * @param width - The overall width of the rectangle\n * @param height - The overall height of the rectangle\n * @returns Returns itself for method chaining\n * @see {@link Rectangle.copyFrom} For copying from another rectangle\n * @see {@link Rectangle.clone} For creating a new copy\n */\n public set(x: number, y: number, width: number, height: number): this\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n return this;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`;\n }\n // #endif\n}\n"],"names":["x0","x1","y0","y1"],"mappings":";;;AAQA,MAAM,UAAa,GAAA,CAAC,IAAI,KAAA,EAAS,EAAA,IAAI,KAAM,EAAA,EAAG,IAAI,KAAA,EAAS,EAAA,IAAI,OAAO,CAAA,CAAA;AAmC/D,MAAM,SACb,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA0EI,WAAA,CAAY,IAAqB,CAAG,EAAA,CAAA,GAAqB,GAAG,KAAyB,GAAA,CAAA,EAAG,SAA0B,CAClH,EAAA;AAzDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,IAAA,CAAgB,IAAwB,GAAA,WAAA,CAAA;AA0DpC,IAAK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