Initial commit

This commit is contained in:
2026-04-08 10:01:19 -07:00
commit 6657125a1e
68 changed files with 15886 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
{
"name": "@goodgrief/effects",
"version": "0.1.0",
"type": "module",
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"dependencies": {
"@goodgrief/shared-types": "file:../shared-types"
}
}
+98
View File
@@ -0,0 +1,98 @@
import type { EffectPreset } from "@goodgrief/shared-types";
import { defaultEffectPresets } from "@goodgrief/shared-types";
export interface EffectCategorySpec {
id:
| "compositing"
| "temporal"
| "spatial"
| "color"
| "depth"
| "particles"
| "reveal"
| "audio"
| "performer"
| "projection";
title: string;
artisticPurpose: string;
recommendedImplementation: "css" | "canvas" | "webgl" | "custom_shader";
performanceNote: string;
}
export const effectCategories: EffectCategorySpec[] = [
{
id: "compositing",
title: "Compositing",
artisticPurpose: "Layer images as memories held in relation rather than simply stacked.",
recommendedImplementation: "webgl",
performanceNote: "Keep pass count low and prefer pre-sized textures."
},
{
id: "temporal",
title: "Temporal",
artisticPurpose: "Create residue, afterimage, freeze, and unstable recall.",
recommendedImplementation: "custom_shader",
performanceNote: "Requires explicit history buffer management."
},
{
id: "spatial",
title: "Spatial",
artisticPurpose: "Turn still photos into playable, live-composed space.",
recommendedImplementation: "webgl",
performanceNote: "Cheap until object counts and shadow complexity grow."
},
{
id: "color",
title: "Color and Tone",
artisticPurpose: "Shift between warmth, institutional coldness, camp, and grief hush.",
recommendedImplementation: "custom_shader",
performanceNote: "Bound operator ranges to prevent unreadable projections."
},
{
id: "depth",
title: "Depth and Parallax",
artisticPurpose: "Give still imagery weight, procession, and breath.",
recommendedImplementation: "webgl",
performanceNote: "Batch materials and cap simultaneous textures."
},
{
id: "particles",
title: "Particles",
artisticPurpose: "Dust, ash, petals, paper, stars, and bodily debris.",
recommendedImplementation: "custom_shader",
performanceNote: "Use one reusable GPU-instanced system."
},
{
id: "reveal",
title: "Reveal and Conceal",
artisticPurpose: "Let imagery emerge through masks, curtains, water, and tears.",
recommendedImplementation: "custom_shader",
performanceNote: "Ordering and alpha complexity need strict discipline."
},
{
id: "audio",
title: "Audio Reactive",
artisticPurpose: "Subtle breathing and swell tied to score rather than spectacle.",
recommendedImplementation: "webgl",
performanceNote: "Should always be operator-disableable."
},
{
id: "performer",
title: "Performer Reactive",
artisticPurpose: "Rare moments where the body reveals or occludes memory.",
recommendedImplementation: "custom_shader",
performanceNote: "Calibration-heavy, high risk, not for core playback."
},
{
id: "projection",
title: "Projection Safety",
artisticPurpose: "Keep output readable in dark rooms and across mismatched surfaces.",
recommendedImplementation: "webgl",
performanceNote: "Apply as the final output calibration layer."
}
];
export const effectPresetLibrary: EffectPreset[] = defaultEffectPresets;
export const findEffectPreset = (id: string) =>
effectPresetLibrary.find((preset) => preset.id === id) ?? null;
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"include": [
"src"
]
}