Skip to content

feat(isometric): shared-window Bevy+Tauri with input bridge#7791

Merged
h0lybyte merged 4 commits intodevfrom
worktree-isometric-collisions
Mar 8, 2026
Merged

feat(isometric): shared-window Bevy+Tauri with input bridge#7791
h0lybyte merged 4 commits intodevfrom
worktree-isometric-collisions

Conversation

@h0lybyte
Copy link
Member

@h0lybyte h0lybyte commented Mar 8, 2026

Summary

  • Replace separate Bevy/Tauri windows with shared-window rendering — Bevy renders into the Tauri webview's native Metal/wgpu surface, React UI overlays on top via transparent webview DOM layer
  • Remove WinitPlugin dependency; manually register non-render plugins upfront, defer render-dependent plugins (CorePipeline, PBR, Sprite, Text, UI, Gizmos) to Tauri's Ready event when the window is guaranteed valid
  • Add input bridge: JS captures keyboard/mouse/scroll in the webview, batches per requestAnimationFrame, sends via Tauri IPC to Bevy's message system (MessageWriter, etc.)
  • Add BridgedCursorPosition resource replacing window.cursor_position() for Rapier raycast hover detection

Test plan

  • cargo check compiles clean
  • cargo tauri dev launches single window with game rendering
  • React UI (FPS counter, HUD, Inventory) overlays on game
  • WASD movement works via input bridge
  • Mouse hover detection works via bridged cursor position
  • Window resize forwards correctly from Tauri to Bevy

🤖 Generated with Claude Code

h0lybyte added 4 commits March 7, 2026 21:42
- Add bevy_rapier3d with KinematicCharacterController for player physics
- Add RigidBody::Fixed + Collider::cuboid to all terrain body entities
- Replace custom Collider enum with Rapier colliders on scene objects
- Rewrite player movement: Rapier handles collision resolution, wall sliding,
  ground snapping, and auto-step (0.35 units, requiring jump for tile steps)
- Keep fall damage, jump mechanics, and WASD isometric directions
- Enable debug-render-3d for collider wireframe visualization
Replace separate Bevy/Tauri windows with shared-window rendering where
Bevy renders into the Tauri webview's native surface. Remove WinitPlugin
dependency and manually register non-render plugins upfront, deferring
render-dependent plugins (CorePipeline, PBR, etc.) to Tauri's Ready event.

Add input bridge system that forwards keyboard/mouse/scroll events from
the React webview via Tauri IPC to Bevy's message system, replacing the
WinitPlugin event sources that were removed.
…wers (#7790)

- Expand grass cap shades from 8 to 12 for richer tile color variation
- Add tapered blade grass mesh for individual grass blade look
- Add 4 flower materials (white daisy, pink, rose, yellow)
- Expand spawn slots from 3 to 5 (tuft, tall, blade, flower)
- Flowers spawn at ~8% density, slightly raised on stems
Merge dev branch changes (WASM entry point, GrassPlugin, GamePluginGroup,
cfg-gated platform code) with shared-window Bevy+Tauri architecture.

Resolution strategy:
- Cargo.toml: keep dev's full feature set (bevy_winit/picking for WASM),
  desktop skips WinitPlugin at app registration level
- scene_objects.rs: keep pointer event observers (WASM) alongside
  cfg-gated Rapier raycast hover detection (desktop)
- tauri_plugin.rs: wrap shared-window code in mod desktop with cfg guard
- main.rs: use isometric_game:: lib crate paths
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@h0lybyte h0lybyte merged commit 21fea1e into dev Mar 8, 2026
5 checks passed
@h0lybyte h0lybyte deleted the worktree-isometric-collisions branch March 8, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant