curves-and-paths

Create and manipulate curves and paths in Phaser 4.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Curves and Paths in Phaser 4 are essential for creating dynamic motion and visually rich scenes, and this skill provides a structured guide to create, sample, and render curves, as well as drive sprites along paths.

Core Features & Use Cases

  • Create and compose multiple curve types (Line, Spline, CubicBezier, QuadraticBezier, Ellipse) into a single Path.
  • Draw curves with Graphics, sample points, and compute lengths for precise motion and hit-testing.
  • Animate sprites along paths using PathFollower with rotation and offset options in Phaser 4.

Quick Start

Create a Path starting at (100, 200), add a lineTo and a spline, and attach a PathFollower to move along it.

Frequently Asked Questions about curves-and-paths

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

FAQPage Schema
How do I animate a sprite along a path in Phaser 4?

You can animate sprites along curves in Phaser 4 by attaching a PathFollower to your sprite, which handles automated motion, rotation, and offset configuration along a composed Path.

What types of curves can I compose into a single Path in Phaser 4?

You can compose Line, Spline, CubicBezier, QuadraticBezier, and Ellipse curves into a single Path using Phaser 4's Path and Curve APIs for dynamic graphics and complex motion.

How do I draw and sample points on curves using Phaser Graphics?

You can draw curves with Phaser Graphics and sample points along them using the Curve API to compute lengths, extract precise coordinates, and support hit-testing for game development.

Does this Phaser 4 path-following approach work for dynamic game graphics?

Yes, creating and manipulating curves and paths in Phaser 4 is designed for dynamic graphics, allowing you to compose multiple curve types, sample points, and render precise motion for game scenes.

What's the best way to structure a Path with multiple curve types in Phaser?

The best way to structure a multi-curve Path in Phaser is to initialize a starting point, sequentially add curve segments like lineTo and splines via the Path API, and then draw or follow the complete route.