geometry-and-math

Solve geometry and math tasks for Phaser 4 with data-only shapes and vector utilities.

Updated Jun 21, 2021
One-click install
npx skills add https://github.com/mahirocoko/mahirocoko --skill geometry-and-math-mahirocoko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: geometry-and-math
Source: https://github.com/mahirocoko/mahirocoko/tree/main/plugins/phaser/skills/geometry-and-math
Command: npx skills add https://github.com/mahirocoko/mahirocoko --skill geometry-and-math-mahirocoko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Geometry and math utilities for Phaser 4 provide robust data-only geometric shapes and math helpers to perform containment checks, intersections, and vector operations without rendering, simplifying game logic and physics calculations.

Core Features & Use Cases

  • Access to data-only geometry objects: Circle, Ellipse, Line, Polygon, Rectangle, Triangle for game logic and collision math.
  • Intersection tests and math utilities (vectors, distances, angles, clamping, randoms) to implement collision, pathfinding, and procedurals.
  • Use cases: computing if a point lies inside a shape, measuring distances, and performing geometric intersections for gameplay mechanics.

Quick Start

Create a Rectangle and a Circle, then test if a point is inside the rectangle.

Frequently Asked Questions about geometry-and-math

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a point is inside a shape in Phaser 4?

To check if a point is inside a shape in Phaser 4, use data-only geometry objects like Rectangle or Circle and run a containment test against the point coordinates. This provides hit testing without rendering.

Can I test geometry intersections for collision detection without rendering?

Yes, you can test geometry intersections for collision detection without rendering. These utilities provide data-only shapes and math helpers to compute intersections purely for gameplay logic.

What math helpers are available for vector operations in Phaser 4?

Math helpers available for vector operations in Phaser 4 include utilities for calculating distances, angles, clamping, and randoms. These support pathfinding and procedural geometry generation across frames.

Does Phaser 4 provide data-only geometric shapes for game logic?

Yes, Phaser 4 provides data-only geometric shapes for game logic. You can access Circle, Ellipse, Line, Polygon, Rectangle, and Triangle classes to perform collision math and containment checks.

What's the best way to handle path calculations and procedural geometry in Phaser?

The best way to handle path calculations and procedural geometry in Phaser is applying vector utilities and intersection tests. These expose robust edge-case handling for gameplay mechanics across frames.