# 2D Digital Effects — Agent Guide

2D Digital Effects is a visual-effects studio independent from 2D Digital Icons. It combines the exactly pinned `@paper-design/shaders-react@0.0.77` package with standalone 2D Digital Canvas pixel engines, turning local photos, logos, and graphics into reusable effects, animations, stills, and production code.

## Core principles

- Images are decoded, analyzed, and rendered in the user's browser by default. The REST API and MCP service do not accept uploaded assets.
- Current recipes use `schemaVersion: 2` with `engine`, post-effect `layers`, and `interactions`. The validation endpoint still migrates valid version 1 Paper recipes.
- Respect `prefers-reduced-motion`; animated effects should set `speed` to `0` when reduced motion is requested.
- Production projects must retain the Paper Shaders Apache-2.0 LICENSE and NOTICE.

## REST

- `GET /api/v1/effects`: List effects with `asset=photo|logo|graphic`, every public category, and `q=` filtering.
- `GET /api/v1/effects/{slug}`: Read one effect, its presets, and its default recipe.
- `POST /api/v1/recipes/validate`: Validate a portable recipe.
- `GET /api/v1/openapi`: Read the OpenAPI 3.1 document.

## MCP

The Streamable HTTP endpoint is `POST /api/mcp` and exposes these tools:

- `list_effects`
- `list_collections`
- `recommend_effects`
- `get_effect`
- `create_recipe`
- `generate_code`

Recommended flow: send asset-analysis results to `recommend_effects`, inspect presets with `get_effect`, lock parameters with `create_recipe`, then use `generate_code` to produce React, Next.js, Web component, or agent-prompt output.

## Installation

```bash
npm install --save-exact @paper-design/shaders-react@0.0.77
```

Do not use `^` or `~`; shader parameters and exported results should not change unexpectedly after an upgrade. Generated code for `engine: canvas` includes the complete runtime and needs no additional effect dependency.
