curves-and-paths

Create Phaser 4 Paths with Line, Spline, CubicBezier, QuadraticBezier, and Ellipse curves for PathFollower-driven sprite movement along dynamic routes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Curves and Paths in Phaser 4 enable developers to create complex movement patterns and visuals by composing curves and paths and driving sprites along them.

Core Features & Use Cases

  • Create and manipulate Paths using Line, Spline, CubicBezier, QuadraticBezier, and Ellipse curves
  • Draw curves and visualize points with Graphics; drive PathFollowers for dynamic motion
  • Use Path and Curve APIs to compute points, tangents, and lengths for precise control in gameplay

Quick Start

Create a Phaser Path and attach a PathFollower to a sprite to start moving along the curve.

Frequently Asked Questions about curves-and-paths

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

FAQPage Schema
How do I move sprites along curved paths in Phaser 4?

To move sprites along curved paths in Phaser 4, create a Path from curves like Line or Spline, then attach a PathFollower to your sprite to drive dynamic motion along the route.

What types of curves can I use for path-based routing in game development?

For path-based routing, you can compose paths using Line, Spline, CubicBezier, QuadraticBezier, and Ellipse curves to create complex movement patterns for sprites.

How do I visualize trajectories and curve points in a Phaser game scene?

To visualize trajectories and curve points in a Phaser game scene, use the Graphics API to draw the curves and display computed points, tangents, and lengths for precise gameplay control.

Can I control rotation and start positions when using PathFollower in Phaser?

Yes, Phaser PathFollower integration supports rotation control, allowing you to manage offset and start positions precisely when driving sprites along dynamic routes.

Does Phaser Path API support computing tangents and lengths for gameplay control?

The Phaser Path and Curve APIs support computing points, tangents, and lengths, giving you precise control over curved motion and path-based routing within game scenes.

What's the best way to create complex movement patterns for sprites in JavaScript games?

The best way to create complex movement patterns in JavaScript games is composing multiple curves into a single Path and using PathFollower to drive sprites along the dynamic route.