Files
VFXdemo/README.md
Daniel afbcd99224 fix
2026-04-01 20:06:17 +08:00

47 lines
979 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VFXdemo
一个用于快速复刻 ShaderToy 效果的本地工具页WebGL2 多预览面板 + 后端内容管理)。
## 启动
```bash
npm install
npm run dev
```
打开 `http://localhost:5180`
## Docker 一键启动(国内镜像)
```bash
./start-docker-cn.sh
```
说明:
- Node 基础镜像走 `docker.m.daocloud.io`
- npm 安装源走 `https://registry.npmmirror.com`
- 服务地址:`http://localhost:5180`
## 页面能力
- 预览墙:多个 VFX 同屏实时渲染,支持点进详情
- 每个小窗独立播放/暂停
- 后端管理:点击“管理内容”,可直接粘贴 GLSL 并保存到后端
- 保存后实时刷新前端展示,支持删除
## 兼容的 uniform
- `iResolution`
- `iTime`
- `iTimeDelta`
- `iFrame`
- `iMouse`
## 后端接口
- `GET /api/shaders` 获取列表
- `POST /api/shaders` 新增 shader`name`, `author`, `code`
- `DELETE /api/shaders/:id` 删除 shader
数据默认持久化在 `data/shaders.json`