shader-gradient-vue 1.0.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ruucm (ShaderGradient)
4
+ Copyright (c) 2025 ffffaaqq (Vue wrapper)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # shader-gradient-vue
2
+
3
+ Vue 3 wrapper for [ShaderGradient](https://github.com/ruucm/shadergradient).
4
+
5
+ > Tested with `@shadergradient/react@2.4.20`
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i shader-gradient-vue
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```vue
16
+ <script setup>
17
+ import { ShaderGradient } from 'shader-gradient-vue'
18
+ </script>
19
+
20
+ <template>
21
+ <ShaderGradient
22
+ animate="on"
23
+ color1="#ff5005"
24
+ color2="#dbba95"
25
+ color3="#d0bce1"
26
+ type="plane"
27
+ :uSpeed="0.4"
28
+ :uStrength="4"
29
+ grain="on"
30
+ />
31
+ </template>
32
+ ```
33
+
34
+ ## Props
35
+
36
+ All props from [@shadergradient/react](https://github.com/ruucm/shadergradient) are supported.
37
+
38
+ | Prop | Type | Description |
39
+ |------|------|-------------|
40
+ | `type` | `'plane' \| 'sphere' \| 'waterPlane'` | Shape |
41
+ | `animate` | `'on' \| 'off'` | Animation |
42
+ | `color1`, `color2`, `color3` | `string` | Colors |
43
+ | `uSpeed`, `uStrength`, `uDensity`, `uFrequency` | `number` | Shader params |
44
+ | `grain` | `'on' \| 'off'` | Grain effect |
45
+ | `lightType` | `'3d' \| 'env'` | Lighting |
46
+ | `envPreset` | `'city' \| 'dawn' \| 'lobby'` | Environment |
47
+
48
+ [Full props list](https://github.com/ruucm/shadergradient)
49
+
50
+ ## Bundle size
51
+
52
+ ~250kb gzip (three.js + react + veaury). Consider this for performance-critical apps.
53
+
54
+ ## License
55
+
56
+ MIT — see [LICENSE](./LICENSE)
@@ -0,0 +1,93 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ type?: "plane" | "sphere" | "waterPlane";
3
+ animate?: "on" | "off";
4
+ uTime?: number;
5
+ uSpeed?: number;
6
+ uStrength?: number;
7
+ uDensity?: number;
8
+ uFrequency?: number;
9
+ uAmplitude?: number;
10
+ positionX?: number;
11
+ positionY?: number;
12
+ positionZ?: number;
13
+ rotationX?: number;
14
+ rotationY?: number;
15
+ rotationZ?: number;
16
+ color1?: string;
17
+ color2?: string;
18
+ color3?: string;
19
+ reflection?: number;
20
+ wireframe?: boolean;
21
+ shader?: string;
22
+ range?: "enabled" | "disabled";
23
+ rangeStart?: number;
24
+ rangeEnd?: number;
25
+ loop?: "on" | "off";
26
+ loopDuration?: number;
27
+ cAzimuthAngle?: number;
28
+ cPolarAngle?: number;
29
+ cDistance?: number;
30
+ cameraZoom?: number;
31
+ lightType?: "3d" | "env";
32
+ brightness?: number;
33
+ envPreset?: "city" | "dawn" | "lobby";
34
+ grain?: "on" | "off";
35
+ grainBlending?: number;
36
+ control?: "query" | "props";
37
+ urlString?: string;
38
+ zoomOut?: boolean;
39
+ toggleAxis?: boolean;
40
+ hoverState?: string;
41
+ enableTransition?: boolean;
42
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
43
+ type?: "plane" | "sphere" | "waterPlane";
44
+ animate?: "on" | "off";
45
+ uTime?: number;
46
+ uSpeed?: number;
47
+ uStrength?: number;
48
+ uDensity?: number;
49
+ uFrequency?: number;
50
+ uAmplitude?: number;
51
+ positionX?: number;
52
+ positionY?: number;
53
+ positionZ?: number;
54
+ rotationX?: number;
55
+ rotationY?: number;
56
+ rotationZ?: number;
57
+ color1?: string;
58
+ color2?: string;
59
+ color3?: string;
60
+ reflection?: number;
61
+ wireframe?: boolean;
62
+ shader?: string;
63
+ range?: "enabled" | "disabled";
64
+ rangeStart?: number;
65
+ rangeEnd?: number;
66
+ loop?: "on" | "off";
67
+ loopDuration?: number;
68
+ cAzimuthAngle?: number;
69
+ cPolarAngle?: number;
70
+ cDistance?: number;
71
+ cameraZoom?: number;
72
+ lightType?: "3d" | "env";
73
+ brightness?: number;
74
+ envPreset?: "city" | "dawn" | "lobby";
75
+ grain?: "on" | "off";
76
+ grainBlending?: number;
77
+ control?: "query" | "props";
78
+ urlString?: string;
79
+ zoomOut?: boolean;
80
+ toggleAxis?: boolean;
81
+ hoverState?: string;
82
+ enableTransition?: boolean;
83
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
84
+ export default _default;
85
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
86
+ type __VLS_TypePropsToRuntimeProps<T> = {
87
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
88
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
89
+ } : {
90
+ type: import('vue').PropType<T[K]>;
91
+ required: true;
92
+ };
93
+ };
@@ -0,0 +1,4 @@
1
+ import { default as ShaderGradient } from './ShaderGradient.vue';
2
+
3
+ export { ShaderGradient };
4
+ export default ShaderGradient;