@instantshader/react 0.4.1 → 0.5.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 CHANGED
@@ -1,8 +1,10 @@
1
+ ![InstantShader](https://raw.githubusercontent.com/ugolbck/instantshader/main/.github/assets/banner.jpg)
2
+
1
3
  # @instantshader/react
2
4
 
3
5
  React bindings for [instantshader](https://www.npmjs.com/package/instantshader), a
4
- zero-dependency animated WebGL gradient engine. Drop a `<Flow>`, `<Beam>` or
5
- `<Bloom>` component into any sized wrapper to mount a live, animated gradient. Built by
6
+ zero-dependency animated WebGL gradient engine. Drop a `<Flow>`, `<Beam>`, `<Bloom>`, `<Halo>`, `<Strata>`, `<Dune>` or
7
+ `<Whorl>` component into any sized wrapper to mount a live, animated gradient. Built by
6
8
  [InstantGradient](https://instantgradient.com/app).
7
9
 
8
10
  ## Install
@@ -35,6 +37,10 @@ One component per shader, each a thin wrapper over the same props:
35
37
  | `<Flow>` | Isotropic swirling currents with defined luminous edges and calm negative space. | `scale`, `curl`, `drift`, `openness`, `grain` |
36
38
  | `<Beam>` | One wide beam of soft light crossing a near-black frame, the palette walking its length. | `scale`, `width`, `glow`, `angle`, `grain` |
37
39
  | `<Bloom>` | A fan of huge soft petals radiating from the bottom edge, palette as concentric scalloped bands. | `scale`, `petals`, `pinch`, `bend`, `sway`, `colorflow`, `grain` |
40
+ | `<Halo>` | An eclipse disc with a bright limb and flowing corona; `x` / `y` place it, and the default is a glowing horizon arc. | `radius`, `x`, `y`, `glow`, `crescent`, `flares`, `grain` |
41
+ | `<Strata>` | Stacked cut-paper layers with soft shadows. | `scale`, `layers`, `warp`, `ridges`, `stretch`, `depth`, `blend`, `angle`, `grain` |
42
+ | `<Dune>` | Overlapping crests, crisp on top and airbrushed below. | `layers`, `swell`, `waves`, `fade`, `soft`, `angle`, `grain` |
43
+ | `<Whorl>` | A spiral of curved blades, positionable with `x` / `y`. | `blades`, `twist`, `depth`, `scale`, `wobble`, `x`, `y`, `grain` |
38
44
 
39
45
  ```tsx
40
46
  import { Bloom } from "@instantshader/react";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement } from "react";
2
- import { ParamDef, ShaderDef, ShaderDef as ShaderDef$1, beam, bloom, flow } from "instantshader";
2
+ import { ParamDef, ShaderDef, ShaderDef as ShaderDef$1, beam, bloom, dune, flow, halo, strata, whorl } from "instantshader";
3
3
 
4
4
  //#region src/ShaderCanvas.d.ts
5
5
  interface ShaderCanvasProps {
@@ -54,5 +54,9 @@ declare function ShaderCanvas({
54
54
  declare function Flow(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
55
55
  declare function Beam(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
56
56
  declare function Bloom(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
57
+ declare function Halo(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
58
+ declare function Strata(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
59
+ declare function Dune(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
60
+ declare function Whorl(props: Omit<ShaderCanvasProps, "shader">): ReactElement;
57
61
  //#endregion
58
- export { Beam, Bloom, Flow, type ParamDef, ShaderCanvas, type ShaderCanvasProps, type ShaderDef, beam, bloom, flow };
62
+ export { Beam, Bloom, Dune, Flow, Halo, type ParamDef, ShaderCanvas, type ShaderCanvasProps, type ShaderDef, Strata, Whorl, beam, bloom, dune, flow, halo, 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 { beam, beam as beam$1, bloom, bloom as bloom$1, flow, flow as flow$1, mountGradient } from "instantshader";
3
+ import { beam, beam as beam$1, bloom, bloom as bloom$1, dune, dune as dune$1, flow, flow as flow$1, halo, halo as halo$1, mountGradient, 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/ShaderCanvas.tsx
@@ -79,6 +79,30 @@ function Bloom(props) {
79
79
  ...props
80
80
  });
81
81
  }
82
+ function Halo(props) {
83
+ return /* @__PURE__ */ jsx(ShaderCanvas, {
84
+ shader: halo$1,
85
+ ...props
86
+ });
87
+ }
88
+ function Strata(props) {
89
+ return /* @__PURE__ */ jsx(ShaderCanvas, {
90
+ shader: strata$1,
91
+ ...props
92
+ });
93
+ }
94
+ function Dune(props) {
95
+ return /* @__PURE__ */ jsx(ShaderCanvas, {
96
+ shader: dune$1,
97
+ ...props
98
+ });
99
+ }
100
+ function Whorl(props) {
101
+ return /* @__PURE__ */ jsx(ShaderCanvas, {
102
+ shader: whorl$1,
103
+ ...props
104
+ });
105
+ }
82
106
 
83
107
  //#endregion
84
- export { Beam, Bloom, Flow, ShaderCanvas, beam, bloom, flow };
108
+ export { Beam, Bloom, Dune, Flow, Halo, ShaderCanvas, Strata, Whorl, beam, bloom, dune, flow, halo, strata, whorl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instantshader/react",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "React bindings for InstantShader animated WebGL gradients.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "react"
37
37
  ],
38
38
  "dependencies": {
39
- "instantshader": "0.4.1"
39
+ "instantshader": "0.5.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": "^18 || ^19",