โฆ Shader Slider Studio
Angular implementation of Shader Slider Studio, a WebGL image slider with live controls and eight shader transitions
Build a sequence of images, tune its transitions while they play, and save the result as a preset or a portable JSON file.
โจ Highlights
- Eight WebGL transitions with adjustable timing, easing, intensity, and shader parameters. Select a transition for the entire slider or override it for individual slides.
- A live preview alongside controls for typography, colors, indicators, autoplay, and interaction.
- Cinematic effects including Ken Burns zoom, depth parallax, ambient motion, chromatic aberration, film grain, and vignette.
- Slide editing with image uploads or URLs, editable captions and links, and drag-and-drop reordering.
- Four built-in presets, custom presets, and browser autosave. JSON export embeds uploaded images and preserves remote image URLs.
- Fullscreen preview, a responsive settings panel, reduced-motion support, and a CSS fallback when WebGL2 is unavailable.
๐งญ Scope
The studio runs at /. The slider and settings share the same screen, with all editing and storage handled in the browser.
| Control |
Action |
H |
Show or hide the settings panel |
F |
Toggle fullscreen |
Esc |
Exit browser fullscreen |
โ / โ |
Previous or next slide when keyboard navigation is enabled |
| Drag or swipe |
Control transition progress when dragging is enabled |
| Mouse wheel or trackpad |
Navigate when wheel control is enabled |
๐ ๏ธ Tech Stack
| Layer |
Technology |
| Interface |
Angular 21, TypeScript 5.9, Lucide |
| Styling |
Tailwind CSS 4 and custom CSS animations |
| Rendering |
Native WebGL2 and GLSL |
| Storage |
localStorage for settings and presets, IndexedDB for uploaded images |
| Build |
Angular CLI and npm |
| Hosting |
Cloudflare Pages with Git integration or Direct Upload |
๐งฑ Architecture
Standalone Angular components render the slider, captions, and settings panel. An injectable studio service holds settings in signals, resolves uploaded images, and saves changes in the browser. SliderEngine manages navigation and animation timing. The WebGL renderer loads textures and draws each frame using the selected GLSL shader.
The slider engine, WebGL renderer and shaders, and configuration types come from the React implementation. Both versions use JSON format version 1, so you can export a configuration from one studio and import it into the other.
Storage is tied to the current origin. Export a JSON file to move settings and uploaded images from localhost or a preview URL to production. The original demo photos load from Unsplash and fonts load from Google Fonts. Remote images must support cross-origin requests to work as WebGL textures.
JSON import limits each embedded image to 20 million characters in its data URL, roughly 15 MB before encoding. Larger images may be truncated even when the import reports success.
๐๏ธ Project Structure
angular-webgl-slider-studio/
โโโ public/ # Favicon and crawler rules
โโโ src/
โ โโโ app/ # Application shell and Angular providers
โ โโโ settings/ # Inline settings, slide editor, and Angular controls
โ โโโ config/ # Defaults, presets, validation, and storage
โ โโโ lib/ # Color helpers
โ โโโ slider/ # Slider UI and animation engine
โ โโโ webgl/ # Renderer, shaders, effects, and easing
โ โโโ index.html
โ โโโ index.css
โ โโโ main.ts
โโโ .node-version # Node.js version for Pages builds
โโโ angular.json # Angular CLI build and serve settings
โโโ LICENSE
โโโ package.json
โโโ package-lock.json
โโโ README.md
โโโ tsconfig.json
โโโ wrangler.jsonc # Cloudflare Pages project and output directory
๐ Local Development
Use Node.js 24.14.0, the version pinned in .node-version.
npm ci
npm start
Run npm run build to check TypeScript and Angular templates and generate dist/. Run npm run preview to preview with the Angular CLI production configuration.
๐ Deployment
Cloudflare Pages
The button opens Workers & Pages in the Cloudflare dashboard. Choose Create application, then Continue to Pages below the app creation options and Import an existing Git repository โ Get started. Cloudflare's automatic deploy button supports Workers only.
- Push this project to GitHub or GitLab and select the repository in the Pages setup wizard. When installing the Cloudflare GitHub app, use Only select repositories and choose this repository.
- Use the settings below, then choose Save and Deploy.
- Open the production URL shown by Cloudflare. Subsequent pushes to the production branch trigger new builds, and other branches can create preview deployments.
| Cloudflare Pages setting |
Value |
| Project name |
angular-webgl-slider-studio |
| Production branch |
The branch you publish from, commonly master or main |
| Framework preset |
None |
| Build command |
npm run build |
| Build output directory |
dist |
| Root directory |
Leave blank in a standalone repo. Set angular-webgl-slider-studio if it is a subdirectory of a larger repo. |
Pages reads the Node.js version from .node-version. The app runs entirely in the browser and requires no application environment variables, secrets, or Pages Functions. If you choose a different Pages project name, update name in wrangler.jsonc to match.
See the Cloudflare Pages Git integration guide and build configuration.
Direct Upload
For a manual deployment, run npm run build, choose Continue to Pages โ Drag and drop your files, and upload dist/. Select Git integration at project creation for automatic builds on repository pushes. See the Direct Upload guide.
๐ License
MIT License. See LICENSE.