The kit is going public, so everything a reader sees is now English:
27 model sources, the core vocabulary, meta.ts (titles, descriptions and
every slider label), the viewer UI, all script output, REFERENCE.md and
the READMEs.
Rules applied: only comments, doc comments and human-facing strings were
touched. Identifiers, numbers, logic, registry item ids, part names and
material slot names are unchanged — those are a published contract and
were already English.
Verified rather than assumed: for all 53 changed .ts files the code
skeleton (source with comments stripped and string contents replaced by a
placeholder) is byte-identical before and after. Full gate is green —
typecheck, registry conformance, ~510 model checks, GLB round trip and a
production build.
Also fixed here:
- index.html and viewer.html were missed by the translation pass because
the file list only covered .ts/.md/.css. Both had lang="tr" and Turkish
titles.
- The viewer formatted triangle counts with toLocaleString('tr-TR'), which
prints 15.425 rather than 15,425.
- REFERENCE.md's model table header did not match what
scripts/catalog-table.ts emits, so the next regeneration would have
silently changed it. Aligned to the generator.
- Removed scripts/probe.ts and scripts/zdiag.ts; they were throwaway
diagnostics that got committed by accident.
28 lines
1,009 B
TypeScript
28 lines
1,009 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
|
|
/**
|
|
* A separate build for embedding the viewer into a single-file Artifact.
|
|
* `scripts/build-artifact.ts` collapses the output into one HTML file.
|
|
*/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: [
|
|
{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) },
|
|
// `three` and `three/webgpu` are separate bundles; loading both packs the
|
|
// core twice and breaks instanceof checks. The regex is required — a plain
|
|
// string prefix match would break the `three/addons/...` path too.
|
|
{ find: /^three$/, replacement: 'three/webgpu' },
|
|
],
|
|
},
|
|
build: {
|
|
outDir: 'dist-viewer',
|
|
emptyOutDir: true,
|
|
target: 'esnext',
|
|
cssCodeSplit: false,
|
|
rollupOptions: {
|
|
input: fileURLToPath(new URL('./viewer.html', import.meta.url)),
|
|
output: { inlineDynamicImports: true, entryFileNames: 'viewer.js', assetFileNames: 'viewer[extname]' },
|
|
},
|
|
},
|
|
})
|