-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.DrawGrid
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw a grid centered at (0, 0, 0)
| Parameter | Default Value | Note |
|---|---|---|
| slices | 10 | |
| spacing | 1.0 |
None.
camera = {position:[0,5,10], target:[0,0,0], up:[0,1,0], fovy:45, projection:raylib.CAMERA_PERSPECTIVE}
raylib.InitWindow 800, 600, "DrawGrid"
while not raylib.WindowShouldClose
raylib.BeginDrawing
raylib.ClearBackground raylib.RAYWHITE
raylib.BeginMode3D camera
raylib.DrawGrid 20, 1.0
raylib.EndMode3D
raylib.EndDrawing
end while
raylib.CloseWindow