Commit Graph

214 Commits

Author SHA1 Message Date
6ef248f76d feat(editor): add OrbitCamera with orbit, zoom, pan controls
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:33:10 +09:00
ae20590f6e feat(editor): add ViewportTexture offscreen render target
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:31:28 +09:00
d93253dfb1 docs: add scene viewport implementation plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:26:21 +09:00
fed47e9242 docs: fix scene viewport spec from review
- Add voltex_math/voltex_renderer dependencies
- Fix color format to Rgba8Unorm (linear, prevent double gamma)
- Correct bind group layout to match mesh_shader.wgsl
- Add vec3 padding requirement for Rust uniform structs
- Per-frame bind group creation for viewport renderer
- Pan degenerate right vector guard

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:22:30 +09:00
8468f3cce2 docs: add scene viewport design spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:20:07 +09:00
c19dc6421a docs: update STATUS.md and DEFERRED.md with docking system
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:11:26 +09:00
f7ef228b49 feat(editor): integrate docking into editor_demo
Add full-frame-cycle integration test to dock.rs (16 tests total) and
update editor_demo to use DockTree layout instead of a single panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:09:53 +09:00
1571aa5f97 feat(editor): add draw_chrome for tab bars and split lines
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:57:18 +09:00
36fedb48bf feat(editor): add update method with tab click and resize handling
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:54:57 +09:00
a642f8ef7e fix(editor): address code review issues in dock module
- debug_assert → assert for empty tabs invariant
- tabs.len() - 1 → saturating_sub(1) to prevent underflow
- Add #[allow(dead_code)] for scaffolded structs/constants

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:52:53 +09:00
14784c731c feat(editor): add dock tree data model and layout algorithm
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:49:53 +09:00
a69554eede docs: add editor docking implementation plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:43:08 +09:00
867f8a0aa0 docs: fix docking spec issues from review
- Add panel name registry (names Vec)
- Cache layout results for draw_chrome
- Track prev_mouse_down for click detection
- Add invariants (non-empty tabs, active clamping, resize priority)
- Add LeafLayout and ResizeState structs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:37:18 +09:00
eb454800a9 docs: add editor docking system design spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:34:45 +09:00
622c91a954 docs: update STATUS.md and DEFERRED.md with all completed deferred items
Test count: 255 → 485. Major additions across all crates:
- Renderer: JPG, glTF, ORM/Emissive, CSM, Point/Spot Shadow, Frustum Culling, SH, GPU BRDF
- ECS: JSON/Binary scene, ComponentRegistry, query filters, scheduler
- Physics: Angular dynamics, Sequential Impulse, Sleep, CCD, BVH refit, ray/triangle
- Asset: Async loader, FileWatcher, hot reload
- Audio: OGG/Vorbis, 24/32-bit WAV, Doppler
- AI: NavMesh builder, Funnel, obstacle avoidance
- Net: Reliability, snapshots, interpolation
- Script: Table interop, coroutines, sandbox, hot reload
- Editor: Text input, scroll, drag & drop

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 07:38:37 +09:00
f522bf10ac feat(script): add Lua table interop, coroutines, sandbox, hot reload
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 07:33:00 +09:00
63e59c0544 feat(editor): add text input, scroll panel, drag-and-drop widgets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 07:32:55 +09:00
9f5f2df07c feat(ai): add navmesh builder, funnel algorithm, dynamic obstacle avoidance
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 07:15:40 +09:00
1c2a8466e7 feat(audio): add OGG/Vorbis decoder, 24/32-bit WAV, Doppler effect
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 07:15:38 +09:00
0ef750de69 feat(net): add reliability layer, state sync, and client interpolation
- ReliableChannel: sequence numbers, ACK, retransmission, RTT estimation
- OrderedChannel: in-order delivery with out-of-order buffering
- Snapshot serialization with delta compression (per-field bitmask)
- InterpolationBuffer: linear interpolation between server snapshots
- New packet types: Reliable, Ack, Snapshot, SnapshotDelta

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 21:03:52 +09:00
dccea21bfe feat(ai): add funnel string-pulling and navmesh serialization
Add Simple Stupid Funnel (SSF) algorithm for optimal path smoothing through
triangle corridors. Refactor A* to expose find_path_triangles for triangle
index paths. Add binary serialize/deserialize for NavMesh and shared_edge
query method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 21:00:35 +09:00
1081fb472f feat(renderer): improve IBL with Hosek-Wilkie sky, SH irradiance, GPU BRDF LUT
- Hosek-Wilkie inspired procedural sky (Rayleigh/Mie scattering, sun disk)
- L2 Spherical Harmonics irradiance (9 coefficients, CPU computation)
- SH evaluation in shader replaces sample_environment for diffuse IBL
- GPU compute BRDF LUT (Rg16Float, higher precision than CPU Rgba8Unorm)
- SkyParams (sun_direction, turbidity) in ShadowUniform

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:58:28 +09:00
abd6f5cf6e feat(physics): add angular dynamics, sequential impulse solver, sleep system, BVH improvements, CCD, and ray extensions
- Angular velocity integration with diagonal inertia tensor (sphere/box/capsule)
- Angular impulse in collision solver (torque from off-center contacts)
- Sequential impulse solver with configurable iterations (default 4)
- Sleep/island system: bodies sleep after velocity threshold timeout, wake on collision
- Ray vs triangle intersection (Moller-Trumbore algorithm)
- raycast_all returning all hits sorted by distance
- BVH query_pairs replaced N^2 brute force with recursive tree traversal
- BVH query_ray for accelerated raycasting
- BVH refit for incremental AABB updates
- Swept sphere vs AABB continuous collision detection (CCD)
- Updated lib.rs exports for all new public APIs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:57:55 +09:00
1b0e12e824 feat(renderer): add CSM, point/spot shadows, and frustum light culling
- CascadedShadowMap: 2-cascade directional shadows with frustum-based splits
- PointShadowMap: cube depth texture with 6-face rendering
- SpotShadowMap: perspective shadow map from spot light cone
- Frustum light culling: Gribb-Hartmann plane extraction + sphere tests
- Mat4::inverse() for frustum corner computation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:55:43 +09:00
a7497f6045 docs: add Phase 4b-5 deferred items spec (shadows, IBL, physics)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:50:24 +09:00
6bc77cb777 feat(renderer): add ORM and emissive texture map support to PBR pipeline
- Extended bind group 1: albedo + normal + ORM + emissive (8 bindings)
- pbr_shader.wgsl: ORM sampling (R=AO, G=roughness, B=metallic) + emissive
- deferred_gbuffer.wgsl: ORM + emissive luminance in material_data.w
- deferred_lighting.wgsl: emissive contribution from G-Buffer
- All 5 PBR examples updated with default ORM/emissive textures
- Backward compatible: old 4-binding layout preserved

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:41:30 +09:00
164eead5ec feat(ecs): add JSON/binary scene serialization and component registry
- Mini JSON writer/parser in voltex_ecs (no renderer dependency)
- ComponentRegistry with register/find/register_defaults
- serialize_scene_json/deserialize_scene_json with hex-encoded components
- serialize_scene_binary/deserialize_scene_binary (VSCN binary format)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:38:56 +09:00
f4b1174e13 feat(asset): add async loading, file watcher, and hot reload support
- FileWatcher: mtime-based polling change detection
- AssetLoader: background thread loading via channels
- replace_in_place on AssetStorage for hot reload
- LoadState enum: Loading/Ready/Failed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:34:54 +09:00
c478e2433d docs: add implementation plans for scene serialization, async loading, PBR textures
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:24:19 +09:00
389cbdb063 docs: add Phase 3b-4a deferred items spec (serialization, async load, PBR textures)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:21:17 +09:00
df2082f532 docs: update STATUS.md and DEFERRED.md for completed Phase 2-3a items
Mark PNG/JPG/glTF, query3/4, query filters, scheduler,
Capsule/GJK, Coulomb friction, Lua engine API as completed.
Update test count from 255 to 324.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:16:37 +09:00
a9f5b11f69 feat(renderer): add glTF 2.0 / GLB parser with self-contained JSON parser
- Mini JSON parser (no external deps) for glTF support
- GLB binary format: header, JSON chunk, BIN chunk
- Embedded base64 buffer URI support
- Accessor/BufferView extraction (position, normal, uv, tangent, indices)
- PBR material extraction (baseColor, metallic, roughness)
- Auto compute_tangents when not provided

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:14:04 +09:00
2d80a218c5 feat(renderer): add Baseline JPEG decoder
Self-contained Huffman/IDCT/MCU/YCbCr decoder.
Supports SOF0, 4:4:4/4:2:2/4:2:0 subsampling, grayscale,
restart markers. API matches parse_png pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:06:07 +09:00
a080f0608b feat(ecs): add query filters (with/without) and system scheduler
- has_component<T> helper on World
- query_with/query_without for single component + filter
- query2_with/query2_without for 2-component + filter
- System trait with blanket impl for FnMut(&mut World)
- Ordered Scheduler (add/run_all)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:05:02 +09:00
8abba16137 docs: add implementation plans for JPG decoder, glTF parser, ECS filters/scheduler
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:58:56 +09:00
dc6aa950e3 docs: add Phase 2-3a deferred items spec (JPG, glTF, ECS filters/scheduler)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:51:50 +09:00
c930d4705d feat: add PNG decoder, query3/4, Capsule+GJK/EPA, friction, Lua engine API
- PNG decoder with self-contained Deflate decompressor (RGB/RGBA)
- ECS query3 and query4 for multi-component queries
- Capsule collider + GJK/EPA narrow phase for convex shapes
- Coulomb friction in physics solver
- Lua engine API bindings (spawn, position, entity_count)

Tests: 255 → 286 (+31)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:31:03 +09:00
7a5e06bd24 feat(script): add Lua engine API bindings (spawn, position, entity_count)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 18:30:26 +09:00
3d985ba803 feat(physics): add Coulomb friction to collision response
Add friction coefficient to RigidBody (default 0.5) and implement
tangential impulse clamping in resolve_collisions using Coulomb's law,
including resting-contact friction for sliding bodies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 18:28:44 +09:00
c196648a2e feat(physics): add GJK/EPA narrow phase for convex shape collision
Implement GJK (Gilbert-Johnson-Keerthi) overlap detection and EPA
(Expanding Polytope Algorithm) penetration resolution for arbitrary
convex collider pairs. Used as the fallback narrow phase for any
combination involving Capsule, while Sphere/Box specialized routines
are preserved for performance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:25:26 +09:00
534838b7b9 feat(physics): add Capsule collider variant
Add Capsule { radius, half_height } to the Collider enum, with AABB
computation and ray-vs-capsule intersection support. The capsule is
oriented along the Y axis (cylinder + two hemisphere caps).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:25:20 +09:00
1707728094 feat(ecs): add query3 and query4 for multi-component queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 18:19:50 +09:00
803df19305 feat(renderer): add PNG decoder with filter reconstruction
Parse PNG files (RGB and RGBA, 8-bit) with full filter reconstruction
(None, Sub, Up, Average, Paeth). Uses the self-contained deflate
decompressor for IDAT chunk decompression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:18:12 +09:00
051eba85aa feat(renderer): add self-contained deflate decompressor
Implement RFC 1951 Deflate decompression with zlib wrapper handling.
Supports stored blocks, fixed Huffman codes, and dynamic Huffman codes
with LZ77 back-reference decoding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:17:59 +09:00
e8a79e112c feat: complete Voltex Engine + Survivor game
11 crates, 13 examples (including survivor_game), 255 tests
Phase 1-8 fully implemented + playable survival game demo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:49:24 +09:00
63d5ae2c25 feat(game): add HUD, audio SFX, and game over/restart
Add IMGUI HUD overlay showing HP, wave, score, and enemy count.
Display centered Game Over panel with final score and restart prompt.
Add procedural sine-wave audio clips for shooting (440Hz) and enemy
kills (220Hz) via voltex_audio. Player blinks white during invincibility.
Press R to restart after game over.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:46:41 +09:00
d17732fcd5 feat(game): add collision detection, damage, and scoring
Projectiles destroy enemies on contact (radius check 0.55). Enemies
damage the player on contact with 1s invincibility window. Score +100
per kill. Game over when HP reaches 0. update() now returns FrameEvents
so the caller can trigger audio/visual feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:46:34 +09:00
a7cd14f413 feat(game): add enemy spawning with wave system and chase AI
Red sphere enemies spawn at arena edges via a wave system that
escalates each round. Enemies use direct seek steering to chase
the player. Both shadow and color passes render enemies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:41:34 +09:00
5496525a7f feat(game): add projectile shooting toward mouse aim
Left click fires small yellow sphere projectiles from the player toward
the mouse cursor position on the XZ plane. Includes fire cooldown (0.2s),
projectile lifetime (2.0s), and ray-plane intersection for mouse aiming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:35:46 +09:00
2f60ace70a feat(game): add player movement with WASD and camera follow
Add blue sphere as the player with WASD movement on XZ plane,
clamped to arena bounds. Camera now tracks player position.
Pre-allocate dynamic UBO buffers for 100 entities to support
future enemies and projectiles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:27:11 +09:00