shaderz 1.1.0 → 1.2.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,6 +1,8 @@
1
- # Shaderz CLI
1
+ # Shaderz
2
2
 
3
- Add beautiful WebGL shaders to your React/Next.js project with a simple CLI.
3
+ Add beautiful WebGL & video background shaders to your React/Next.js project with a simple CLI.
4
+
5
+ **26 shaders** — 16 WebGL + 10 video backgrounds. Zero config.
4
6
 
5
7
  ## Installation
6
8
 
@@ -8,7 +10,7 @@ Add beautiful WebGL shaders to your React/Next.js project with a simple CLI.
8
10
  npm install shaderz
9
11
  ```
10
12
 
11
- Or use with npx (no installation required):
13
+ Or use directly with npx (no installation required):
12
14
 
13
15
  ```bash
14
16
  npx shaderz add
@@ -16,75 +18,107 @@ npx shaderz add
16
18
 
17
19
  ## Usage
18
20
 
19
- ### Interactive Installation
20
-
21
- Install shaders interactively by selecting from a list:
21
+ ### Add shaders to your project
22
22
 
23
23
  ```bash
24
24
  npx shaderz add
25
25
  ```
26
26
 
27
27
  This will:
28
- 1. Show a checkbox list of all available shaders
29
- 2. Let you select multiple shaders with Space
30
- 3. Install selected shaders to `components/shaders/`
28
+ 1. Show a list of all 26 available shaders
29
+ 2. Let you select multiple shaders with **Space**
30
+ 3. Install shader components to `components/shaders/`
31
31
  4. Copy video files to `public/videos/` (for video shaders)
32
- 5. Check and remind you to install required dependencies
33
- 6. Show usage examples
34
-
35
- ## Available Shaders
36
-
37
- **WebGL Shaders:**
38
- - `liquid-orange` - Flowing liquid shader with warm orange tones
39
- - `ocean-waves` - Dynamic ocean waves shader
40
- - `neon-fluid` - Vibrant neon fluid shader
41
- - `gradient-waves` - Smooth gradient waves shader
42
- - `cosmic-nebula` - Space-themed nebula shader
43
- - `glossy-ribbon` - Glossy ribbon flow shader
44
- - `silk-flow` - Smooth silk flow shader
45
- - `glass-twist` - Glass twist effect shader
46
- - `plasma` - Classic plasma shader
47
-
48
- **Video Background:**
49
- - `glossy-film` - MP4 video background (copies video to public/videos/)
50
-
51
- ## Usage in Your Project
32
+ 5. Remind you to install required dependencies
52
33
 
53
- After installation:
34
+ ### Use as a full-screen background
54
35
 
55
36
  ```tsx
56
37
  import LiquidOrangeShader from '@/components/shaders/LiquidOrangeShader';
57
38
 
58
- function App() {
39
+ export default function HeroSection() {
59
40
  return (
60
- <div className="relative w-full h-screen">
61
- <LiquidOrangeShader />
62
- {/* Your content */}
41
+ <div className="relative w-full h-screen overflow-hidden">
42
+ {/* Shader background */}
43
+ <div className="absolute inset-0 z-0">
44
+ <LiquidOrangeShader />
45
+ </div>
46
+
47
+ {/* Your content on top */}
48
+ <div className="relative z-10 flex items-center justify-center h-full">
49
+ <h1 className="text-6xl font-bold text-white">Hello World</h1>
50
+ </div>
63
51
  </div>
64
52
  );
65
53
  }
66
54
  ```
67
55
 
68
- ### Video Background
56
+ ### Use as a contained element
69
57
 
70
58
  ```tsx
71
- import VideoBackground from '@/components/shaders/VideoBackground';
59
+ import PlasmaShader from '@/components/shaders/PlasmaShader';
72
60
 
73
61
  function App() {
74
62
  return (
75
- <div className="relative w-full h-screen">
76
- <VideoBackground src="/videos/glossy-film.mp4" />
77
- {/* Your content */}
63
+ <div style={{ width: '100%', height: '500px' }}>
64
+ <PlasmaShader />
78
65
  </div>
79
66
  );
80
67
  }
81
68
  ```
82
69
 
70
+ ## Available Shaders
71
+
72
+ ### WebGL Shaders (16)
73
+
74
+ | Shader | Description |
75
+ |--------|-------------|
76
+ | `liquid-orange` | Flowing liquid with warm orange tones |
77
+ | `ocean-waves` | Dynamic ocean waves |
78
+ | `neon-fluid` | Vibrant neon fluid |
79
+ | `gradient-waves` | Smooth gradient waves |
80
+ | `cosmic-nebula` | Space-themed nebula |
81
+ | `silk-flow` | Smooth silk flow |
82
+ | `plasma` | Classic plasma effect |
83
+ | `plasma-v2` | Enhanced plasma with more colors |
84
+ | `dark-veil` | Mysterious blue/purple gradient |
85
+ | `liquid-motion` | Advanced fluid simulation |
86
+ | `frothy-galaxy` | Galactic frothy effect |
87
+ | `dark-cloudy` | Atmospheric dark cloudy |
88
+ | `electric-storm` | Dramatic electric lightning |
89
+ | `floating-lines` | Floating geometric lines |
90
+ | `gradient-blinds` | Venetian blinds effect |
91
+ | `lightening` | Lightning bolt effects |
92
+
93
+ ### Video Shaders (10)
94
+
95
+ | Shader | Description |
96
+ |--------|-------------|
97
+ | `glossy-film` | Smooth glossy film with reflections |
98
+ | `nova-silk` | Silky smooth nova with flowing gradients |
99
+ | `abstract-render` | Stunning 3D abstract art render |
100
+ | `cosmic-flow` | Mesmerizing cosmic flow animation |
101
+ | `liquid-colors` | Vibrant liquid colors with smooth transitions |
102
+ | `neon-swirl` | Vibrant neon swirling patterns |
103
+ | `sci-fi-corridor` | Futuristic sci-fi corridor |
104
+ | `tunnel-cube` | Hypnotic tunnel made of cubes |
105
+ | `vj-spiral` | VJ-style spiral with psychedelic colors |
106
+ | `wavy-abstract` | Wavy abstract patterns |
107
+
108
+ > Video shaders automatically copy the `.mp4` file to your `public/videos/` folder.
109
+
83
110
  ## Requirements
84
111
 
85
112
  - React 18+ or 19+
86
- - No additional dependencies required (WebGL is built into modern browsers)
87
- - Video shader requires the video file to be in public/videos/ (automatically handled by CLI)
113
+ - **WebGL shaders**: `npm install three @types/three @react-three/fiber`
114
+ - **Gradient Blinds**: `npm install ogl`
115
+ - **Video shaders**: No extra dependencies (uses native `<video>` element)
116
+
117
+ ## Links
118
+
119
+ - 🌐 [Live Demo & Docs](https://shaderz.vercel.app)
120
+ - 📦 [npm](https://www.npmjs.com/package/shaderz)
121
+ - 🐙 [GitHub](https://github.com/harshsinghsv/shaders-library)
88
122
 
89
123
  ## License
90
124
 
package/dist/cli.js CHANGED
@@ -327,6 +327,6 @@ No components directory found. Will create: ${componentsBase}/shaders/`));
327
327
  process.exit(1);
328
328
  }
329
329
  }
330
- program.name("shaderz").description("CLI to add beautiful WebGL shaders to your project").version("1.0.0");
330
+ program.name("shaderz").description("CLI to add beautiful WebGL shaders to your project").version("1.2.0");
331
331
  program.command("add").description("Add shaders to your project").action(addShaders);
332
332
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shaderz",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "CLI tool to add beautiful WebGL shaders to your React/Next.js project",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  /* eslint-disable react/no-unknown-property */
2
3
  import React, { forwardRef, useMemo, useRef, useLayoutEffect } from 'react';
3
4
  import { Canvas, useFrame, useThree, RootState } from '@react-three/fiber';
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { useEffect, useRef } from 'react';
2
3
  import {
3
4
  Scene,
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React, { useEffect, useRef } from 'react';
2
3
  import { Renderer, Program, Mesh, Triangle } from 'ogl';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React, { useRef, useEffect, useState } from 'react';
2
3
  import * as THREE from 'three';
3
4