---
name: "popmotion-physics-springs"
description: "Implement low-level physics engines, inertia dragging, and decay animations with Popmotion."
metadata:
  author: "Popmotion"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "create decay animation popmotion"
  - "use spring physics popmotion"
  - "calculate pointer velocity"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Popmotion Low-Level Physics & Springs

Powers fluid interactive physics using Popmotion: spring(), decay(), physics velocities, pointer tracking, and smooth interpolation pipelines.

## When to Invoke
Invoke this skill whenever you need to:
- create decay animation popmotion
- use spring physics popmotion
- calculate pointer velocity

## Execution SOP & Rules
1. Initialize springs using spring({ from: 0, to: 100, velocity: currentVelocity, stiffness: 200 }).start(v => ...).
2. Use decay({ from: currentPos, velocity: releaseVelocity, power: 0.8 }) for momentum drift.
3. Stop ongoing animations immediately if the user touches or interacts with the moving element.
4. Clamp animated values within strict bounds to prevent elements from escaping viewports.

## 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.
