Add per-class 3D viewers for tiles, tokens, cards, and custom models using React Three Fiber, drei, and postprocessing. Viewers are lazy-loaded and registered through the existing viewer registry, with a shared scene wrapper for lighting, orbit controls, and subtle effects. Add a CORS-safe /asset proxy route so three.js loaders can fetch Workshop-hosted textures and models, and extend TTSObject with the CustomMesh and CustomTile/CustomToken fields the viewers read.
16 lines
461 B
TypeScript
16 lines
461 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
// Proxy API calls to the Hono backend during development.
|
|
proxy: {
|
|
'/search': 'http://localhost:3000',
|
|
'/items': 'http://localhost:3000',
|
|
'/health': 'http://localhost:3000',
|
|
'/asset': 'http://localhost:3000',
|
|
},
|
|
},
|
|
}); |