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:
+22
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
|
||||
const browsers = require('./browsers').browsers
|
||||
|
||||
function unpackRegion(packed) {
|
||||
return Object.keys(packed).reduce((list, browser) => {
|
||||
let data = packed[browser]
|
||||
list[browsers[browser]] = Object.keys(data).reduce((memo, key) => {
|
||||
let stats = data[key]
|
||||
if (key === '_') {
|
||||
stats.split(' ').forEach(version => (memo[version] = null))
|
||||
} else {
|
||||
memo[key] = stats
|
||||
}
|
||||
return memo
|
||||
}, {})
|
||||
return list
|
||||
}, {})
|
||||
}
|
||||
|
||||
module.exports = unpackRegion
|
||||
module.exports.default = unpackRegion
|
||||
Reference in New Issue
Block a user