---
name: "paperjs-vector-bezier-curves"
description: "Manipulate complex bezier curves, path intersections, and vector geometry with Paper.js."
metadata:
  author: "Jürg Lehni & Jonathan Puckey"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "simplify bezier curve paper.js"
  - "boolean path intersection paperjs"
  - "smooth vector path paper.js"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Paper.js Vector Graphics & Bezier Mathematics

Harnesses Paper.js vector scripting engine: Path construction, segment manipulation, curve simplification, Boolean path operations (unite, intersect, subtract), and mouse tools.

## When to Invoke
Invoke this skill whenever you need to:
- simplify bezier curve paper.js
- boolean path intersection paperjs
- smooth vector path paper.js

## Execution SOP & Rules
1. Initialize project using paper.setup(canvasElement) with standard PaperScope.
2. Smooth freehand user paths using path.simplify(10) to reduce vertex counts.
3. Perform boolean operations: const result = shapeA.subtract(shapeB).
4. Redraw the canvas cleanly using paper.view.draw() after updating path geometry.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
