feat: V1 prototype — Vite/React/TS tileset generator

- Scaffold: package.json, tsconfig.json, vite.config.ts, index.html
- src/lib/imageProcessor.ts: full pipeline (normalize, offset, seam repair, export, validation)
- src/components/UploadPanel.tsx: drag-and-drop, file picker, clipboard paste
- src/components/SettingsPanel.tsx: all controls per spec
- src/components/PreviewPanel.tsx: Original / Tileable / Repeated tabs
- src/components/ErrorBanner.tsx: dismissible error/warning banners
- src/App.tsx: root component wiring everything together
- src/index.css: dark premium glassmorphism theme w/ Inter font
This commit is contained in:
Ben
2026-05-15 01:18:26 -07:00
parent 68d1ee21b4
commit 31d0464a60
2439 changed files with 933708 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const { EOL } = require('os')
const getFirstRegexpMatchOrDefault = (text, regexp, defaultValue) => {
regexp.lastIndex = 0 // https://stackoverflow.com/a/11477448/4536543
let match = regexp.exec(text)
if (match !== null) {
return match[1]
} else {
return defaultValue
}
}
const DEFAULT_INDENT = ' '
const INDENT_REGEXP = /^([ \t]+)[^\s]/m
module.exports.detectIndent = text =>
getFirstRegexpMatchOrDefault(text, INDENT_REGEXP, DEFAULT_INDENT)
module.exports.DEFAULT_INDENT = DEFAULT_INDENT
const DEFAULT_EOL = EOL
const EOL_REGEXP = /(\r\n|\n|\r)/g
module.exports.detectEOL = text =>
getFirstRegexpMatchOrDefault(text, EOL_REGEXP, DEFAULT_EOL)
module.exports.DEFAULT_EOL = DEFAULT_EOL