Agent skill · Audited from source
geometry-and-math
skill · phaserjs/phaserMIT licenceAudited 28 Oct 2026 · source d14f4c86f869
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit d14f4c86f869 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2,…
Cite
Cite this page
ModelsAtlas. “geometry-and-math (phaserjs/phaser)”. Retrieved 28 Oct 2026. https://modelsatlas.com/skills/phaserjs/geometry-and-math
Trust audit
Audit 0.4.1 · source read 28 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha d14f4c86f869 · 28 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherphaserjs GitHub organizationOwner of the repository this skill is read from
- Source folderphaserjs/phaser/skills/geometry-and-mathThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictd14f4c86f869A new audit runs when the source changes
- Repository statusNot archivedLast push 68 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2,…
---
name: geometry-and-math
description: "Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2, Rectangle, Circle, math, distance, angle, random, lerp."
---
# Phaser 4 — Geometry and Math
> Geom classes (Circle, Ellipse, Line, Polygon, Rectangle, Triangle), intersection tests, and Math utilities (Vector2, Vector3, Matrix4, angles, distances, interpolation, easing, random, snap, clamp).
Related skills: graphics-and-shapes.md, physics-arcade.md
---
## Quick Start
```js
// Create geometry objects (these are data only, not renderable)
const rect = new Phaser.Geom.Rectangle(10, 20, 200, 100);
const circle = new Phaser.Geom.Circle(400, 300, 50);
const line = new Phaser.Geom.Line(0, 0, 100, 100);
// Point containment
rect.contains(50, 50); // true
circle.contains(410, 310); // true
// Intersection test
Phaser.Geom.Intersects.CircleToRectangle(circle, rect); // boolean
// Math utilities
const v = new Phaser.Math.Vector2(3, 4);
v.length(); // 5
v.normalize(); // {x: 0.6, y: 0.8}
const dist = Phaser.Math.Distance.Between(0, 0, 100, 100);
const angle = Phaser.Math.Angle.Between(0, 0, 100, 100);
const clamped = Phaser.Math.Clamp(150, 0, 100); // 100
```
---
## Core Concepts
Geometry objects are pure data containers holding coordinates and dimensions. They are NOT game objects and cannot be added to the display list. To render geometry, use the Graphics game object or Shape game objects (see graphics-and-shapes.md).
Every geom class has a `type` property set to a `Phaser.Geom` constant for fast type checks.
All geom classes share a common instance method pattern:
- `contains(x, y)` -- point-in-shape test
- `getPoint(position, output?)` -- point at normalized position (0-1) on perimeter
- `getPoints(quantity, stepRate?, output?)` -- evenly spaced points on perimeter
- `getRandomPoint(output?)` -- random point inside the shape
- `setTo(...)` -- reset all properties
- `setEmpty()` -- zero out the shape
- `setPosition(x, y)` -- move origin/center
Each geom type also has a folder of static helper functions (e.g., `Phaser.Geom.Rectangle.Contains`, `Phaser.Geom.Circle.Area`).
---
## Geometry Classes
| Class | Namespace | Constructor | Key Properties |
|---|---|---|---|
| **Circle** | `Phaser.Geom.Circle` | `(x, y, radius)` | `x`, `y`, `radius`, `diameter`, `left`, `right`, `top`, `bottom` |
| **Ellipse** | `Phaser.Geom.Ellipse` | `(x, y, width, height)` | `x`, `y`, `width`, `height`, `left`, `right`, `top`, `bottom` |
| **Line** | `Phaser.Geom.Line` | `(x1, y1, x2, y2)` | `x1`, `y1`, `x2`, `y2`, `left`, `right`, `top`, `bottom` |
| **Polygon** | `Phaser.Geom.Polygon` | `(points)` | `area`, `points` (array of Vector2Like) |
| **Rectangle** | `Phaser.Geom.Rectangle` | `(x, y, width, height)` | `x`, `y`, `width`, `height`, `left`, `right`, `top`, `bottom`, `centerX`, `centerY` |
| **Triangle** | `Phaser.Geom.Triangle` | `(x1, y1, x2, y2, x3, y3)` | `x1`, `y1`, `x2`, `y2`, `x3`, `y3` |
### Rectangle Static Helpers
`Phaser.Geom.Rectangle.*`: Area, Ceil, CeilAll, CenterOn, Clone, Contains, ContainsPoint, ContainsRect, CopyFrom, Decompose, Equals, FitInside, FitOutside, Floor, FloorAll, FromPoints, FromXY, GetAspectRatio, GetCenter, GetPoint, GetPoints, GetSize, Inflate, Intersection, MarchingAnts, MergePoints, MergeRect, MergeXY, Offset, OffsetPoint, Overlaps, Perimeter, PerimeterPoint, Random, RandomOutside, SameDimensions, Scale, Union.
### Circle Static Helpers
`Phaser.Geom.Circle.*`: Area, Circumference, CircumferencePoint, Clone, Contains, ContainsPoint, ContainsRect, CopyFrom, Equals, GetBounds, GetPoint, GetPoints, Offset, OffsetPoint, Random.
### Line Static Helpers
`Phaser.Geom.Line.*`: Angle, BresenhamPoints, CenterOn, Clone, CopyFrom, Equals, Extend, GetEasedPoints, GetMidPoint, GetNearestPoint, GetNormal, GetPoint, GetPoints, GetShortestDistance, Height, Length, NormalAngle, NormalX, NormalY, Offset, PerpSlope, Random, ReflectAngle, Rotate, RotateAroundPoint, RotateAroundXY, SetToAngle, Slope, Width.
### Triangle Static Helpers
`Phaser.Geom.Triangle.*`: Area, BuildEquilateral, BuildFromPolygon, BuildRight, CenterOn, Centroid, CircumCenter, CircumCircle, Clone, Contains, ContainsArray, ContainsPoint, CopyFrom, Decompose, Equals, GetPoint, GetPoints, InCenter, Offset, Perimeter, Random, Rotate, RotateAroundPoint, RotateAroundXY.
### Polygon Input Formats
The Polygon constructor accepts multiple formats for the `points` argument:
- Space-separated string: `'40 0 40 20 100 20 100 80'`
- Array of `{x, y}` objects
- Flat number array: `[x1, y1, x2, y2, ...]`
- Array of `[x, y]` sub-arrays
---
## Intersection Tests
All under `Phaser.Geom.Intersects`.
### Boolean Tests (return `true`/`false`)
| Function | Description |
|---|---|
| `CircleToCircle(circleA, circleB)` | Two circles overlap |
| `CircleToRectangle(circle, rect)` | Circle overlaps rectangle |
| `LineToCircle(line, circle)` | Line segment intersects circle |
| `LineToLine(line1, line2, out?)` | Two line segments cross; writes point to `out` |
| `LineToRectangle(line, rect)` | Line segment intersects rectangle |
| `PointToLine(point, line, lineThickness?)` | Point lies on/near line |
| `PointToLineSegment(point, line)` | Point lies on finite line segment |
| `RectangleToRectangle(rectA, rectB)` | Two rectangles overlap |
| `RectangleToTriangle(rect, triangle)` | Rectangle overlaps triangle |
| `RectangleToValues(rect, left, right, top, bottom, tolerance?)` | Rectangle overlaps LRTB bounds |
| `TriangleToCircle(triangle, circle)` | Triangle overlaps circle |
| `TriangleToLine(triangle, line)` | Triangle intersects line |
| `TriangleToTriangle(triA, triB)` | Two triangles overlap |
### Get Intersection Points (return `Vector2[]`)
| Function | Description |
|---|---|
| `GetCircleToCircle(circleA, circleB, out?)` | Intersection points of two circlesExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit d14f4c8
git clone https://github.com/phaserjs/phaser git -C phaser checkout d14f4c86f869
The author documents no install command, so this uses the repository directly. Our verdict covers commit d14f4c86f869 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
d14f4c86f869
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/phaserjs/geometry-and-math/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →phaserjs/phaser
Use this skill when drawing shapes and graphics in Phaser 4. Covers the Graphics game object, lines, rectangles, circles, arcs, polygons, gradients, fill, stroke, and generated textures. Triggers on: Graphics, draw…
phaserjs/phaser
Use this skill when using Groups or Containers in Phaser 4. Covers organizing game objects, object pooling, batch operations, and nested transforms with Containers. Triggers on: Group, Container, object pool,…
phaserjs/phaser
Use this skill when creating a new Phaser 4 game instance or configuring GameConfig options. Covers renderer selection, canvas setup, scaling, pixel art, FPS settings, boot sequence, and all config sub-objects. Triggers…
phaserjs/phaser
Use this skill when working with Phaser 4 game object components and the mixin system. Covers Transform, Alpha, Tint, Origin, Depth, Flip, Mask, GetBounds, Lighting, and other shared component behaviors. Triggers on:…
phaserjs/phaser
Use this skill when working with the Phaser 4 event system. Covers EventEmitter, scene events, game events, custom events, and event-driven communication. Triggers on: events, on, emit, EventEmitter, scene events,…
phaserjs/phaser
Use this skill when applying visual filters or post-processing effects in Phaser 4. Covers bloom, blur, glow, color matrix, barrel distortion, displacement, custom shaders, and the filter pipeline. Triggers on: filter,…
Add this badge to your README
[](https://modelsatlas.com/skills/phaserjs/geometry-and-math/)
<a href="https://modelsatlas.com/skills/phaserjs/geometry-and-math/"><img src="https://modelsatlas.com/skills/phaserjs/geometry-and-math/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about geometry-and-math
What does the geometry-and-math skill do?
Is geometry-and-math safe to install?
What can geometry-and-math access on my machine?
How current is this page?
Sources
- github.com/phaserjs/phaser/tree/master/skills/geometry-and-math — the audited source at commit d14f4c86f869 and every finding aboveObserved · 28 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the geometry-and-math skill do?
- Is geometry-and-math safe to install?
- What can geometry-and-math access on my machine?