diff --git a/.changeset/camp-dev-move.md b/.changeset/camp-dev-move.md new file mode 100644 index 00000000..0d5d7418 --- /dev/null +++ b/.changeset/camp-dev-move.md @@ -0,0 +1,13 @@ +--- +'@camp-dev/shaders': minor +'@camp-dev/shaders-react': minor +'@camp-dev/shaders-cli': minor +--- + +The three packages are renamed. `@lovo/matter` is now `@camp-dev/shaders`, `@lovo/matter-react` is now `@camp-dev/shaders-react`, and `@lovo/matter-cli` is now `@camp-dev/shaders-cli`. The repository moved to github.com/campdotdev/shaders. Update your dependency names and every import specifier. Apart from the removals below, the exports themselves are unchanged. + +The CLI binary is renamed from `matter-cli` to `shaders-cli`, and its config file from `matter.config.json` to `shaders.config.json`. Rename the file and update any script that calls the old binary. Two defaults that `shaders-cli init` writes also change: `componentsDir` goes from `src/components/matter` to `src/components/shaders`, and `registryUrl` now points at `campdotdev/shaders` instead of `lovo-hq/matter`. A config you already have keeps the values it records, so edit its `registryUrl` by hand or re-run `init` with `--force`. + +`MatterError` and `MatterErrorCode` in `@camp-dev/shaders-react` are now `ShadersError` and `ShadersErrorCode`. A `catch` block that tests `instanceof MatterError` has to switch to the new name. + +The READMEs drop their migration notes for the `Matter*` aliases that 0.4.0 deprecated, such as `MatterScene` and `MatterScheduler`. The aliases themselves left the source several releases ago. diff --git a/.changeset/config.json b/.changeset/config.json index faede07a..58287ea6 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json", "changelog": "@changesets/cli/changelog", "commit": false, - "fixed": [["@mattermix/shaders", "@mattermix/shaders-react", "@mattermix/shaders-cli"]], + "fixed": [["@camp-dev/shaders", "@camp-dev/shaders-react", "@camp-dev/shaders-cli"]], "linked": [], "access": "public", "baseBranch": "main", diff --git a/.changeset/mattermix-move.md b/.changeset/mattermix-move.md deleted file mode 100644 index b36c8e12..00000000 --- a/.changeset/mattermix-move.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@mattermix/shaders': minor -'@mattermix/shaders-react': minor -'@mattermix/shaders-cli': minor ---- - -The three packages are renamed. `@lovo/matter` is now `@mattermix/shaders`, `@lovo/matter-react` is now `@mattermix/shaders-react`, and `@lovo/matter-cli` is now `@mattermix/shaders-cli`. The repository moved to github.com/mattermix/shaders. Update your dependency names and every import specifier. Apart from the removals below, the exports themselves are unchanged. - -The CLI binary is renamed from `matter-cli` to `shaders-cli`, and its config file from `matter.config.json` to `shaders.config.json`. Rename the file and update any script that calls the old binary. Two defaults that `shaders-cli init` writes also change: `componentsDir` goes from `src/components/matter` to `src/components/shaders`, and `registryUrl` now points at `mattermix/shaders` instead of `lovo-hq/matter`. A config you already have keeps the values it records, so edit its `registryUrl` by hand or re-run `init` with `--force`. - -`MatterError` and `MatterErrorCode` in `@mattermix/shaders-react` are now `ShadersError` and `ShadersErrorCode`. A `catch` block that tests `instanceof MatterError` has to switch to the new name. - -The READMEs drop their migration notes for the `Matter*` aliases that 0.4.0 deprecated, such as `MatterScene` and `MatterScheduler`. The aliases themselves left the source several releases ago. diff --git a/.changeset/stable-hash-backend-parity.md b/.changeset/stable-hash-backend-parity.md index 31f9ad7e..9d093215 100644 --- a/.changeset/stable-hash-backend-parity.md +++ b/.changeset/stable-hash-backend-parity.md @@ -1,5 +1,5 @@ --- -'@mattermix/shaders': minor +'@camp-dev/shaders': minor --- Seeded randomness now renders the same pattern on the WebGPU and WebGL2 backends. three's TSL `hash()` writes its PCG constants as float literals, which GLSL rounds to a different hash than WGSL computes, so the same `seed` produced a different Voronoi layout in Safari than in Chrome. The new `stableHash` and `stableHashUint` exports run the same PCG with integer-typed constants and chain hash streams u32 to u32, and `voronoiCells`, `grain`, `metaballs`, and `ditherPattern` now draw from them. diff --git a/.claude/skills/resolve-coderabbit-feedback/SKILL.md b/.claude/skills/resolve-coderabbit-feedback/SKILL.md index be19053d..5b78768b 100644 --- a/.claude/skills/resolve-coderabbit-feedback/SKILL.md +++ b/.claude/skills/resolve-coderabbit-feedback/SKILL.md @@ -267,7 +267,7 @@ pnpm test --filter Four repo traps apply here: -- If a fix changed source under `packages/shaders` or `packages/shaders-react`, run `pnpm --filter @mattermix/shaders build`. The docs site consumes `dist`, so an unbuilt fix looks like no fix at all. +- If a fix changed source under `packages/shaders` or `packages/shaders-react`, run `pnpm --filter @camp-dev/shaders build`. The docs site consumes `dist`, so an unbuilt fix looks like no fix at all. - If a fix changed a dependency in any `package.json`, commit the updated `pnpm-lock.yaml` with it, and check that the lockfile still pins `node@runtime` at `version: 22.22.2` with `hasBin: true`. Every pnpm resolution step rewrites that entry to `0.0.0`, and CI then dies at install in every job. - Never run `pnpm snap` as part of this workflow. Ask first. It needs Docker and Node 22, it takes a long time, and it corrupts a running docs or editor dev server. - If you ran Playwright or `pnpm snap` for any reason, tell the user to restart the dev server before trusting the browser. The procedure is in `AGENTS.md` under the environment gotchas. @@ -296,7 +296,7 @@ Pick `` from the file class the approved fixes touched, and add no AI attr | A workflow under `.github/` | `ci` | | Tests, tooling config, or a lockfile on its own | `chore` | -The command above supplies the colon, so these values carry none. Scope is the package name without the `@mattermix/` prefix. When a run spans classes, name the class that carries the substantive fix, so a code fix that drags a lockfile with it stays `fix()`. The user already saw the commit line in the Step 6 preview, so change it there rather than asking again here. +The command above supplies the colon, so these values carry none. Scope is the package name without the `@camp-dev/` prefix. When a run spans classes, name the class that carries the substantive fix, so a code fix that drags a lockfile with it stays `fix()`. The user already saw the commit line in the Step 6 preview, so change it there rather than asking again here. ## Step 10: Reply and resolve the threads diff --git a/AGENTS.md b/AGENTS.md index 61d4b97b..95f758f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,7 @@ Milestone history lives in git tags and `docs/superpowers/plans/`. Don't trust a ## Project shape (30-second version) - **Three-tier model.** Tier 1 is the polished components such as ``, delivered by shadcn-style CLI copy-paste from `registry/`. Tier 2 is the TSL primitives in the engine package, such as `fractalNoise` and `voronoi`. Tier 3 is recipes: TSL snippets in the docs site. -- **Three packages.** `@mattermix/shaders` is the framework-agnostic engine, `@mattermix/shaders-react` is the React binding, and `@mattermix/shaders-cli` handles copy-paste delivery. Two apps sit alongside them: `@shaders/docs` is the docs site, and `@shaders/editor` is the node editor from MAT-94. The editor is a React Flow canvas over the same Tier 2 primitives, with an eject-to-code emitter. A permanent parity gate pixel-compares that emitter's output against the live compiler. +- **Three packages.** `@camp-dev/shaders` is the framework-agnostic engine, `@camp-dev/shaders-react` is the React binding, and `@camp-dev/shaders-cli` handles copy-paste delivery. Two apps sit alongside them: `@shaders/docs` is the docs site, and `@shaders/editor` is the node editor from MAT-94. The editor is a React Flow canvas over the same Tier 2 primitives, with an eject-to-code emitter. A permanent parity gate pixel-compares that emitter's output against the live compiler. - **The editor app is layered by dependency direction**, not by file type. `src/editor/graph/` is the framework-free core, holding the node registry, graph model, param store, live TSL compiler, and code emitter. `src/editor/preset/` handles save, load, undo, and copy-paste, and is also React-free. `src/editor/state/` is the React Flow glue. `canvas/`, `params/`, and `panels/` are UI. Dependencies point one way, toward `graph/`. Siblings import each other as `./x` and everything else as `@/editor//`. `vitest.config.ts` has to declare that `@` alias itself, because Vitest doesn't read tsconfig `paths`. - **Two rendering modes**, with no auto-detection of `@react-three/fiber`. In Mode 1 every Tier 1 component is bare and requires an explicit `` wrap, and you compose by stacking children in one scene. In Mode 2 you call `useShaderMaterial` inside your own r3f ``. @@ -37,7 +37,7 @@ Read the spec for architecture, public APIs, the component catalog, and the anim - **Rejected alternatives only when a reviewer would otherwise propose them.** Dead ends you hit along the way are session debrief. PR #93 spent a paragraph on a rejected triangle wave and another on PNG versus JPEG byte counts, and neither changes an approve or request-changes call. - **Anything already recorded in the diff gets a clause, not a section.** If the reasoning is in a code comment, in AGENTS.md, or in a changeset this PR adds, write "documented in X" and stop. Restating it makes a second copy that drifts from the first. - **Run user-facing prose through the `technical-writing` skill**, which also applies `unslop` for the slop-pattern catalog. Look for the skill in the repo's `.claude/skills/` first, then in whatever directory your harness keeps skills in, which is `~/.claude/skills/` for Claude Code. PR bodies, commit messages, changelog entries, release notes, and docs get a pass before the PR opens or the text ships. The skill sets `disable-model-invocation: true`, so an agent that honors that field never loads it on its own. Read its `SKILL.md` and work the review checklist at the end. Its first rule is to cut every word that does no work, so it pulls toward the PR word budget rather than against it. Diátaxis mode selection is the one layer a PR body skips. -- **Commit messages use Conventional Commits**, such as `feat(scope): …`, `fix(scope): …`, `chore: …`, `docs: …`, and `ci: …`. Scope is the package name without the `@mattermix/` prefix. +- **Commit messages use Conventional Commits**, such as `feat(scope): …`, `fix(scope): …`, `chore: …`, `docs: …`, and `ci: …`. Scope is the package name without the `@camp-dev/` prefix. ## Shader development process @@ -85,10 +85,10 @@ These rules exist because Shaders doubles as a shader-learning project for its a ## Environment and build gotchas - **Node 22, exactly.** The docs production build (`next build`, static export) **silently fails on Node 23**. It exits 0 and writes no `out/`, and that missing directory then breaks pagefind and `pnpm snap`. The fix is environmental, so run the pinned Node 22 rather than changing config. `.node-version` at 22.22.2 is the source of truth. `.nvmrc` at 22 is the loose duplicate fnm actually honors. -- **The docs site consumes built `dist`, not source**, for `@mattermix/shaders` and `@mattermix/shaders-react`. `@shaders/registry` is the exception, and reaches the site as raw `.tsx` via `transpilePackages`. After you edit engine or binding source, run `pnpm --filter @mattermix/shaders build` AND restart the docs dev server, or a correct fix looks like a no-op. Before you re-debug a "fix that didn't work," check `dist` mtime against `src`. +- **The docs site consumes built `dist`, not source**, for `@camp-dev/shaders` and `@camp-dev/shaders-react`. `@shaders/registry` is the exception, and reaches the site as raw `.tsx` via `transpilePackages`. After you edit engine or binding source, run `pnpm --filter @camp-dev/shaders build` AND restart the docs dev server, or a correct fix looks like a no-op. Before you re-debug a "fix that didn't work," check `dist` mtime against `src`. - **CI runs more than package-scoped checks.** Five traps: 1. `pnpm install --frozen-lockfile` runs first in every job. Any `package.json` dep change must ship with the updated `pnpm-lock.yaml`, or every job dies at install, and `ERR_PNPM_OUTDATED_LOCKFILE` masquerades as "everything failing". **Read the lockfile diff before you commit it.** Any resolution step (`pnpm add`, `pnpm remove`, `pnpm install --lockfile-only`) also rewrites the `node@runtime` entry from `version: 22.22.2` and `hasBin: true` to `version: 0.0.0`. That entry is the resolved form of the root `devEngines` pin, the thing that makes every `pnpm` script run Node 22, so restore those two lines by hand and re-check `pnpm install --frozen-lockfile` before committing. This has slipped through twice. - 2. CI runs whole-repo Prettier through root `pnpm format:check`, not just lint. The import-sort plugin orders React and external imports before `@mattermix/*` and `@shaders/*`. Run Prettier on changed files before you commit. + 2. CI runs whole-repo Prettier through root `pnpm format:check`, not just lint. The import-sort plugin orders React and external imports before `@camp-dev/*` and `@shaders/*`. Run Prettier on changed files before you commit. 3. Visual regression screenshots the canvas itself, through `page.locator('canvas').first()`, not the full page and not the `[data-shader-demo]` container. A change that resizes or repositions the canvas invalidates baselines. A change confined to the control panel's own styling does not. That wasn't always true. Before the panel moved into a sidebar outside `[data-shader-demo]`, it sat absolutely positioned inside the canvas's bounding box, so any panel change showed up in the shot too. It no longer does, so you can restyle the panel freely without regenerating anything. But `.demo-layout`'s grid columns and padding are CSS that sizes the canvas, so layout changes there still invalidate baselines, and `DemoPoster`'s poster image sits inside `[data-shader-demo]` but outside the canvas, so nothing captures it either way. @@ -127,7 +127,7 @@ These rules exist because Shaders doubles as a shader-learning project for its a 6. **`setClearColor` accepts only `Color` in three 0.170 and later.** Convert with `new Color(...)`. 7. **Vitest exits 1 with no test files.** Set `passWithNoTests: true` in per-package configs. 8. **The docs site needs `@shaders/registry` plus `transpilePackages`** to import raw `.tsx` from a workspace dep. -9. **`three/webgpu` references `self` at module load, so it cannot SSR.** Anything that genuinely reaches the renderer needs `next/dynamic` with `{ ssr: false }`, and all eight component pages load their `scene.tsx` that way. Scalar code that merely ships in the same package does not, and each piece has an import path that never pulls in three: CPU color math at `@mattermix/shaders/color`, and `useDisplayGamut` at `@mattermix/shaders-react/gamut`. A `no-restricted-imports` rule scoped to `apps/docs/**` rejects both roots for those names, so the wrong import fails at lint rather than at render, and each subpath carries a `// @vitest-environment node` test that throws if three creeps back into its graph. Reach for a subpath before you reach for `ssr: false`. +9. **`three/webgpu` references `self` at module load, so it cannot SSR.** Anything that genuinely reaches the renderer needs `next/dynamic` with `{ ssr: false }`, and all eight component pages load their `scene.tsx` that way. Scalar code that merely ships in the same package does not, and each piece has an import path that never pulls in three: CPU color math at `@camp-dev/shaders/color`, and `useDisplayGamut` at `@camp-dev/shaders-react/gamut`. A `no-restricted-imports` rule scoped to `apps/docs/**` rejects both roots for those names, so the wrong import fails at lint rather than at render, and each subpath carries a `// @vitest-environment node` test that throws if three creeps back into its graph. Reach for a subpath before you reach for `ssr: false`. 10. **`tweakpane@4` ships a broken `@tweakpane/core` reference.** Add published `@tweakpane/core` 2.x as a devDep for typecheck. 11. **Consume vec-typed `uniform(...)` as an argument, not a chained receiver, in TSL math.** `uv().sub(cursorUniform)` works. Chaining methods off a raw vec2 or vec3 uniform node silently produces wrong GPU values despite typechecking. Build expressions from `uv()` and `vec2(...)`, and pass vec uniforms as args. Scalar float uniforms are safe as chained receivers. wave-lines chains them throughout and seven visual gates validated it. 12. **three ships two standalone bundles**, `three.module.js` and `three.webgpu.js`. Importing both duplicates three core, which shows up as `Cannot read properties of undefined (reading 'usedTimes')` on dispose. Alias all three subpaths to the webgpu bundle. See `apps/docs/next.config.ts`. diff --git a/LICENSE b/LICENSE index ef1a0273..ba46e314 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Hunter Garrett / Mattermix +Copyright (c) 2026 Hunter Garrett / camp.dev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 780450e0..539354c0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ React shader components powered by WebGPU and Three.js TSL. -> **Status:** v0.1.0 shipped to npm. `npm install -D @mattermix/shaders-cli && npx shaders-cli init && npx shaders-cli add linear-gradient` to scaffold your first component. +> **Status:** v0.1.0 shipped to npm. `npm install -D @camp-dev/shaders-cli && npx shaders-cli init && npx shaders-cli add linear-gradient` to scaffold your first component. ## What is Shaders? @@ -16,9 +16,9 @@ apps/ └── playground/ # @shaders/playground — Vite app with M1 manual harnesses packages/ -├── shaders/ # @mattermix/shaders — engine: TSL primitives, renderer, scheduler -├── shaders-react/ # @mattermix/shaders-react — React binding -└── shaders-cli/ # @mattermix/shaders-cli — copy-paste CLI +├── shaders/ # @camp-dev/shaders — engine: TSL primitives, renderer, scheduler +├── shaders-react/ # @camp-dev/shaders-react — React binding +└── shaders-cli/ # @camp-dev/shaders-cli — copy-paste CLI registry/ # @shaders/registry — Tier 1 component source files (CLI consumes) @@ -41,7 +41,7 @@ pnpm install pnpm build # build all packages + apps pnpm typecheck # typecheck all packages + apps pnpm lint # lint all packages + apps -pnpm test # run all tests (Vitest in @mattermix/shaders) +pnpm test # run all tests (Vitest in @camp-dev/shaders) # Live shader demo pnpm --filter @shaders/docs dev # Next.js docs at http://localhost:3000 @@ -54,7 +54,7 @@ pnpm --filter @shaders/playground dev # Vite at http://localhost:5173 - ✅ **Milestone 0** — Repo bootstrap - ✅ **Milestone 1** — Vertical slice: `` end-to-end -- ✅ **Milestone 2** — `@mattermix/shaders-cli` (copy-paste delivery) +- ✅ **Milestone 2** — `@camp-dev/shaders-cli` (copy-paste delivery) - ✅ **Milestone 3** — The other 5 v1 components (MeshGradient, Aurora, DotField, NoiseField, Waves) - ✅ **Milestone 4** — Docs site polish - ✅ **Milestone 5** — Performance, testing, accessibility diff --git a/apps/docs/content/docs/changelog.mdx b/apps/docs/content/docs/changelog.mdx index c19b6519..f589a6e0 100644 --- a/apps/docs/content/docs/changelog.mdx +++ b/apps/docs/content/docs/changelog.mdx @@ -7,7 +7,7 @@ order: 30 # Changelog -Shaders ships as three coordinated npm packages: `@mattermix/shaders` (engine), `@mattermix/shaders-react` (React binding), and `@mattermix/shaders-cli` (copy-paste CLI). Each package has its own `CHANGELOG.md` in the repo, and this page summarizes the headline changes. +Shaders ships as three coordinated npm packages: `@camp-dev/shaders` (engine), `@camp-dev/shaders-react` (React binding), and `@camp-dev/shaders-cli` (copy-paste CLI). Each package has its own `CHANGELOG.md` in the repo, and this page summarizes the headline changes. Everything through 0.18.0 shipped under the earlier name, as `@lovo/matter`. The 1.0.0 through 3.9.0 releases from that history are renumbered as 0.7.0 through 0.18.0 in the per-package changelogs, because 1.0.0 went out by accident and the project is not at 1.0 yet. @@ -45,24 +45,24 @@ The same copy-paste rule applies. Installed copies keep rendering as before, and ## 0.2.0 -**Breaking: `@mattermix/shaders` no longer re-exports pure TSL primitives.** +**Breaking: `@camp-dev/shaders` no longer re-exports pure TSL primitives.** -The following 15 nodes are no longer exported by `@mattermix/shaders`. Import them directly from `three/tsl`: +The following 15 nodes are no longer exported by `@camp-dev/shaders`. Import them directly from `three/tsl`: `uv`, `vec2`, `vec3`, `vec4`, `uniform`, `mix`, `smoothstep`, `mod`, `sin`, `cos`, `length`, `dot`, `normalize`, `max`, `min` ```ts // Before (0.1.x) -import { vec3, uv, time } from '@mattermix/shaders' +import { vec3, uv, time } from '@camp-dev/shaders' // After (0.2.0) import { vec3, uv } from 'three/tsl' -import { time } from '@mattermix/shaders' // still here, reduced-motion-gated +import { time } from '@camp-dev/shaders' // still here, reduced-motion-gated ``` -`time` stays exported from `@mattermix/shaders` because the engine owns its semantics, which is the reduced-motion gating. For raw uncapped time, import from `three/tsl` directly. +`time` stays exported from `@camp-dev/shaders` because the engine owns its semantics, which is the reduced-motion gating. For raw uncapped time, import from `three/tsl` directly. -The primitives the engine owns (`fbm`, `noise`, `voronoi`, `colorRamp`, `sdfCircle`, `displace`, `cursorRipple`, `quantize`) stay exported from `@mattermix/shaders` unchanged. Registry component sources at 0.2.0 use the new convention. If you copied a component at 0.1.x, update its imports from `@mattermix/shaders` to `three/tsl` for the dropped symbols, or re-add the component through the CLI to pull the 0.2.0 source. +The primitives the engine owns (`fbm`, `noise`, `voronoi`, `colorRamp`, `sdfCircle`, `displace`, `cursorRipple`, `quantize`) stay exported from `@camp-dev/shaders` unchanged. Registry component sources at 0.2.0 use the new convention. If you copied a component at 0.1.x, update its imports from `@camp-dev/shaders` to `three/tsl` for the dropped symbols, or re-add the component through the CLI to pull the 0.2.0 source. **Why:** re-exporting pure TSL primitives bought nothing beyond shared import paths. No rename, no added docs, no future swap. Dropping them clarifies the layer boundary. The engine ships value-add primitives, and TSL provides the math. The [shaders engine reference](/reference/shaders) lists what the engine exports today. @@ -70,7 +70,7 @@ The primitives the engine owns (`fbm`, `noise`, `voronoi`, `colorRamp`, `sdfCirc React shader components on WebGPU and Three.js TSL. -### `@mattermix/shaders` +### `@camp-dev/shaders` The framework-agnostic engine. It exports: @@ -79,7 +79,7 @@ The framework-agnostic engine. It exports: - Runtime: `createRenderer`, `MatterScheduler`, the visibility and intersection watchers, and the reduced-motion policy. - Inputs: `CursorInput`, a framework-agnostic cursor source. -### `@mattermix/shaders-react` +### `@camp-dev/shaders-react` The React binding for the engine. It exports: @@ -89,7 +89,7 @@ The React binding for the engine. It exports: - Animation glue: `useAnimatableUniform`, which accepts any MotionValue-shaped signal. - Fallback and dev utilities: `FallbackBoundary`, `useStaticHint`, and `MatterMonitor`. -### `@mattermix/shaders-cli` +### `@camp-dev/shaders-cli` The shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so the component source you copy is stable per release. @@ -104,5 +104,5 @@ Six components are available through `shaders-cli add `: `linear-gradient` - React ^19 and Three.js ^0.170. - Detailed per-package changelogs live in the repo: [`packages/shaders/CHANGELOG.md`](https://github.com/mattermix/shaders/blob/main/packages/shaders/CHANGELOG.md), [`packages/shaders-react/CHANGELOG.md`](https://github.com/mattermix/shaders/blob/main/packages/shaders-react/CHANGELOG.md), [`packages/shaders-cli/CHANGELOG.md`](https://github.com/mattermix/shaders/blob/main/packages/shaders-cli/CHANGELOG.md). + Detailed per-package changelogs live in the repo: [`packages/shaders/CHANGELOG.md`](https://github.com/campdotdev/shaders/blob/main/packages/shaders/CHANGELOG.md), [`packages/shaders-react/CHANGELOG.md`](https://github.com/campdotdev/shaders/blob/main/packages/shaders-react/CHANGELOG.md), [`packages/shaders-cli/CHANGELOG.md`](https://github.com/campdotdev/shaders/blob/main/packages/shaders-cli/CHANGELOG.md). diff --git a/apps/docs/content/docs/cli.mdx b/apps/docs/content/docs/cli.mdx index efac1152..2e449565 100644 --- a/apps/docs/content/docs/cli.mdx +++ b/apps/docs/content/docs/cli.mdx @@ -1,18 +1,18 @@ --- title: CLI -description: Copy components from the Shaders registry into your project with @mattermix/shaders-cli. +description: Copy components from the Shaders registry into your project with @camp-dev/shaders-cli. section: overview order: 20 --- # CLI -`@mattermix/shaders-cli` copies polished shader components from the Shaders registry directly into your project. It's a shadcn-style copy-paste workflow — once a component is in your repo, it's yours to edit. There's no runtime CLI dependency; you only need it installed during development. +`@camp-dev/shaders-cli` copies polished shader components from the Shaders registry directly into your project. It's a shadcn-style copy-paste workflow — once a component is in your repo, it's yours to edit. There's no runtime CLI dependency; you only need it installed during development. ## Install ```bash -pnpm add -D @mattermix/shaders-cli +pnpm add -D @camp-dev/shaders-cli ``` Requires Node 22+. @@ -32,7 +32,7 @@ Default config: ```json { "componentsDir": "src/components/shaders", - "registryUrl": "https://raw.githubusercontent.com/mattermix/shaders/${ref}/registry", + "registryUrl": "https://raw.githubusercontent.com/campdotdev/shaders/${ref}/registry", "aliases": { "@/": "src/" }, "tsx": true } @@ -68,7 +68,7 @@ Without `--force`, `update` refuses to overwrite a file you've modified — you ## Why not a runtime dependency? -Tier 1 components (``, ``, etc.) aren't published to npm. They live in [the registry](https://github.com/mattermix/shaders/tree/main/registry) and get copied into your project, where you can edit the shader, swap props, or refactor the JSX freely. The two packages you do depend on at runtime — `@mattermix/shaders` and `@mattermix/shaders-react` — provide the primitives, hooks, and `` that those components call into. +Tier 1 components (``, ``, etc.) aren't published to npm. They live in [the registry](https://github.com/campdotdev/shaders/tree/main/registry) and get copied into your project, where you can edit the shader, swap props, or refactor the JSX freely. The two packages you do depend on at runtime — `@camp-dev/shaders` and `@camp-dev/shaders-react` — provide the primitives, hooks, and `` that those components call into. There is no hosted registry endpoint. The CLI fetches sources from GitHub raw URLs at the pinned `${ref}`. If you want to host your own fork, change `registryUrl` in `shaders.config.json` to point at your fork's raw URL. diff --git a/apps/docs/content/docs/examples.mdx b/apps/docs/content/docs/examples.mdx index 9933abab..5fdc7c21 100644 --- a/apps/docs/content/docs/examples.mdx +++ b/apps/docs/content/docs/examples.mdx @@ -16,4 +16,4 @@ In the meantime: - The [primitives pages](/primitives) show the lower-level TSL building blocks. If you want to write your own shader, start there. - The [Shared scenes guide](/guides/shared-scenes) shows how to combine multiple Shaders components inside one ``. -If you build something with Shaders, [open a PR on GitHub](https://github.com/mattermix/shaders) — selected examples will land on this page. +If you build something with Shaders, [open a PR on GitHub](https://github.com/campdotdev/shaders) — selected examples will land on this page. diff --git a/apps/docs/content/docs/getting-started.mdx b/apps/docs/content/docs/getting-started.mdx index fc256d29..5d12dc73 100644 --- a/apps/docs/content/docs/getting-started.mdx +++ b/apps/docs/content/docs/getting-started.mdx @@ -18,8 +18,8 @@ Shaders is a React component library for WebGPU shaders built on Three.js TSL. C Add the engine and the React binding to your app, and the CLI as a dev dependency: ```bash -pnpm add @mattermix/shaders @mattermix/shaders-react -pnpm add -D @mattermix/shaders-cli +pnpm add @camp-dev/shaders @camp-dev/shaders-react +pnpm add -D @camp-dev/shaders-cli ``` Requirements: @@ -64,7 +64,7 @@ Requirements: Every Shaders component is bare — it needs a `` parent to provide the WebGPU canvas. The simplest valid usage: ```tsx -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { LinearGradient } from '@/components/shaders/linear-gradient' export function Hero() { diff --git a/apps/docs/content/docs/guides/animation.mdx b/apps/docs/content/docs/guides/animation.mdx index e0996fca..32b51871 100644 --- a/apps/docs/content/docs/guides/animation.mdx +++ b/apps/docs/content/docs/guides/animation.mdx @@ -34,7 +34,7 @@ The animation engine doesn't run on the CPU per-frame — values flow straight i ```tsx import { useMotionValue, useTransform, useScroll } from 'motion/react' -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { DotField } from '@/components/shaders/dot-field' export function Hero() { @@ -60,7 +60,7 @@ Shaders ships three React hooks that produce ready-to-use signals — they handl - `useResize()` — returns a `ResizeSignal` with current canvas dimensions. ```tsx -import { ShaderScene, useCursor } from '@mattermix/shaders-react' +import { ShaderScene, useCursor } from '@camp-dev/shaders-react' function App() { return ( diff --git a/apps/docs/content/docs/guides/color.mdx b/apps/docs/content/docs/guides/color.mdx index 87654483..7d797be8 100644 --- a/apps/docs/content/docs/guides/color.mdx +++ b/apps/docs/content/docs/guides/color.mdx @@ -74,4 +74,4 @@ Think of it as a pipeline, one control per stage: They compose independently. A wide-gamut `oklch()` input blended in `oklab` and written to a `p3` framebuffer is the common case, and none of those three choices constrains the others. Reaching for `colorSpace` to fix a color that looks dull on a wide display is the usual mistake — that's stage 3's job. -For the CPU-side functions behind stage 1 — `parseColorString`, the conversions, the gamut helpers — see [the engine reference](/reference/shaders#color-math--mattermixshaderscolor). They come from `@mattermix/shaders/color`, which has no path to three, so you can call them wherever you need them: in the browser, or during a server render where the root entry would crash. +For the CPU-side functions behind stage 1 — `parseColorString`, the conversions, the gamut helpers — see [the engine reference](/reference/shaders#color-math--camp-devshaderscolor). They come from `@camp-dev/shaders/color`, which has no path to three, so you can call them wherever you need them: in the browser, or during a server render where the root entry would crash. diff --git a/apps/docs/content/docs/guides/perf.mdx b/apps/docs/content/docs/guides/perf.mdx index be5fc391..f8a8b819 100644 --- a/apps/docs/content/docs/guides/perf.mdx +++ b/apps/docs/content/docs/guides/perf.mdx @@ -42,19 +42,19 @@ Shaders reads `prefers-reduced-motion: reduce` on mount and respects the user's - `'ignore'` — Shaders ignores the OS hint entirely. ```ts -import { setReducedMotionPolicy } from '@mattermix/shaders' +import { setReducedMotionPolicy } from '@camp-dev/shaders' setReducedMotionPolicy('slow') ``` -This is global to the page and runs once at module init. The hook `useStaticSceneHint` from `@mattermix/shaders-react` can read the current scale per-render if you need to swap visuals based on it. +This is global to the page and runs once at module init. The hook `useStaticSceneHint` from `@camp-dev/shaders-react` can read the current scale per-render if you need to swap visuals based on it. ## Static / render-on-demand For decorative shaders that don't actually need to animate every frame, you can hint to Shaders that the scene is "static" — it renders once on mount, then only on prop / signal changes. ```tsx -import { ShaderScene, useStaticSceneHint } from '@mattermix/shaders-react' +import { ShaderScene, useStaticSceneHint } from '@camp-dev/shaders-react' function Hero() { useStaticSceneHint(true) @@ -77,7 +77,7 @@ Beyond intersection-based pausing, `` also listens to `document.vis Drop `` into your dev pages to get a corner overlay showing FPS, active component count, and scheduler state. It's a dev tool — not for production — and tree-shakes out when guarded behind `import.meta.env.DEV` or similar. ```tsx -import { ShaderMonitor } from '@mattermix/shaders-react' +import { ShaderMonitor } from '@camp-dev/shaders-react' {process.env.NODE_ENV === 'development' && } ``` diff --git a/apps/docs/content/docs/guides/shared-scenes.mdx b/apps/docs/content/docs/guides/shared-scenes.mdx index 799fbf50..19d2b016 100644 --- a/apps/docs/content/docs/guides/shared-scenes.mdx +++ b/apps/docs/content/docs/guides/shared-scenes.mdx @@ -12,7 +12,7 @@ Every Shaders component renders to a WebGPU canvas owned by its parent `` The scene wrapper. Owns the WebGPU canvas, creates the renderer, runs the scheduler. Every Tier 1 Shaders component must render inside one. ```tsx -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' ` from `@react-three/fiber`. Use this when you want Shaders primitives inside your own r3f scene — see [Three / r3f](/react/guides/three-r3f). ```tsx -import { useShaderMaterial } from '@mattermix/shaders-react' +import { useShaderMaterial } from '@camp-dev/shaders-react' import { uv } from 'three/tsl' -import { fractalNoise } from '@mattermix/shaders' +import { fractalNoise } from '@camp-dev/shaders' function Plane() { const material = useShaderMaterial({ @@ -69,7 +69,7 @@ All three are Strict-Mode-safe (no leaked listeners on dev double-mount) and mus Low-level animation glue. Pass an animatable prop — a static value or a signal — and get back a stable TSL uniform node that tracks it: ```tsx -import { useAnimatableUniform, type AnimatableProp } from '@mattermix/shaders-react' +import { useAnimatableUniform, type AnimatableProp } from '@camp-dev/shaders-react' function Inner({ reach }: { reach: AnimatableProp }) { const reachUniform = useAnimatableUniform(reach) @@ -84,7 +84,7 @@ The returned node keeps its identity for the component's lifetime, so a material The `[x, y]` sibling, for props like `center`. Same contract — static pair or signal in, one stable `vec2` uniform out, backed by a single `Vector2` mutated in place: ```tsx -import { useAnimatablePoint, type AnimatableProp } from '@mattermix/shaders-react' +import { useAnimatablePoint, type AnimatableProp } from '@camp-dev/shaders-react' function Inner({ center }: { center: AnimatableProp }) { const centerUniform = useAnimatablePoint(center, { screenOrigin: true }) @@ -99,7 +99,7 @@ function Inner({ center }: { center: AnimatableProp } The animation glue behind every registry component's `speed` prop. It does not return a speed uniform — it returns a scalar **phase** uniform, integrating speed over time on the CPU: ```tsx -import { useAnimatableSpeed, type AnimatableProp } from '@mattermix/shaders-react' +import { useAnimatableSpeed, type AnimatableProp } from '@camp-dev/shaders-react' function Inner({ speed }: { speed: AnimatableProp }) { const phaseUniform = useAnimatableSpeed(speed) @@ -132,7 +132,7 @@ A static stand-in shown until the shader's first content frame is on screen, and Imported from its own entry point, which has no path to three and so server-renders: ```tsx -import { ShaderPoster } from '@mattermix/shaders-react/poster' +import { ShaderPoster } from '@camp-dev/shaders-react/poster' }> @@ -146,7 +146,7 @@ import { ShaderPoster } from '@mattermix/shaders-react/poster' Resolves a gamut preference to what the display can actually show. Pass `'srgb'` or `'p3'` to fix it, or `'auto'` to query `(color-gamut: p3)` and re-resolve when the window moves to another monitor. ```tsx -import { useDisplayGamut } from '@mattermix/shaders-react/gamut' +import { useDisplayGamut } from '@camp-dev/shaders-react/gamut' const gamut = useDisplayGamut('auto') // 'srgb' | 'p3' ``` diff --git a/apps/docs/content/docs/react/guides/ssr-and-fallbacks.mdx b/apps/docs/content/docs/react/guides/ssr-and-fallbacks.mdx index 390674bc..28f8403d 100644 --- a/apps/docs/content/docs/react/guides/ssr-and-fallbacks.mdx +++ b/apps/docs/content/docs/react/guides/ssr-and-fallbacks.mdx @@ -24,13 +24,13 @@ Some of what Shaders ships is plain arithmetic that never touches the GPU: parsi | Import from | Instead of | For | | --- | --- | --- | -| `@mattermix/shaders/color` | `@mattermix/shaders` | `parseColorString`, the OKLab/OKLCH conversions, the gamut helpers, the sRGB transfer functions | -| `@mattermix/shaders-react/gamut` | `@mattermix/shaders-react` | `useDisplayGamut` | -| `@mattermix/shaders-react/poster` | `@mattermix/shaders-react` | `` | +| `@camp-dev/shaders/color` | `@camp-dev/shaders` | `parseColorString`, the OKLab/OKLCH conversions, the gamut helpers, the sRGB transfer functions | +| `@camp-dev/shaders-react/gamut` | `@camp-dev/shaders-react` | `useDisplayGamut` | +| `@camp-dev/shaders-react/poster` | `@camp-dev/shaders-react` | `` | ```tsx // Server-renders fine — no path to three. -import { parseColorString, linearSrgbToOklch } from '@mattermix/shaders/color' +import { parseColorString, linearSrgbToOklch } from '@camp-dev/shaders/color' export default function Swatch({ color }: { color: string }) { const [lightness] = linearSrgbToOklch(...parseColorString(color)) @@ -57,7 +57,7 @@ export default function Page() { } ``` -`Hero` is a regular client component that imports `@mattermix/shaders-react` and the registry component. The page itself can stay an RSC. +`Hero` is a regular client component that imports `@camp-dev/shaders-react` and the registry component. The page itself can stay an RSC. ## Webpack alias for three (Next 14+) @@ -94,7 +94,7 @@ This forces every `three` import to resolve to the unified bundle. Same idea app Some browsers (Firefox stable, Safari < 18, older Chrome) don't ship WebGPU yet. Wrap any Shaders subtree in ``: ```tsx -import { FallbackBoundary, ShaderScene } from '@mattermix/shaders-react' +import { FallbackBoundary, ShaderScene } from '@camp-dev/shaders-react' import { Aurora } from '@/components/shaders/aurora' export function Hero() { @@ -132,6 +132,6 @@ To show something in its place, wrap it in ``: the poster stays up If you wrap a scene in `next/dynamic` with `ssr: false`, nothing from that subtree ships in the server HTML — which is right, because a canvas has nothing useful to say before it has a GPU. The fallback inside `` is what users see during hydration and on unsupported browsers. -The subpaths are the exception, and worth remembering when you reach for `ssr: false` reflexively. A page that reads colors with `@mattermix/shaders/color`, or checks the display gamut with `@mattermix/shaders-react/gamut`, or shows a `` while the scene loads, renders all of that on the server normally. Only the scene itself has to wait. +The subpaths are the exception, and worth remembering when you reach for `ssr: false` reflexively. A page that reads colors with `@camp-dev/shaders/color`, or checks the display gamut with `@camp-dev/shaders-react/gamut`, or shows a `` while the scene loads, renders all of that on the server normally. Only the scene itself has to wait. If you have SEO-critical content that's currently hidden behind a Shaders component, lift it out into the surrounding RSC. Shaders is for decoration; the surrounding page is for content. diff --git a/apps/docs/content/docs/react/guides/three-r3f.mdx b/apps/docs/content/docs/react/guides/three-r3f.mdx index cb7494de..6317479d 100644 --- a/apps/docs/content/docs/react/guides/three-r3f.mdx +++ b/apps/docs/content/docs/react/guides/three-r3f.mdx @@ -20,8 +20,8 @@ Mode 2 doesn't auto-detect r3f — it's an explicit opt-in via the `useShaderMat ```tsx import { Canvas } from '@react-three/fiber' -import { useShaderMaterial } from '@mattermix/shaders-react' -import { fractalNoise, uv, vec3, mix } from '@mattermix/shaders' +import { useShaderMaterial } from '@camp-dev/shaders-react' +import { fractalNoise, uv, vec3, mix } from '@camp-dev/shaders' function ShaderPlane() { const material = useShaderMaterial({ diff --git a/apps/docs/content/docs/reference/shaders.mdx b/apps/docs/content/docs/reference/shaders.mdx index c67286d4..75620d74 100644 --- a/apps/docs/content/docs/reference/shaders.mdx +++ b/apps/docs/content/docs/reference/shaders.mdx @@ -1,13 +1,13 @@ --- title: Engine API -description: '@mattermix/shaders — primitives, runtime, inputs, and reduced-motion-gated time.' +description: '@camp-dev/shaders — primitives, runtime, inputs, and reduced-motion-gated time.' section: reference order: 10 --- # Engine API -`@mattermix/shaders` is the framework-agnostic engine. This page lists everything it exports. A generated TypeDoc reference replaces this hand-written page post-launch. +`@camp-dev/shaders` is the framework-agnostic engine. This page lists everything it exports. A generated TypeDoc reference replaces this hand-written page post-launch. ## Tier 2 primitives @@ -31,17 +31,17 @@ Shaders sits on top of Three.js's TSL. Pure TSL primitives (`uv`, `vec2`, `vec3` import { uv, vec3, uniform, mix } from 'three/tsl' ``` -Shaders exports one TSL node of its own: **`elapsedTime`**. It's the TSL built-in `time` multiplied by an engine-owned reduced-motion scale uniform, so every component that animates against `elapsedTime` from `@mattermix/shaders` automatically respects `prefers-reduced-motion` and the policy override set via `setReducedMotionPolicy`. +Shaders exports one TSL node of its own: **`elapsedTime`**. It's the TSL built-in `time` multiplied by an engine-owned reduced-motion scale uniform, so every component that animates against `elapsedTime` from `@camp-dev/shaders` automatically respects `prefers-reduced-motion` and the policy override set via `setReducedMotionPolicy`. ```ts -import { elapsedTime } from '@mattermix/shaders' +import { elapsedTime } from '@camp-dev/shaders' // → equivalent to three/tsl's `time.mul(reducedMotionScale)` // If you specifically want raw uncapped time (e.g. a debug overlay): import { time as rawTime } from 'three/tsl' ``` -> **Migrating from 0.1.x?** Before 0.2.0, `@mattermix/shaders` re-exported the TSL primitives listed above as a convenience. They're gone in 0.2.0 — replace `import { vec3, uv, … } from '@mattermix/shaders'` with `import { vec3, uv, … } from 'three/tsl'`. `elapsedTime` (named `time` before 0.5.0) is the only carry-over and stays imported from `@mattermix/shaders`. +> **Migrating from 0.1.x?** Before 0.2.0, `@camp-dev/shaders` re-exported the TSL primitives listed above as a convenience. They're gone in 0.2.0 — replace `import { vec3, uv, … } from '@camp-dev/shaders'` with `import { vec3, uv, … } from 'three/tsl'`. `elapsedTime` (named `time` before 0.5.0) is the only carry-over and stays imported from `@camp-dev/shaders`. ## Runtime @@ -51,7 +51,7 @@ import { time as rawTime } from 'three/tsl' ## Inputs -- **`CursorInput`** — framework-agnostic cursor source. `useCursor()` in `@mattermix/shaders-react` wraps it; in Mode 2 or non-React contexts, you instantiate it directly. +- **`CursorInput`** — framework-agnostic cursor source. `useCursor()` in `@camp-dev/shaders-react` wraps it; in Mode 2 or non-React contexts, you instantiate it directly. ## Reduced motion @@ -60,14 +60,14 @@ import { time as rawTime } from 'three/tsl' - **`getReducedMotionTimeScale()`** — get the current animation time scale (0, 0.3, or 1). - **`createReducedMotionWatcher()`** — subscribe to policy changes. -## Color math — `@mattermix/shaders/color` +## Color math — `@camp-dev/shaders/color` CPU-side color conversion, run once in JavaScript when a prop is parsed. The GPU only ever sees the resulting numbers. These are also exported from the root entry, but prefer the subpath: it has no path to three, so it can be imported during a server render, where the root entry cannot. See [SSR and fallbacks](/react/guides/ssr-and-fallbacks#the-three-free-subpaths). ```ts -import { parseColorString, linearSrgbToOklch } from '@mattermix/shaders/color' +import { parseColorString, linearSrgbToOklch } from '@camp-dev/shaders/color' ``` - `parseColorString(input)` → extended linear-sRGB. Accepts `#rrggbb`, `#rrggbbaa` (alpha dropped), `oklab(L a b)`, and `oklch(L C H)`. Throws on anything else, including components that aren't numbers. @@ -83,5 +83,5 @@ import { parseColorString, linearSrgbToOklch } from '@mattermix/shaders/color' The engine exports types for everything above: `GpuRenderer`, `CreateRendererOptions`, `GpuBackend`, `SchedulerTick`, `SchedulerClient`, `CursorInputOptions`, `Vector2`, `ColorRampStop`, `TSLNode`, `FractalNoiseOptions`, `FractalFold`, `CursorRippleOptions`, `ReducedMotionPolicy`, `ReducedMotionWatcher`, `VisibilityWatcher`, `IntersectionWatcher`, `OutputGamut`, `ColorSpace`, `HueInterpolation`. - For React-specific exports (``, hooks, ``), see [the React API](/react/api). This page only covers `@mattermix/shaders`. + For React-specific exports (``, hooks, ``), see [the React API](/react/api). This page only covers `@camp-dev/shaders`. diff --git a/apps/docs/next.config.ts b/apps/docs/next.config.ts index c95efce9..1e0e3520 100644 --- a/apps/docs/next.config.ts +++ b/apps/docs/next.config.ts @@ -38,7 +38,7 @@ const nextConfig: NextConfig = { // `next build` lint too just runs the same rules a second time. Turning it off // here is not a way of skipping the check — it is saying where the check lives. eslint: { ignoreDuringBuilds: true }, - transpilePackages: ['@mattermix/shaders', '@mattermix/shaders-react', '@shaders/registry'], + transpilePackages: ['@camp-dev/shaders', '@camp-dev/shaders-react', '@shaders/registry'], webpack(config: WebpackConfig): WebpackConfig { config.resolve = config.resolve ?? {}; const webgpuBundle = resolve(threeDir, 'build/three.webgpu.js'); diff --git a/apps/docs/package.json b/apps/docs/package.json index 078d817f..ad48175b 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -14,8 +14,8 @@ }, "dependencies": { "@base-ui/react": "^1.6.0", - "@mattermix/shaders": "workspace:*", - "@mattermix/shaders-react": "workspace:*", + "@camp-dev/shaders": "workspace:*", + "@camp-dev/shaders-react": "workspace:*", "@shaders/registry": "workspace:*", "@xyflow/react": "^12.11.2", "github-slugger": "^2.0.0", diff --git a/apps/docs/src/app/components/aurora/params.ts b/apps/docs/src/app/components/aurora/params.ts index 68841657..4bfb1bc5 100644 --- a/apps/docs/src/app/components/aurora/params.ts +++ b/apps/docs/src/app/components/aurora/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/aurora/scene.tsx b/apps/docs/src/app/components/aurora/scene.tsx index 5b99d2d6..7e3201d3 100644 --- a/apps/docs/src/app/components/aurora/scene.tsx +++ b/apps/docs/src/app/components/aurora/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { Aurora, type ColorStop } from '@shaders/registry/aurora'; import { type AuroraParams, INITIAL } from './params'; diff --git a/apps/docs/src/app/components/blobs/params.ts b/apps/docs/src/app/components/blobs/params.ts index 3f121f5c..cbfb3424 100644 --- a/apps/docs/src/app/components/blobs/params.ts +++ b/apps/docs/src/app/components/blobs/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/blobs/scene.tsx b/apps/docs/src/app/components/blobs/scene.tsx index 431033cf..dc1817b1 100644 --- a/apps/docs/src/app/components/blobs/scene.tsx +++ b/apps/docs/src/app/components/blobs/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { Blobs } from '@shaders/registry/blobs'; import type { ColorStop } from '@shaders/registry/blobs'; import { LinearGradient } from '@shaders/registry/linear-gradient'; diff --git a/apps/docs/src/app/components/conic-gradient/params.ts b/apps/docs/src/app/components/conic-gradient/params.ts index f2e24160..2c6e95cb 100644 --- a/apps/docs/src/app/components/conic-gradient/params.ts +++ b/apps/docs/src/app/components/conic-gradient/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/conic-gradient/scene.tsx b/apps/docs/src/app/components/conic-gradient/scene.tsx index f5104e67..da413856 100644 --- a/apps/docs/src/app/components/conic-gradient/scene.tsx +++ b/apps/docs/src/app/components/conic-gradient/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { ConicGradient } from '@shaders/registry/conic-gradient'; import { INITIAL, type Params } from './params'; diff --git a/apps/docs/src/app/components/dither/scene.tsx b/apps/docs/src/app/components/dither/scene.tsx index 2f3915c4..33ce608d 100644 --- a/apps/docs/src/app/components/dither/scene.tsx +++ b/apps/docs/src/app/components/dither/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { Dither } from '@shaders/registry/dither'; import { MeshGradient } from '@shaders/registry/mesh-gradient'; diff --git a/apps/docs/src/app/components/dot-field/scene.tsx b/apps/docs/src/app/components/dot-field/scene.tsx index 16ee5351..012718c2 100644 --- a/apps/docs/src/app/components/dot-field/scene.tsx +++ b/apps/docs/src/app/components/dot-field/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { DotField } from '@shaders/registry/dot-field'; import { INITIAL, type Params } from './params'; diff --git a/apps/docs/src/app/components/fractal-noise/params.ts b/apps/docs/src/app/components/fractal-noise/params.ts index 0bc349ac..eb646859 100644 --- a/apps/docs/src/app/components/fractal-noise/params.ts +++ b/apps/docs/src/app/components/fractal-noise/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import type { FractalNoiseStyle } from '@shaders/registry/fractal-noise'; import { STYLE_DIAL_DEFAULTS } from '@shaders/registry/fractal-noise/style-dial-defaults'; diff --git a/apps/docs/src/app/components/fractal-noise/scene.tsx b/apps/docs/src/app/components/fractal-noise/scene.tsx index ba4ae5cd..20cfa003 100644 --- a/apps/docs/src/app/components/fractal-noise/scene.tsx +++ b/apps/docs/src/app/components/fractal-noise/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { FractalNoise } from '@shaders/registry/fractal-noise'; import type { ColorStop } from '@shaders/registry/fractal-noise'; diff --git a/apps/docs/src/app/components/god-rays/scene.tsx b/apps/docs/src/app/components/god-rays/scene.tsx index b51d4848..e7f39b9b 100644 --- a/apps/docs/src/app/components/god-rays/scene.tsx +++ b/apps/docs/src/app/components/god-rays/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { GodRays } from '@shaders/registry/god-rays'; import { type GodRaysParams, INITIAL } from './params'; diff --git a/apps/docs/src/app/components/grain/scene.tsx b/apps/docs/src/app/components/grain/scene.tsx index 961b0620..d8ef10ed 100644 --- a/apps/docs/src/app/components/grain/scene.tsx +++ b/apps/docs/src/app/components/grain/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { Grain } from '@shaders/registry/grain'; import { LinearGradient } from '@shaders/registry/linear-gradient'; diff --git a/apps/docs/src/app/components/linear-gradient/params.ts b/apps/docs/src/app/components/linear-gradient/params.ts index dd1121d3..cd642127 100644 --- a/apps/docs/src/app/components/linear-gradient/params.ts +++ b/apps/docs/src/app/components/linear-gradient/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/linear-gradient/scene.tsx b/apps/docs/src/app/components/linear-gradient/scene.tsx index 33476b37..aafbd1cc 100644 --- a/apps/docs/src/app/components/linear-gradient/scene.tsx +++ b/apps/docs/src/app/components/linear-gradient/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { LinearGradient } from '@shaders/registry/linear-gradient'; import { INITIAL, type Params } from './params'; diff --git a/apps/docs/src/app/components/mesh-gradient/params.ts b/apps/docs/src/app/components/mesh-gradient/params.ts index 1c260be2..47c83dcb 100644 --- a/apps/docs/src/app/components/mesh-gradient/params.ts +++ b/apps/docs/src/app/components/mesh-gradient/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/mesh-gradient/scene.tsx b/apps/docs/src/app/components/mesh-gradient/scene.tsx index c30efa35..e8ae0e0e 100644 --- a/apps/docs/src/app/components/mesh-gradient/scene.tsx +++ b/apps/docs/src/app/components/mesh-gradient/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { MeshGradient, type Palette } from '@shaders/registry/mesh-gradient'; import { INITIAL, type Params } from './params'; diff --git a/apps/docs/src/app/components/radial-gradient/params.ts b/apps/docs/src/app/components/radial-gradient/params.ts index ab8666b8..271be97e 100644 --- a/apps/docs/src/app/components/radial-gradient/params.ts +++ b/apps/docs/src/app/components/radial-gradient/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/radial-gradient/scene.tsx b/apps/docs/src/app/components/radial-gradient/scene.tsx index 580a443d..52c77bc6 100644 --- a/apps/docs/src/app/components/radial-gradient/scene.tsx +++ b/apps/docs/src/app/components/radial-gradient/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { RadialGradient } from '@shaders/registry/radial-gradient'; import { INITIAL, type Params } from './params'; diff --git a/apps/docs/src/app/components/simplex-noise/page.tsx b/apps/docs/src/app/components/simplex-noise/page.tsx index 59ddbe1b..6e280886 100644 --- a/apps/docs/src/app/components/simplex-noise/page.tsx +++ b/apps/docs/src/app/components/simplex-noise/page.tsx @@ -104,7 +104,7 @@ export default function SimplexNoisePage() { fontSize: '0.85rem', }} > - {`import { ShaderScene } from '@mattermix/shaders-react' + {`import { ShaderScene } from '@camp-dev/shaders-react' import { SimplexNoise } from '@/components/shaders/simplex-noise' diff --git a/apps/docs/src/app/components/simplex-noise/params.ts b/apps/docs/src/app/components/simplex-noise/params.ts index eacb4f4e..1a32c951 100644 --- a/apps/docs/src/app/components/simplex-noise/params.ts +++ b/apps/docs/src/app/components/simplex-noise/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/simplex-noise/scene.tsx b/apps/docs/src/app/components/simplex-noise/scene.tsx index c3b6df79..ffe582ae 100644 --- a/apps/docs/src/app/components/simplex-noise/scene.tsx +++ b/apps/docs/src/app/components/simplex-noise/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { SimplexNoise } from '@shaders/registry/simplex-noise'; import type { ColorStop } from '@shaders/registry/simplex-noise'; diff --git a/apps/docs/src/app/components/vignette/params.ts b/apps/docs/src/app/components/vignette/params.ts index b1d65ab3..8fd996cd 100644 --- a/apps/docs/src/app/components/vignette/params.ts +++ b/apps/docs/src/app/components/vignette/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; export interface VignetteParams { intensity: number; diff --git a/apps/docs/src/app/components/vignette/scene.tsx b/apps/docs/src/app/components/vignette/scene.tsx index eb00dc02..576ee9be 100644 --- a/apps/docs/src/app/components/vignette/scene.tsx +++ b/apps/docs/src/app/components/vignette/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { LinearGradient } from '@shaders/registry/linear-gradient'; import { Vignette } from '@shaders/registry/vignette'; diff --git a/apps/docs/src/app/components/voronoi/params.ts b/apps/docs/src/app/components/voronoi/params.ts index 38783482..452ba017 100644 --- a/apps/docs/src/app/components/voronoi/params.ts +++ b/apps/docs/src/app/components/voronoi/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/voronoi/scene.tsx b/apps/docs/src/app/components/voronoi/scene.tsx index 6d65da71..22e70911 100644 --- a/apps/docs/src/app/components/voronoi/scene.tsx +++ b/apps/docs/src/app/components/voronoi/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { Voronoi } from '@shaders/registry/voronoi'; import type { ColorStop } from '@shaders/registry/voronoi'; diff --git a/apps/docs/src/app/components/wave-lines/params.ts b/apps/docs/src/app/components/wave-lines/params.ts index d4395972..d97915f4 100644 --- a/apps/docs/src/app/components/wave-lines/params.ts +++ b/apps/docs/src/app/components/wave-lines/params.ts @@ -1,4 +1,4 @@ -import type { ColorSpace } from '@mattermix/shaders'; +import type { ColorSpace } from '@camp-dev/shaders'; import { paletteOklch } from '../../../lib/palette'; diff --git a/apps/docs/src/app/components/wave-lines/scene.tsx b/apps/docs/src/app/components/wave-lines/scene.tsx index c495a707..3e122c72 100644 --- a/apps/docs/src/app/components/wave-lines/scene.tsx +++ b/apps/docs/src/app/components/wave-lines/scene.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { WaveLines } from '@shaders/registry/wave-lines'; import type { WaveLine } from '@shaders/registry/wave-lines'; diff --git a/apps/docs/src/app/dev/color-space-probe/ProbeGrid.tsx b/apps/docs/src/app/dev/color-space-probe/ProbeGrid.tsx index ea6324ee..e6d5c674 100644 --- a/apps/docs/src/app/dev/color-space-probe/ProbeGrid.tsx +++ b/apps/docs/src/app/dev/color-space-probe/ProbeGrid.tsx @@ -2,9 +2,9 @@ import { useEffect } from 'react'; -import type { ColorSpace } from '@mattermix/shaders'; -import { mixColor } from '@mattermix/shaders'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; +import type { ColorSpace } from '@camp-dev/shaders'; +import { mixColor } from '@camp-dev/shaders'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; import { mix, step, uv, vec3, vec4 } from 'three/tsl'; import { addPlaneMesh } from '@/lib/meshUtils'; diff --git a/apps/docs/src/app/dev/dot-field-stack-probe/probe-scene.tsx b/apps/docs/src/app/dev/dot-field-stack-probe/probe-scene.tsx index 7004b4ae..3dd0c6fa 100644 --- a/apps/docs/src/app/dev/dot-field-stack-probe/probe-scene.tsx +++ b/apps/docs/src/app/dev/dot-field-stack-probe/probe-scene.tsx @@ -6,7 +6,7 @@ // the canvas shows the page background (black) there instead. The paired // spec (visual/dot-field-stack.spec.ts) asserts pixel-color fractions, so // there is no screenshot baseline to regenerate. -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { DotField } from '@shaders/registry/dot-field'; import { LinearGradient } from '@shaders/registry/linear-gradient'; diff --git a/apps/docs/src/app/dev/gamut-probe/ProbeGrid.tsx b/apps/docs/src/app/dev/gamut-probe/ProbeGrid.tsx index 7f0604c8..5b111a03 100644 --- a/apps/docs/src/app/dev/gamut-probe/ProbeGrid.tsx +++ b/apps/docs/src/app/dev/gamut-probe/ProbeGrid.tsx @@ -2,8 +2,8 @@ import { useEffect } from 'react'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; -import { oklchToLinearSrgb } from '@mattermix/shaders/color'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; +import { oklchToLinearSrgb } from '@camp-dev/shaders/color'; import { vec3, vec4 } from 'three/tsl'; import { addPlaneMesh } from '@/lib/meshUtils'; diff --git a/apps/docs/src/app/dev/hsl-gamut-probe/ProbeGrid.tsx b/apps/docs/src/app/dev/hsl-gamut-probe/ProbeGrid.tsx index 48c9ef5b..f8169f2f 100644 --- a/apps/docs/src/app/dev/hsl-gamut-probe/ProbeGrid.tsx +++ b/apps/docs/src/app/dev/hsl-gamut-probe/ProbeGrid.tsx @@ -1,6 +1,6 @@ 'use client'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { LinearGradient } from '@shaders/registry/linear-gradient'; import { VisualTestPause } from '@/lib/visualTestHooks'; diff --git a/apps/docs/src/app/dev/hue-arc-probe/ProbeGrid.tsx b/apps/docs/src/app/dev/hue-arc-probe/ProbeGrid.tsx index 60255f3b..52964c00 100644 --- a/apps/docs/src/app/dev/hue-arc-probe/ProbeGrid.tsx +++ b/apps/docs/src/app/dev/hue-arc-probe/ProbeGrid.tsx @@ -2,10 +2,10 @@ import { useEffect } from 'react'; -import type { HueInterpolation } from '@mattermix/shaders'; -import { colorRamp } from '@mattermix/shaders'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; -import { srgbChannelToLinear } from '@mattermix/shaders/color'; +import type { HueInterpolation } from '@camp-dev/shaders'; +import { colorRamp } from '@camp-dev/shaders'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; +import { srgbChannelToLinear } from '@camp-dev/shaders/color'; import type { ShaderNodeObject } from 'three/tsl'; import { mix, step, uv, vec3, vec4 } from 'three/tsl'; import type { Node } from 'three/webgpu'; diff --git a/apps/docs/src/app/dev/voronoi-probe/probe-scene.tsx b/apps/docs/src/app/dev/voronoi-probe/probe-scene.tsx index f2498e25..5665801e 100644 --- a/apps/docs/src/app/dev/voronoi-probe/probe-scene.tsx +++ b/apps/docs/src/app/dev/voronoi-probe/probe-scene.tsx @@ -7,8 +7,8 @@ // bisector distance works. Swap the colorNode lines below to isolate fields. import { useEffect } from 'react'; -import { voronoiCells } from '@mattermix/shaders'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; +import { voronoiCells } from '@camp-dev/shaders'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; import { smoothstep, uniform, uv, vec3 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/apps/docs/src/app/palette/LightnessGrid.tsx b/apps/docs/src/app/palette/LightnessGrid.tsx index 87e26a5e..24b91d6a 100644 --- a/apps/docs/src/app/palette/LightnessGrid.tsx +++ b/apps/docs/src/app/palette/LightnessGrid.tsx @@ -7,7 +7,7 @@ // rather than snapped to the neutral ladder, which is now a formality for the // accents — every one of them sits on a tick — but still matters for limeScale, // whose ramp has a ladder of its own. -import { linearSrgbToOklch, parseColorString } from '@mattermix/shaders/color'; +import { linearSrgbToOklch, parseColorString } from '@camp-dev/shaders/color'; import { palette, paletteOklch } from '@/lib/palette'; diff --git a/apps/docs/src/app/primitives/page.tsx b/apps/docs/src/app/primitives/page.tsx index a6cbe56d..8aa971be 100644 --- a/apps/docs/src/app/primitives/page.tsx +++ b/apps/docs/src/app/primitives/page.tsx @@ -5,7 +5,7 @@ import { PRIMITIVES } from '@/data/primitives'; export const metadata = { title: 'Primitives', description: - 'Tier 2 — pure TSL functions exported from @mattermix/shaders. Compose them into your own shaders.', + 'Tier 2 — pure TSL functions exported from @camp-dev/shaders. Compose them into your own shaders.', }; export default function PrimitivesIndex() { @@ -13,7 +13,7 @@ export default function PrimitivesIndex() {

Primitives

- Tier 2 — pure TSL functions exported from @mattermix/shaders. Use them inside + Tier 2 — pure TSL functions exported from @camp-dev/shaders. Use them inside your own shaders or compose them into Tier 1 components.

    diff --git a/apps/docs/src/app/recipes/_builds.ts b/apps/docs/src/app/recipes/_builds.ts index 09922193..77a878a9 100644 --- a/apps/docs/src/app/recipes/_builds.ts +++ b/apps/docs/src/app/recipes/_builds.ts @@ -5,7 +5,7 @@ import { fractalNoise, quantize, voronoi, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import type UniformNode from 'three/src/nodes/core/UniformNode.js'; import { length, max, sin, smoothstep, uv, vec2, vec3, vec4 } from 'three/tsl'; import type { ShaderNodeObject } from 'three/tsl'; diff --git a/apps/docs/src/components/DemoPoster.tsx b/apps/docs/src/components/DemoPoster.tsx index 031eacb6..ce7c3581 100644 --- a/apps/docs/src/components/DemoPoster.tsx +++ b/apps/docs/src/components/DemoPoster.tsx @@ -3,7 +3,7 @@ import Image from 'next/image'; import type { ReactNode } from 'react'; -import { ShaderPoster } from '@mattermix/shaders-react/poster'; +import { ShaderPoster } from '@camp-dev/shaders-react/poster'; export interface DemoPosterProps { src: string; diff --git a/apps/docs/src/components/PrimitiveScene.tsx b/apps/docs/src/components/PrimitiveScene.tsx index b98bbfc8..7f263ea1 100644 --- a/apps/docs/src/components/PrimitiveScene.tsx +++ b/apps/docs/src/components/PrimitiveScene.tsx @@ -14,8 +14,8 @@ import { signedDistanceFieldCircle, simplexNoise, voronoi, -} from '@mattermix/shaders'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; +} from '@camp-dev/shaders'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; import type { ShaderNodeObject } from 'three/tsl'; import { mix, sin, smoothstep, uniform, uv, vec2, vec3, vec4 } from 'three/tsl'; import { Vector2 } from 'three/webgpu'; diff --git a/apps/docs/src/components/RecipeScene.tsx b/apps/docs/src/components/RecipeScene.tsx index 01810601..60b795f3 100644 --- a/apps/docs/src/components/RecipeScene.tsx +++ b/apps/docs/src/components/RecipeScene.tsx @@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react'; -import { ShaderScene, useCursor, useShaderContext } from '@mattermix/shaders-react'; +import { ShaderScene, useCursor, useShaderContext } from '@camp-dev/shaders-react'; import { uniform } from 'three/tsl'; import { Vector2 } from 'three/webgpu'; diff --git a/apps/docs/src/components/controls/ColorInput.tsx b/apps/docs/src/components/controls/ColorInput.tsx index 16dcff1f..b289be80 100644 --- a/apps/docs/src/components/controls/ColorInput.tsx +++ b/apps/docs/src/components/controls/ColorInput.tsx @@ -8,7 +8,7 @@ * This used to load the popover through `next/dynamic` with `ssr: false`, * because reaching the color math meant importing three/webgpu, which reads * `self` at module load. Both halves of that now come from three-free subpaths - * (`@mattermix/shaders/color` and `@mattermix/shaders-react/gamut`), so it is a plain + * (`@camp-dev/shaders/color` and `@camp-dev/shaders-react/gamut`), so it is a plain * import. */ import { Popover } from '@base-ui/react/popover'; diff --git a/apps/docs/src/components/controls/ColorPopoverContents.tsx b/apps/docs/src/components/controls/ColorPopoverContents.tsx index d0f23485..d941643d 100644 --- a/apps/docs/src/components/controls/ColorPopoverContents.tsx +++ b/apps/docs/src/components/controls/ColorPopoverContents.tsx @@ -8,8 +8,8 @@ */ import { type ChangeEvent, useEffect, useRef, useState } from 'react'; -import { useDisplayGamut } from '@mattermix/shaders-react/gamut'; -import { oklchInGamut, oklchToGamut } from '@mattermix/shaders/color'; +import { useDisplayGamut } from '@camp-dev/shaders-react/gamut'; +import { oklchInGamut, oklchToGamut } from '@camp-dev/shaders/color'; import { ChannelSlider } from './color/ChannelSlider'; import { formatOklch, type OklchColor, parseToOklch } from './color/oklch'; diff --git a/apps/docs/src/components/controls/color/ChannelSlider.tsx b/apps/docs/src/components/controls/color/ChannelSlider.tsx index e310dcbe..0f2d45e7 100644 --- a/apps/docs/src/components/controls/color/ChannelSlider.tsx +++ b/apps/docs/src/components/controls/color/ChannelSlider.tsx @@ -24,7 +24,7 @@ import { linearSrgbToLinearDisplayP3, oklchInGamut, oklchToLinearSrgb, -} from '@mattermix/shaders/color'; +} from '@camp-dev/shaders/color'; import { MAX_CHROMA, type OklchColor } from './oklch'; diff --git a/apps/docs/src/components/controls/color/oklch.ts b/apps/docs/src/components/controls/color/oklch.ts index 01162e3a..d1707c11 100644 --- a/apps/docs/src/components/controls/color/oklch.ts +++ b/apps/docs/src/components/controls/color/oklch.ts @@ -5,7 +5,7 @@ * oklab(), and throws on anything else, so emitting rgb() or hsl() would crash * the shader. */ -import { linearSrgbToOklch, parseColorString } from '@mattermix/shaders/color'; +import { linearSrgbToOklch, parseColorString } from '@camp-dev/shaders/color'; /** * OKLCH in one line: lightness is how bright (0 black, 1 white), chroma is how diff --git a/apps/docs/src/data/primitives.ts b/apps/docs/src/data/primitives.ts index 238d085c..e7a1bce5 100644 --- a/apps/docs/src/data/primitives.ts +++ b/apps/docs/src/data/primitives.ts @@ -165,7 +165,7 @@ interface CursorRippleOptions { signature: `const elapsedTime: TSLNode // Equals three/tsl's built-in time * reducedMotionScale. Honors // prefers-reduced-motion and any setReducedMotionPolicy override. -// Import from '@mattermix/shaders'. For raw uncapped time, import from +// Import from '@camp-dev/shaders'. For raw uncapped time, import from // 'three/tsl' directly.`, usedBy: ['linear-gradient', 'simplex-noise', 'wave-lines', 'mesh-gradient', 'aurora'], controls: [], diff --git a/apps/docs/src/data/recipes.ts b/apps/docs/src/data/recipes.ts index edfd0f29..5302d3e5 100644 --- a/apps/docs/src/data/recipes.ts +++ b/apps/docs/src/data/recipes.ts @@ -21,7 +21,7 @@ export const RECIPES: readonly RecipeEntry[] = [ 'Warm/cool vertical bands that scroll horizontally. Simplest combination of sin, time, and colorRamp.', primitivesUsed: ['time', 'color-ramp'], source: `import { uv, vec3, vec4, sin } from 'three/tsl' -import { elapsedTime, colorRamp } from '@mattermix/shaders' +import { elapsedTime, colorRamp } from '@camp-dev/shaders' const stripe = sin(uv().x.mul(20).add(elapsedTime.mul(2))) const normalizedStripe = stripe.mul(0.5).add(0.5).clamp(0, 1) @@ -87,7 +87,7 @@ material.colorNode = vec4(glow, glow.mul(0.7), glow.mul(1.5), 1)`, description: 'FBM-driven color swirl. The canonical "shader-y" look from one primitive.', primitivesUsed: ['fbm', 'time', 'color-ramp'], source: `import { uv, vec2, vec3, vec4 } from 'three/tsl' -import { elapsedTime, fractalNoise, colorRamp } from '@mattermix/shaders' +import { elapsedTime, fractalNoise, colorRamp } from '@camp-dev/shaders' const scrolledTime = elapsedTime.mul(0.3) const samplePosition = uv().mul(2).add(vec2(scrolledTime, scrolledTime)) @@ -118,7 +118,7 @@ material.colorNode = vec4(colorRamp(noiseValue, stops), 1)`, 'Voronoi cells flattened into 4 discrete sepia bands — a mosaic / stained-glass / low-poly aesthetic. Use as a hand-crafted-feeling background where each region renders one solid color rather than a gradient.', primitivesUsed: ['voronoi', 'quantize', 'color-ramp'], source: `import { uv, vec4 } from 'three/tsl' -import { voronoi, quantize } from '@mattermix/shaders' +import { voronoi, quantize } from '@camp-dev/shaders' const cells = voronoi(uv().mul(8)) const tiered = quantize(cells, 4) diff --git a/apps/docs/src/lib/VisualTestPause.tsx b/apps/docs/src/lib/VisualTestPause.tsx index 95c6e4bc..dcaf45d3 100644 --- a/apps/docs/src/lib/VisualTestPause.tsx +++ b/apps/docs/src/lib/VisualTestPause.tsx @@ -2,9 +2,9 @@ import { useEffect } from 'react'; -import { resetRendererClock, setReducedMotionPolicy } from '@mattermix/shaders'; -import type { ReducedMotionPolicy, SchedulerTick } from '@mattermix/shaders'; -import { useShaderContext } from '@mattermix/shaders-react'; +import { resetRendererClock, setReducedMotionPolicy } from '@camp-dev/shaders'; +import type { ReducedMotionPolicy, SchedulerTick } from '@camp-dev/shaders'; +import { useShaderContext } from '@camp-dev/shaders-react'; const TARGET_FRAME = 2; diff --git a/apps/docs/src/lib/meshUtils.ts b/apps/docs/src/lib/meshUtils.ts index d84dc245..d9f01ce9 100644 --- a/apps/docs/src/lib/meshUtils.ts +++ b/apps/docs/src/lib/meshUtils.ts @@ -1,4 +1,4 @@ -import type { ShaderContextValue } from '@mattermix/shaders-react'; +import type { ShaderContextValue } from '@camp-dev/shaders-react'; import type { ShaderNodeObject } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; import type { Node } from 'three/webgpu'; diff --git a/apps/docs/src/lib/palette.test.ts b/apps/docs/src/lib/palette.test.ts index ebb1939a..455ea39c 100644 --- a/apps/docs/src/lib/palette.test.ts +++ b/apps/docs/src/lib/palette.test.ts @@ -1,8 +1,8 @@ // Guards the brand palette against the two mistakes that produced the 2026-07-26 // correction: colors no display can show, and neutral scales drifting off their -// intended tint. Reads L/C/h back through @mattermix/shaders's own conversions rather +// intended tint. Reads L/C/h back through @camp-dev/shaders's own conversions rather // than parsing strings, so the assertions use the same math the renderer does. -import { linearSrgbToOklch, oklchInGamut, parseColorString } from '@mattermix/shaders/color'; +import { linearSrgbToOklch, oklchInGamut, parseColorString } from '@camp-dev/shaders/color'; import { readFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; diff --git a/apps/docs/src/lib/palette.ts b/apps/docs/src/lib/palette.ts index 1c579906..653f52a0 100644 --- a/apps/docs/src/lib/palette.ts +++ b/apps/docs/src/lib/palette.ts @@ -23,7 +23,7 @@ * it. Before the 2026-07-26 pass, the accent then called `sky.dark` asked for * 0.145 chroma where P3 allows 0.109, and clipping landed it 14.7 degrees off * its stated hue. So: keep every oklch value inside P3 (`oklchInGamut` from - * `@mattermix/shaders` is the check), and derive the hex from it with + * `@camp-dev/shaders` is the check), and derive the hex from it with * `oklchToGamut(..., 'srgb')` rather than by clipping. */ import { accents } from './accents'; diff --git a/apps/docs/vitest.config.ts b/apps/docs/vitest.config.ts index 1e7a51ff..e5227675 100644 --- a/apps/docs/vitest.config.ts +++ b/apps/docs/vitest.config.ts @@ -8,9 +8,9 @@ export default defineConfig({ test: { // No DOM environment on purpose. These tests are pure color math, and // running them in plain Node means a future test that imports root - // @mattermix/shaders fails here — three/webgpu reads `self` at module load — the + // @camp-dev/shaders fails here — three/webgpu reads `self` at module load — the // same way it would fail in a server render. Import from - // @mattermix/shaders/color instead. + // @camp-dev/shaders/color instead. name: '@shaders/docs', include: ['src/**/*.test.{ts,tsx}'], passWithNoTests: true, diff --git a/apps/editor/next.config.ts b/apps/editor/next.config.ts index 4e5b7de8..4f127979 100644 --- a/apps/editor/next.config.ts +++ b/apps/editor/next.config.ts @@ -38,7 +38,7 @@ const nextConfig: NextConfig = { // `next build` lint too just runs the same rules a second time. Turning it off // here is not a way of skipping the check — it is saying where the check lives. eslint: { ignoreDuringBuilds: true }, - transpilePackages: ['@mattermix/shaders', '@mattermix/shaders-react'], + transpilePackages: ['@camp-dev/shaders', '@camp-dev/shaders-react'], webpack(config: WebpackConfig): WebpackConfig { config.resolve = config.resolve ?? {}; const webgpuBundle = resolve(threeDir, 'build/three.webgpu.js'); diff --git a/apps/editor/package.json b/apps/editor/package.json index 26ad0cf8..92280959 100644 --- a/apps/editor/package.json +++ b/apps/editor/package.json @@ -14,8 +14,8 @@ }, "dependencies": { "@base-ui/react": "^1.6.0", - "@mattermix/shaders": "workspace:*", - "@mattermix/shaders-react": "workspace:*", + "@camp-dev/shaders": "workspace:*", + "@camp-dev/shaders-react": "workspace:*", "@xyflow/react": "^12.11.2", "next": "^15.5.18", "react": "^19.0.0", diff --git a/apps/editor/src/app/parity/generated.gen.tsx b/apps/editor/src/app/parity/generated.gen.tsx index d401b6e2..c1aec303 100644 --- a/apps/editor/src/app/parity/generated.gen.tsx +++ b/apps/editor/src/app/parity/generated.gen.tsx @@ -6,13 +6,13 @@ // as a prop with the editor's value as its default. import { useEffect } from 'react'; -import { colorRamp, displace, simplexNoise } from '@mattermix/shaders'; +import { colorRamp, displace, simplexNoise } from '@camp-dev/shaders'; import { useAnimatableSpeed, useAnimatableUniform, useShaderContext, -} from '@mattermix/shaders-react'; -import { parseColorString } from '@mattermix/shaders/color'; +} from '@camp-dev/shaders-react'; +import { parseColorString } from '@camp-dev/shaders/color'; import { clamp, cos, diff --git a/apps/editor/src/app/parity/generated/scene.tsx b/apps/editor/src/app/parity/generated/scene.tsx index 4611286b..ca96faa5 100644 --- a/apps/editor/src/app/parity/generated/scene.tsx +++ b/apps/editor/src/app/parity/generated/scene.tsx @@ -6,7 +6,7 @@ // full-viewport ShaderScene. The visual spec drives this and /parity/runtime // to the same screenshot baseline; parity.test.ts keeps the file honest // against the emitter. -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import VisualTestPause from '@/lib/VisualTestPause'; diff --git a/apps/editor/src/app/parity/runtime/scene.tsx b/apps/editor/src/app/parity/runtime/scene.tsx index 945c1428..dee3adb3 100644 --- a/apps/editor/src/app/parity/runtime/scene.tsx +++ b/apps/editor/src/app/parity/runtime/scene.tsx @@ -8,7 +8,7 @@ // see page.dev.tsx beside this file. import { useMemo } from 'react'; -import { ShaderScene } from '@mattermix/shaders-react'; +import { ShaderScene } from '@camp-dev/shaders-react'; import { CompiledMesh } from '@/editor/canvas/OutputPreview'; import { structuralKeyOf } from '@/editor/graph/graph'; diff --git a/apps/editor/src/controls/ColorPopoverContents.tsx b/apps/editor/src/controls/ColorPopoverContents.tsx index 68a1c5b9..5aa87f37 100644 --- a/apps/editor/src/controls/ColorPopoverContents.tsx +++ b/apps/editor/src/controls/ColorPopoverContents.tsx @@ -20,8 +20,8 @@ */ import { type ChangeEvent, useEffect, useRef, useState } from 'react'; -import { useDisplayGamut } from '@mattermix/shaders-react/gamut'; -import { oklchInGamut, oklchToGamut } from '@mattermix/shaders/color'; +import { useDisplayGamut } from '@camp-dev/shaders-react/gamut'; +import { oklchInGamut, oklchToGamut } from '@camp-dev/shaders/color'; import { ChannelSlider } from './color/ChannelSlider'; import { formatOklch, type OklchColor, parseToOklch } from './color/oklch'; diff --git a/apps/editor/src/controls/color/ChannelSlider.tsx b/apps/editor/src/controls/color/ChannelSlider.tsx index b1f9e00f..04e3e79f 100644 --- a/apps/editor/src/controls/color/ChannelSlider.tsx +++ b/apps/editor/src/controls/color/ChannelSlider.tsx @@ -28,7 +28,7 @@ import { linearSrgbToLinearDisplayP3, oklchInGamut, oklchToLinearSrgb, -} from '@mattermix/shaders/color'; +} from '@camp-dev/shaders/color'; import { MAX_CHROMA, type OklchColor } from './oklch'; diff --git a/apps/editor/src/controls/color/oklch.ts b/apps/editor/src/controls/color/oklch.ts index 8f6ee43e..0caa54cd 100644 --- a/apps/editor/src/controls/color/oklch.ts +++ b/apps/editor/src/controls/color/oklch.ts @@ -10,7 +10,7 @@ * wiring around it was left behind (ColorInput/ColorPopoverContents here take * plain value/onChange/onCommit props instead). */ -import { linearSrgbToOklch, parseColorString } from '@mattermix/shaders/color'; +import { linearSrgbToOklch, parseColorString } from '@camp-dev/shaders/color'; /** * OKLCH in one line: lightness is how bright (0 black, 1 white), chroma is how diff --git a/apps/editor/src/editor/canvas/CardParams.tsx b/apps/editor/src/editor/canvas/CardParams.tsx index 5ea51494..e8a9522a 100644 --- a/apps/editor/src/editor/canvas/CardParams.tsx +++ b/apps/editor/src/editor/canvas/CardParams.tsx @@ -5,7 +5,7 @@ // one place that writes node data) and passes it down here. Split out of // CardNode.tsx (MAT-94 Task 11.5) so the card shell stays under the // 300-line bar. -import { parseColorString } from '@mattermix/shaders/color'; +import { parseColorString } from '@camp-dev/shaders/color'; import { ColorInput } from '@/controls/ColorInput'; import { colorParamOf, rampStopsOf } from '@/editor/graph/graph'; diff --git a/apps/editor/src/editor/canvas/OutputPreview.tsx b/apps/editor/src/editor/canvas/OutputPreview.tsx index 930263a5..3d3ad5b6 100644 --- a/apps/editor/src/editor/canvas/OutputPreview.tsx +++ b/apps/editor/src/editor/canvas/OutputPreview.tsx @@ -6,9 +6,9 @@ // graph's STRUCTURE changes — drags and selections never recompile. import { useEffect } from 'react'; -import { getReducedMotionTimeScale } from '@mattermix/shaders'; -import type { SchedulerTick } from '@mattermix/shaders'; -import { ShaderScene, useShaderContext } from '@mattermix/shaders-react'; +import { getReducedMotionTimeScale } from '@camp-dev/shaders'; +import type { SchedulerTick } from '@camp-dev/shaders'; +import { ShaderScene, useShaderContext } from '@camp-dev/shaders-react'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; import { compileOutputColor } from '@/editor/graph/compile'; diff --git a/apps/editor/src/editor/graph/compile.ts b/apps/editor/src/editor/graph/compile.ts index 9734d004..6ad279b2 100644 --- a/apps/editor/src/editor/graph/compile.ts +++ b/apps/editor/src/editor/graph/compile.ts @@ -17,8 +17,8 @@ import { mixColor, simplexNoise, voronoiCells, -} from '@mattermix/shaders'; -import { parseColorString } from '@mattermix/shaders/color'; +} from '@camp-dev/shaders'; +import { parseColorString } from '@camp-dev/shaders/color'; import { add, clamp, diff --git a/apps/editor/src/editor/graph/emit.test.ts b/apps/editor/src/editor/graph/emit.test.ts index 4b9397f4..d7c95169 100644 --- a/apps/editor/src/editor/graph/emit.test.ts +++ b/apps/editor/src/editor/graph/emit.test.ts @@ -142,7 +142,7 @@ describe('emitComponentSource on the starter graph', () => { it('animates speed through useAnimatableSpeed, outside the effect deps', () => { // The generated component is a fixed graph, so hooks are callable — one // per speed dial, placed before the effect. - expect(source).toContain("from '@mattermix/shaders-react'"); + expect(source).toContain("from '@camp-dev/shaders-react'"); expect(source).toContain('const noiseSpeedPhase = useAnimatableSpeed(noiseSpeed);'); // The phase uniform absorbs speed changes, so the speed prop must NOT // rebuild the material: it stays out of the deps array. @@ -163,7 +163,7 @@ describe('emitComponentSource on the starter graph', () => { expect(source).toContain("{ position: 0.5, color: vec3(...parseColorString('#7C3AED')) }"); expect(source).toContain("{ position: 1, color: vec3(...parseColorString('#F472B6')) }"); expect(source).not.toContain('stops?:'); - expect(source).toContain("from '@mattermix/shaders/color'"); + expect(source).toContain("from '@camp-dev/shaders/color'"); }); it('routes the ramp color into the material', () => { diff --git a/apps/editor/src/editor/graph/emit.ts b/apps/editor/src/editor/graph/emit.ts index 164d5dac..db06b7c8 100644 --- a/apps/editor/src/editor/graph/emit.ts +++ b/apps/editor/src/editor/graph/emit.ts @@ -957,10 +957,10 @@ function assembleFile(emission: Emission, finalColorExpr: string): string { const shadersImportLine = sortedShadersImports.length > 0 - ? `${importLineOf(sortedShadersImports, '@mattermix/shaders')}\n` + ? `${importLineOf(sortedShadersImports, '@camp-dev/shaders')}\n` : ''; const parseColorLine = emission.usesParseColor - ? `import { parseColorString } from '@mattermix/shaders/color';\n` + ? `import { parseColorString } from '@camp-dev/shaders/color';\n` : ''; return `'use client'; @@ -971,7 +971,7 @@ function assembleFile(emission: Emission, finalColorExpr: string): string { // as a prop with the editor's value as its default. import { useEffect } from 'react'; -${shadersImportLine}${importLineOf(sortedShadersReactImports, '@mattermix/shaders-react')} +${shadersImportLine}${importLineOf(sortedShadersReactImports, '@camp-dev/shaders-react')} ${parseColorLine}${importLineOf(sortedTsl, 'three/tsl')} import type { ShaderNodeObject } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/apps/editor/src/editor/params/RampParam.tsx b/apps/editor/src/editor/params/RampParam.tsx index 11bdfa59..d13caa51 100644 --- a/apps/editor/src/editor/params/RampParam.tsx +++ b/apps/editor/src/editor/params/RampParam.tsx @@ -8,7 +8,7 @@ // compiled mix chain's arity (structuralKeyOf, graph.ts), so adding or // removing a stop is expected to rebuild; that only happens on the add/remove // buttons, never mid-drag. -import { parseColorString } from '@mattermix/shaders/color'; +import { parseColorString } from '@camp-dev/shaders/color'; import { ColorInput } from '@/controls/ColorInput'; import type { ColorStop } from '@/editor/graph/registry'; diff --git a/apps/editor/src/editor/preset/flow-preset.ts b/apps/editor/src/editor/preset/flow-preset.ts index 14630636..af4ed2f2 100644 --- a/apps/editor/src/editor/preset/flow-preset.ts +++ b/apps/editor/src/editor/preset/flow-preset.ts @@ -12,7 +12,7 @@ // must serialize byte-identically to `p`, because that identity is what stops // an undo from recording itself as a fresh history entry (see // use-editor-history.ts). -import { parseColorString } from '@mattermix/shaders/color'; +import { parseColorString } from '@camp-dev/shaders/color'; import type { Edge } from '@xyflow/react'; import type { CardNodeType } from '@/editor/canvas/CardNode'; diff --git a/apps/editor/src/editor/preset/preset.ts b/apps/editor/src/editor/preset/preset.ts index 120a081a..590ef9a0 100644 --- a/apps/editor/src/editor/preset/preset.ts +++ b/apps/editor/src/editor/preset/preset.ts @@ -8,7 +8,7 @@ // spec's default instead of failing the whole load. Kept dependency-free // (hand-rolled validation, no schema library) so every consumer -- including // the code emitter, which stays three-free -- can pull it in cheaply. -import { parseColorString } from '@mattermix/shaders/color'; +import { parseColorString } from '@camp-dev/shaders/color'; import type { ColorStop, ParamSpec, ParamValue, SpecId } from '@/editor/graph/registry'; import { NODE_SPECS, xyKeysOf } from '@/editor/graph/registry'; diff --git a/apps/editor/src/lib/VisualTestPause.tsx b/apps/editor/src/lib/VisualTestPause.tsx index 4c040041..99b68473 100644 --- a/apps/editor/src/lib/VisualTestPause.tsx +++ b/apps/editor/src/lib/VisualTestPause.tsx @@ -7,9 +7,9 @@ // Mounted inside the parity scenes' ShaderScene trees. import { useEffect } from 'react'; -import { resetRendererClock, setReducedMotionPolicy } from '@mattermix/shaders'; -import type { ReducedMotionPolicy, SchedulerTick } from '@mattermix/shaders'; -import { useShaderContext } from '@mattermix/shaders-react'; +import { resetRendererClock, setReducedMotionPolicy } from '@camp-dev/shaders'; +import type { ReducedMotionPolicy, SchedulerTick } from '@camp-dev/shaders'; +import { useShaderContext } from '@camp-dev/shaders-react'; const TARGET_FRAME = 2; diff --git a/eslint.config.js b/eslint.config.js index a6f08338..16f23eed 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -172,8 +172,8 @@ export default defineConfig([ // reaches three/webgpu — the engine's through the renderer, the binding's // through ShaderScene. three/webgpu reads `self` at module load, so the // wrong import crashes at render time, which is far too late to notice. - // Each has a three-free subpath carrying the same code: @mattermix/shaders/color - // and @mattermix/shaders-react/gamut. + // Each has a three-free subpath carrying the same code: @camp-dev/shaders/color + // and @camp-dev/shaders-react/gamut. // // Banning the names rather than the specifiers is deliberate: it lets /dev // playgrounds keep importing colorRamp, ShaderScene and friends from the @@ -186,7 +186,7 @@ export default defineConfig([ { paths: [ { - name: '@mattermix/shaders', + name: '@camp-dev/shaders', importNames: [ 'linearChannelToSrgb', 'linearSrgbToLinearDisplayP3', @@ -200,14 +200,14 @@ export default defineConfig([ ], allowTypeImports: true, message: - "Import CPU color math from '@mattermix/shaders/color'. The root entry pulls in three/webgpu, which reads `self` at module load and crashes any server render.", + "Import CPU color math from '@camp-dev/shaders/color'. The root entry pulls in three/webgpu, which reads `self` at module load and crashes any server render.", }, { - name: '@mattermix/shaders-react', + name: '@camp-dev/shaders-react', importNames: ['useDisplayGamut'], allowTypeImports: true, message: - "Import useDisplayGamut from '@mattermix/shaders-react/gamut'. The root entry re-exports ShaderScene and so pulls in three/webgpu, which reads `self` at module load and crashes any server render.", + "Import useDisplayGamut from '@camp-dev/shaders-react/gamut'. The root entry re-exports ShaderScene and so pulls in three/webgpu, which reads `self` at module load and crashes any server render.", }, ], }, diff --git a/packages/shaders-cli/CHANGELOG.md b/packages/shaders-cli/CHANGELOG.md index 3f60daa4..50e0d835 100644 --- a/packages/shaders-cli/CHANGELOG.md +++ b/packages/shaders-cli/CHANGELOG.md @@ -1,6 +1,6 @@ -# @mattermix/shaders-cli +# @camp-dev/shaders-cli -> Versions 0.18.0 and below shipped as `@lovo/matter-cli` before the project moved to the mattermix org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. +> Versions 0.18.0 and below shipped as `@lovo/matter-cli` before the project moved to the camp-dev org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. ## 0.18.0 @@ -92,7 +92,7 @@ ### Minor Changes -- No API changes. This package bumped alongside `@mattermix/shaders` 0.2.0 because the three packages ship as a fixed version group. See [`@mattermix/shaders`'s 0.2.0 changelog](../shaders/CHANGELOG.md#020) for the engine-level breaking change. +- No API changes. This package bumped alongside `@camp-dev/shaders` 0.2.0 because the three packages ship as a fixed version group. See [`@camp-dev/shaders`'s 0.2.0 changelog](../shaders/CHANGELOG.md#020) for the engine-level breaking change. ## 0.1.0 @@ -100,9 +100,9 @@ - Initial public release. React shader components on WebGPU and Three.js TSL. - - `@mattermix/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. - - `@mattermix/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. - - `@mattermix/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. + - `@camp-dev/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. + - `@camp-dev/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. + - `@camp-dev/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. Six components ship through `shaders-cli add `: `linear-gradient`, `mesh-gradient`, `aurora`, `dot-field`, `noise-field`, and `waves`. Each component is yours to edit after copy-in. diff --git a/packages/shaders-cli/LICENSE b/packages/shaders-cli/LICENSE index ef1a0273..ba46e314 100644 --- a/packages/shaders-cli/LICENSE +++ b/packages/shaders-cli/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Hunter Garrett / Mattermix +Copyright (c) 2026 Hunter Garrett / camp.dev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/shaders-cli/README.md b/packages/shaders-cli/README.md index e498413f..14b6c861 100644 --- a/packages/shaders-cli/README.md +++ b/packages/shaders-cli/README.md @@ -1,12 +1,12 @@ -# @mattermix/shaders-cli +# @camp-dev/shaders-cli shadcn-style copy-paste CLI for **Shaders** — fetch polished shader components from the registry into your project, where they're yours to edit. ## Install ```bash -npm install -D @mattermix/shaders-cli -# or run ad-hoc: npx @mattermix/shaders-cli +npm install -D @camp-dev/shaders-cli +# or run ad-hoc: npx @camp-dev/shaders-cli ``` Requires Node 22+. @@ -24,7 +24,7 @@ Writes `shaders.config.json` to your project root with sensible defaults: ```json { "componentsDir": "src/components/shaders", - "registryUrl": "https://raw.githubusercontent.com/mattermix/shaders/${ref}/registry", + "registryUrl": "https://raw.githubusercontent.com/campdotdev/shaders/${ref}/registry", "aliases": { "@/": "src/" } } ``` @@ -112,7 +112,7 @@ npx shaders-cli poster --source ./aurora.tsx --output ./public/aurora.jpg --qual Wire it up: ```tsx -import { ShaderPoster } from '@mattermix/shaders-react/poster'; +import { ShaderPoster } from '@camp-dev/shaders-react/poster'; }> @@ -131,15 +131,15 @@ import { ShaderPoster } from '@mattermix/shaders-react/poster'; `linear-gradient`, `mesh-gradient`, `aurora`, `dot-field`, `simplex-noise`, `wave-lines`. -Each component depends on `@mattermix/shaders` and `@mattermix/shaders-react`, which you install separately: +Each component depends on `@camp-dev/shaders` and `@camp-dev/shaders-react`, which you install separately: ```bash -npm install @mattermix/shaders @mattermix/shaders-react three +npm install @camp-dev/shaders @camp-dev/shaders-react three ``` ## Docs - + ## License diff --git a/packages/shaders-cli/package.json b/packages/shaders-cli/package.json index 98023ab8..77f55398 100644 --- a/packages/shaders-cli/package.json +++ b/packages/shaders-cli/package.json @@ -1,5 +1,5 @@ { - "name": "@mattermix/shaders-cli", + "name": "@camp-dev/shaders-cli", "version": "0.18.0", "description": "CLI for Shaders — copy-paste components from the registry into your project.", "keywords": [ @@ -10,15 +10,15 @@ "shadcn", "shader" ], - "homepage": "https://github.com/mattermix/shaders#readme", + "homepage": "https://github.com/campdotdev/shaders#readme", "bugs": { - "url": "https://github.com/mattermix/shaders/issues" + "url": "https://github.com/campdotdev/shaders/issues" }, "license": "MIT", - "author": "mattermix", + "author": "camp-dev", "repository": { "type": "git", - "url": "git+https://github.com/mattermix/shaders.git", + "url": "git+https://github.com/campdotdev/shaders.git", "directory": "packages/shaders-cli" }, "bin": { @@ -46,8 +46,8 @@ "esbuild": "^0.27.0" }, "devDependencies": { - "@mattermix/shaders": "workspace:*", - "@mattermix/shaders-react": "workspace:*", + "@camp-dev/shaders": "workspace:*", + "@camp-dev/shaders-react": "workspace:*", "@shaders/registry": "workspace:*", "@shaders/tsconfig": "workspace:*", "@types/node": "^22.7.0", diff --git a/packages/shaders-cli/src/commands/init.test.ts b/packages/shaders-cli/src/commands/init.test.ts index 5b620f72..f19af604 100644 --- a/packages/shaders-cli/src/commands/init.test.ts +++ b/packages/shaders-cli/src/commands/init.test.ts @@ -22,7 +22,7 @@ describe('runInit', () => { const shadersConfig = JSON.parse(raw); expect(shadersConfig.componentsDir).toBe('src/components/shaders'); - expect(shadersConfig.registryUrl).toContain('mattermix/shaders'); + expect(shadersConfig.registryUrl).toContain('campdotdev/shaders'); }); it('refuses to overwrite an existing config without --force', async () => { diff --git a/packages/shaders-cli/src/config/shadersConfig.test.ts b/packages/shaders-cli/src/config/shadersConfig.test.ts index 2d31e255..34070d2a 100644 --- a/packages/shaders-cli/src/config/shadersConfig.test.ts +++ b/packages/shaders-cli/src/config/shadersConfig.test.ts @@ -11,8 +11,8 @@ import { } from './shadersConfig.js'; describe('DEFAULT_SHADERS_CONFIG.registryUrl', () => { - it('points at the mattermix/shaders org', () => { - expect(DEFAULT_SHADERS_CONFIG.registryUrl).toContain('/mattermix/shaders/'); + it('points at the campdotdev/shaders org', () => { + expect(DEFAULT_SHADERS_CONFIG.registryUrl).toContain('/campdotdev/shaders/'); }); it('contains the ${ref} placeholder for resolveRef substitution', () => { diff --git a/packages/shaders-cli/src/config/shadersConfig.ts b/packages/shaders-cli/src/config/shadersConfig.ts index 0dbdec01..a39ba214 100644 --- a/packages/shaders-cli/src/config/shadersConfig.ts +++ b/packages/shaders-cli/src/config/shadersConfig.ts @@ -17,7 +17,7 @@ export interface ShadersConfig { export const DEFAULT_SHADERS_CONFIG: ShadersConfig = { componentsDir: 'src/components/shaders', - registryUrl: 'https://raw.githubusercontent.com/mattermix/shaders/${ref}/registry', + registryUrl: 'https://raw.githubusercontent.com/campdotdev/shaders/${ref}/registry', aliases: { '@/': 'src/' }, }; diff --git a/packages/shaders-cli/src/harness/index.tsx b/packages/shaders-cli/src/harness/index.tsx index 87c91cef..cac24527 100644 --- a/packages/shaders-cli/src/harness/index.tsx +++ b/packages/shaders-cli/src/harness/index.tsx @@ -5,7 +5,7 @@ // watcher the screenshot side polls for. import type React from 'react'; -import { setReducedMotionPolicy } from '@mattermix/shaders'; +import { setReducedMotionPolicy } from '@camp-dev/shaders'; import { createRoot } from 'react-dom/client'; import { installFrameReadyWatcher } from './frameReady.js'; diff --git a/packages/shaders-cli/src/poster/bundle.ts b/packages/shaders-cli/src/poster/bundle.ts index 062b5900..fb9048fa 100644 --- a/packages/shaders-cli/src/poster/bundle.ts +++ b/packages/shaders-cli/src/poster/bundle.ts @@ -30,7 +30,7 @@ export interface BundlePosterResult { // `dist/index.tsx` instead of `dist/harness/index.tsx`. // // The fix: walk up the directory tree from `import.meta.url` until we find a `package.json` -// with `name === '@mattermix/shaders-cli'`, then try `dist/harness` then `src/harness` in order. +// with `name === '@camp-dev/shaders-cli'`, then try `dist/harness` then `src/harness` in order. // This is robust to any output chunk location tsup chooses. let harnessDirPromise: Promise | undefined; @@ -48,7 +48,7 @@ async function locateHarnessDir(): Promise { name?: string; }; - if (packageJson.name === '@mattermix/shaders-cli') { + if (packageJson.name === '@camp-dev/shaders-cli') { for (const candidate of ['dist/harness', 'src/harness']) { const harnessPath = join(dir, candidate); @@ -61,14 +61,14 @@ async function locateHarnessDir(): Promise { } } throw new Error( - `Found @mattermix/shaders-cli at ${dir} but neither dist/harness nor src/harness contains index.html`, + `Found @camp-dev/shaders-cli at ${dir} but neither dist/harness nor src/harness contains index.html`, ); } } catch (caughtError) { // Re-throw if we found the package but harness is missing if ( caughtError instanceof Error && - caughtError.message.startsWith('Found @mattermix/shaders-cli') + caughtError.message.startsWith('Found @camp-dev/shaders-cli') ) { throw caughtError; } @@ -78,7 +78,7 @@ async function locateHarnessDir(): Promise { if (parent === dir) { throw new Error( - 'Could not locate @mattermix/shaders-cli package root from ' + + 'Could not locate @camp-dev/shaders-cli package root from ' + fileURLToPath(import.meta.url), ); } diff --git a/packages/shaders-cli/src/poster/projectRoot.ts b/packages/shaders-cli/src/poster/projectRoot.ts index e1df4d89..1afee5d7 100644 --- a/packages/shaders-cli/src/poster/projectRoot.ts +++ b/packages/shaders-cli/src/poster/projectRoot.ts @@ -5,7 +5,7 @@ import { dirname, resolve } from 'node:path'; * Nearest package.json above the user's source file = their project root. * The poster pipeline resolves everything against it: esbuild pulls the * component's dependencies from the USER's node_modules (their react, their - * @mattermix/shaders), and playwright is looked up there too. + * @camp-dev/shaders), and playwright is looked up there too. */ export async function findProjectRoot(fromPath: string): Promise { let dir = dirname(resolve(fromPath)); diff --git a/packages/shaders-cli/src/test-fixtures/posters/aurora-with-time.tsx b/packages/shaders-cli/src/test-fixtures/posters/aurora-with-time.tsx index 71dd17af..4ad3143a 100644 --- a/packages/shaders-cli/src/test-fixtures/posters/aurora-with-time.tsx +++ b/packages/shaders-cli/src/test-fixtures/posters/aurora-with-time.tsx @@ -1,4 +1,4 @@ -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { Aurora } from '@shaders/registry/aurora' export default function AuroraWithTime() { diff --git a/packages/shaders-cli/src/test-fixtures/posters/gradient-plus-grain.tsx b/packages/shaders-cli/src/test-fixtures/posters/gradient-plus-grain.tsx index f1225a67..7ba364b9 100644 --- a/packages/shaders-cli/src/test-fixtures/posters/gradient-plus-grain.tsx +++ b/packages/shaders-cli/src/test-fixtures/posters/gradient-plus-grain.tsx @@ -1,4 +1,4 @@ -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { Grain } from '@shaders/registry/grain' import { LinearGradient } from '@shaders/registry/linear-gradient' diff --git a/packages/shaders-cli/src/test-fixtures/posters/named-export.tsx b/packages/shaders-cli/src/test-fixtures/posters/named-export.tsx index f16dcc76..3add7469 100644 --- a/packages/shaders-cli/src/test-fixtures/posters/named-export.tsx +++ b/packages/shaders-cli/src/test-fixtures/posters/named-export.tsx @@ -1,4 +1,4 @@ -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { LinearGradient } from '@shaders/registry/linear-gradient' export function NamedExport() { diff --git a/packages/shaders-cli/src/test-fixtures/posters/single-linear-gradient.tsx b/packages/shaders-cli/src/test-fixtures/posters/single-linear-gradient.tsx index bf8461af..6d663ea6 100644 --- a/packages/shaders-cli/src/test-fixtures/posters/single-linear-gradient.tsx +++ b/packages/shaders-cli/src/test-fixtures/posters/single-linear-gradient.tsx @@ -1,4 +1,4 @@ -import { ShaderScene } from '@mattermix/shaders-react' +import { ShaderScene } from '@camp-dev/shaders-react' import { LinearGradient } from '@shaders/registry/linear-gradient' export default function SingleLinearGradient() { diff --git a/packages/shaders-cli/src/transforms/rewriteImports.test.ts b/packages/shaders-cli/src/transforms/rewriteImports.test.ts index 14b70f1f..c96a9812 100644 --- a/packages/shaders-cli/src/transforms/rewriteImports.test.ts +++ b/packages/shaders-cli/src/transforms/rewriteImports.test.ts @@ -26,16 +26,16 @@ describe('rewriteImports', () => { it('leaves unrelated imports alone', () => { const src = - `import { LinearGradient } from '@mattermix/shaders-react'\n` + + `import { LinearGradient } from '@camp-dev/shaders-react'\n` + `import { foo } from '@matter-internal/lib'\n`; const out = rewriteImports(src, { '@matter-internal/': '@/lib/matter/' }); - expect(out).toContain(`import { LinearGradient } from '@mattermix/shaders-react'`); + expect(out).toContain(`import { LinearGradient } from '@camp-dev/shaders-react'`); expect(out).toContain(`import { foo } from '@/lib/matter/lib'`); }); it('is a no-op when no alias matches', () => { - const src = `import { LinearGradient } from '@mattermix/shaders-react'\n`; + const src = `import { LinearGradient } from '@camp-dev/shaders-react'\n`; const out = rewriteImports(src, { '@/': 'src/' }); expect(out).toBe(src); diff --git a/packages/shaders-cli/vitest.config.ts b/packages/shaders-cli/vitest.config.ts index 2a918291..461cbc7e 100644 --- a/packages/shaders-cli/vitest.config.ts +++ b/packages/shaders-cli/vitest.config.ts @@ -4,7 +4,7 @@ export default defineConfig({ // @ts-expect-error -- oxc is not in UserConfig types yet; this is the documented workaround oxc: { tsconfig: { compilerOptions: { verbatimModuleSyntax: true } } }, test: { - name: '@mattermix/shaders-cli', + name: '@camp-dev/shaders-cli', environment: 'node', include: ['src/**/*.test.ts'], passWithNoTests: true, diff --git a/packages/shaders-react/CHANGELOG.md b/packages/shaders-react/CHANGELOG.md index 6034c71b..3eebb7de 100644 --- a/packages/shaders-react/CHANGELOG.md +++ b/packages/shaders-react/CHANGELOG.md @@ -1,6 +1,6 @@ -# @mattermix/shaders-react +# @camp-dev/shaders-react -> Versions 0.18.0 and below shipped as `@lovo/matter-react` before the project moved to the mattermix org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. +> Versions 0.18.0 and below shipped as `@lovo/matter-react` before the project moved to the camp-dev org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. ## 0.18.0 @@ -46,9 +46,9 @@ ### Minor Changes -- 0d924ce: Add `@mattermix/shaders-react/gamut`, a second entry point carrying `useDisplayGamut` with no path to three. The root entry re-exports `ShaderScene`, which imports `three/webgpu`, and that reads `self` at module load, so a server-rendered page that only wanted to know whether the display can show P3 had to load the renderer to ask. The hook itself never needed it. +- 0d924ce: Add `@camp-dev/shaders-react/gamut`, a second entry point carrying `useDisplayGamut` with no path to three. The root entry re-exports `ShaderScene`, which imports `three/webgpu`, and that reads `self` at module load, so a server-rendered page that only wanted to know whether the display can show P3 had to load the renderer to ask. The hook itself never needed it. - Same reasoning as `@mattermix/shaders/color`, and as the `./poster` subpath this package already shipped. Both subpaths now have a test that imports them under a bare Node environment, so three creeping back into either one fails there rather than in someone's server render. + Same reasoning as `@camp-dev/shaders/color`, and as the `./poster` subpath this package already shipped. Both subpaths now have a test that imports them under a bare Node environment, so three creeping back into either one fails there rather than in someone's server render. ## 0.10.0 @@ -56,7 +56,7 @@ ### Major Changes -- 1b0bbcb: Remove `ShaderScene`'s `fallback` prop. This is a breaking change. Use the new `ShaderPoster` component from `@mattermix/shaders-react/poster` instead. It renders in the initial HTML, with no three import, and dismisses when the wrapped `ShaderScene` paints its first frame. +- 1b0bbcb: Remove `ShaderScene`'s `fallback` prop. This is a breaking change. Use the new `ShaderPoster` component from `@camp-dev/shaders-react/poster` instead. It renders in the initial HTML, with no three import, and dismisses when the wrapped `ShaderScene` paints its first frame. ## 0.8.0 @@ -70,7 +70,7 @@ ### Minor Changes -- 35274c3: Rename ambiguous `@mattermix/shaders-react` public exports to clearer names. This is a breaking change before 1.0. +- 35274c3: Rename ambiguous `@camp-dev/shaders-react` public exports to clearer names. This is a breaking change before 1.0. - `useOverlayPass` → `usePostProcessPass` (and the paired type `OverlayTransform` → `PostProcessTransform`) - `useStaticHint` → `useStaticSceneHint` @@ -86,7 +86,7 @@ - 1c69220: Rename public API symbols to domain-accurate names. - New primary names: `FrameScheduler`, `GpuRenderer`, `GpuBackend` (`@mattermix/shaders`); `ShaderScene`, `ShaderSceneProps`, `ShaderContext`, `ShaderContextValue`, `useShaderContext`, `ShaderMonitor`, `ShaderMonitorProps`, `AnimatableSignal` (`@mattermix/shaders-react`). + New primary names: `FrameScheduler`, `GpuRenderer`, `GpuBackend` (`@camp-dev/shaders`); `ShaderScene`, `ShaderSceneProps`, `ShaderContext`, `ShaderContextValue`, `useShaderContext`, `ShaderMonitor`, `ShaderMonitorProps`, `AnimatableSignal` (`@camp-dev/shaders-react`). The old names `MatterScheduler`, `MatterRenderer`, `MatterBackend`, `MatterScene`, `MatterSceneProps`, `MatterContext`, `MatterContextValue`, `useMatterContext`, `MatterMonitor`, `MatterMonitorProps`, and `MatterSignal` carry `@deprecated` JSDoc and continue to work. They will be removed no earlier than 0.5.0. @@ -101,7 +101,7 @@ The new hook is `useOverlayPass(transform, deps)`: ```ts - import { useAnimatableUniform, useOverlayPass } from '@mattermix/shaders-react'; + import { useAnimatableUniform, useOverlayPass } from '@camp-dev/shaders-react'; export function MyOverlay({ intensity }) { const intensityU = useAnimatableUniform(intensity); @@ -115,7 +115,7 @@ Mount the component inside any `` and it composes onto the pipeline. Multiple overlays chain in mount order. Uniforms captured inside `transform` update in place and don't need to be in `deps`. Put only structural changes there, such as a mode toggle, so the transform gets re-registered. - Two registry components ship with it, delivered through `@mattermix/shaders-cli` copy-paste: + Two registry components ship with it, delivered through `@camp-dev/shaders-cli` copy-paste: - ``, an additive or subtractive grain overlay. - ``, radial edge darkening, aspect-corrected so the mask is a circle on widescreen. @@ -125,13 +125,13 @@ ### Patch Changes - Updated dependencies [3856367] - - @mattermix/shaders@0.3.0 + - @camp-dev/shaders@0.3.0 ## 0.2.0 ### Minor Changes -- No API changes. This package bumped alongside `@mattermix/shaders` 0.2.0 because the three packages ship as a fixed version group. See [`@mattermix/shaders`'s 0.2.0 changelog](../shaders/CHANGELOG.md#020) for the engine-level breaking change. +- No API changes. This package bumped alongside `@camp-dev/shaders` 0.2.0 because the three packages ship as a fixed version group. See [`@camp-dev/shaders`'s 0.2.0 changelog](../shaders/CHANGELOG.md#020) for the engine-level breaking change. ## 0.1.0 @@ -139,9 +139,9 @@ - Initial public release. React shader components on WebGPU and Three.js TSL. - - `@mattermix/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. - - `@mattermix/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. - - `@mattermix/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. + - `@camp-dev/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. + - `@camp-dev/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. + - `@camp-dev/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. Six components ship through `shaders-cli add `: `linear-gradient`, `mesh-gradient`, `aurora`, `dot-field`, `noise-field`, and `waves`. Each component is yours to edit after copy-in. diff --git a/packages/shaders-react/LICENSE b/packages/shaders-react/LICENSE index ef1a0273..ba46e314 100644 --- a/packages/shaders-react/LICENSE +++ b/packages/shaders-react/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Hunter Garrett / Mattermix +Copyright (c) 2026 Hunter Garrett / camp.dev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/shaders-react/README.md b/packages/shaders-react/README.md index a1017e81..6d7186e2 100644 --- a/packages/shaders-react/README.md +++ b/packages/shaders-react/README.md @@ -1,16 +1,16 @@ -# @mattermix/shaders-react +# @camp-dev/shaders-react React binding for **Shaders** — shader components on WebGPU + Three.js TSL. -This package wraps the engine ([`@mattermix/shaders`](https://www.npmjs.com/package/@mattermix/shaders)) with React-friendly primitives: a shared `` canvas, a `useShaderMaterial` hook for `@react-three/fiber` integration, and input hooks (`useCursor`, `useScroll`). +This package wraps the engine ([`@camp-dev/shaders`](https://www.npmjs.com/package/@camp-dev/shaders)) with React-friendly primitives: a shared `` canvas, a `useShaderMaterial` hook for `@react-three/fiber` integration, and input hooks (`useCursor`, `useScroll`). ## Install ```bash -npm install @mattermix/shaders @mattermix/shaders-react react three +npm install @camp-dev/shaders @camp-dev/shaders-react react three ``` -`react` (^19), `@mattermix/shaders`, and `three` (^0.170) are peer dependencies. +`react` (^19), `@camp-dev/shaders`, and `three` (^0.170) are peer dependencies. ## Three rendering modes @@ -23,8 +23,8 @@ Shaders components work in three configurations: ## Minimal usage (Mode 2: shared scene) ```tsx -import { ShaderScene } from '@mattermix/shaders-react' -// LinearGradient is copy-pasted into your project via @mattermix/shaders-cli +import { ShaderScene } from '@camp-dev/shaders-react' +// LinearGradient is copy-pasted into your project via @camp-dev/shaders-cli import { LinearGradient } from '@/components/shaders/linear-gradient' export default function Hero() { @@ -41,7 +41,7 @@ export default function Hero() { Polished drop-in components (``, ``, ``, ``, ``, ``) ship via the shadcn-style copy-paste CLI. Install it once: ```bash -npm install -D @mattermix/shaders-cli +npm install -D @camp-dev/shaders-cli npx shaders-cli init npx shaders-cli add linear-gradient ``` @@ -50,7 +50,7 @@ The component lands in `src/components/shaders/linear-gradient.tsx` and is yours ## Docs - + ## License diff --git a/packages/shaders-react/package.json b/packages/shaders-react/package.json index 0c812e14..6fd15943 100644 --- a/packages/shaders-react/package.json +++ b/packages/shaders-react/package.json @@ -1,5 +1,5 @@ { - "name": "@mattermix/shaders-react", + "name": "@camp-dev/shaders-react", "version": "0.18.0", "description": "React binding for Shaders — ShaderScene, useShaderMaterial, input hooks.", "keywords": [ @@ -13,15 +13,15 @@ "tsl", "webgpu" ], - "homepage": "https://github.com/mattermix/shaders#readme", + "homepage": "https://github.com/campdotdev/shaders#readme", "bugs": { - "url": "https://github.com/mattermix/shaders/issues" + "url": "https://github.com/campdotdev/shaders/issues" }, "license": "MIT", - "author": "mattermix", + "author": "camp-dev", "repository": { "type": "git", - "url": "git+https://github.com/mattermix/shaders.git", + "url": "git+https://github.com/campdotdev/shaders.git", "directory": "packages/shaders-react" }, "files": [ @@ -63,7 +63,7 @@ "clean": "rm -rf dist .turbo *.tsbuildinfo" }, "devDependencies": { - "@mattermix/shaders": "workspace:*", + "@camp-dev/shaders": "workspace:*", "@shaders/tsconfig": "workspace:*", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", @@ -80,7 +80,7 @@ "vitest": "catalog:" }, "peerDependencies": { - "@mattermix/shaders": "workspace:>=0.2.0", + "@camp-dev/shaders": "workspace:>=0.2.0", "react": "^19.0.0", "three": "^0.170.0" } diff --git a/packages/shaders-react/src/components/shader-monitor/shader-monitor.test.tsx b/packages/shaders-react/src/components/shader-monitor/shader-monitor.test.tsx index 4c2d68f3..cecd38b3 100644 --- a/packages/shaders-react/src/components/shader-monitor/shader-monitor.test.tsx +++ b/packages/shaders-react/src/components/shader-monitor/shader-monitor.test.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import { FrameScheduler } from '@mattermix/shaders'; +import { FrameScheduler } from '@camp-dev/shaders'; import { render, screen } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; diff --git a/packages/shaders-react/src/components/shader-poster/poster-context.ts b/packages/shaders-react/src/components/shader-poster/poster-context.ts index 772c3f7d..7cc87fca 100644 --- a/packages/shaders-react/src/components/shader-poster/poster-context.ts +++ b/packages/shaders-react/src/components/shader-poster/poster-context.ts @@ -21,9 +21,9 @@ export interface PosterContextValue { // package, `PosterContextValue`'s shape is a forever-contract for the // lifetime of this key: any future change to it must stay backward-compatible // with older copies reading/writing the same global slot, or the key itself -// must be bumped (e.g. to `@mattermix/shaders-react:poster-context/v2`) so +// must be bumped (e.g. to `@camp-dev/shaders-react:poster-context/v2`) so // incompatible shapes don't collide. -const POSTER_CONTEXT_KEY = Symbol.for('@mattermix/shaders-react:poster-context'); +const POSTER_CONTEXT_KEY = Symbol.for('@camp-dev/shaders-react:poster-context'); const globalRegistry = globalThis as Record; diff --git a/packages/shaders-react/src/components/shader-scene/shader-scene.test.tsx b/packages/shaders-react/src/components/shader-scene/shader-scene.test.tsx index bbbdc040..8627f049 100644 --- a/packages/shaders-react/src/components/shader-scene/shader-scene.test.tsx +++ b/packages/shaders-react/src/components/shader-scene/shader-scene.test.tsx @@ -1,5 +1,5 @@ -import type * as ShadersModule from '@mattermix/shaders'; -import { createRenderer } from '@mattermix/shaders'; +import type * as ShadersModule from '@camp-dev/shaders'; +import { createRenderer } from '@camp-dev/shaders'; import { render, waitFor } from '@testing-library/react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; @@ -7,7 +7,7 @@ import { ShadersError } from '../../errors/shaders-error.js'; import { PosterContext } from '../shader-poster/poster-context.js'; import { ShaderScene } from './shader-scene.js'; -vi.mock('@mattermix/shaders', async (importOriginal) => { +vi.mock('@camp-dev/shaders', async (importOriginal) => { const actual = await importOriginal(); return { diff --git a/packages/shaders-react/src/components/shader-scene/shader-scene.tsx b/packages/shaders-react/src/components/shader-scene/shader-scene.tsx index 147b5921..bd3cbc4b 100644 --- a/packages/shaders-react/src/components/shader-scene/shader-scene.tsx +++ b/packages/shaders-react/src/components/shader-scene/shader-scene.tsx @@ -16,7 +16,7 @@ import { dither, FrameScheduler, resetRendererClock, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import { OrthographicCamera, Scene } from 'three'; import type { ShaderNodeObject } from 'three/tsl'; import { pass, passTexture, renderOutput, uv, vec4 } from 'three/tsl'; diff --git a/packages/shaders-react/src/context/shader-context.ts b/packages/shaders-react/src/context/shader-context.ts index 405e6569..7325cf60 100644 --- a/packages/shaders-react/src/context/shader-context.ts +++ b/packages/shaders-react/src/context/shader-context.ts @@ -1,6 +1,6 @@ import { createContext } from 'react'; -import type { FrameScheduler, GpuRenderer } from '@mattermix/shaders'; +import type { FrameScheduler, GpuRenderer } from '@camp-dev/shaders'; import type { Camera, Scene } from 'three'; import type { ShaderNodeObject } from 'three/tsl'; import type { Node } from 'three/webgpu'; diff --git a/packages/shaders-react/src/errors/shaders-error.ts b/packages/shaders-react/src/errors/shaders-error.ts index c70e8abc..18affee9 100644 --- a/packages/shaders-react/src/errors/shaders-error.ts +++ b/packages/shaders-react/src/errors/shaders-error.ts @@ -5,7 +5,7 @@ export type ShadersErrorCode = 'renderer-init'; /** - * A typed error surfaced by @mattermix/shaders-react. The original thrown value is + * A typed error surfaced by @camp-dev/shaders-react. The original thrown value is * always available on `cause`. */ export class ShadersError extends Error { diff --git a/packages/shaders-react/src/gamut.test.ts b/packages/shaders-react/src/gamut.test.ts index a85bf6dc..cd766ec0 100644 --- a/packages/shaders-react/src/gamut.test.ts +++ b/packages/shaders-react/src/gamut.test.ts @@ -10,7 +10,7 @@ import { describe, expect, it } from 'vitest'; import { useDisplayGamut } from './gamut.js'; -describe('@mattermix/shaders-react/gamut', () => { +describe('@camp-dev/shaders-react/gamut', () => { it('imports with no DOM globals present', () => { // Guards the guard. If the environment docblock above is ever removed, the // package's happy-dom default would supply `self` and this file would go on diff --git a/packages/shaders-react/src/gamut.ts b/packages/shaders-react/src/gamut.ts index bed35895..193679ca 100644 --- a/packages/shaders-react/src/gamut.ts +++ b/packages/shaders-react/src/gamut.ts @@ -1,4 +1,4 @@ -// @mattermix/shaders-react/gamut — display-gamut detection, SSR-safe. +// @camp-dev/shaders-react/gamut — display-gamut detection, SSR-safe. // // Deliberately shipped as its own entry point, for the same reason as // ./poster: the main barrel re-exports ShaderScene, which imports diff --git a/packages/shaders-react/src/hooks/use-animatable-point/use-animatable-point.test.tsx b/packages/shaders-react/src/hooks/use-animatable-point/use-animatable-point.test.tsx index ea829b35..884dcce7 100644 --- a/packages/shaders-react/src/hooks/use-animatable-point/use-animatable-point.test.tsx +++ b/packages/shaders-react/src/hooks/use-animatable-point/use-animatable-point.test.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import { FrameScheduler } from '@mattermix/shaders'; +import { FrameScheduler } from '@camp-dev/shaders'; import { renderHook } from '@testing-library/react'; import type { Vector2 } from 'three/webgpu'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.test.tsx b/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.test.tsx index 78d64b4d..ce12d6f4 100644 --- a/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.test.tsx +++ b/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.test.tsx @@ -1,7 +1,7 @@ import { type ReactNode, StrictMode } from 'react'; -import { getReducedMotionTimeScale } from '@mattermix/shaders'; -import type { SchedulerClient, SchedulerTick } from '@mattermix/shaders'; +import { getReducedMotionTimeScale } from '@camp-dev/shaders'; +import type { SchedulerClient, SchedulerTick } from '@camp-dev/shaders'; import { renderHook } from '@testing-library/react'; import { beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.ts b/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.ts index 606f6469..dea459f4 100644 --- a/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.ts +++ b/packages/shaders-react/src/hooks/use-animatable-speed/use-animatable-speed.ts @@ -9,8 +9,8 @@ // smoothly from wherever it is (MAT-66). import { useEffect, useMemo, useRef } from 'react'; -import { getReducedMotionTimeScale } from '@mattermix/shaders'; -import type { SchedulerTick } from '@mattermix/shaders'; +import { getReducedMotionTimeScale } from '@camp-dev/shaders'; +import type { SchedulerTick } from '@camp-dev/shaders'; import { uniform } from 'three/tsl'; import { type AnimatableProp, isSignal } from '../animatable-signal/animatable-signal.js'; diff --git a/packages/shaders-react/src/hooks/use-animatable-uniform/use-animatable-uniform.test.tsx b/packages/shaders-react/src/hooks/use-animatable-uniform/use-animatable-uniform.test.tsx index 47f8d76b..b1289dea 100644 --- a/packages/shaders-react/src/hooks/use-animatable-uniform/use-animatable-uniform.test.tsx +++ b/packages/shaders-react/src/hooks/use-animatable-uniform/use-animatable-uniform.test.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import { FrameScheduler } from '@mattermix/shaders'; +import { FrameScheduler } from '@camp-dev/shaders'; import { renderHook } from '@testing-library/react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/packages/shaders-react/src/hooks/use-cursor/use-cursor.ts b/packages/shaders-react/src/hooks/use-cursor/use-cursor.ts index 4b159b99..f97e6f54 100644 --- a/packages/shaders-react/src/hooks/use-cursor/use-cursor.ts +++ b/packages/shaders-react/src/hooks/use-cursor/use-cursor.ts @@ -10,7 +10,7 @@ // instance — collapsed into one effect, each cycle cleans up after itself. import { useEffect, useState } from 'react'; -import { CursorInput, type CursorInputOptions, type Vector2 } from '@mattermix/shaders'; +import { CursorInput, type CursorInputOptions, type Vector2 } from '@camp-dev/shaders'; import { useShaderContext } from '../use-shader-context/use-shader-context.js'; diff --git a/packages/shaders-react/src/hooks/use-display-gamut/use-display-gamut.ts b/packages/shaders-react/src/hooks/use-display-gamut/use-display-gamut.ts index 1adc6d24..a5bd7f13 100644 --- a/packages/shaders-react/src/hooks/use-display-gamut/use-display-gamut.ts +++ b/packages/shaders-react/src/hooks/use-display-gamut/use-display-gamut.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -import type { OutputGamut } from '@mattermix/shaders'; +import type { OutputGamut } from '@camp-dev/shaders'; /** What the consumer asks for: a fixed gamut, or 'auto' to detect the display. */ export type GamutPreference = 'auto' | OutputGamut; diff --git a/packages/shaders-react/src/hooks/use-static-hint/use-static-hint.test.tsx b/packages/shaders-react/src/hooks/use-static-hint/use-static-hint.test.tsx index 0aca7074..106867be 100644 --- a/packages/shaders-react/src/hooks/use-static-hint/use-static-hint.test.tsx +++ b/packages/shaders-react/src/hooks/use-static-hint/use-static-hint.test.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import { FrameScheduler } from '@mattermix/shaders'; +import { FrameScheduler } from '@camp-dev/shaders'; import { renderHook } from '@testing-library/react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/packages/shaders-react/src/index.ts b/packages/shaders-react/src/index.ts index 22ed0c35..4baa4983 100644 --- a/packages/shaders-react/src/index.ts +++ b/packages/shaders-react/src/index.ts @@ -1,4 +1,4 @@ -// @mattermix/shaders-react — React binding for Shaders. +// @camp-dev/shaders-react — React binding for Shaders. export * from './components/index.js'; export * from './hooks/index.js'; diff --git a/packages/shaders-react/src/poster.test.ts b/packages/shaders-react/src/poster.test.ts index 6678e8d8..61a16669 100644 --- a/packages/shaders-react/src/poster.test.ts +++ b/packages/shaders-react/src/poster.test.ts @@ -9,7 +9,7 @@ import { describe, expect, it } from 'vitest'; import { ShaderPoster } from './poster.js'; -describe('@mattermix/shaders-react/poster', () => { +describe('@camp-dev/shaders-react/poster', () => { it('imports with no DOM globals present', () => { expect(typeof self).toBe('undefined'); }); diff --git a/packages/shaders-react/src/poster.ts b/packages/shaders-react/src/poster.ts index 72dd14fb..17336184 100644 --- a/packages/shaders-react/src/poster.ts +++ b/packages/shaders-react/src/poster.ts @@ -1,4 +1,4 @@ -// @mattermix/shaders-react/poster — SSR-safe poster boundary. +// @camp-dev/shaders-react/poster — SSR-safe poster boundary. // // Deliberately shipped as its own entry point: the main barrel imports // three/webgpu, which references `self` at module load and crashes SSR. This diff --git a/packages/shaders-react/tsup.config.ts b/packages/shaders-react/tsup.config.ts index f084b401..15fb7f49 100644 --- a/packages/shaders-react/tsup.config.ts +++ b/packages/shaders-react/tsup.config.ts @@ -6,6 +6,6 @@ export default defineConfig({ dts: true, sourcemap: true, clean: true, - external: ['react', 'three', '@mattermix/shaders'], + external: ['react', 'three', '@camp-dev/shaders'], banner: { js: "'use client';" }, }); diff --git a/packages/shaders-react/vitest.config.ts b/packages/shaders-react/vitest.config.ts index 069d85b6..a5f0e7f9 100644 --- a/packages/shaders-react/vitest.config.ts +++ b/packages/shaders-react/vitest.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ // @ts-expect-error -- oxc is not in UserConfig types yet; this is the documented workaround oxc: { tsconfig: { compilerOptions: { verbatimModuleSyntax: true } } }, test: { - name: '@mattermix/shaders-react', + name: '@camp-dev/shaders-react', environment: 'happy-dom', globals: false, include: ['src/**/*.test.ts', 'src/**/*.test.tsx'], diff --git a/packages/shaders/CHANGELOG.md b/packages/shaders/CHANGELOG.md index f224ce77..97b073ee 100644 --- a/packages/shaders/CHANGELOG.md +++ b/packages/shaders/CHANGELOG.md @@ -1,6 +1,6 @@ -# @mattermix/shaders +# @camp-dev/shaders -> Versions 0.18.0 and below shipped as `@lovo/matter` before the project moved to the mattermix org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. +> Versions 0.18.0 and below shipped as `@lovo/matter` before the project moved to the camp-dev org. Releases 1.0.0 through 3.9.0 from that history are renumbered here as 0.7.0 through 0.18.0. ## 0.18.0 @@ -46,7 +46,7 @@ ### Minor Changes -- dd8f99b: Add `@mattermix/shaders/color`, a second entry point for the CPU-side color math: `parseColorString`, the OKLab and OKLCH conversions, the gamut helpers, and the sRGB transfer functions. The root entry still exports all of them, so nothing has to move. The difference is that the subpath has no path to three, so a server render can import it. The root entry cannot, because it reaches the renderer and `three/webgpu` reads `self` at module load. +- dd8f99b: Add `@camp-dev/shaders/color`, a second entry point for the CPU-side color math: `parseColorString`, the OKLab and OKLCH conversions, the gamut helpers, and the sRGB transfer functions. The root entry still exports all of them, so nothing has to move. The difference is that the subpath has no path to three, so a server render can import it. The root entry cannot, because it reaches the renderer and `three/webgpu` reads `self` at module load. `parseColorString` now throws on input it used to mangle. Components that aren't numbers ran through `parseFloat` to NaN and came back as `[NaN, NaN, NaN]`, which reached the GPU as a blank shader with a clean console. Hex is checked for format now too. It takes `#rrggbb` and `#rrggbbaa`, parsing and dropping alpha the same way `oklch()` and `oklab()` already do, and throws on anything else. `#abcdefgh` used to slice its first six digits and return a confidently wrong color. @@ -77,11 +77,11 @@ ```ts // Before - import { filmGrain } from '@mattermix/shaders'; + import { filmGrain } from '@camp-dev/shaders'; const g = filmGrain(0.08); // After - import { grain } from '@mattermix/shaders'; + import { grain } from '@camp-dev/shaders'; const g = grain(0.08); ``` @@ -126,7 +126,7 @@ - 1c69220: Rename public API symbols to domain-accurate names. - New primary names: `FrameScheduler`, `GpuRenderer`, `GpuBackend` (`@mattermix/shaders`); `ShaderScene`, `ShaderSceneProps`, `ShaderContext`, `ShaderContextValue`, `useShaderContext`, `ShaderMonitor`, `ShaderMonitorProps`, `AnimatableSignal` (`@mattermix/shaders-react`). + New primary names: `FrameScheduler`, `GpuRenderer`, `GpuBackend` (`@camp-dev/shaders`); `ShaderScene`, `ShaderSceneProps`, `ShaderContext`, `ShaderContextValue`, `useShaderContext`, `ShaderMonitor`, `ShaderMonitorProps`, `AnimatableSignal` (`@camp-dev/shaders-react`). The old names `MatterScheduler`, `MatterRenderer`, `MatterBackend`, `MatterScene`, `MatterSceneProps`, `MatterContext`, `MatterContextValue`, `useMatterContext`, `MatterMonitor`, `MatterMonitorProps`, and `MatterSignal` carry `@deprecated` JSDoc and continue to work. They will be removed no earlier than 0.5.0. @@ -139,7 +139,7 @@ - 3856367: Add the `grain` primitive, a hash-based, centered film grain for shader compositions. ```ts - import { grain, time } from "@mattermix/shaders"; + import { grain, time } from "@camp-dev/shaders"; import { uv } from "three/tsl"; // Static grain: @@ -162,24 +162,24 @@ ### Minor Changes -- Drop pure TSL re-exports from the `@mattermix/shaders` public API. +- Drop pure TSL re-exports from the `@camp-dev/shaders` public API. - The following 15 nodes are no longer exported by `@mattermix/shaders`. Import them directly from `three/tsl`: + The following 15 nodes are no longer exported by `@camp-dev/shaders`. Import them directly from `three/tsl`: `uv`, `vec2`, `vec3`, `vec4`, `uniform`, `mix`, `smoothstep`, `mod`, `sin`, `cos`, `length`, `dot`, `normalize`, `max`, `min` ```ts // Before (0.1.x) - import { vec3, uv, time } from "@mattermix/shaders"; + import { vec3, uv, time } from "@camp-dev/shaders"; // After (0.2.0) import { vec3, uv } from "three/tsl"; - import { time } from "@mattermix/shaders"; // still here, reduced-motion-gated + import { time } from "@camp-dev/shaders"; // still here, reduced-motion-gated ``` - `time` stays exported from `@mattermix/shaders` unchanged, because this package owns its reduced-motion gating. For raw uncapped time, import from `three/tsl` directly. + `time` stays exported from `@camp-dev/shaders` unchanged, because this package owns its reduced-motion gating. For raw uncapped time, import from `three/tsl` directly. - The primitives this package owns (`fbm`, `noise`, `voronoi`, `colorRamp`, `sdfCircle`, `displace`, `cursorRipple`, `quantize`) also stay exported unchanged. Registry component sources at 0.2.0 use the new convention. If you copied a component at 0.1.x, update its imports from `@mattermix/shaders` to `three/tsl` for the dropped symbols, or re-add the component through the CLI to pull the 0.2.0 source. + The primitives this package owns (`fbm`, `noise`, `voronoi`, `colorRamp`, `sdfCircle`, `displace`, `cursorRipple`, `quantize`) also stay exported unchanged. Registry component sources at 0.2.0 use the new convention. If you copied a component at 0.1.x, update its imports from `@camp-dev/shaders` to `three/tsl` for the dropped symbols, or re-add the component through the CLI to pull the 0.2.0 source. **Why:** re-exporting pure TSL primitives bought nothing beyond shared import paths. Dropping them clarifies the layer boundary. This library ships value-add primitives, and TSL provides the math. @@ -189,9 +189,9 @@ - Initial public release. React shader components on WebGPU and Three.js TSL. - - `@mattermix/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. - - `@mattermix/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. - - `@mattermix/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. + - `@camp-dev/shaders` is the framework-agnostic engine: TSL primitives such as `fbm`, `voronoi`, `colorRamp`, and `quantize`, a WebGPU renderer wrapper, and a scheduler that watches visibility and intersection. + - `@camp-dev/shaders-react` is the React binding: `` for the shared canvas, `useShaderMaterial` for r3f, and the `useCursor` and `useScroll` input hooks. + - `@camp-dev/shaders-cli` is the shadcn-style copy-paste CLI, with `init`, `list`, `add`, and `update`. The default registry tracks the CLI's published version tag (`v0.1.0`), so component code is stable per release. Six components ship through `shaders-cli add `: `linear-gradient`, `mesh-gradient`, `aurora`, `dot-field`, `noise-field`, and `waves`. Each component is yours to edit after copy-in. diff --git a/packages/shaders/LICENSE b/packages/shaders/LICENSE index ef1a0273..ba46e314 100644 --- a/packages/shaders/LICENSE +++ b/packages/shaders/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Hunter Garrett / Mattermix +Copyright (c) 2026 Hunter Garrett / camp.dev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/shaders/README.md b/packages/shaders/README.md index 600b7090..756aaa3f 100644 --- a/packages/shaders/README.md +++ b/packages/shaders/README.md @@ -1,14 +1,14 @@ -# @mattermix/shaders +# @camp-dev/shaders Framework-agnostic engine for **Shaders** — React shader components on WebGPU + Three.js TSL. -This package contains the TSL primitives, the renderer, and the scheduler. It has no React dependency. If you're using React, install [`@mattermix/shaders-react`](https://www.npmjs.com/package/@mattermix/shaders-react) alongside this package — it adds React-friendly wrappers (a shared ``, input hooks, and `@react-three/fiber` integration) on top of this engine. +This package contains the TSL primitives, the renderer, and the scheduler. It has no React dependency. If you're using React, install [`@camp-dev/shaders-react`](https://www.npmjs.com/package/@camp-dev/shaders-react) alongside this package — it adds React-friendly wrappers (a shared ``, input hooks, and `@react-three/fiber` integration) on top of this engine. ## Install ```bash -npm install @mattermix/shaders three -# or: pnpm add @mattermix/shaders three +npm install @camp-dev/shaders three +# or: pnpm add @camp-dev/shaders three ``` `three` is a peer dependency. Shaders targets `three@^0.170.0` and uses the WebGPU TSL API exclusively. @@ -22,7 +22,7 @@ npm install @mattermix/shaders three ## Minimal usage ```typescript -import { fractalNoise, colorRamp } from '@mattermix/shaders' +import { fractalNoise, colorRamp } from '@camp-dev/shaders' import { uv, vec3, time } from 'three/tsl' // Inside your TSL fragment graph: @@ -33,11 +33,11 @@ const color = colorRamp(noise, [ ]) ``` -For polished drop-in components like `` and ``, install [`@mattermix/shaders-cli`](https://www.npmjs.com/package/@mattermix/shaders-cli) and copy them into your project. +For polished drop-in components like `` and ``, install [`@camp-dev/shaders-cli`](https://www.npmjs.com/package/@camp-dev/shaders-cli) and copy them into your project. ## Docs -Full docs and live demos: +Full docs and live demos: ## License diff --git a/packages/shaders/package.json b/packages/shaders/package.json index 2d779e6f..529a9f2e 100644 --- a/packages/shaders/package.json +++ b/packages/shaders/package.json @@ -1,5 +1,5 @@ { - "name": "@mattermix/shaders", + "name": "@camp-dev/shaders", "version": "0.18.0", "description": "Engine for Shaders — TSL primitives, renderer, scheduler. Framework-agnostic.", "keywords": [ @@ -13,15 +13,15 @@ "tsl", "webgpu" ], - "homepage": "https://github.com/mattermix/shaders#readme", + "homepage": "https://github.com/campdotdev/shaders#readme", "bugs": { - "url": "https://github.com/mattermix/shaders/issues" + "url": "https://github.com/campdotdev/shaders/issues" }, "license": "MIT", - "author": "mattermix", + "author": "camp-dev", "repository": { "type": "git", - "url": "git+https://github.com/mattermix/shaders.git", + "url": "git+https://github.com/campdotdev/shaders.git", "directory": "packages/shaders" }, "files": [ diff --git a/packages/shaders/src/color.test.ts b/packages/shaders/src/color.test.ts index d2441d88..7ad4fd08 100644 --- a/packages/shaders/src/color.test.ts +++ b/packages/shaders/src/color.test.ts @@ -10,7 +10,7 @@ import { describe, expect, it } from 'vitest'; import { linearSrgbToOklch, parseColorString, srgbChannelToLinear } from './color.js'; -describe('@mattermix/shaders/color', () => { +describe('@camp-dev/shaders/color', () => { it('runs with no DOM globals present', () => { // Guards the guard. If the environment docblock above is ever removed or // changed, this fails loudly rather than the file quietly becoming diff --git a/packages/shaders/src/color.ts b/packages/shaders/src/color.ts index 2ce408d6..25bc87be 100644 --- a/packages/shaders/src/color.ts +++ b/packages/shaders/src/color.ts @@ -1,4 +1,4 @@ -// @mattermix/shaders/color — the CPU-only half of the color system, published as its +// @camp-dev/shaders/color — the CPU-only half of the color system, published as its // own entry point. Everything here is plain scalar arithmetic with no path to // three, which makes this module safe to import during a server render; the // root entry is not, because its barrel reaches the renderer and three/webgpu diff --git a/packages/shaders/src/index.ts b/packages/shaders/src/index.ts index 3dad58d8..abeb9320 100644 --- a/packages/shaders/src/index.ts +++ b/packages/shaders/src/index.ts @@ -1,4 +1,4 @@ -// @mattermix/shaders — engine package public API. +// @camp-dev/shaders — engine package public API. export { createRenderer } from './runtime/create-renderer/create-renderer.js'; export type { diff --git a/packages/shaders/src/primitives/color-ramp/color-ramp.ts b/packages/shaders/src/primitives/color-ramp/color-ramp.ts index 6613f055..3f9ba7e3 100644 --- a/packages/shaders/src/primitives/color-ramp/color-ramp.ts +++ b/packages/shaders/src/primitives/color-ramp/color-ramp.ts @@ -7,7 +7,7 @@ import { colorSpaces } from '../color-space/registry.js'; import type { ColorSpace, HueInterpolation } from '../color-space/types.js'; /** - * Canonical TSL-node *input* shape used throughout `@mattermix/shaders`. + * Canonical TSL-node *input* shape used throughout `@camp-dev/shaders`. * * Stays as the broad `Node | ShaderNodeObject` union so callers can * pass uniform-typed nodes (e.g. `ShaderNodeObject>`) diff --git a/packages/shaders/src/primitives/color-space/cpu-transfer.ts b/packages/shaders/src/primitives/color-space/cpu-transfer.ts index 374a0d90..4aba787a 100644 --- a/packages/shaders/src/primitives/color-space/cpu-transfer.ts +++ b/packages/shaders/src/primitives/color-space/cpu-transfer.ts @@ -2,7 +2,7 @@ // linearly: sRGB channels are gamma-encoded so more precision goes to dark // tones, where eyes are most sensitive. Color MATH only works right on linear // values (where 0.5 really is half the light of 1.0), so these convert each way. -// This file imports nothing on purpose — it is the reason `@mattermix/shaders/color` +// This file imports nothing on purpose — it is the reason `@camp-dev/shaders/color` // can be imported during a server render. The TSL node versions of the same two // curves live next door in transfer.ts, behind a three import. diff --git a/packages/shaders/src/primitives/noise/noise.ts b/packages/shaders/src/primitives/noise/noise.ts index 8f27b822..a2312383 100644 --- a/packages/shaders/src/primitives/noise/noise.ts +++ b/packages/shaders/src/primitives/noise/noise.ts @@ -14,7 +14,7 @@ import type { TSLNode } from '../color-ramp/color-ramp.js'; * place — see the simplex-noise registry component). * * Built on top of three's `mx_noise_float`; we wrap it so consumers have a - * stable import path through `@mattermix/shaders` and we can swap the + * stable import path through `@camp-dev/shaders` and we can swap the * implementation if a different noise primitive proves better in practice. * * Returns `ShaderNodeObject` (chainable) rather than the broader diff --git a/packages/shaders/src/primitives/time/time.ts b/packages/shaders/src/primitives/time/time.ts index 27879b8f..46133810 100644 --- a/packages/shaders/src/primitives/time/time.ts +++ b/packages/shaders/src/primitives/time/time.ts @@ -1,5 +1,5 @@ // Engine-gated `time` — equals the TSL built-in `time` multiplied by the -// reduced-motion scale uniform. Components consuming `time` from `@mattermix/shaders` +// reduced-motion scale uniform. Components consuming `time` from `@camp-dev/shaders` // automatically respect `prefers-reduced-motion` and the policy override set // via `setReducedMotionPolicy`. // diff --git a/packages/shaders/vitest.config.ts b/packages/shaders/vitest.config.ts index 900677f3..8e8c709f 100644 --- a/packages/shaders/vitest.config.ts +++ b/packages/shaders/vitest.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ // @ts-expect-error -- oxc is not in UserConfig types yet; this is the documented workaround oxc: { tsconfig: { compilerOptions: { verbatimModuleSyntax: true } } }, test: { - name: '@mattermix/shaders', + name: '@camp-dev/shaders', environment: 'happy-dom', include: ['src/**/*.test.ts'], passWithNoTests: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20da163c..e41e0418 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -101,10 +101,10 @@ importers: '@base-ui/react': specifier: ^1.6.0 version: 1.6.0(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@mattermix/shaders': + '@camp-dev/shaders': specifier: workspace:* version: link:../../packages/shaders - '@mattermix/shaders-react': + '@camp-dev/shaders-react': specifier: workspace:* version: link:../../packages/shaders-react '@shaders/registry': @@ -225,10 +225,10 @@ importers: '@base-ui/react': specifier: ^1.6.0 version: 1.6.0(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@mattermix/shaders': + '@camp-dev/shaders': specifier: workspace:* version: link:../../packages/shaders - '@mattermix/shaders-react': + '@camp-dev/shaders-react': specifier: workspace:* version: link:../../packages/shaders-react '@xyflow/react': @@ -308,10 +308,10 @@ importers: specifier: ^0.27.0 version: 0.27.7 devDependencies: - '@mattermix/shaders': + '@camp-dev/shaders': specifier: workspace:* version: link:../shaders - '@mattermix/shaders-react': + '@camp-dev/shaders-react': specifier: workspace:* version: link:../shaders-react '@shaders/registry': @@ -353,7 +353,7 @@ importers: packages/shaders-react: devDependencies: - '@mattermix/shaders': + '@camp-dev/shaders': specifier: workspace:* version: link:../shaders '@shaders/tsconfig': @@ -401,10 +401,10 @@ importers: registry: dependencies: - '@mattermix/shaders': + '@camp-dev/shaders': specifier: workspace:* version: link:../packages/shaders - '@mattermix/shaders-react': + '@camp-dev/shaders-react': specifier: workspace:* version: link:../packages/shaders-react react: diff --git a/registry/aurora/aurora.tsx b/registry/aurora/aurora.tsx index 78640e29..6c538ac0 100644 --- a/registry/aurora/aurora.tsx +++ b/registry/aurora/aurora.tsx @@ -5,8 +5,8 @@ // glowing curtain ribbons by marching a virtual view ray through a noise // field. The aurora emits light over a transparent background — stack it // above a dark layer inside a . -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { AuroraShader } from './shader'; diff --git a/registry/aurora/shader.tsx b/registry/aurora/shader.tsx index 4bfaaf46..867a05fe 100644 --- a/registry/aurora/shader.tsx +++ b/registry/aurora/shader.tsx @@ -2,19 +2,14 @@ import { useEffect, useMemo } from 'react'; -import { - colorRamp, - type ColorSpace, - type HueInterpolation, - type TSLNode, -} from '@mattermix/shaders'; +import { colorRamp, type ColorSpace, type HueInterpolation, type TSLNode } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, useResize, useShaderContext, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { cos, dot, diff --git a/registry/blobs/blobs.tsx b/registry/blobs/blobs.tsx index cd7ff51d..9f4c73ee 100644 --- a/registry/blobs/blobs.tsx +++ b/registry/blobs/blobs.tsx @@ -5,8 +5,8 @@ // metaball field over roaming blob centers and thresholds it into merging, // splitting shapes. Render it inside a , typically stacked // over a background layer — the space between blobs is transparent. -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { BlobsShader } from './shader'; diff --git a/registry/blobs/shader.tsx b/registry/blobs/shader.tsx index a2aaabe7..fe5564b6 100644 --- a/registry/blobs/shader.tsx +++ b/registry/blobs/shader.tsx @@ -8,7 +8,7 @@ // supplies the props. import { useEffect, useMemo } from 'react'; -import { colorRamp, type ColorSpace, type HueInterpolation, metaballs } from '@mattermix/shaders'; +import { colorRamp, type ColorSpace, type HueInterpolation, metaballs } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, @@ -17,7 +17,7 @@ import { useResize, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { add, clamp, fwidth, smoothstep, sub, uniform, uv, vec2, vec4 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/registry/conic-gradient/conic-gradient.tsx b/registry/conic-gradient/conic-gradient.tsx index 5cd5c7f0..390f4a09 100644 --- a/registry/conic-gradient/conic-gradient.tsx +++ b/registry/conic-gradient/conic-gradient.tsx @@ -4,8 +4,8 @@ // and their default values, then hands everything to ConicGradientShader // (./shader.tsx), which does the actual GPU work. Render it inside a // — the component draws nothing on its own. -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { ConicGradientShader } from './shader'; diff --git a/registry/conic-gradient/shader.tsx b/registry/conic-gradient/shader.tsx index f15934b7..fc40d0b1 100644 --- a/registry/conic-gradient/shader.tsx +++ b/registry/conic-gradient/shader.tsx @@ -8,7 +8,7 @@ // fraction of a full turn? That fraction picks a color from the ramp. import { useEffect, useMemo } from 'react'; -import { colorRamp, type ColorSpace, type HueInterpolation } from '@mattermix/shaders'; +import { colorRamp, type ColorSpace, type HueInterpolation } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, @@ -17,7 +17,7 @@ import { useResize, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { atan2, fract, uniform, uv, vec2 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/registry/dither/dither.tsx b/registry/dither/dither.tsx index f71f7544..cf362a66 100644 --- a/registry/dither/dither.tsx +++ b/registry/dither/dither.tsx @@ -4,7 +4,7 @@ // defaults, then delegates to DitherShader (./shader.tsx). Dither is a // post-process layer — stack it after other components inside a // and it pixelates and posterizes everything beneath it. -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { type DitherPattern, DitherShader } from './shader'; diff --git a/registry/dither/shader.tsx b/registry/dither/shader.tsx index 9fa39942..0f664de7 100644 --- a/registry/dither/shader.tsx +++ b/registry/dither/shader.tsx @@ -7,7 +7,7 @@ // the level math. import { useEffect, useMemo } from 'react'; -import { type DitherPattern, ditherThreshold, quantize } from '@mattermix/shaders'; +import { type DitherPattern, ditherThreshold, quantize } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableUniform, @@ -15,10 +15,10 @@ import { usePostProcessPass, useResize, useShaderContext, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { floor, mix, screenCoordinate, screenSize, step, uniform, vec3, vec4 } from 'three/tsl'; -export type { DitherPattern } from '@mattermix/shaders'; +export type { DitherPattern } from '@camp-dev/shaders'; export interface DitherShaderProps { /** diff --git a/registry/dot-field/dot-field.tsx b/registry/dot-field/dot-field.tsx index 2aba8c56..736ba8fc 100644 --- a/registry/dot-field/dot-field.tsx +++ b/registry/dot-field/dot-field.tsx @@ -5,7 +5,7 @@ // pixel-spaced grid of dots and ripples them outward from a center point. // Render it inside a ; the gaps between dots are transparent, // so it can sit over other layers. -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { DotFieldShader } from './shader'; diff --git a/registry/dot-field/shader.tsx b/registry/dot-field/shader.tsx index 3874124c..d28577b9 100644 --- a/registry/dot-field/shader.tsx +++ b/registry/dot-field/shader.tsx @@ -8,7 +8,7 @@ // the canvas resolution to convert between pixels and cell units. import { useEffect, useMemo } from 'react'; -import { displace, signedDistanceFieldCircle, type TSLNode } from '@mattermix/shaders'; +import { displace, signedDistanceFieldCircle, type TSLNode } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, @@ -16,7 +16,7 @@ import { useAnimatableUniform, useResize, useShaderContext, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { exp, length, round, sin, smoothstep, uniform, uv, vec2, vec3, vec4 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry, Vector2 } from 'three/webgpu'; diff --git a/registry/fractal-noise/fractal-noise.tsx b/registry/fractal-noise/fractal-noise.tsx index 91869ee2..ff29c60d 100644 --- a/registry/fractal-noise/fractal-noise.tsx +++ b/registry/fractal-noise/fractal-noise.tsx @@ -4,8 +4,8 @@ // their defaults, then delegates to FractalNoiseShader (./shader.tsx), which // sums several octaves of noise per pixel and maps the result onto a color // ramp. Render it inside a . -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { FractalNoiseShader, type FractalNoiseStyle } from './shader'; diff --git a/registry/fractal-noise/shader.tsx b/registry/fractal-noise/shader.tsx index d745dc26..dc642b57 100644 --- a/registry/fractal-noise/shader.tsx +++ b/registry/fractal-noise/shader.tsx @@ -16,14 +16,14 @@ import { fractalNoise, type HueInterpolation, quantize, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { clamp, float, mix, uniform, uv, vec3 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry, Vector2 } from 'three/webgpu'; diff --git a/registry/god-rays/god-rays.tsx b/registry/god-rays/god-rays.tsx index 640c23a7..516e5c85 100644 --- a/registry/god-rays/god-rays.tsx +++ b/registry/god-rays/god-rays.tsx @@ -6,7 +6,7 @@ // noise fields — one decorrelated layer of rays per entry in `colors`. The // rays emit light over a transparent background — stack them above a dark // layer inside a . -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { GodRaysShader } from './shader'; diff --git a/registry/god-rays/shader.tsx b/registry/god-rays/shader.tsx index 459f74b2..59f476a5 100644 --- a/registry/god-rays/shader.tsx +++ b/registry/god-rays/shader.tsx @@ -21,7 +21,7 @@ import { useResize, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { abs, atan2, diff --git a/registry/grain/grain.tsx b/registry/grain/grain.tsx index 58534231..ba427658 100644 --- a/registry/grain/grain.tsx +++ b/registry/grain/grain.tsx @@ -4,7 +4,7 @@ // defaults, then delegates to GrainShader (./shader.tsx). Grain is a // post-process layer — stack it after other components inside a // and it textures whatever rendered beneath it. -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { type GrainBlend, GrainShader } from './shader'; diff --git a/registry/grain/shader.tsx b/registry/grain/shader.tsx index 6e54adb3..d0968f47 100644 --- a/registry/grain/shader.tsx +++ b/registry/grain/shader.tsx @@ -4,14 +4,14 @@ // the engine's grain() primitive (a screen-position hash); this file decides // the two things layered on top of it: how often the pattern re-rolls // (speed) and how the noise combines with the image underneath (blend). -import { grain } from '@mattermix/shaders'; +import { grain } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, usePostProcessPass, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { floor, vec4 } from 'three/tsl'; export type GrainBlend = 'additive' | 'subtractive'; diff --git a/registry/linear-gradient/linear-gradient.tsx b/registry/linear-gradient/linear-gradient.tsx index cf2f73b7..63a52582 100644 --- a/registry/linear-gradient/linear-gradient.tsx +++ b/registry/linear-gradient/linear-gradient.tsx @@ -4,8 +4,8 @@ // and their default values, then hands everything to LinearGradientShader // (./shader.tsx), which does the actual GPU work. Render it inside a // — the component draws nothing on its own. -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { LinearGradientShader } from './shader'; diff --git a/registry/linear-gradient/shader.tsx b/registry/linear-gradient/shader.tsx index 57fba970..e4a35b5f 100644 --- a/registry/linear-gradient/shader.tsx +++ b/registry/linear-gradient/shader.tsx @@ -8,7 +8,7 @@ // color from the ramp. import { useEffect } from 'react'; -import { colorRamp, type ColorSpace, type HueInterpolation } from '@mattermix/shaders'; +import { colorRamp, type ColorSpace, type HueInterpolation } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, @@ -16,7 +16,7 @@ import { useAnimatableUniform, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { cos, fract, mix, sin, smoothstep, sub, uv, vec2 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/registry/mesh-gradient/mesh-gradient.tsx b/registry/mesh-gradient/mesh-gradient.tsx index 996599fa..1093ab85 100644 --- a/registry/mesh-gradient/mesh-gradient.tsx +++ b/registry/mesh-gradient/mesh-gradient.tsx @@ -5,8 +5,8 @@ // anchors four colors near the canvas corners, melts the boundaries with a // noise-driven warp, and cross-fades the whole thing between two palettes. // Render it inside a . -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { Palette } from '../utils/color'; import { MeshGradientShader } from './shader'; diff --git a/registry/mesh-gradient/shader.tsx b/registry/mesh-gradient/shader.tsx index 22b8f61b..bbbb959b 100644 --- a/registry/mesh-gradient/shader.tsx +++ b/registry/mesh-gradient/shader.tsx @@ -15,14 +15,14 @@ import { type HueInterpolation, mixColor, simplexNoise, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, useResize, useShaderContext, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { abs, cos, pow, sign, sin, smoothstep, uniform, uv, vec2, vec4 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry, Vector3 } from 'three/webgpu'; diff --git a/registry/package.json b/registry/package.json index 5eaa27bd..cbb8f37d 100644 --- a/registry/package.json +++ b/registry/package.json @@ -2,7 +2,7 @@ "name": "@shaders/registry", "version": "0.0.0", "private": true, - "description": "Source-of-truth Tier 1 components shipped via the @mattermix/shaders-cli copy-paste flow. Not published to npm.", + "description": "Source-of-truth Tier 1 components shipped via the @camp-dev/shaders-cli copy-paste flow. Not published to npm.", "type": "module", "exports": { "./linear-gradient": "./linear-gradient/linear-gradient.tsx", @@ -27,8 +27,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@mattermix/shaders": "workspace:*", - "@mattermix/shaders-react": "workspace:*", + "@camp-dev/shaders": "workspace:*", + "@camp-dev/shaders-react": "workspace:*", "react": "^19.0.0", "three": "^0.170.0" }, diff --git a/registry/radial-gradient/radial-gradient.tsx b/registry/radial-gradient/radial-gradient.tsx index f1aa1076..8c29598a 100644 --- a/registry/radial-gradient/radial-gradient.tsx +++ b/registry/radial-gradient/radial-gradient.tsx @@ -4,8 +4,8 @@ // and their default values, then hands everything to RadialGradientShader // (./shader.tsx), which does the actual GPU work. Render it inside a // — the component draws nothing on its own. -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { RadialGradientShader } from './shader'; diff --git a/registry/radial-gradient/shader.tsx b/registry/radial-gradient/shader.tsx index 9551a6b1..a85f8d23 100644 --- a/registry/radial-gradient/shader.tsx +++ b/registry/radial-gradient/shader.tsx @@ -8,7 +8,7 @@ // a color from the ramp. import { useEffect, useMemo } from 'react'; -import { colorRamp, type ColorSpace, type HueInterpolation } from '@mattermix/shaders'; +import { colorRamp, type ColorSpace, type HueInterpolation } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, @@ -17,7 +17,7 @@ import { useResize, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { clamp, cos, fract, length, mix, sin, step, uniform, uv, vec2 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry } from 'three/webgpu'; diff --git a/registry/registry.json b/registry/registry.json index 20a37594..fd63d813 100644 --- a/registry/registry.json +++ b/registry/registry.json @@ -6,7 +6,7 @@ "file": "linear-gradient/linear-gradient.tsx", "files": ["linear-gradient/shader.tsx", "utils/color.ts"], "description": "Animated linear gradient. The simplest, foundational Shaders component.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": ["colorRamp", "mix", "uv", "vec2", "vec3", "uniform"], "tier": 1 }, @@ -14,7 +14,7 @@ "file": "simplex-noise/simplex-noise.tsx", "files": ["simplex-noise/shader.tsx", "utils/color.ts"], "description": "Evolving 3D simplex noise with color ramp, contour bands, and brightness/contrast histogram shaping.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "colorRamp", "simplexNoise", @@ -31,7 +31,7 @@ "file": "dot-field/dot-field.tsx", "files": ["dot-field/shader.tsx", "utils/color.ts"], "description": "Tiled dot field with center-anchored ripple displacement \u2014 the architecturally-validating Shaders component.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "signedDistanceFieldCircle", "displace", @@ -51,7 +51,7 @@ "file": "grain/grain.tsx", "files": ["grain/shader.tsx"], "description": "Additive or subtractive film grain overlay. Stacks on top of any base component inside .", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": ["grain", "uv", "vec4", "uniform", "floor"], "tier": 1 }, @@ -59,7 +59,7 @@ "file": "wave-lines/wave-lines.tsx", "files": ["wave-lines/shader.tsx", "utils/color.ts"], "description": "Coherent wave-line bundle: translucent ribbon bodies wrapped in additive halo light. Lines share one wave and braid, breathe, and fray wide toward the canvas edges, with per-line flat or gradient color.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "sin", "uv", @@ -83,7 +83,7 @@ "file": "mesh-gradient/mesh-gradient.tsx", "files": ["mesh-gradient/shader.tsx", "utils/color.ts"], "description": "Warped 4-color fluid gradient with time-cycling palette and film grain. Linear/Stripe marketing-page style.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "simplexNoise", "elapsedTime", @@ -105,7 +105,7 @@ "file": "aurora/aurora.tsx", "files": ["aurora/shader.tsx", "utils/color.ts"], "description": "Four color-seeded noise curtains sharing one atmospheric noise field, layered over a dusk sky.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "simplexNoise", "smoothstep", @@ -122,7 +122,7 @@ "file": "vignette/vignette.tsx", "files": ["vignette/shader.tsx", "utils/color.ts"], "description": "Radial darkening at the canvas edges. Stacks on top of any base component inside .", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": ["uv", "vec2", "vec3", "vec4", "mix", "smoothstep", "length", "uniform"], "tier": 1 }, @@ -130,7 +130,7 @@ "file": "radial-gradient/radial-gradient.tsx", "files": ["radial-gradient/shader.tsx", "utils/color.ts"], "description": "A color ramp radiating from a point, with an elliptical shape control and repeating concentric rings. The radial counterpart to LinearGradient.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "colorRamp", "clamp", @@ -148,7 +148,7 @@ "file": "god-rays/god-rays.tsx", "files": ["god-rays/shader.tsx", "utils/color.ts"], "description": "Layered soft light rays radiating from a controllable origin: two flowing noise fields multiplied per color, with patchiness, diffusion, and an interactive source glow.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "abs", "atan2", @@ -174,7 +174,7 @@ "file": "conic-gradient/conic-gradient.tsx", "files": ["conic-gradient/shader.tsx", "utils/color.ts"], "description": "A color ramp sweeping clockwise around a center point, with pinwheel repeats and rotation. Completes the CSS gradient trio with LinearGradient and RadialGradient.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": ["colorRamp", "atan2", "fract", "uv", "vec2", "uniform"], "tier": 1 }, @@ -182,7 +182,7 @@ "file": "dither/dither.tsx", "files": ["dither/shader.tsx"], "description": "Retro ordered dithering: pixelates the scene into chunky cells and posterizes its colors. Stacks on top of any base component inside .", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "ditherThreshold", "quantize", @@ -197,7 +197,7 @@ "file": "voronoi/voronoi.tsx", "files": ["voronoi/shader.tsx", "utils/color.ts"], "description": "Cellular mosaic \u2014 flat color patches around drifting seed points, with crisp constant-width borders.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "voronoiCells", "colorRamp", @@ -224,7 +224,7 @@ "utils/color.ts" ], "description": "Layered fractal noise \u2014 multi-octave texture with a style dial from soft clouds to crisp vein networks.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "fractalNoise", "colorRamp", @@ -241,7 +241,7 @@ "file": "blobs/blobs.tsx", "files": ["blobs/shader.tsx", "utils/color.ts"], "description": "Soft gooey blobs \u2014 colored metaballs drifting around the center, merging and splitting over a transparent background.", - "dependencies": ["@mattermix/shaders", "@mattermix/shaders-react", "react", "three"], + "dependencies": ["@camp-dev/shaders", "@camp-dev/shaders-react", "react", "three"], "uses_primitives": [ "metaballs", "colorRamp", diff --git a/registry/registry.schema.json b/registry/registry.schema.json index 38a6548d..51a874db 100644 --- a/registry/registry.schema.json +++ b/registry/registry.schema.json @@ -1,8 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://github.com/mattermix/shaders/blob/main/registry/registry.schema.json", + "$id": "https://github.com/campdotdev/shaders/blob/main/registry/registry.schema.json", "title": "Shaders registry index", - "description": "The index @mattermix/shaders-cli reads to copy Tier 1 components into a user's project.", + "description": "The index @camp-dev/shaders-cli reads to copy Tier 1 components into a user's project.", "type": "object", "required": ["version", "components"], "additionalProperties": false, diff --git a/registry/simplex-noise/shader.tsx b/registry/simplex-noise/shader.tsx index e1cf6d02..1e428072 100644 --- a/registry/simplex-noise/shader.tsx +++ b/registry/simplex-noise/shader.tsx @@ -13,14 +13,14 @@ import { type HueInterpolation, quantize, simplexNoise, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { clamp, mix, uniform, uv, vec3 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry, Vector2 } from 'three/webgpu'; diff --git a/registry/simplex-noise/simplex-noise.tsx b/registry/simplex-noise/simplex-noise.tsx index 49274dae..768abb68 100644 --- a/registry/simplex-noise/simplex-noise.tsx +++ b/registry/simplex-noise/simplex-noise.tsx @@ -4,8 +4,8 @@ // their defaults, then delegates to SimplexNoiseShader (./shader.tsx), which // samples a noise field per pixel and maps the result onto a color ramp. // Render it inside a . -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { SimplexNoiseShader } from './shader'; diff --git a/registry/utils/color.ts b/registry/utils/color.ts index 9b39e0dc..1e9e0fc3 100644 --- a/registry/utils/color.ts +++ b/registry/utils/color.ts @@ -3,7 +3,7 @@ // user-facing ColorStop[] props into the engine's ColorRampStop[] shape. // This file ships alongside each component the CLI copies out, so it stays // dependency-light (engine + TSL only). -import { type ColorRampStop, parseColorString } from '@mattermix/shaders'; +import { type ColorRampStop, parseColorString } from '@camp-dev/shaders'; import { vec3 } from 'three/tsl'; /** diff --git a/registry/vignette/shader.tsx b/registry/vignette/shader.tsx index 057b967e..e632172a 100644 --- a/registry/vignette/shader.tsx +++ b/registry/vignette/shader.tsx @@ -6,15 +6,15 @@ // props; the engine's mixColor() does the color-space-aware blending. import { useEffect, useMemo } from 'react'; -import { mixColor } from '@mattermix/shaders'; -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; +import { mixColor } from '@camp-dev/shaders'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatablePoint, useAnimatableUniform, usePostProcessPass, useResize, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { length, smoothstep, uniform, uv, vec2, vec4 } from 'three/tsl'; import { Vector3 } from 'three/webgpu'; diff --git a/registry/vignette/vignette.tsx b/registry/vignette/vignette.tsx index c3081a9e..2c629478 100644 --- a/registry/vignette/vignette.tsx +++ b/registry/vignette/vignette.tsx @@ -4,8 +4,8 @@ // defaults, then delegates to VignetteShader (./shader.tsx). The vignette is // a post-process layer — stack it after other components inside a // and it blends the image toward `color` at the edges. -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { VignetteShader } from './shader'; diff --git a/registry/voronoi/shader.tsx b/registry/voronoi/shader.tsx index ed1c7b31..7386c492 100644 --- a/registry/voronoi/shader.tsx +++ b/registry/voronoi/shader.tsx @@ -15,7 +15,7 @@ import { mixColor, quantize, voronoiCells, -} from '@mattermix/shaders'; +} from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, @@ -23,7 +23,7 @@ import { useResize, useShaderContext, useStaticSceneHint, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { clamp, float, fwidth, mix, pow, select, smoothstep, uniform, uv, vec2 } from 'three/tsl'; import { Mesh, MeshBasicNodeMaterial, PlaneGeometry, Vector2, Vector3 } from 'three/webgpu'; diff --git a/registry/voronoi/voronoi.tsx b/registry/voronoi/voronoi.tsx index 2437f262..c7a3fc3b 100644 --- a/registry/voronoi/voronoi.tsx +++ b/registry/voronoi/voronoi.tsx @@ -4,8 +4,8 @@ // defaults, then delegates to VoronoiShader (./shader.tsx), which carves the // canvas into cells around scattered seed points and colors each cell from // the ramp. Render it inside a . -import type { ColorSpace, HueInterpolation } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace, HueInterpolation } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import type { ColorStop } from '../utils/color'; import { VoronoiShader } from './shader'; diff --git a/registry/wave-lines/shader.tsx b/registry/wave-lines/shader.tsx index 7802ab74..3d89b8ce 100644 --- a/registry/wave-lines/shader.tsx +++ b/registry/wave-lines/shader.tsx @@ -9,13 +9,13 @@ // (./wave-lines.tsx) supplies the props. import { useEffect } from 'react'; -import { colorRamp, type ColorSpace } from '@mattermix/shaders'; +import { colorRamp, type ColorSpace } from '@camp-dev/shaders'; import { type AnimatableProp, useAnimatableSpeed, useAnimatableUniform, useShaderContext, -} from '@mattermix/shaders-react'; +} from '@camp-dev/shaders-react'; import { float, fract, diff --git a/registry/wave-lines/wave-lines.tsx b/registry/wave-lines/wave-lines.tsx index 925674ea..7cc497d7 100644 --- a/registry/wave-lines/wave-lines.tsx +++ b/registry/wave-lines/wave-lines.tsx @@ -5,8 +5,8 @@ // bundle of waving ribbons — each a solid body plus an additive light halo — // sharing one wave so they move as a coherent group. Render it inside a // . -import type { ColorSpace } from '@mattermix/shaders'; -import type { AnimatableProp } from '@mattermix/shaders-react'; +import type { ColorSpace } from '@camp-dev/shaders'; +import type { AnimatableProp } from '@camp-dev/shaders-react'; import { WaveLinesShader } from './shader'; diff --git a/scripts/build-posters.sh b/scripts/build-posters.sh index 1f49c44c..a06dc8ae 100755 --- a/scripts/build-posters.sh +++ b/scripts/build-posters.sh @@ -15,7 +15,7 @@ WIDTH=1080 HEIGHT=720 if [ ! -f packages/shaders-cli/dist/index.js ]; then - echo "error: CLI not built. Run: pnpm --filter @mattermix/shaders-cli build" >&2 + echo "error: CLI not built. Run: pnpm --filter @camp-dev/shaders-cli build" >&2 exit 1 fi diff --git a/scripts/smoke-test-cli.mjs b/scripts/smoke-test-cli.mjs index 32a8dcaa..455a2c7b 100755 --- a/scripts/smoke-test-cli.mjs +++ b/scripts/smoke-test-cli.mjs @@ -30,7 +30,7 @@ let exitCode = 0; try { step('Build the CLI'); - run('pnpm --filter @mattermix/shaders-cli build', { cwd: repoRoot }); + run('pnpm --filter @camp-dev/shaders-cli build', { cwd: repoRoot }); step(`Pack the CLI from ${cliDir}`); const packOutput = runQuiet(`pnpm pack --pack-destination "${smokeDir}"`, { @@ -51,7 +51,7 @@ try { run(`npm install --no-save "${tarball}"`, { cwd: smokeDir }); step(`Run \`shaders-cli init\``); - run(`node node_modules/@mattermix/shaders-cli/dist/index.js init`, { + run(`node node_modules/@camp-dev/shaders-cli/dist/index.js init`, { cwd: smokeDir, }); @@ -62,12 +62,12 @@ try { writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n'); step(`Run \`shaders-cli list\``); - run(`node node_modules/@mattermix/shaders-cli/dist/index.js list`, { + run(`node node_modules/@camp-dev/shaders-cli/dist/index.js list`, { cwd: smokeDir, }); step(`Run \`shaders-cli add linear-gradient\``); - run(`node node_modules/@mattermix/shaders-cli/dist/index.js add linear-gradient`, { + run(`node node_modules/@camp-dev/shaders-cli/dist/index.js add linear-gradient`, { cwd: smokeDir, }); @@ -90,7 +90,7 @@ try { join(smokeDir, 'src/components/shaders/linear-gradient/linear-gradient.tsx'), 'export const stale = true\n', ); - run(`node node_modules/@mattermix/shaders-cli/dist/index.js update linear-gradient --force`, { + run(`node node_modules/@camp-dev/shaders-cli/dist/index.js update linear-gradient --force`, { cwd: smokeDir, }); const refreshed = readFileSync(