geometry-and-math

Solve 2D geometry and math tasks for Phaser 4 games.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/arnaudruffin/dvx-phaser-game --skill geometry-and-math-arnaudruffin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: geometry-and-math
Source: https://github.com/arnaudruffin/dvx-phaser-game/tree/main/.agents/skills/geometry-and-math
Command: npx skills add https://github.com/arnaudruffin/dvx-phaser-game --skill geometry-and-math-arnaudruffin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser 4 geometry and math utilities provide a centralized, reusable toolkit to handle common geometry and math operations in 2D games, eliminating ad-hoc implementations and reducing development time.

Core Features & Use Cases

  • Geometry objects and helpers for Circle, Rectangle, Ellipse, Line, Polygon, and Triangle for precise shape handling and intersection tests.
  • Math utilities like distance, angle, interpolation, random generation, snapping, and vector operations enabling physics, collision, pathfinding, and rendering calculations.
  • Use Case: Build a Phaser 4 game where you need efficient hit testing, point containment, shape construction, and deterministic random geometry generation.

Quick Start

Create a Rectangle and a Circle, then test a point containment and measure the distance between their centers.

Frequently Asked Questions about geometry-and-math

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

FAQPage Schema
How do I detect collision and point containment for 2D shapes in a Phaser 4 game?

Point containment and collision detection in Phaser 4 are handled by testing intersections across geometry objects like Rectangles, Circles, and Triangles. This provides precise shape handling for determining if coordinates fall within defined boundaries.

Can I calculate distance and angles between vectors for Phaser 4 game physics?

Vector operations in Phaser 4 include math utilities for calculating distance, angles, and interpolation. These helpers enable accurate physics calculations, pathfinding logic, and coordinate transformations within the game environment.

What is the best way to construct and test intersections between circles and rectangles in Phaser 4?

Constructing and testing intersections between Circles and Rectangles in Phaser 4 uses built-in geometry objects and intersection tests. This allows developers to efficiently execute hit testing and evaluate shape overlaps for game logic.

Does this math utility support deterministic random generation and snapping for game coordinates?

Math utilities for Phaser 4 support deterministic random generation and coordinate snapping. These features allow developers to generate predictable geometry and align elements precisely to a grid during game development.

Why use centralized geometry and math utilities instead of ad-hoc implementations in Phaser 4?

Centralized geometry and math utilities eliminate ad-hoc implementations in Phaser 4, reducing development time and errors. This reusable toolkit provides standardized operations for shapes, vectors, and math helpers to ensure consistent game logic.