Free open-source image editor for the browser
Upgrade vgpu-react to 0.3.0 (#3)
Rodrigo Belfiore4197411fb181
diff --git a/AGENTS.md b/AGENTS.mdindex 0e65b9b..999482f 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -51,7 +51,7 @@ All React bindings come from `vgpu-react`; everything else comes from `vgpu`.- `useGpu()` returns the `Gpu`. Every vgpu call takes it as the first argument.- Build pipelines once per engine instance and reuse them across frames.-- `useSurface(canvasRef)` turns a `<canvas>` into a render target and disposes it on unmount. Its options are read once; to change them, remount the canvas with a `key`.+- `useSurface(canvasRef, options)` turns a `<canvas>` into a render target and disposes it on cleanup. Changing `clearColor` updates the surface in place; changing other options recreates it.- `useFrameLoop` renders every animation frame. `useFrame` returns a function that renders once, for pointer and other events.- Shader code lives in `.wgsl` files beside the module that owns it, or in `lib/` for reusable GPU operations. The Vite loader and ambient types are already configured.- The working space is linear Rec.2020 in `rgba16float`. Decoders convert into it, the editor shader converts out of it; nothing in between assumes a format or primaries, so both can change (an 8-bit variant is planned).diff --git a/bun.lock b/bun.lockindex c8daf09..51493f3 100644--- a/bun.lock+++ b/bun.lock@@ -15,7 +15,7 @@"react-dom": "^19.2.8","tailwindcss": "^4.3.3","vgpu": "^0.3.1",- "vgpu-react": "^0.2.0",+ "vgpu-react": "^0.3.0","zustand": "^5.0.15",},"devDependencies": {@@ -291,7 +291,7 @@"vgpu": ["[email protected]", "", { "dependencies": { "@modelcontextprotocol/server": "2.0.0", "@vgpu/adapter-mock": "0.3.1", "@vgpu/adapter-node": "0.3.1", "@vgpu/core": "0.3.1", "@vgpu/wgsl": "0.3.1", "@vgpu/wgsl-std": "0.3.1", "@webgpu/types": "^0.1.69", "pixelmatch": "^7.2.0", "pngjs": "^7.0.0", "wgpu-matrix": "^3.4.2", "zod": "^4.4.3" }, "bin": { "vgpu": "bin/vgpu.js" } }, "sha512-NeEETis2aCr0I9/8dy42lueNGNs3GZxL+0OmjLI82wlgPD/4WpW/XNX4xduc+ChxFqOJtjEYsz297VS9GmIuyA=="],- "vgpu-react": ["[email protected]", "", { "peerDependencies": { "react": ">=19", "vgpu": ">=0.3.0" } }, "sha512-gv/e68VXN9k98M6yJIi8ToxhNEFWCnY9Vt42ONFMFoyvkGhvJG64WG6fNYwfnX47MStFtpYHNNBCTLJvhGQvhA=="],+ "vgpu-react": ["[email protected]", "", { "peerDependencies": { "react": ">=19", "vgpu": "^0.3.0" } }, "sha512-XtXKQf5fH0ylGFR3LLDDFdmxxGQu9jXnoG02sDfsePH/6N6oM539etWahB8mqzTqWCZfUIFAesqGQXavKrvhsg=="],"vite": ["[email protected]", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", "postcss": "^8.5.26", "rolldown": "~1.2.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.4.0 || ^0.5.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q=="],diff --git a/package.json b/package.jsonindex 4c904ce..86b1916 100644--- a/package.json+++ b/package.json@@ -20,7 +20,7 @@"react-dom": "^19.2.8","tailwindcss": "^4.3.3","vgpu": "^0.3.1",- "vgpu-react": "^0.2.0",+ "vgpu-react": "^0.3.0","zustand": "^5.0.15"},"devDependencies": {