[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CST3AA1HE4QSCAWNM478D2":3,"skill-same:01M7CST3AA1HE4QSCAWNM478D2":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7CST3AA1HE4QSCAWNM478D2","pixijs-math",null,"Use this skill when working with coordinates, vectors, matrices, shapes, hit testing, or layout rectangles in PixiJS v8. Covers Point\u002FObservablePoint, Matrix (2D affine, decompose, apply, applyInverse), shapes (Rectangle, Circle, Ellipse, Polygon, RoundedRectangle, Triangle), Rectangle layout helpers (pad, fit, enlarge, ceil, scale, getBounds), strokeContains hit tests, Polygon isClockwise\u002FcontainsPolygon, toGlobal\u002FtoLocal, PointData\u002FPointLike\u002FSize types, DEG_TO_RAD, and pixi.js\u002Fmath-extras vector and intersection helpers. Triggers on: Point, ObservablePoint, Matrix, Rectangle, Circle, Polygon, Triangle, RoundedRectangle, toGlobal, toLocal, hitArea, strokeContains, pad, fit, enlarge, ceil, getBounds, containsRect, intersects, isClockwise, math-extras, lineIntersection, segmentIntersection, DEG_TO_RAD, PointData.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-math\u002FSkill.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pixijs-math\ndescription: \"Use this skill when working with coordinates, vectors, matrices, shapes, hit testing, or layout rectangles in PixiJS v8. Covers Point\u002FObservablePoint, Matrix (2D affine, decompose, apply, applyInverse), shapes (Rectangle, Circle, Ellipse, Polygon, RoundedRectangle, Triangle), Rectangle layout helpers (pad, fit, enlarge, ceil, scale, getBounds), strokeContains hit tests, Polygon isClockwise\u002FcontainsPolygon, toGlobal\u002FtoLocal, PointData\u002FPointLike\u002FSize types, DEG_TO_RAD, and pixi.js\u002Fmath-extras vector and intersection helpers. Triggers on: Point, ObservablePoint, Matrix, Rectangle, Circle, Polygon, Triangle, RoundedRectangle, toGlobal, toLocal, hitArea, strokeContains, pad, fit, enlarge, ceil, getBounds, containsRect, intersects, isClockwise, math-extras, lineIntersection, segmentIntersection, DEG_TO_RAD, PointData.\"\nlicense: MIT\n---\n\nPixiJS exposes lightweight math primitives (Point, Matrix, shape classes) used throughout the library for transforms, hit testing, and coordinate conversion. Import `pixi.js\u002Fmath-extras` to add vector operations (add, dot, magnitude, reflect) and Rectangle intersection\u002Funion helpers.\n\n## Quick Start\n\n```ts\nconst parent = new Container();\nparent.position.set(100, 100);\nparent.scale.set(2);\napp.stage.addChild(parent);\n\nconst child = new Container();\nchild.position.set(50, 50);\nparent.addChild(child);\n\nconst globalPt = child.toGlobal(new Point(0, 0));\n\nconst m = new Matrix()\n  .translate(100, 50)\n  .rotate(Math.PI \u002F 4)\n  .scale(2, 2);\nconst world = m.apply(new Point(10, 20));\n\nconst hitArea = new Rectangle(0, 0, 200, 100);\nconsole.log(hitArea.contains(50, 50));\n```\n\n**Related skills:** `pixijs-scene-container` (transform properties), `pixijs-events` (hitArea usage), `pixijs-scene-core-concepts` (culling with Rectangle).\n\n## Core Patterns\n\n### Point and ObservablePoint\n\nPoint is a simple {x, y} value type. ObservablePoint fires a callback when x or y changes; it is used internally by Container's position, scale, pivot, origin, and skew.\n\n```ts\nimport { Point } from \"pixi.js\";\n\nconst p = new Point(10, 20);\np.set(30, 40); \u002F\u002F set both\np.set(50); \u002F\u002F x=50, y=50\n\nconst clone = p.clone();\nconsole.log(p.equals(clone)); \u002F\u002F true\n\np.copyFrom({ x: 1, y: 2 }); \u002F\u002F accepts any PointData\n\n\u002F\u002F Point.shared: temporary point, reset to (0,0) on each access\nconst temp = Point.shared;\ntemp.set(100, 200);\n\u002F\u002F do not store a reference to Point.shared\n```\n\nContainer properties like `position`, `scale`, `pivot`, `origin`, and `skew` are ObservablePoints. Setting `.x` or `.y` on them triggers transform recalculation automatically.\n\n```ts\nimport { Container } from \"pixi.js\";\n\nconst obj = new Container();\nobj.position.set(100, 200); \u002F\u002F triggers observer -> marks transform dirty\nobj.position.x = 150; \u002F\u002F also triggers observer\n```\n\n### Matrix (2D affine transform)\n\nMatrix represents a 3x3 affine transform: `| a c tx | b d ty | 0 0 1 |`. It supports translate, scale, rotate, append, prepend, invert, and decompose.\n\n```ts\nimport { Matrix, Point } from \"pixi.js\";\n\n\u002F\u002F Build a transform\nconst m = new Matrix()\n  .translate(100, 50)\n  .rotate(Math.PI \u002F 4)\n  .scale(2, 2);\n\n\u002F\u002F Transform a point (local -> parent space)\nconst local = new Point(10, 20);\nconst world = m.apply(local);\n\n\u002F\u002F Inverse transform (parent -> local space)\nconst backToLocal = m.applyInverse(world);\n\n\u002F\u002F Combine matrices\nconst a = new Matrix().translate(50, 0);\nconst b = new Matrix().rotate(Math.PI \u002F 2);\na.append(b); \u002F\u002F a = a * b\n\n\u002F\u002F Decompose into position\u002Fscale\u002Frotation\u002Fskew\nconst transform = {\n  position: new Point(),\n  scale: new Point(),\n  pivot: new Point(),\n  skew: new Point(),\n  rotation: 0,\n};\nm.decompose(transform);\nconsole.log(transform.rotation); \u002F\u002F ~0.785 (PI\u002F4)\n\n\u002F\u002F Shared temporary matrix (reset on each access)\nconst temp = Matrix.shared;\n\u002F\u002F IDENTITY is read-only reference\nconst isDefault = m.equals(Matrix.IDENTITY);\n```\n\n### Coordinate transforms via Container\n\nContainers provide `toGlobal`, `toLocal`, and `getGlobalPosition` for coordinate conversion.\n\n```ts\nimport { Container, Point } from \"pixi.js\";\n\nconst parent = new Container();\nparent.position.set(100, 100);\nparent.scale.set(2);\n\nconst child = new Container();\nchild.position.set(50, 50);\nparent.addChild(child);\n\n\u002F\u002F Local point in child's space -> global (world) space\nconst globalPt = child.toGlobal(new Point(0, 0));\n\u002F\u002F globalPt = { x: 200, y: 200 } (100 + 50*2, 100 + 50*2)\n\n\u002F\u002F Global point -> child's local space\nconst localPt = child.toLocal(new Point(200, 200));\n\u002F\u002F localPt = { x: 0, y: 0 }\n\n\u002F\u002F Convert between two containers\nconst other = new Container();\nother.position.set(300, 300);\nconst ptInOther = child.toLocal(new Point(10, 10), other);\n```\n\n### Shapes and hit testing\n\nRectangle, Circle, Ellipse, Polygon, RoundedRectangle, and Triangle all implement `contains(x, y)` for point-in-shape tests, plus `getBounds(out?)` and `strokeContains(x, y, width, alignment?)`. They can be used as `hitArea` on containers for custom interaction regions.\n\n```ts\nimport { Rectangle, Circle, Polygon, Container } from \"pixi.js\";\n\nconst rect = new Rectangle(0, 0, 200, 100);\nrect.contains(50, 50); \u002F\u002F true\nrect.contains(300, 50); \u002F\u002F false\nrect.left; \u002F\u002F 0\nrect.right; \u002F\u002F 200\nrect.top; \u002F\u002F 0\nrect.bottom; \u002F\u002F 100\nrect.isEmpty(); \u002F\u002F false (Rectangle.EMPTY returns a fresh empty rect)\n\n\u002F\u002F Native Rectangle-to-Rectangle methods (no math-extras needed)\nconst other = new Rectangle(50, 50, 100, 100);\nrect.containsRect(other); \u002F\u002F true if `other` is fully inside `rect`\nrect.intersects(other); \u002F\u002F boolean: do they overlap at all?\nrect.intersects(other, matrix); \u002F\u002F overlap after transforming `other`\n\n\u002F\u002F Stroke hit testing (alignment: 1 = inner, 0.5 = centered, 0 = outer)\nrect.strokeContains(0, 50, 4); \u002F\u002F true if (0,50) lies on a 4px centered stroke\nconst circle = new Circle(100, 100, 50);\ncircle.strokeContains(150, 100, 4, 1); \u002F\u002F inner-aligned stroke check\n\n\u002F\u002F getBounds works on every shape (returns a Rectangle, accepts an out param)\nconst bounds = circle.getBounds();\nconst reused = new Rectangle();\nnew Polygon([0, 0, 100, 0, 50, 100]).getBounds(reused);\n\n\u002F\u002F Use as hit area for interaction\nconst button = new Container();\nbutton.hitArea = new Rectangle(0, 0, 200, 50);\nbutton.eventMode = \"static\";\nbutton.on(\"pointerdown\", () => {\n  \u002F* clicked *\u002F\n});\n```\n\nDo not confuse native `Rectangle.intersects(other)` (returns `boolean`) with math-extras `intersection(other)` (returns a `Rectangle` describing the overlap area).\n\n### Rectangle layout helpers\n\nRectangle ships with mutating helpers used heavily in UI\u002Flayout, bounds aggregation, and pixel snapping. All return `this` for chaining.\n\n```ts\nimport { Rectangle } from \"pixi.js\";\n\nconst r = new Rectangle(10, 10, 100, 50);\n\nr.pad(5); \u002F\u002F grow on all sides: x=5, y=5, w=110, h=60\nr.pad(10, 4); \u002F\u002F separate horizontal\u002Fvertical padding\nr.scale(2); \u002F\u002F multiply x, y, width, height by 2\n\n\u002F\u002F fit shrinks `this` to lie inside another rect (clipping)\nconst viewport = new Rectangle(0, 0, 200, 200);\nnew Rectangle(150, 150, 200, 200).fit(viewport); \u002F\u002F -> 150, 150, 50, 50\n\n\u002F\u002F enlarge expands `this` to include another rect (bounds aggregation)\nconst total = new Rectangle();\nitems.forEach((item) =>\n  total.enlarge(new Rectangle().copyFromBounds(item.getBounds())),\n);\n\n\u002F\u002F ceil snaps to a pixel grid (resolution: 1 = whole pixels, 2 = half pixels)\nnew Rectangle(10.2, 10.6, 100.8, 100.4).ceil();\n\n\u002F\u002F copy a Container\u002FMesh bounds object straight into a Rectangle\nnew Rectangle().copyFromBounds(container.getBounds());\n```\n\n### Polygon\n\nPolygon accepts four constructor formats: a flat number array, an array of point-like objects, or either passed as spread arguments.\n\n```ts\nimport { Polygon, Point } from \"pixi.js\";\n\nnew Polygon([0, 0, 100, 0, 50, 100]); \u002F\u002F flat numbers\nnew Polygon([new Point(0, 0), new Point(100, 0), new Point(50, 100)]); \u002F\u002F PointData[]\nnew Polygon(0, 0, 100, 0, 50, 100); \u002F\u002F spread numbers\nnew Polygon(new Point(0, 0), new Point(100, 0), new Point(50, 100)); \u002F\u002F spread points\n\nconst poly = new Polygon([0, 0, 100, 0, 100, 100, 0, 100]);\npoly.points; \u002F\u002F [0, 0, 100, 0, 100, 100, 0, 100] (mutable flat array)\npoly.closePath; \u002F\u002F true by default; false produces an open path\npoly.startX; \u002F\u002F 0  - first vertex\npoly.lastX; \u002F\u002F 0  - last vertex (lastY for y)\npoly.isClockwise(); \u002F\u002F shoelace winding test (useful for SVG hole detection)\n\n\u002F\u002F Polygon-in-polygon containment for hole detection\nconst outer = new Polygon([0, 0, 100, 0, 100, 100, 0, 100]);\nconst hole = new Polygon([25, 25, 75, 25, 75, 75, 25, 75]);\nouter.containsPolygon(hole); \u002F\u002F true\n```\n\n### Constants\n\n```ts\nimport { DEG_TO_RAD, RAD_TO_DEG, PI_2 } from \"pixi.js\";\n\nconst angle = 45 * DEG_TO_RAD; \u002F\u002F 0.785...\nconst degrees = angle * RAD_TO_DEG; \u002F\u002F 45\nconst fullCircle = PI_2; \u002F\u002F Math.PI * 2\n```\n\n### Types\n\n- `PointData` - minimal `{x, y}` interface accepted by most APIs. Use it when typing parameters that only need to read coordinates.\n- `PointLike` - extends `PointData` with `set()`, `copyFrom()`, `copyTo()`, `equals()`. Implemented by both `Point` and `ObservablePoint`.\n- `Size` - `{ width, height }` interface used by renderer\u002Fcanvas APIs.\n- `SHAPE_PRIMITIVE` - string literal union: `'rectangle' | 'circle' | 'ellipse' | 'polygon' | 'roundedRectangle' | 'triangle'`. Every shape exposes `type` so you can branch without `instanceof`.\n\n```ts\nimport type { PointData } from \"pixi.js\";\n\nfunction distance(a: PointData, b: PointData): number {\n  const dx = a.x - b.x;\n  const dy = a.y - b.y;\n  return Math.sqrt(dx * dx + dy * dy);\n}\n```\n\n### math-extras (side-effect import)\n\n`import 'pixi.js\u002Fmath-extras'` adds methods to Point, ObservablePoint, and Rectangle via prototype extension. Not included in the default bundle.\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\n```\n\n#### Point \u002F ObservablePoint vector methods\n\nAll methods accept an optional `out` parameter to avoid allocations. Without `out`, a new Point is returned.\n\n```ts\nconst a = new Point(3, 4);\nconst b = new Point(1, 2);\n\n\u002F\u002F Arithmetic\nconst sum = a.add(b); \u002F\u002F Point(4, 6)\nconst diff = a.subtract(b); \u002F\u002F Point(2, 2)\nconst prod = a.multiply(b); \u002F\u002F Point(3, 8) - component-wise\nconst scaled = a.multiplyScalar(2); \u002F\u002F Point(6, 8)\n\n\u002F\u002F Dot and cross product\nconst dot = a.dot(b); \u002F\u002F 11\nconst cross = a.cross(b); \u002F\u002F 2 (z-component of 3D cross)\n\n\u002F\u002F Length\nconst len = a.magnitude(); \u002F\u002F 5\nconst lenSq = a.magnitudeSquared(); \u002F\u002F 25 (faster for comparisons)\n\n\u002F\u002F Normalize to unit vector\nconst unit = a.normalize(); \u002F\u002F Point(0.6, 0.8)\n\n\u002F\u002F Projection and reflection\nconst proj = a.project(b); \u002F\u002F project a onto b\nconst refl = a.reflect(new Point(0, 1)); \u002F\u002F reflect across normal\n\n\u002F\u002F Rotation\nconst rotated = a.rotate(Math.PI \u002F 2); \u002F\u002F rotate 90 degrees\n\n\u002F\u002F Reuse existing point to avoid allocation\nconst out = new Point();\na.add(b, out); \u002F\u002F result written to out\n```\n\n#### Rectangle extended methods\n\n`containsRect` and `intersects` are native `Rectangle` methods (see above). math-extras adds `equals`, `intersection` (returns the overlap rect), and `union`:\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Rectangle } from \"pixi.js\";\n\nconst r1 = new Rectangle(0, 0, 100, 100);\nconst r2 = new Rectangle(50, 50, 100, 100);\n\nr1.equals(r2); \u002F\u002F false\n\nconst overlap = r1.intersection(r2); \u002F\u002F Rectangle(50, 50, 50, 50)\nconst envelope = r1.union(r2); \u002F\u002F Rectangle(0, 0, 150, 150)\n\n\u002F\u002F Optional out parameter\nconst out = new Rectangle();\nr1.intersection(r2, out);\n```\n\n#### Geometry utility functions\n\nThese functions are exported from `pixi.js\u002Fmath-extras`, not the main `pixi.js` entry.\n\n```ts\nimport {\n  floatEqual,\n  lineIntersection,\n  segmentIntersection,\n} from \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\n\n\u002F\u002F Epsilon-based float comparison (default epsilon: Number.EPSILON)\nfloatEqual(0.1 + 0.2, 0.3, 1e-10); \u002F\u002F true with reasonable epsilon\nfloatEqual(1.0, 1.001, 0.01); \u002F\u002F true (custom epsilon)\n\n\u002F\u002F Unbounded line intersection (returns {x: NaN, y: NaN} if parallel)\nconst hit = lineIntersection(\n  new Point(0, 0),\n  new Point(10, 10), \u002F\u002F line A\n  new Point(10, 0),\n  new Point(0, 10), \u002F\u002F line B\n); \u002F\u002F Point(5, 5)\nif (isNaN(hit.x)) {\n  \u002F* lines are parallel *\u002F\n}\n\n\u002F\u002F Bounded segment intersection (returns {x: NaN, y: NaN} if segments don't cross)\nconst segHit = segmentIntersection(\n  new Point(0, 0),\n  new Point(10, 10),\n  new Point(10, 0),\n  new Point(0, 10),\n); \u002F\u002F Point(5, 5)\nif (isNaN(segHit.x)) {\n  \u002F* segments don't intersect *\u002F\n}\n```\n\n## Common Mistakes\n\n### HIGH: Importing from @pixi\u002Fmath\n\nWrong:\n\n```ts\nimport { Point } from \"@pixi\u002Fmath\";\n```\n\nCorrect:\n\n```ts\nimport { Point } from \"pixi.js\";\n```\n\nv8 uses a single `pixi.js` package. All sub-packages like `@pixi\u002Fmath`, `@pixi\u002Fcore`, etc. were removed.\n\n\n### MEDIUM: Mutating ObservablePoint without triggering observer\n\nWrong:\n\n```ts\n\u002F\u002F Replacing the reference loses observation\nlet pos = container.position;\npos = new Point(100, 200); \u002F\u002F container.position unchanged\n```\n\nCorrect:\n\n```ts\n\u002F\u002F Mutate in place to trigger the observer\ncontainer.position.set(100, 200);\n\u002F\u002F or\ncontainer.position.x = 100;\ncontainer.position.y = 200;\n\u002F\u002F or copy from another point\ncontainer.position.copyFrom(new Point(100, 200));\n```\n\nContainer's position, scale, pivot, origin, and skew are ObservablePoints. Setting `.x` or `.y` on them triggers the container's transform update. Reassigning the variable reference does not modify the container. Always mutate the existing ObservablePoint via `.set()`, `.copyFrom()`, or direct property assignment on the original object.\n\n\n### MEDIUM: Not importing math-extras for extended methods\n\nWrong:\n\n```ts\nimport { Point } from \"pixi.js\";\nconst p = new Point(1, 2);\np.add(new Point(3, 4)); \u002F\u002F TypeError: p.add is not a function\n```\n\nCorrect:\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\nconst p = new Point(1, 2);\nconst sum = p.add(new Point(3, 4)); \u002F\u002F works\n```\n\nExtended math utilities (add, subtract, multiply, magnitude, normalize, dot, cross, etc. on Point; intersection methods on shapes) require an explicit `import 'pixi.js\u002Fmath-extras'`. These are not included in the default bundle.\n\n\n### MEDIUM: Storing references to shared\u002Ftemporary objects\n\nWrong:\n\n```ts\nconst myPoint = Point.shared;\nmyPoint.set(100, 200);\n\u002F\u002F ... later ...\nconsole.log(myPoint.x); \u002F\u002F 0 (reset on next access)\n```\n\nCorrect:\n\n```ts\nconst myPoint = new Point();\nmyPoint.copyFrom(Point.shared.set(100, 200));\n\u002F\u002F or just\nconst myPoint = new Point(100, 200);\n```\n\n`Point.shared` and `Matrix.shared` are reset to zero\u002Fidentity every time they are accessed. They exist for one-off calculations within a single expression. Never store a reference to them.\n\n\n## API Reference\n\n- [Point](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Point.html.md)\n- [ObservablePoint](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.ObservablePoint.html.md)\n- [Matrix](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Matrix.html.md)\n- [Rectangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Rectangle.html.md)\n- [Circle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Circle.html.md)\n- [Ellipse](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Ellipse.html.md)\n- [Polygon](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Polygon.html.md)\n- [RoundedRectangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.RoundedRectangle.html.md)\n- [Triangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Triangle.html.md)\n- [DEG_TO_RAD](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.DEG_TO_RAD.html.md)\n","PixiJS exposes lightweight math primitives (Point, Matrix, shape classes) used throughout the library for transforms, hit testing, and coordinate conversion. Import `pixi.js\u002Fmath-extras` to add vector operations (add, dot, magnitude, reflect) and Rectangle intersection\u002Funion helpers.\n\n## Quick Start\n\n```ts\nconst parent = new Container();\nparent.position.set(100, 100);\nparent.scale.set(2);\napp.stage.addChild(parent);\n\nconst child = new Container();\nchild.position.set(50, 50);\nparent.addChild(child);\n\nconst globalPt = child.toGlobal(new Point(0, 0));\n\nconst m = new Matrix()\n  .translate(100, 50)\n  .rotate(Math.PI \u002F 4)\n  .scale(2, 2);\nconst world = m.apply(new Point(10, 20));\n\nconst hitArea = new Rectangle(0, 0, 200, 100);\nconsole.log(hitArea.contains(50, 50));\n```\n\n**Related skills:** `pixijs-scene-container` (transform properties), `pixijs-events` (hitArea usage), `pixijs-scene-core-concepts` (culling with Rectangle).\n\n## Core Patterns\n\n### Point and ObservablePoint\n\nPoint is a simple {x, y} value type. ObservablePoint fires a callback when x or y changes; it is used internally by Container's position, scale, pivot, origin, and skew.\n\n```ts\nimport { Point } from \"pixi.js\";\n\nconst p = new Point(10, 20);\np.set(30, 40); \u002F\u002F set both\np.set(50); \u002F\u002F x=50, y=50\n\nconst clone = p.clone();\nconsole.log(p.equals(clone)); \u002F\u002F true\n\np.copyFrom({ x: 1, y: 2 }); \u002F\u002F accepts any PointData\n\n\u002F\u002F Point.shared: temporary point, reset to (0,0) on each access\nconst temp = Point.shared;\ntemp.set(100, 200);\n\u002F\u002F do not store a reference to Point.shared\n```\n\nContainer properties like `position`, `scale`, `pivot`, `origin`, and `skew` are ObservablePoints. Setting `.x` or `.y` on them triggers transform recalculation automatically.\n\n```ts\nimport { Container } from \"pixi.js\";\n\nconst obj = new Container();\nobj.position.set(100, 200); \u002F\u002F triggers observer -> marks transform dirty\nobj.position.x = 150; \u002F\u002F also triggers observer\n```\n\n### Matrix (2D affine transform)\n\nMatrix represents a 3x3 affine transform: `| a c tx | b d ty | 0 0 1 |`. It supports translate, scale, rotate, append, prepend, invert, and decompose.\n\n```ts\nimport { Matrix, Point } from \"pixi.js\";\n\n\u002F\u002F Build a transform\nconst m = new Matrix()\n  .translate(100, 50)\n  .rotate(Math.PI \u002F 4)\n  .scale(2, 2);\n\n\u002F\u002F Transform a point (local -> parent space)\nconst local = new Point(10, 20);\nconst world = m.apply(local);\n\n\u002F\u002F Inverse transform (parent -> local space)\nconst backToLocal = m.applyInverse(world);\n\n\u002F\u002F Combine matrices\nconst a = new Matrix().translate(50, 0);\nconst b = new Matrix().rotate(Math.PI \u002F 2);\na.append(b); \u002F\u002F a = a * b\n\n\u002F\u002F Decompose into position\u002Fscale\u002Frotation\u002Fskew\nconst transform = {\n  position: new Point(),\n  scale: new Point(),\n  pivot: new Point(),\n  skew: new Point(),\n  rotation: 0,\n};\nm.decompose(transform);\nconsole.log(transform.rotation); \u002F\u002F ~0.785 (PI\u002F4)\n\n\u002F\u002F Shared temporary matrix (reset on each access)\nconst temp = Matrix.shared;\n\u002F\u002F IDENTITY is read-only reference\nconst isDefault = m.equals(Matrix.IDENTITY);\n```\n\n### Coordinate transforms via Container\n\nContainers provide `toGlobal`, `toLocal`, and `getGlobalPosition` for coordinate conversion.\n\n```ts\nimport { Container, Point } from \"pixi.js\";\n\nconst parent = new Container();\nparent.position.set(100, 100);\nparent.scale.set(2);\n\nconst child = new Container();\nchild.position.set(50, 50);\nparent.addChild(child);\n\n\u002F\u002F Local point in child's space -> global (world) space\nconst globalPt = child.toGlobal(new Point(0, 0));\n\u002F\u002F globalPt = { x: 200, y: 200 } (100 + 50*2, 100 + 50*2)\n\n\u002F\u002F Global point -> child's local space\nconst localPt = child.toLocal(new Point(200, 200));\n\u002F\u002F localPt = { x: 0, y: 0 }\n\n\u002F\u002F Convert between two containers\nconst other = new Container();\nother.position.set(300, 300);\nconst ptInOther = child.toLocal(new Point(10, 10), other);\n```\n\n### Shapes and hit testing\n\nRectangle, Circle, Ellipse, Polygon, RoundedRectangle, and Triangle all implement `contains(x, y)` for point-in-shape tests, plus `getBounds(out?)` and `strokeContains(x, y, width, alignment?)`. They can be used as `hitArea` on containers for custom interaction regions.\n\n```ts\nimport { Rectangle, Circle, Polygon, Container } from \"pixi.js\";\n\nconst rect = new Rectangle(0, 0, 200, 100);\nrect.contains(50, 50); \u002F\u002F true\nrect.contains(300, 50); \u002F\u002F false\nrect.left; \u002F\u002F 0\nrect.right; \u002F\u002F 200\nrect.top; \u002F\u002F 0\nrect.bottom; \u002F\u002F 100\nrect.isEmpty(); \u002F\u002F false (Rectangle.EMPTY returns a fresh empty rect)\n\n\u002F\u002F Native Rectangle-to-Rectangle methods (no math-extras needed)\nconst other = new Rectangle(50, 50, 100, 100);\nrect.containsRect(other); \u002F\u002F true if `other` is fully inside `rect`\nrect.intersects(other); \u002F\u002F boolean: do they overlap at all?\nrect.intersects(other, matrix); \u002F\u002F overlap after transforming `other`\n\n\u002F\u002F Stroke hit testing (alignment: 1 = inner, 0.5 = centered, 0 = outer)\nrect.strokeContains(0, 50, 4); \u002F\u002F true if (0,50) lies on a 4px centered stroke\nconst circle = new Circle(100, 100, 50);\ncircle.strokeContains(150, 100, 4, 1); \u002F\u002F inner-aligned stroke check\n\n\u002F\u002F getBounds works on every shape (returns a Rectangle, accepts an out param)\nconst bounds = circle.getBounds();\nconst reused = new Rectangle();\nnew Polygon([0, 0, 100, 0, 50, 100]).getBounds(reused);\n\n\u002F\u002F Use as hit area for interaction\nconst button = new Container();\nbutton.hitArea = new Rectangle(0, 0, 200, 50);\nbutton.eventMode = \"static\";\nbutton.on(\"pointerdown\", () => {\n  \u002F* clicked *\u002F\n});\n```\n\nDo not confuse native `Rectangle.intersects(other)` (returns `boolean`) with math-extras `intersection(other)` (returns a `Rectangle` describing the overlap area).\n\n### Rectangle layout helpers\n\nRectangle ships with mutating helpers used heavily in UI\u002Flayout, bounds aggregation, and pixel snapping. All return `this` for chaining.\n\n```ts\nimport { Rectangle } from \"pixi.js\";\n\nconst r = new Rectangle(10, 10, 100, 50);\n\nr.pad(5); \u002F\u002F grow on all sides: x=5, y=5, w=110, h=60\nr.pad(10, 4); \u002F\u002F separate horizontal\u002Fvertical padding\nr.scale(2); \u002F\u002F multiply x, y, width, height by 2\n\n\u002F\u002F fit shrinks `this` to lie inside another rect (clipping)\nconst viewport = new Rectangle(0, 0, 200, 200);\nnew Rectangle(150, 150, 200, 200).fit(viewport); \u002F\u002F -> 150, 150, 50, 50\n\n\u002F\u002F enlarge expands `this` to include another rect (bounds aggregation)\nconst total = new Rectangle();\nitems.forEach((item) =>\n  total.enlarge(new Rectangle().copyFromBounds(item.getBounds())),\n);\n\n\u002F\u002F ceil snaps to a pixel grid (resolution: 1 = whole pixels, 2 = half pixels)\nnew Rectangle(10.2, 10.6, 100.8, 100.4).ceil();\n\n\u002F\u002F copy a Container\u002FMesh bounds object straight into a Rectangle\nnew Rectangle().copyFromBounds(container.getBounds());\n```\n\n### Polygon\n\nPolygon accepts four constructor formats: a flat number array, an array of point-like objects, or either passed as spread arguments.\n\n```ts\nimport { Polygon, Point } from \"pixi.js\";\n\nnew Polygon([0, 0, 100, 0, 50, 100]); \u002F\u002F flat numbers\nnew Polygon([new Point(0, 0), new Point(100, 0), new Point(50, 100)]); \u002F\u002F PointData[]\nnew Polygon(0, 0, 100, 0, 50, 100); \u002F\u002F spread numbers\nnew Polygon(new Point(0, 0), new Point(100, 0), new Point(50, 100)); \u002F\u002F spread points\n\nconst poly = new Polygon([0, 0, 100, 0, 100, 100, 0, 100]);\npoly.points; \u002F\u002F [0, 0, 100, 0, 100, 100, 0, 100] (mutable flat array)\npoly.closePath; \u002F\u002F true by default; false produces an open path\npoly.startX; \u002F\u002F 0  - first vertex\npoly.lastX; \u002F\u002F 0  - last vertex (lastY for y)\npoly.isClockwise(); \u002F\u002F shoelace winding test (useful for SVG hole detection)\n\n\u002F\u002F Polygon-in-polygon containment for hole detection\nconst outer = new Polygon([0, 0, 100, 0, 100, 100, 0, 100]);\nconst hole = new Polygon([25, 25, 75, 25, 75, 75, 25, 75]);\nouter.containsPolygon(hole); \u002F\u002F true\n```\n\n### Constants\n\n```ts\nimport { DEG_TO_RAD, RAD_TO_DEG, PI_2 } from \"pixi.js\";\n\nconst angle = 45 * DEG_TO_RAD; \u002F\u002F 0.785...\nconst degrees = angle * RAD_TO_DEG; \u002F\u002F 45\nconst fullCircle = PI_2; \u002F\u002F Math.PI * 2\n```\n\n### Types\n\n- `PointData` - minimal `{x, y}` interface accepted by most APIs. Use it when typing parameters that only need to read coordinates.\n- `PointLike` - extends `PointData` with `set()`, `copyFrom()`, `copyTo()`, `equals()`. Implemented by both `Point` and `ObservablePoint`.\n- `Size` - `{ width, height }` interface used by renderer\u002Fcanvas APIs.\n- `SHAPE_PRIMITIVE` - string literal union: `'rectangle' | 'circle' | 'ellipse' | 'polygon' | 'roundedRectangle' | 'triangle'`. Every shape exposes `type` so you can branch without `instanceof`.\n\n```ts\nimport type { PointData } from \"pixi.js\";\n\nfunction distance(a: PointData, b: PointData): number {\n  const dx = a.x - b.x;\n  const dy = a.y - b.y;\n  return Math.sqrt(dx * dx + dy * dy);\n}\n```\n\n### math-extras (side-effect import)\n\n`import 'pixi.js\u002Fmath-extras'` adds methods to Point, ObservablePoint, and Rectangle via prototype extension. Not included in the default bundle.\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\n```\n\n#### Point \u002F ObservablePoint vector methods\n\nAll methods accept an optional `out` parameter to avoid allocations. Without `out`, a new Point is returned.\n\n```ts\nconst a = new Point(3, 4);\nconst b = new Point(1, 2);\n\n\u002F\u002F Arithmetic\nconst sum = a.add(b); \u002F\u002F Point(4, 6)\nconst diff = a.subtract(b); \u002F\u002F Point(2, 2)\nconst prod = a.multiply(b); \u002F\u002F Point(3, 8) - component-wise\nconst scaled = a.multiplyScalar(2); \u002F\u002F Point(6, 8)\n\n\u002F\u002F Dot and cross product\nconst dot = a.dot(b); \u002F\u002F 11\nconst cross = a.cross(b); \u002F\u002F 2 (z-component of 3D cross)\n\n\u002F\u002F Length\nconst len = a.magnitude(); \u002F\u002F 5\nconst lenSq = a.magnitudeSquared(); \u002F\u002F 25 (faster for comparisons)\n\n\u002F\u002F Normalize to unit vector\nconst unit = a.normalize(); \u002F\u002F Point(0.6, 0.8)\n\n\u002F\u002F Projection and reflection\nconst proj = a.project(b); \u002F\u002F project a onto b\nconst refl = a.reflect(new Point(0, 1)); \u002F\u002F reflect across normal\n\n\u002F\u002F Rotation\nconst rotated = a.rotate(Math.PI \u002F 2); \u002F\u002F rotate 90 degrees\n\n\u002F\u002F Reuse existing point to avoid allocation\nconst out = new Point();\na.add(b, out); \u002F\u002F result written to out\n```\n\n#### Rectangle extended methods\n\n`containsRect` and `intersects` are native `Rectangle` methods (see above). math-extras adds `equals`, `intersection` (returns the overlap rect), and `union`:\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Rectangle } from \"pixi.js\";\n\nconst r1 = new Rectangle(0, 0, 100, 100);\nconst r2 = new Rectangle(50, 50, 100, 100);\n\nr1.equals(r2); \u002F\u002F false\n\nconst overlap = r1.intersection(r2); \u002F\u002F Rectangle(50, 50, 50, 50)\nconst envelope = r1.union(r2); \u002F\u002F Rectangle(0, 0, 150, 150)\n\n\u002F\u002F Optional out parameter\nconst out = new Rectangle();\nr1.intersection(r2, out);\n```\n\n#### Geometry utility functions\n\nThese functions are exported from `pixi.js\u002Fmath-extras`, not the main `pixi.js` entry.\n\n```ts\nimport {\n  floatEqual,\n  lineIntersection,\n  segmentIntersection,\n} from \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\n\n\u002F\u002F Epsilon-based float comparison (default epsilon: Number.EPSILON)\nfloatEqual(0.1 + 0.2, 0.3, 1e-10); \u002F\u002F true with reasonable epsilon\nfloatEqual(1.0, 1.001, 0.01); \u002F\u002F true (custom epsilon)\n\n\u002F\u002F Unbounded line intersection (returns {x: NaN, y: NaN} if parallel)\nconst hit = lineIntersection(\n  new Point(0, 0),\n  new Point(10, 10), \u002F\u002F line A\n  new Point(10, 0),\n  new Point(0, 10), \u002F\u002F line B\n); \u002F\u002F Point(5, 5)\nif (isNaN(hit.x)) {\n  \u002F* lines are parallel *\u002F\n}\n\n\u002F\u002F Bounded segment intersection (returns {x: NaN, y: NaN} if segments don't cross)\nconst segHit = segmentIntersection(\n  new Point(0, 0),\n  new Point(10, 10),\n  new Point(10, 0),\n  new Point(0, 10),\n); \u002F\u002F Point(5, 5)\nif (isNaN(segHit.x)) {\n  \u002F* segments don't intersect *\u002F\n}\n```\n\n## Common Mistakes\n\n### HIGH: Importing from @pixi\u002Fmath\n\nWrong:\n\n```ts\nimport { Point } from \"@pixi\u002Fmath\";\n```\n\nCorrect:\n\n```ts\nimport { Point } from \"pixi.js\";\n```\n\nv8 uses a single `pixi.js` package. All sub-packages like `@pixi\u002Fmath`, `@pixi\u002Fcore`, etc. were removed.\n\n\n### MEDIUM: Mutating ObservablePoint without triggering observer\n\nWrong:\n\n```ts\n\u002F\u002F Replacing the reference loses observation\nlet pos = container.position;\npos = new Point(100, 200); \u002F\u002F container.position unchanged\n```\n\nCorrect:\n\n```ts\n\u002F\u002F Mutate in place to trigger the observer\ncontainer.position.set(100, 200);\n\u002F\u002F or\ncontainer.position.x = 100;\ncontainer.position.y = 200;\n\u002F\u002F or copy from another point\ncontainer.position.copyFrom(new Point(100, 200));\n```\n\nContainer's position, scale, pivot, origin, and skew are ObservablePoints. Setting `.x` or `.y` on them triggers the container's transform update. Reassigning the variable reference does not modify the container. Always mutate the existing ObservablePoint via `.set()`, `.copyFrom()`, or direct property assignment on the original object.\n\n\n### MEDIUM: Not importing math-extras for extended methods\n\nWrong:\n\n```ts\nimport { Point } from \"pixi.js\";\nconst p = new Point(1, 2);\np.add(new Point(3, 4)); \u002F\u002F TypeError: p.add is not a function\n```\n\nCorrect:\n\n```ts\nimport \"pixi.js\u002Fmath-extras\";\nimport { Point } from \"pixi.js\";\nconst p = new Point(1, 2);\nconst sum = p.add(new Point(3, 4)); \u002F\u002F works\n```\n\nExtended math utilities (add, subtract, multiply, magnitude, normalize, dot, cross, etc. on Point; intersection methods on shapes) require an explicit `import 'pixi.js\u002Fmath-extras'`. These are not included in the default bundle.\n\n\n### MEDIUM: Storing references to shared\u002Ftemporary objects\n\nWrong:\n\n```ts\nconst myPoint = Point.shared;\nmyPoint.set(100, 200);\n\u002F\u002F ... later ...\nconsole.log(myPoint.x); \u002F\u002F 0 (reset on next access)\n```\n\nCorrect:\n\n```ts\nconst myPoint = new Point();\nmyPoint.copyFrom(Point.shared.set(100, 200));\n\u002F\u002F or just\nconst myPoint = new Point(100, 200);\n```\n\n`Point.shared` and `Matrix.shared` are reset to zero\u002Fidentity every time they are accessed. They exist for one-off calculations within a single expression. Never store a reference to them.\n\n\n## API Reference\n\n- [Point](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Point.html.md)\n- [ObservablePoint](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.ObservablePoint.html.md)\n- [Matrix](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Matrix.html.md)\n- [Rectangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Rectangle.html.md)\n- [Circle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Circle.html.md)\n- [Ellipse](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Ellipse.html.md)\n- [Polygon](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Polygon.html.md)\n- [RoundedRectangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.RoundedRectangle.html.md)\n- [Triangle](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.Triangle.html.md)\n- [DEG_TO_RAD](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fmaths.DEG_TO_RAD.html.md)\n",{"name":5,"license":15,"description":7},"main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-math",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-math",{"tool":38,"command":39},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-math",{"tool":41,"command":42},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-math","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-math\u002FSkill.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"metadata.json","REFERENCE","参考文档",429,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-math\u002Fmetadata.json",[53,60,65,72,77,84],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":61,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":73,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":85,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]