react-native-effects 0.0.1 → 0.1.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.
Files changed (100) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +251 -0
  3. package/lib/module/components/Aurora.js +184 -0
  4. package/lib/module/components/Aurora.js.map +1 -0
  5. package/lib/module/components/CalicoSwirl.js +155 -0
  6. package/lib/module/components/CalicoSwirl.js.map +1 -0
  7. package/lib/module/components/Campfire.js +225 -0
  8. package/lib/module/components/Campfire.js.map +1 -0
  9. package/lib/module/components/CircularGradient.js +52 -0
  10. package/lib/module/components/CircularGradient.js.map +1 -0
  11. package/lib/module/components/Iridescence.js +57 -0
  12. package/lib/module/components/Iridescence.js.map +1 -0
  13. package/lib/module/components/LinearGradient.js +48 -0
  14. package/lib/module/components/LinearGradient.js.map +1 -0
  15. package/lib/module/components/LiquidChrome.js +75 -0
  16. package/lib/module/components/LiquidChrome.js.map +1 -0
  17. package/lib/module/components/ShaderView/index.js +224 -0
  18. package/lib/module/components/ShaderView/index.js.map +1 -0
  19. package/lib/module/components/ShaderView/types.js +4 -0
  20. package/lib/module/components/ShaderView/types.js.map +1 -0
  21. package/lib/module/components/Silk.js +83 -0
  22. package/lib/module/components/Silk.js.map +1 -0
  23. package/lib/module/consts.js +154 -0
  24. package/lib/module/consts.js.map +1 -0
  25. package/lib/module/hooks/useClock.js +15 -0
  26. package/lib/module/hooks/useClock.js.map +1 -0
  27. package/lib/module/hooks/useWGPUSetup.js +54 -0
  28. package/lib/module/hooks/useWGPUSetup.js.map +1 -0
  29. package/lib/module/index.js +13 -0
  30. package/lib/module/index.js.map +1 -0
  31. package/lib/module/package.json +1 -0
  32. package/lib/module/shaders/TRIANGLE_VERTEX_SHADER.js +20 -0
  33. package/lib/module/shaders/TRIANGLE_VERTEX_SHADER.js.map +1 -0
  34. package/lib/module/shaders/uniforms.js +20 -0
  35. package/lib/module/shaders/uniforms.js.map +1 -0
  36. package/lib/module/utils/backgroundRuntime.js +12 -0
  37. package/lib/module/utils/backgroundRuntime.js.map +1 -0
  38. package/lib/module/utils/colors.js +94 -0
  39. package/lib/module/utils/colors.js.map +1 -0
  40. package/lib/module/utils/initWebGPU.js +40 -0
  41. package/lib/module/utils/initWebGPU.js.map +1 -0
  42. package/lib/typescript/package.json +1 -0
  43. package/lib/typescript/src/components/Aurora.d.ts +17 -0
  44. package/lib/typescript/src/components/Aurora.d.ts.map +1 -0
  45. package/lib/typescript/src/components/CalicoSwirl.d.ts +13 -0
  46. package/lib/typescript/src/components/CalicoSwirl.d.ts.map +1 -0
  47. package/lib/typescript/src/components/Campfire.d.ts +17 -0
  48. package/lib/typescript/src/components/Campfire.d.ts.map +1 -0
  49. package/lib/typescript/src/components/CircularGradient.d.ts +19 -0
  50. package/lib/typescript/src/components/CircularGradient.d.ts.map +1 -0
  51. package/lib/typescript/src/components/Iridescence.d.ts +11 -0
  52. package/lib/typescript/src/components/Iridescence.d.ts.map +1 -0
  53. package/lib/typescript/src/components/LinearGradient.d.ts +15 -0
  54. package/lib/typescript/src/components/LinearGradient.d.ts.map +1 -0
  55. package/lib/typescript/src/components/LiquidChrome.d.ts +17 -0
  56. package/lib/typescript/src/components/LiquidChrome.d.ts.map +1 -0
  57. package/lib/typescript/src/components/ShaderView/index.d.ts +3 -0
  58. package/lib/typescript/src/components/ShaderView/index.d.ts.map +1 -0
  59. package/lib/typescript/src/components/ShaderView/types.d.ts +15 -0
  60. package/lib/typescript/src/components/ShaderView/types.d.ts.map +1 -0
  61. package/lib/typescript/src/components/Silk.d.ts +17 -0
  62. package/lib/typescript/src/components/Silk.d.ts.map +1 -0
  63. package/lib/typescript/src/consts.d.ts +2 -0
  64. package/lib/typescript/src/consts.d.ts.map +1 -0
  65. package/lib/typescript/src/hooks/useClock.d.ts +3 -0
  66. package/lib/typescript/src/hooks/useClock.d.ts.map +1 -0
  67. package/lib/typescript/src/hooks/useWGPUSetup.d.ts +15 -0
  68. package/lib/typescript/src/hooks/useWGPUSetup.d.ts.map +1 -0
  69. package/lib/typescript/src/index.d.ts +12 -0
  70. package/lib/typescript/src/index.d.ts.map +1 -0
  71. package/lib/typescript/src/shaders/TRIANGLE_VERTEX_SHADER.d.ts +2 -0
  72. package/lib/typescript/src/shaders/TRIANGLE_VERTEX_SHADER.d.ts.map +1 -0
  73. package/lib/typescript/src/shaders/uniforms.d.ts +6 -0
  74. package/lib/typescript/src/shaders/uniforms.d.ts.map +1 -0
  75. package/lib/typescript/src/utils/backgroundRuntime.d.ts +3 -0
  76. package/lib/typescript/src/utils/backgroundRuntime.d.ts.map +1 -0
  77. package/lib/typescript/src/utils/colors.d.ts +22 -0
  78. package/lib/typescript/src/utils/colors.d.ts.map +1 -0
  79. package/lib/typescript/src/utils/initWebGPU.d.ts +23 -0
  80. package/lib/typescript/src/utils/initWebGPU.d.ts.map +1 -0
  81. package/package.json +174 -7
  82. package/src/components/Aurora.tsx +203 -0
  83. package/src/components/CalicoSwirl.tsx +167 -0
  84. package/src/components/Campfire.tsx +244 -0
  85. package/src/components/CircularGradient.tsx +76 -0
  86. package/src/components/Iridescence.tsx +67 -0
  87. package/src/components/LinearGradient.tsx +62 -0
  88. package/src/components/LiquidChrome.tsx +94 -0
  89. package/src/components/ShaderView/index.tsx +225 -0
  90. package/src/components/ShaderView/types.ts +15 -0
  91. package/src/components/Silk.tsx +102 -0
  92. package/src/consts.ts +152 -0
  93. package/src/hooks/useClock.ts +20 -0
  94. package/src/hooks/useWGPUSetup.tsx +73 -0
  95. package/src/index.tsx +23 -0
  96. package/src/shaders/TRIANGLE_VERTEX_SHADER.ts +17 -0
  97. package/src/shaders/uniforms.ts +17 -0
  98. package/src/utils/backgroundRuntime.ts +10 -0
  99. package/src/utils/colors.ts +117 -0
  100. package/src/utils/initWebGPU.ts +47 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createWorkletRuntime","scheduleOnRuntime","BackgroundRuntime","name","runOnBackground","callback"],"sourceRoot":"../../../src","sources":["utils/backgroundRuntime.ts"],"mappings":";;AAAA,SAASA,oBAAoB,EAAEC,iBAAiB,QAAQ,uBAAuB;AAE/E,OAAO,MAAMC,iBAAiB,GAAGF,oBAAoB,CAAC;EACpDG,IAAI,EAAE;AACR,CAAC,CAAC;AAEF,OAAO,SAASC,eAAeA,CAACC,QAAkC,EAAE;EAClE,SAAS;;EACT,OAAOJ,iBAAiB,CAACC,iBAAiB,EAAEG,QAAQ,CAAC;AACvD","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ import { NAMED_COLORS } from "../consts.js";
4
+
5
+ /**
6
+ * RGBA color values normalized to 0-1 range
7
+ */
8
+
9
+ /**
10
+ * Converts various color formats to RGBA object
11
+ * @param color - Can be:
12
+ * - Hex number (0xff0000)
13
+ * - Hex string ("#ff0000" or "ff0000")
14
+ * - RGB string ("rgb(255, 0, 0)")
15
+ * - RGBA string ("rgba(255, 0, 0, 0.5)")
16
+ * - Named color ("red", "blue", "purple", etc.)
17
+ * @returns RGBA object with normalized values (0-1), alpha defaults to 1.0 for non-rgba formats
18
+ */
19
+ export function colorToVec4(color) {
20
+ 'worklet';
21
+
22
+ // Handle hex number
23
+ if (typeof color === 'number') {
24
+ return {
25
+ r: (color >> 16 & 0xff) / 255,
26
+ g: (color >> 8 & 0xff) / 255,
27
+ b: (color & 0xff) / 255,
28
+ a: 1.0
29
+ };
30
+ }
31
+ if (typeof color === 'string') {
32
+ const trimmed = color.trim();
33
+
34
+ // Handle rgba() format
35
+ if (trimmed.startsWith('rgba(') && trimmed.endsWith(')')) {
36
+ const rgbaMatch = trimmed.match(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)/);
37
+ if (!rgbaMatch) {
38
+ throw new Error(`[react-native-effects] Invalid RGBA format: ${color}. Expected rgba(r, g, b, a).`);
39
+ }
40
+ return {
41
+ r: Math.max(0, Math.min(255, parseInt(rgbaMatch[1], 10))) / 255,
42
+ g: Math.max(0, Math.min(255, parseInt(rgbaMatch[2], 10))) / 255,
43
+ b: Math.max(0, Math.min(255, parseInt(rgbaMatch[3], 10))) / 255,
44
+ a: Math.max(0, Math.min(1, parseFloat(rgbaMatch[4])))
45
+ };
46
+ }
47
+
48
+ // Handle rgb() format
49
+ if (trimmed.startsWith('rgb(') && trimmed.endsWith(')')) {
50
+ const rgbMatch = trimmed.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);
51
+ if (!rgbMatch) {
52
+ throw new Error(`[react-native-effects] Invalid RGB format: ${color}. Expected rgb(r, g, b).`);
53
+ }
54
+ return {
55
+ r: Math.max(0, Math.min(255, parseInt(rgbMatch[1], 10))) / 255,
56
+ g: Math.max(0, Math.min(255, parseInt(rgbMatch[2], 10))) / 255,
57
+ b: Math.max(0, Math.min(255, parseInt(rgbMatch[3], 10))) / 255,
58
+ a: 1.0
59
+ };
60
+ }
61
+ const lowerColor = trimmed.toLowerCase();
62
+
63
+ // Handle named colors
64
+ if (lowerColor in NAMED_COLORS) {
65
+ const hexValue = NAMED_COLORS[lowerColor];
66
+ if (hexValue !== undefined) {
67
+ return {
68
+ r: (hexValue >> 16 & 0xff) / 255,
69
+ g: (hexValue >> 8 & 0xff) / 255,
70
+ b: (hexValue & 0xff) / 255,
71
+ a: 1.0
72
+ };
73
+ }
74
+ }
75
+
76
+ // Handle hex string
77
+ const hex = trimmed.replace('#', '');
78
+ if (hex.length !== 6) {
79
+ throw new Error(`[react-native-effects] Invalid hex color: ${color}. Must be 6 characters.`);
80
+ }
81
+ const num = parseInt(hex, 16);
82
+ if (isNaN(num)) {
83
+ throw new Error(`[react-native-effects] Invalid hex color: ${color}. Must be valid hexadecimal.`);
84
+ }
85
+ return {
86
+ r: (num >> 16 & 0xff) / 255,
87
+ g: (num >> 8 & 0xff) / 255,
88
+ b: (num & 0xff) / 255,
89
+ a: 1.0
90
+ };
91
+ }
92
+ throw new Error(`[react-native-effects] Invalid color format: ${color}. Expected hex number, hex string, rgb() string, or named color.`);
93
+ }
94
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NAMED_COLORS","colorToVec4","color","r","g","b","a","trimmed","trim","startsWith","endsWith","rgbaMatch","match","Error","Math","max","min","parseInt","parseFloat","rgbMatch","lowerColor","toLowerCase","hexValue","undefined","hex","replace","length","num","isNaN"],"sourceRoot":"../../../src","sources":["utils/colors.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ import { scheduleOnRuntime } from 'react-native-worklets';
4
+
5
+ /**
6
+ * Installs WebGPU globals on the given worklet runtime.
7
+ *
8
+ * Worklet runtimes run on a separate JS context that lacks browser-like globals.
9
+ * This function captures WebGPU constants and `navigator.gpu` from the RN thread
10
+ * and injects them into the worklet's `globalThis` so that WebGPU code can run
11
+ * as if it were in a browser environment.
12
+ *
13
+ * @param runtime - The worklet runtime to initialize
14
+ */
15
+ export function initWebGPU(runtime) {
16
+ const navigator = globalThis.navigator;
17
+ const GPUBufferUsage = globalThis.GPUBufferUsage;
18
+ const GPUColorWrite = globalThis.GPUColorWrite;
19
+ const GPUMapMode = globalThis.GPUMapMode;
20
+ const GPUShaderStage = globalThis.GPUShaderStage;
21
+ const GPUTextureUsage = globalThis.GPUTextureUsage;
22
+ scheduleOnRuntime(runtime, () => {
23
+ 'worklet';
24
+
25
+ if (globalThis.self) {
26
+ return;
27
+ }
28
+ globalThis.self = globalThis;
29
+ globalThis.navigator = {
30
+ gpu: navigator.gpu
31
+ };
32
+ globalThis.GPUBufferUsage = GPUBufferUsage;
33
+ globalThis.GPUColorWrite = GPUColorWrite;
34
+ globalThis.GPUMapMode = GPUMapMode;
35
+ globalThis.GPUShaderStage = GPUShaderStage;
36
+ globalThis.GPUTextureUsage = GPUTextureUsage;
37
+ globalThis.setImmediate = globalThis.requestAnimationFrame;
38
+ });
39
+ }
40
+ //# sourceMappingURL=initWebGPU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["scheduleOnRuntime","initWebGPU","runtime","navigator","globalThis","GPUBufferUsage","GPUColorWrite","GPUMapMode","GPUShaderStage","GPUTextureUsage","self","gpu","setImmediate","requestAnimationFrame"],"sourceRoot":"../../../src","sources":["utils/initWebGPU.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA6B,uBAAuB;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACC,OAAuB,EAAE;EAClD,MAAMC,SAAS,GAAGC,UAAU,CAACD,SAAyB;EACtD,MAAME,cAAc,GAAGD,UAAU,CAACC,cAAc;EAChD,MAAMC,aAAa,GAAGF,UAAU,CAACE,aAAa;EAC9C,MAAMC,UAAU,GAAGH,UAAU,CAACG,UAAU;EACxC,MAAMC,cAAc,GAAGJ,UAAU,CAACI,cAAc;EAChD,MAAMC,eAAe,GAAGL,UAAU,CAACK,eAAe;EAElDT,iBAAiB,CAACE,OAAO,EAAE,MAAM;IAC/B,SAAS;;IAET,IAAIE,UAAU,CAACM,IAAI,EAAE;MACnB;IACF;IACAN,UAAU,CAACM,IAAI,GAAGN,UAAU;IAC5BA,UAAU,CAACD,SAAS,GAAG;MAAEQ,GAAG,EAAER,SAAS,CAACQ;IAAI,CAAyB;IACrEP,UAAU,CAACC,cAAc,GAAGA,cAAc;IAC1CD,UAAU,CAACE,aAAa,GAAGA,aAAa;IACxCF,UAAU,CAACG,UAAU,GAAGA,UAAU;IAClCH,UAAU,CAACI,cAAc,GAAGA,cAAc;IAC1CJ,UAAU,CAACK,eAAe,GAAGA,eAAe;IAC5CL,UAAU,CAACQ,YAAY,GACrBR,UAAU,CAACS,qBAA4C;EAC3D,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,17 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** Base tint color for the aurora effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 1.0 */
7
+ speed?: number;
8
+ /** Brightness of the aurora bands. Default: 1.0 */
9
+ intensity?: number;
10
+ /** Number of aurora curtain layers (1-5). Default: 3 */
11
+ layers?: number;
12
+ /** How wavy/turbulent the curtains are. Default: 1.0 */
13
+ waviness?: number;
14
+ };
15
+ export default function Aurora({ color, speed, intensity, layers, waviness, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=Aurora.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Aurora.d.ts","sourceRoot":"","sources":["../../../../src/components/Aurora.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,KAAiB,EACjB,KAAW,EACX,SAAe,EACf,MAAY,EACZ,QAAc,EACd,GAAG,SAAS,EACb,EAAE,KAAK,2CAiBP"}
@@ -0,0 +1,13 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The color tint for the calico swirl effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 1.0 */
7
+ speed?: number;
8
+ /** Intensity of the effect. Default: 1.0 */
9
+ intensity?: number;
10
+ };
11
+ export default function CalicoSwirl({ color, speed, intensity, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=CalicoSwirl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalicoSwirl.d.ts","sourceRoot":"","sources":["../../../../src/components/CalicoSwirl.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,kDAAkD;IAClD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAiB,EACjB,KAAW,EACX,SAAe,EACf,GAAG,SAAS,EACb,EAAE,KAAK,2CAcP"}
@@ -0,0 +1,17 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The color tint for the fire effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 1.0 */
7
+ speed?: number;
8
+ /** Size of the sparks. Default: 1.0 */
9
+ sparkSize?: number;
10
+ /** Intensity of the fire. Default: 1.0 */
11
+ fireIntensity?: number;
12
+ /** Intensity of the smoke. Default: 1.0 */
13
+ smokeIntensity?: number;
14
+ };
15
+ export default function Campfire({ color, speed, sparkSize, fireIntensity, smokeIntensity, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=Campfire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Campfire.d.ts","sourceRoot":"","sources":["../../../../src/components/Campfire.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAiB,EACjB,KAAW,EACX,SAAe,EACf,aAAmB,EACnB,cAAoB,EACpB,GAAG,SAAS,EACb,EAAE,KAAK,2CAiBP"}
@@ -0,0 +1,19 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The color at the center of the gradient. */
5
+ centerColor: ColorInput;
6
+ /** The color at the edge of the gradient. Default: transparent */
7
+ edgeColor?: ColorInput;
8
+ /** Horizontal center position (0-1). Default: 0.5 */
9
+ centerX?: number;
10
+ /** Vertical center position (0-1). Default: 0.5 */
11
+ centerY?: number;
12
+ /** Horizontal radius. Default: 0.5 */
13
+ sizeX?: number;
14
+ /** Vertical radius. Default: 0.5 */
15
+ sizeY?: number;
16
+ };
17
+ export default function CircularGradient({ centerColor, edgeColor, centerX, centerY, sizeX, sizeY, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=CircularGradient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircularGradient.d.ts","sourceRoot":"","sources":["../../../../src/components/CircularGradient.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,+CAA+C;IAC/C,WAAW,EAAE,UAAU,CAAC;IACxB,kEAAkE;IAClE,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,WAAW,EACX,SAA2B,EAC3B,OAAa,EACb,OAAa,EACb,KAAW,EACX,KAAW,EACX,GAAG,SAAS,EACb,EAAE,KAAK,2CAmBP"}
@@ -0,0 +1,11 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The color tint for the iridescence effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 1.0 */
7
+ speed?: number;
8
+ };
9
+ export default function Iridescence({ color, speed, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=Iridescence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Iridescence.d.ts","sourceRoot":"","sources":["../../../../src/components/Iridescence.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,iDAAiD;IACjD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAiB,EACjB,KAAW,EACX,GAAG,SAAS,EACb,EAAE,KAAK,2CAaP"}
@@ -0,0 +1,15 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The color of the start of the gradient. */
5
+ startColor: ColorInput;
6
+ /** The color of the end of the gradient. */
7
+ endColor: ColorInput;
8
+ /** The angle of the gradient in degrees (0-360). */
9
+ angle: number;
10
+ /** Rotation speed in degrees/second. 0 = static. Default: 0 */
11
+ speed?: number;
12
+ };
13
+ export default function LinearGradient({ startColor, endColor, angle, speed, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=LinearGradient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearGradient.d.ts","sourceRoot":"","sources":["../../../../src/components/LinearGradient.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,8CAA8C;IAC9C,UAAU,EAAE,UAAU,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,EAAE,UAAU,CAAC;IACrB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAS,EACT,GAAG,SAAS,EACb,EAAE,KAAK,2CAcP"}
@@ -0,0 +1,17 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The base color for the liquid chrome effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 0.2 */
7
+ speed?: number;
8
+ /** Amplitude of the distortion. Default: 0.3 */
9
+ amplitude?: number;
10
+ /** Horizontal frequency. Default: 3 */
11
+ frequencyX?: number;
12
+ /** Vertical frequency. Default: 3 */
13
+ frequencyY?: number;
14
+ };
15
+ export default function LiquidChrome({ color, speed, amplitude, frequencyX, frequencyY, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=LiquidChrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiquidChrome.d.ts","sourceRoot":"","sources":["../../../../src/components/LiquidChrome.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,mDAAmD;IACnD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAiB,EACjB,KAAW,EACX,SAAe,EACf,UAAc,EACd,UAAc,EACd,GAAG,SAAS,EACb,EAAE,KAAK,2CAiBP"}
@@ -0,0 +1,3 @@
1
+ import type { ShaderViewProps } from './types';
2
+ export default function ShaderView({ fragmentShader, colors, speed, params, isStatic, style, ...viewProps }: ShaderViewProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ShaderView/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAS/C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,cAAc,EACd,MAAW,EACX,KAAW,EACX,MAAW,EACX,QAAgB,EAChB,KAAK,EACL,GAAG,SAAS,EACb,EAAE,eAAe,2CA8LjB"}
@@ -0,0 +1,15 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../../utils/colors';
3
+ export type ShaderViewProps = ViewProps & {
4
+ /** WGSL fragment shader source (must declare the Uniforms struct) */
5
+ fragmentShader: string;
6
+ /** Array of colors mapped to u.color0, u.color1 (max 2). Default: [] */
7
+ colors?: ColorInput[];
8
+ /** Time multiplier — controls animation speed. Default: 1.0 */
9
+ speed?: number;
10
+ /** Up to 8 shader-specific floats mapped to u.params0.xyzw and u.params1.xyzw */
11
+ params?: number[];
12
+ /** Render once then stop the RAF loop. Default: false */
13
+ isStatic?: boolean;
14
+ };
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ShaderView/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ColorInput } from '../utils/colors';
3
+ type Props = ViewProps & {
4
+ /** The base color for the silk effect. */
5
+ color?: ColorInput;
6
+ /** Animation speed multiplier. Default: 1.0 */
7
+ speed?: number;
8
+ /** Scale of the pattern. Default: 1.0 */
9
+ scale?: number;
10
+ /** Rotation angle in radians. Default: 0.0 */
11
+ rotation?: number;
12
+ /** Intensity of the noise grain. Default: 1.5 */
13
+ noiseIntensity?: number;
14
+ };
15
+ export default function Silk({ color, speed, scale, rotation, noiseIntensity, ...viewProps }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=Silk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Silk.d.ts","sourceRoot":"","sources":["../../../../src/components/Silk.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,KAAiB,EACjB,KAAW,EACX,KAAW,EACX,QAAc,EACd,cAAoB,EACpB,GAAG,SAAS,EACb,EAAE,KAAK,2CAiBP"}
@@ -0,0 +1,2 @@
1
+ export declare const NAMED_COLORS: Record<string, number>;
2
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuJ/C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type SharedValue } from 'react-native-reanimated';
2
+ export declare function useClock(): SharedValue<number>;
3
+ //# sourceMappingURL=useClock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClock.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useClock.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,CAW9C"}
@@ -0,0 +1,15 @@
1
+ import { type CanvasRef, type RNCanvasContext } from 'react-native-wgpu';
2
+ import type { WorkletRuntime } from 'react-native-worklets';
3
+ type GPUResources = {
4
+ device: GPUDevice;
5
+ context: RNCanvasContext;
6
+ presentationFormat: GPUTextureFormat;
7
+ };
8
+ type WGPUSetupResult = {
9
+ canvasRef: React.RefObject<CanvasRef>;
10
+ runtime: WorkletRuntime;
11
+ resources: GPUResources | null;
12
+ };
13
+ export declare function useWGPUSetup(): WGPUSetupResult;
14
+ export {};
15
+ //# sourceMappingURL=useWGPUSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWGPUSetup.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useWGPUSetup.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;IACzB,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,YAAY,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,wBAAgB,YAAY,IAAI,eAAe,CAiD9C"}
@@ -0,0 +1,12 @@
1
+ import CircularGradient from './components/CircularGradient';
2
+ import LinearGradient from './components/LinearGradient';
3
+ import ShaderView from './components/ShaderView';
4
+ import Iridescence from './components/Iridescence';
5
+ import LiquidChrome from './components/LiquidChrome';
6
+ import Silk from './components/Silk';
7
+ import Campfire from './components/Campfire';
8
+ import CalicoSwirl from './components/CalicoSwirl';
9
+ import Aurora from './components/Aurora';
10
+ export type { ShaderViewProps } from './components/ShaderView/types';
11
+ export { CircularGradient, LinearGradient, ShaderView, Iridescence, LiquidChrome, Silk, Campfire, CalicoSwirl, Aurora, };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,MAAM,GACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const TRIANGLE_VERTEX_SHADER = "\n struct VSOut { \n @builtin(position) pos: vec4<f32>,\n @location(0) ndc: vec2<f32>,\n };\n \n @vertex \n fn main(@builtin(vertex_index) vid: u32) -> VSOut {\n var p = array<vec2<f32>,3>(\n vec2<f32>(-1.0,-3.0), vec2<f32>(-1.0,1.0), vec2<f32>(3.0,1.0)\n );\n var o: VSOut;\n o.pos = vec4<f32>(p[vid], 0, 1.0);\n o.ndc = p[vid];\n return o;\n }\n";
2
+ //# sourceMappingURL=TRIANGLE_VERTEX_SHADER.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TRIANGLE_VERTEX_SHADER.d.ts","sourceRoot":"","sources":["../../../../src/shaders/TRIANGLE_VERTEX_SHADER.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,mYAgBlC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /** 96 bytes = 6 × vec4<f32> */
2
+ export declare const UNIFORM_BUFFER_SIZE = 96;
3
+ /** Number of float32 values in the uniform buffer */
4
+ export declare const UNIFORM_FLOAT_COUNT: number;
5
+ export declare const UNIFORMS_WGSL = "\nstruct Uniforms {\n resolution: vec4<f32>, // (width, height, aspect, pixelRatio)\n time: vec4<f32>, // (seconds, dt, 0, 0)\n color0: vec4<f32>, // colors[0] RGBA\n color1: vec4<f32>, // colors[1] RGBA\n params0: vec4<f32>, // params[0..3]\n params1: vec4<f32>, // params[4..7]\n};\n@group(0) @binding(0) var<uniform> u: Uniforms;\n";
6
+ //# sourceMappingURL=uniforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uniforms.d.ts","sourceRoot":"","sources":["../../../../src/shaders/uniforms.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAE3D,eAAO,MAAM,aAAa,mXAUzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const BackgroundRuntime: import("react-native-worklets").WorkletRuntime;
2
+ export declare function runOnBackground(callback: (...args: any[]) => void): void;
3
+ //# sourceMappingURL=backgroundRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundRuntime.d.ts","sourceRoot":"","sources":["../../../../src/utils/backgroundRuntime.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,gDAE5B,CAAC;AAEH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,QAGjE"}
@@ -0,0 +1,22 @@
1
+ export type ColorInput = number | string;
2
+ /**
3
+ * RGBA color values normalized to 0-1 range
4
+ */
5
+ export type RGBA = {
6
+ r: number;
7
+ g: number;
8
+ b: number;
9
+ a: number;
10
+ };
11
+ /**
12
+ * Converts various color formats to RGBA object
13
+ * @param color - Can be:
14
+ * - Hex number (0xff0000)
15
+ * - Hex string ("#ff0000" or "ff0000")
16
+ * - RGB string ("rgb(255, 0, 0)")
17
+ * - RGBA string ("rgba(255, 0, 0, 0.5)")
18
+ * - Named color ("red", "blue", "purple", etc.)
19
+ * @returns RGBA object with normalized values (0-1), alpha defaults to 1.0 for non-rgba formats
20
+ */
21
+ export declare function colorToVec4(color: ColorInput): RGBA;
22
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/utils/colors.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CA4FnD"}
@@ -0,0 +1,23 @@
1
+ import { type WorkletRuntime } from 'react-native-worklets';
2
+ /**
3
+ * Installs WebGPU globals on the given worklet runtime.
4
+ *
5
+ * Worklet runtimes run on a separate JS context that lacks browser-like globals.
6
+ * This function captures WebGPU constants and `navigator.gpu` from the RN thread
7
+ * and injects them into the worklet's `globalThis` so that WebGPU code can run
8
+ * as if it were in a browser environment.
9
+ *
10
+ * @param runtime - The worklet runtime to initialize
11
+ */
12
+ export declare function initWebGPU(runtime: WorkletRuntime): void;
13
+ declare global {
14
+ var self: typeof globalThis;
15
+ var _WORKLET: boolean | undefined;
16
+ var performance: {
17
+ now(): number;
18
+ };
19
+ interface Navigator {
20
+ gpu: GPU;
21
+ }
22
+ }
23
+ //# sourceMappingURL=initWebGPU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initWebGPU.d.ts","sourceRoot":"","sources":["../../../../src/utils/initWebGPU.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,QAwBjD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,IAAI,EAAE,OAAO,UAAU,CAAC;IAC5B,IAAI,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,IAAI,WAAW,EAAE;QAAE,GAAG,IAAI,MAAM,CAAA;KAAE,CAAC;IAEnC,UAAU,SAAS;QACjB,GAAG,EAAE,GAAG,CAAC;KACV;CACF"}