Skip to content

Phase 1a: Ray, bounds, unproject, Line, frame timing#1

Merged
robinhilliard merged 1 commit intomainfrom
feature/phase-1a
Mar 3, 2026
Merged

Phase 1a: Ray, bounds, unproject, Line, frame timing#1
robinhilliard merged 1 commit intomainfrom
feature/phase-1a

Conversation

@robinhilliard
Copy link
Owner

@robinhilliard robinhilliard commented Mar 3, 2026

  • EAGL.Math: ray_new/2, ray_intersects_aabb?/2
  • EAGL.Math.Bounds: contains_point?/2, intersects?/2, intersects_ray?/2
  • EAGL.Camera: unproject/5 (screen to world ray)
  • EAGL.Window: render/4 with delta_time, elapsed_time
  • EAGL.Line: draw_line/5, draw_lines/4 (GL_LINES)

Note

Medium Risk
Touches the core EAGL.Window render loop by introducing optional render/4 timing and threading a new start_time through main_loop, which could affect frame scheduling or callback expectations. The rest is additive math/rendering utilities with localized impact.

Overview
Adds picking/collision building blocks: EAGL.Camera.unproject/5 (screen-space to world-space ray), EAGL.Math ray helpers including ray_intersects_aabb?/2, and a new EAGL.Math.Bounds module for point/AABB, AABB/AABB, and ray/AABB intersection checks.

Introduces EAGL.Line for simple GL_LINES rendering (with new line shaders) and extends the window API with an optional render/4 callback that receives %{delta_time, elapsed_time}; the window loop now tracks start_time and prefers render/4 when implemented, falling back to render/3.

Written by Cursor Bugbot for commit 2559036. This will update automatically on new commits. Configure here.

- EAGL.Math: ray_new/2, ray_intersects_aabb?/2
- EAGL.Math.Bounds: contains_point?/2, intersects?/2, intersects_ray?/2
- EAGL.Camera: unproject/5 (screen to world ray)
- EAGL.Window: render/4 with delta_time, elapsed_time
- EAGL.Line: draw_line/5, draw_lines/4 (GL_LINES)

Made-with: Cursor
@robinhilliard robinhilliard merged commit 2559036 into main Mar 3, 2026
6 checks passed
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