p5js-collision
OfficialEfficient p5.js collision detection utilities.
Authorneighbor-game-ai
Version1.0.0
Installs0
System Documentation
What problem does it solve?
P5.js collision detection helpers for common shape interactions, enabling games and interactive sketches to determine overlaps reliably without writing boilerplate math.
Core Features & Use Cases
- Circle-circle collision detection: circlesCollide(x1, y1, r1, x2, y2, r2)
- Axis-aligned rectangle-rectangle collision: rectsCollide(x1, y1, w1, h1, x2, y2, w2, h2)
- Point-in-rectangle test: pointInRect(px, py, rx, ry, rw, rh)
- Circle-rectangle collision: circleRectCollide(cx, cy, r, rx, ry, rw, rh)
- Use case: quickly determine hit outcomes in simple p5.js games or demos.
Quick Start
Load the functions into your p5.js sketch and call them to detect collisions between shapes.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: p5js-collision Download link: https://github.com/neighbor-game-ai/DreamCore-V2-sandbox/archive/main.zip#p5js-collision Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.