OpenCut/packages/effects
anh doan 81adac6e1e
feat(effects): add @opencut/effects package with 24 effects and presets
Add a standalone effects package that extracts effect definitions,
GLSL shaders, and registry from @opencut/web into a reusable package.

## Package (@opencut/effects)

- Registry: register/get/has/getAll effects with Map-based lookup
- Categories: COLOR_TONE, ARTISTIC, BEAUTY with display metadata
- Types: Effect, EffectDefinition, EffectContext, WebGLEffectPass

### Effects (24 total)

**Color & Tone (8):** brightness, contrast, saturation, hue-shift,
temperature, exposure, gamma, color-balance

**Artistic (10):** blur, vignette, film-grain, sharpen, pixelate,
chromatic-aberration, glitch (2-pass), neon-glow (2-pass),
sketch (2-pass), oil-paint (2-pass)

**Beauty (6):** skin-smooth (bilateral filter), face-brighten,
eye-enhance, teeth-whiten, blush, slim-face

### Presets (12)

- Instagram: clarendon, juno, lark, gingham, valencia, nashville
- Cinematic: teal-and-orange, vintage-film, noir, bleach-bypass
- Beauty: soft-glow, portrait

## Web App Integration

- Migrate blur effect from web app to package
- Update imports via re-export pattern (backward compatible)
- Pass time param for animated effects (film-grain, glitch)
- Add face-mesh service using MediaPipe Face Mesh (lazy-loaded)
- Beauty effects auto-detect faces and pass EffectContext
- Async renderVisual for face detection pipeline

## Tests

152 unit tests covering registry, all effect definitions, and presets
2026-03-23 13:32:46 +07:00
..
src feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00
tests feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00
.gitignore feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00
package.json feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00
tsconfig.json feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00
tsup.config.ts feat(effects): add @opencut/effects package with 24 effects and presets 2026-03-23 13:32:46 +07:00