[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81116":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":19,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":14,"starSnapshotCount":14,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},81116,"levels","artofpilgrim\u002Flevels","artofpilgrim","Levels — texture alpha studio (browser-based)",null,"JavaScript",38,1,35,0,3,0.9,false,"main",true,[],"2026-06-12 02:04:11","# Levels\n\nA browser-based texture alpha studio. Drop an image, dial in a black-and-white channel mix, Brightness\u002FContrast, a Levels curve, and a perspective or rectangular crop — then copy or download the result as a PNG. Useful for generating alpha masks, height\u002Froughness maps, and stylised monochrome plates from photo references.\n\n**Live:** https:\u002F\u002Fartofpilgrim.github.io\u002Flevels\u002F\n\n## Features\n\n- **Channel mixer** with six color sliders (reds, yellows, greens, cyans, blues, magentas) and presets (Default, High contrast, Dark sky, Infrared, Red filter, Stark grunge).\n- **Brightness \u002F Contrast** as a linear (legacy-Photoshop) pre-stage applied before Levels.\n- **Levels** panel with histogram, input shadow\u002Fmidtone\u002Fhighlight handles, and output black\u002Fwhite handles. Keyboard-navigable (Tab to focus a handle, arrow keys to nudge, Shift+arrow for big steps).\n- **Rectangular crop** with free or locked aspect ratios (1:1, 4:5, 5:4, 16:9, 9:16, 3:2, 2:3). Shift while dragging = 1:1.\n- **Perspective crop** — drag 4 corners of a quad to deskew a region into a rectangle. Bilinear sampling, rule-of-thirds alignment grid, live output size, and 1px \u002F 10px keyboard nudging. Composes with rectangular crop; Reset preserves the pre-perspective crop.\n- **Color mode** — bypass the B&W conversion entirely and apply Levels \u002F B\u002FC per-channel.\n- **Invert**.\n- Real-time preview. Hold `Space` to compare against the original (before processing, after any crop\u002Fperspective).\n- One-click copy to clipboard or PNG download. Exports render from the current settings, even when the preview is deferred for responsiveness. Drag-and-drop, paste from clipboard, or open from disk.\n- Inputs over 4096px on the long edge are downscaled with a toast notice.\n\n## Shortcuts\n\n| Key | Action |\n| --- | --- |\n| `Space` (hold) | Compare against original |\n| `I` | Toggle invert |\n| `Ctrl` \u002F `⌘` + `C` | Copy result to clipboard |\n| `Ctrl` \u002F `⌘` + `S` | Download PNG |\n| `Enter` \u002F `Esc` | Apply \u002F cancel inside crop or perspective mode |\n| Arrow keys on a slider, levels handle, or selected perspective corner | Nudge (Shift for 10× step) |\n| Double-click a slider | Reset that slider to default |\n\n## File layout\n\nNo build step. React 18 + ReactDOM are loaded from a CDN; everything else is plain ES5\u002FES2017 JavaScript split into three ordered `\u003Cscript>` tags.\n\n| File | Role |\n| --- | --- |\n| `index.html` | Shell — links CSS and the three JS files. |\n| `styles.css` | All styles. |\n| `image.js` | `clamp`, B&W gray lookup, Levels\u002FB\u002FC LUT, `processImage`, homography + bilinear `warpPerspective`, defaults, presets. No React. |\n| `components.js` | `Icon`, `Slider`, `NumberInput`, `BWMixer`, `BCPanel`, `LevelsPanel`. Uses React. |\n| `app.js` | The `App` component + DOM boot. |\n\nThe three JS files communicate via a `window.Levels` namespace. `image.js` populates math + data first, `components.js` reads from it and adds the panels, `app.js` reads everything and renders.\n\n## Running locally\n\nOpen `index.html` in any modern browser — `file:\u002F\u002F` works for sibling `\u003Cscript src=\"...\">` files. For touch-pointer and clipboard testing, serve over HTTP (`python -m http.server` from the repo root).\n","Levels 是一个基于浏览器的纹理透明度工作室，用户可以上传图片并通过调整黑白通道混合、亮度\u002F对比度、色阶曲线以及裁剪等功能生成PNG格式的结果。其核心功能包括六种颜色滑块的通道混合器、亮度\u002F对比度调节、具有直方图和输入输出控制手柄的色阶面板、矩形裁剪与透视裁剪等。此外，它还支持实时预览、一键复制到剪贴板或下载PNG文件，并提供多种快捷键操作以提高效率。该项目特别适用于需要从照片参考中生成alpha遮罩、高度\u002F粗糙度贴图或风格化单色图像的设计场景。整个应用使用JavaScript编写，无需构建步骤即可运行，依赖React 18和ReactDOM库通过CDN加载。",2,"2026-06-11 04:03:35","CREATED_QUERY"]