You've already forked flecs_tests
Reorganized the code structure, fix a lot of issues.
This commit is contained in:
11
CLAUDE.md
11
CLAUDE.md
@@ -9,6 +9,7 @@ A browser-based world map creation tool (like Wonderdraft/Inkarnate). C99 compil
|
||||
- **UI:** Dear ImGui via cimgui — `lib/imgui/`
|
||||
- **Math:** cglm (types are C arrays: `vec2` = `float[2]`, `mat4` = `float[4][4]` column-major) — `lib/cglm/`
|
||||
- **Shaders:** WGSL in `src/shaders/`, compiled to C headers via `xxd -i` into `src/generated/`
|
||||
- **Shapes:** Line-strip based vector shapes (circle, star) with procedural vertex generation
|
||||
|
||||
### Build
|
||||
- `make` (release) / `make debug` — outputs `app.html`
|
||||
@@ -16,9 +17,13 @@ A browser-based world map creation tool (like Wonderdraft/Inkarnate). C99 compil
|
||||
- Include paths: `lib/sokol`, `lib/imgui`, `lib/imgui/imgui`, `lib/util`, `lib/cglm/include`
|
||||
|
||||
### Key files
|
||||
- `src/main.c` — entry point, sokol init, render loop, input (zoom/pan/drag)
|
||||
- `src/api.h` — central include hub, backend defines
|
||||
- `src/sprite.h` — sprite batching, texture manager, file import stubs
|
||||
- `src/main.c` — entry point, sokol init, render loop, all input handling, overlay geometry, UI panels, and debug stats
|
||||
- `src/api.h` — central include hub, backend defines, ALLOC/FREE macros (wired to smemtrack)
|
||||
- `src/camera.h` — viewport state (zoom/pan), MVP matrix computation, screen↔world coordinate transforms
|
||||
- `src/render.h` — shape pipeline init/shutdown, per-shape draw calls (shader uniform binding)
|
||||
- `src/shape.h` — shape geometry types, procedural generation (circle/star), transform building, hit testing, buffer management
|
||||
- `src/spatial.h` — spatial hash grid for accelerating hit tests and rect-selection queries
|
||||
- `src/history.h` — undo/redo stack with property-level tracking (position/scale/rotation/color), edit session capture, batch operations
|
||||
- `src/util.h` — `vector_t` (dynamic array) and `mem_pool_t` (free-list pool), both stripe-based
|
||||
- `src/rand.h` — xorshift32 PRNG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user