@fjandin/react-shader 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ReactGpuShader.d.ts +11 -0
- package/dist/ReactGpuShader.d.ts.map +1 -0
- package/dist/example/examples/webgl.d.ts +2 -0
- package/dist/example/examples/webgl.d.ts.map +1 -0
- package/dist/example/examples/webgpu.d.ts +2 -0
- package/dist/example/examples/webgpu.d.ts.map +1 -0
- package/dist/example/frontend.d.ts.map +1 -1
- package/dist/hooks/useWebGPU.d.ts +13 -0
- package/dist/hooks/useWebGPU.d.ts.map +1 -0
- package/dist/index.cjs +822 -54
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +822 -54
- package/dist/shaders/color-palette-gpu.d.ts +2 -0
- package/dist/shaders/color-palette-gpu.d.ts.map +1 -0
- package/dist/shaders/distortion-ripple-gpu.d.ts +16 -0
- package/dist/shaders/distortion-ripple-gpu.d.ts.map +1 -0
- package/dist/shaders/scene-circles-gpu.d.ts +21 -0
- package/dist/shaders/scene-circles-gpu.d.ts.map +1 -0
- package/dist/shaders/simplex-noise-gpu.d.ts +2 -0
- package/dist/shaders/simplex-noise-gpu.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/example/glsl/cartesian-to-polar.glsl.d.ts +0 -2
- package/dist/example/glsl/cartesian-to-polar.glsl.d.ts.map +0 -1
- package/dist/example/glsl/circles.glsl.d.ts +0 -3
- package/dist/example/glsl/circles.glsl.d.ts.map +0 -1
- package/dist/example/glsl/noise.glsl.d.ts +0 -3
- package/dist/example/glsl/noise.glsl.d.ts.map +0 -1
- package/dist/example/glsl/palette.glsl.d.ts +0 -2
- package/dist/example/glsl/palette.glsl.d.ts.map +0 -1
- package/dist/example/glsl/texture-demo.glsl.d.ts +0 -2
- package/dist/example/glsl/texture-demo.glsl.d.ts.map +0 -1
- package/dist/example/lib/logger.d.ts +0 -2
- package/dist/example/lib/logger.d.ts.map +0 -1
- package/dist/example/shader.d.ts +0 -2
- package/dist/example/shader.d.ts.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Vec2, Vec3, Vec4, Vec4Array } from "./types";
|
|
2
|
+
type GpuUniformValue = number | Vec2 | Vec3 | Vec4 | Vec4Array;
|
|
3
|
+
export interface ReactGpuShaderProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
fragment: string;
|
|
6
|
+
uniforms?: Record<string, GpuUniformValue>;
|
|
7
|
+
fullscreen?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function ReactGpuShader({ className, fragment, uniforms, fullscreen }: ReactGpuShaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ReactGpuShader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactGpuShader.d.ts","sourceRoot":"","sources":["../src/ReactGpuShader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAG1D,KAAK,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAuBD,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAkB,EAAE,EAAE,mBAAmB,2CAkDxG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgl.d.ts","sourceRoot":"","sources":["../../../src/example/examples/webgl.tsx"],"names":[],"mappings":"AAiDA,wBAAgB,SAAS,4CA6BxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu.d.ts","sourceRoot":"","sources":["../../../src/example/examples/webgpu.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,UAAU,4CA8BzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../src/example/frontend.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../src/example/frontend.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,aAAa,CAAA;AAwBpB,wBAAgB,GAAG,4CAyBlB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Vec2, Vec3, Vec4, Vec4Array } from "../types";
|
|
2
|
+
type GpuUniformValue = number | Vec2 | Vec3 | Vec4 | Vec4Array;
|
|
3
|
+
interface UseWebGPUOptions {
|
|
4
|
+
fragment: string;
|
|
5
|
+
uniforms?: Record<string, GpuUniformValue>;
|
|
6
|
+
onError?: (error: Error) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useWebGPU(options: UseWebGPUOptions): {
|
|
9
|
+
canvasRef: import("react").RefObject<HTMLCanvasElement>;
|
|
10
|
+
mouseRef: import("react").MutableRefObject<[number, number]>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useWebGPU.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWebGPU.d.ts","sourceRoot":"","sources":["../../src/hooks/useWebGPU.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAG3D,KAAK,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;AAE9D,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC;AA+WD,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB;;;EA0NlD"}
|