@instantshader/react 0.6.1 → 0.7.0
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/README.md +6 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +26 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,6 +42,10 @@ One component per shader, each a thin wrapper over the same props:
|
|
|
42
42
|
| `<Strata>` | Stacked cut-paper layers with soft shadows. | `scale`, `layers`, `warp`, `ridges`, `stretch`, `depth`, `blend`, `angle`, `grain` |
|
|
43
43
|
| `<Dune>` | Overlapping crests, crisp on top and airbrushed below. | `layers`, `swell`, `waves`, `fade`, `soft`, `angle`, `grain` |
|
|
44
44
|
| `<Whorl>` | A spiral of curved blades, positionable with `x` / `y`. | `blades`, `twist`, `depth`, `scale`, `wobble`, `x`, `y`, `grain` |
|
|
45
|
+
| `<Silk>` | Satin folds with a highlight along the threads. | `scale`, `folds`, `depth`, `warp`, `sheen`, `light`, `grain` |
|
|
46
|
+
| `<Nacre>` | Glassy liquid folds whose colour shifts on every slope. | `scale`, `flow`, `crease`, `depth`, `iridescence`, `light`, `grain` |
|
|
47
|
+
| `<Burst>` | Thin rays out of one point, tunnel or star, straight or twisted. | `rays`, `sharp`, `glow`, `twist`, `x`, `y`, `grain` |
|
|
48
|
+
| `<Glint>` | A shoal of spinning shards streaming along a current. | `size`, `density`, `bend`, `angle`, `speed`, `grain` |
|
|
45
49
|
|
|
46
50
|
```tsx
|
|
47
51
|
import { Bloom } from "@instantshader/react";
|
|
@@ -57,7 +61,8 @@ import { Bloom } from "@instantshader/react";
|
|
|
57
61
|
|
|
58
62
|
See the [`instantshader` README](https://www.npmjs.com/package/instantshader)
|
|
59
63
|
for what each param does and for the shader defs themselves (re-exported from
|
|
60
|
-
here as `flow`, `beam`, `bloom`, `halo`, `strata`, `dune
|
|
64
|
+
here as `flow`, `beam`, `bloom`, `halo`, `strata`, `dune`, `whorl`, `silk`,
|
|
65
|
+
`nacre`, `burst` and `glint`).
|
|
61
66
|
|
|
62
67
|
## Effects
|
|
63
68
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactElement } from "react";
|
|
2
|
-
import { EffectDef, EffectLayer, EffectLayer as EffectLayer$1, EffectParamDef, ParamDef, ParamValue, ShaderDef, ShaderDef as ShaderDef$1, Source, Source as Source$1, ascii, beam, bloom, dither, dune, flow, halftone, halo, pixelate, strata, whorl } from "instantshader";
|
|
2
|
+
import { EffectDef, EffectLayer, EffectLayer as EffectLayer$1, EffectParamDef, ParamDef, ParamValue, ShaderDef, ShaderDef as ShaderDef$1, Source, Source as Source$1, ascii, beam, bloom, burst, dither, dune, flow, glint, halftone, halo, nacre, pixelate, silk, strata, whorl } from "instantshader";
|
|
3
3
|
|
|
4
4
|
//#region src/ShaderStack.d.ts
|
|
5
5
|
interface ShaderStackProps {
|
|
@@ -84,5 +84,9 @@ declare function Halo(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
|
84
84
|
declare function Strata(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
85
85
|
declare function Dune(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
86
86
|
declare function Whorl(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
87
|
+
declare function Silk(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
88
|
+
declare function Nacre(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
89
|
+
declare function Burst(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
90
|
+
declare function Glint(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
|
|
87
91
|
//#endregion
|
|
88
|
-
export { Beam, Bloom, Dune, type EffectDef, type EffectLayer, type EffectParamDef, Flow, Halo, type ParamDef, type ParamValue, ShaderCanvas, type ShaderCanvasProps, type ShaderDef, ShaderStack, type ShaderStackProps, type Source, Strata, Whorl, ascii, beam, bloom, dither, dune, flow, halftone, halo, pixelate, strata, whorl };
|
|
92
|
+
export { Beam, Bloom, Burst, Dune, type EffectDef, type EffectLayer, type EffectParamDef, Flow, Glint, Halo, Nacre, type ParamDef, type ParamValue, ShaderCanvas, type ShaderCanvasProps, type ShaderDef, ShaderStack, type ShaderStackProps, Silk, type Source, Strata, Whorl, ascii, beam, bloom, burst, dither, dune, flow, glint, halftone, halo, nacre, pixelate, silk, strata, whorl };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useMemo, useRef } from "react";
|
|
3
|
-
import { ascii, beam, beam as beam$1, bloom, bloom as bloom$1, dither, dune, dune as dune$1, flow, flow as flow$1, halftone, halo, halo as halo$1, mountStack, pixelate, strata, strata as strata$1, whorl, whorl as whorl$1 } from "instantshader";
|
|
3
|
+
import { ascii, beam, beam as beam$1, bloom, bloom as bloom$1, burst, burst as burst$1, dither, dune, dune as dune$1, flow, flow as flow$1, glint, glint as glint$1, halftone, halo, halo as halo$1, mountStack, nacre, nacre as nacre$1, pixelate, silk, silk as silk$1, strata, strata as strata$1, whorl, whorl as whorl$1 } from "instantshader";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/ShaderStack.tsx
|
|
@@ -139,6 +139,30 @@ function Whorl(props) {
|
|
|
139
139
|
...props
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
+
function Silk(props) {
|
|
143
|
+
return /* @__PURE__ */ jsx(ShaderCanvas, {
|
|
144
|
+
shader: silk$1,
|
|
145
|
+
...props
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function Nacre(props) {
|
|
149
|
+
return /* @__PURE__ */ jsx(ShaderCanvas, {
|
|
150
|
+
shader: nacre$1,
|
|
151
|
+
...props
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function Burst(props) {
|
|
155
|
+
return /* @__PURE__ */ jsx(ShaderCanvas, {
|
|
156
|
+
shader: burst$1,
|
|
157
|
+
...props
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function Glint(props) {
|
|
161
|
+
return /* @__PURE__ */ jsx(ShaderCanvas, {
|
|
162
|
+
shader: glint$1,
|
|
163
|
+
...props
|
|
164
|
+
});
|
|
165
|
+
}
|
|
142
166
|
|
|
143
167
|
//#endregion
|
|
144
|
-
export { Beam, Bloom, Dune, Flow, Halo, ShaderCanvas, ShaderStack, Strata, Whorl, ascii, beam, bloom, dither, dune, flow, halftone, halo, pixelate, strata, whorl };
|
|
168
|
+
export { Beam, Bloom, Burst, Dune, Flow, Glint, Halo, Nacre, ShaderCanvas, ShaderStack, Silk, Strata, Whorl, ascii, beam, bloom, burst, dither, dune, flow, glint, halftone, halo, nacre, pixelate, silk, strata, whorl };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instantshader/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "React components for InstantShader: animated WebGL gradients and image effects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"instantshader": "0.
|
|
39
|
+
"instantshader": "0.7.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^18 || ^19",
|