refactor: tighten project structure and strengthen tooling
This commit is contained in:
@@ -8,31 +8,31 @@ Built with React, Three.js, and Vite. Runs in the browser, no installation requi
|
||||
|
||||
### Build & Language
|
||||
|
||||
| Package | Doc |
|
||||
| -------------------------------------------------- | ------------------------------------ |
|
||||
| [TypeScript](https://www.typescriptlang.org/docs/) | https://www.typescriptlang.org/docs/ |
|
||||
| [React](https://react.dev/learn) | https://react.dev/learn |
|
||||
| [Vite](https://vite.dev/guide/) | https://vite.dev/guide/ |
|
||||
| [ESLint](https://eslint.org/docs/latest/) | https://eslint.org/docs/latest/ |
|
||||
| [Prettier](https://prettier.io/docs/) | https://prettier.io/docs/ |
|
||||
| Package |
|
||||
| -------------------------------------------------- |
|
||||
| [TypeScript](https://www.typescriptlang.org/docs/) |
|
||||
| [React](https://react.dev/learn) |
|
||||
| [Vite](https://vite.dev/guide/) |
|
||||
| [ESLint](https://eslint.org/docs/latest/) |
|
||||
| [Prettier](https://prettier.io/docs/) |
|
||||
|
||||
### 3D Engine
|
||||
|
||||
| Package | Doc |
|
||||
| ----------------------------------------------------------------------------------------- | ---------------------------------------------- |
|
||||
| [Three.js](https://threejs.org/docs/) | https://threejs.org/docs/ |
|
||||
| [@react-three/fiber](https://docs.pmnd.rs/react-three-fiber/getting-started/introduction) | https://docs.pmnd.rs/react-three-fiber |
|
||||
| [@react-three/drei](https://pmndrs.github.io/drei) | https://pmndrs.github.io/drei |
|
||||
| [@react-three/rapier](https://rapier.rs/docs/) | https://rapier.rs/docs/user_guides/javascript/ |
|
||||
| [@react-three/postprocessing](https://github.com/pmndrs/postprocessing) | https://github.com/pmndrs/postprocessing |
|
||||
| [GSAP](https://gsap.com/docs/v3/Installation/) | https://gsap.com/docs/v3/ |
|
||||
| Package |
|
||||
| ----------------------------------------------------------------------------------------- |
|
||||
| [Three.js](https://threejs.org/docs/) |
|
||||
| [@react-three/fiber](https://docs.pmnd.rs/react-three-fiber/getting-started/introduction) |
|
||||
| [@react-three/drei](https://pmndrs.github.io/drei) |
|
||||
| [@react-three/rapier](https://rapier.rs/docs/) |
|
||||
| [@react-three/postprocessing](https://github.com/pmndrs/postprocessing) |
|
||||
| [GSAP](https://gsap.com/docs/v3/Installation/) |
|
||||
|
||||
### Performance & Effects
|
||||
|
||||
| Package | Doc |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| [r3f-perf](https://github.com/utsuboco/r3f-perf) | https://github.com/utsuboco/r3f-perf |
|
||||
| [AnimationMixer](https://threejs.org/docs/#api/en/animation/AnimationMixer) | https://threejs.org/docs/#api/en/animation/AnimationMixer |
|
||||
| Package |
|
||||
| --------------------------------------------------------------------------- |
|
||||
| [r3f-perf](https://github.com/utsuboco/r3f-perf) |
|
||||
| [AnimationMixer](https://threejs.org/docs/#api/en/animation/AnimationMixer) |
|
||||
|
||||
## 🗂 Project Structure
|
||||
|
||||
@@ -98,16 +98,20 @@ la-fabrik/
|
||||
│ ├── vertex.glsl
|
||||
│ └── fragment.glsl
|
||||
│
|
||||
├── debug/ # Dev-only tools and scene inspection
|
||||
│ ├── Debug.ts # Global lil-gui manager
|
||||
│ ├── DebugPerf.tsx # r3f-perf overlay mounted in Canvas
|
||||
│ └── scene/
|
||||
│ ├── DebugHelpers.tsx # Grid + axes helpers shown in debug mode
|
||||
│ └── DebugCameraControls.tsx # Free debug camera for map inspection
|
||||
│
|
||||
├── utils/
|
||||
│ ├── EventEmitter.ts # Simple pub/sub for manager-to-manager events
|
||||
│ └── Dispose.ts # traverse() + dispose() helper
|
||||
│ ├── EventEmitter.ts # Simple typed pub/sub utility
|
||||
│ ├── Sizes.ts # Viewport size tracking
|
||||
│ ├── Time.ts # Animation frame timing utility
|
||||
│ ├── Readme.md
|
||||
│ └── debug/ # Dev-only tools and scene inspection
|
||||
│ ├── Debug.ts # Global lil-gui manager
|
||||
│ ├── DebugPerf.tsx # r3f-perf overlay mounted in Canvas
|
||||
├── hooks/
|
||||
│ └── debug/
|
||||
│ └── useCameraMode.ts
|
||||
│ └── scene/
|
||||
│ ├── DebugHelpers.tsx # Grid + axes helpers shown in debug mode
|
||||
│ └── DebugCameraControls.tsx # Free debug camera for map inspection
|
||||
│
|
||||
├── App.tsx # Canvas bootstrap
|
||||
└── main.tsx
|
||||
@@ -122,12 +126,8 @@ npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open `http://localhost:5173` — standard experience.
|
||||
Open `http://localhost:5173?debug` — debug panel + r3f-perf overlay. The free debug camera is enabled from the debug panel.
|
||||
|
||||
## 🧭 Conventions
|
||||
|
||||
Coding conventions and generation rules live in `.agent/skills/best-practices.md`.
|
||||
- `http://localhost:5173` for the app
|
||||
- `http://localhost:5173?debug` to enable debug tooling
|
||||
|
||||
## 📜 License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user