Watch
2
0
Fork
You've already forked raylib-cs
0

update enum/color names to match c# naming convention

This commit is contained in:
danil 2024-01-14 12:54:02 +02:00
commit 05facaca81
123 changed files with 1822 additions and 1821 deletions

View file

@ -31,7 +31,7 @@ public class Camera3dFree
camera.Target = new Vector3(0.0f, 0.0f, 0.0f);
camera.Up = new Vector3(0.0f, 1.0f, 0.0f);
camera.FovY = 45.0f;
camera.Projection = CameraProjection.CAMERA_PERSPECTIVE;
camera.Projection = CameraProjection.Perspective;
Vector3 cubePosition = new(0.0f, 0.0f, 0.0f);
@ -43,9 +43,9 @@ public class Camera3dFree
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(ref camera, CameraMode.CAMERA_FREE);
UpdateCamera(ref camera, CameraMode.Free);
if (IsKeyDown(KeyboardKey.KEY_Z))
if (IsKeyDown(KeyboardKey.Z))
{
camera.Target = new Vector3(0.0f, 0.0f, 0.0f);
}
@ -54,26 +54,26 @@ public class Camera3dFree
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(Color.RAYWHITE);
ClearBackground(Color.RayWhite);
BeginMode3D(camera);
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, Color.RED);
DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, Color.MAROON);
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, Color.Red);
DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, Color.Maroon);
DrawGrid(10, 1.0f);
EndMode3D();
DrawRectangle(10, 10, 320, 133, ColorAlpha(Color.SKYBLUE, 0.5f));
DrawRectangleLines(10, 10, 320, 133, Color.BLUE);
DrawRectangle(10, 10, 320, 133, ColorAlpha(Color.SkyBlue, 0.5f));
DrawRectangleLines(10, 10, 320, 133, Color.Blue);
DrawText("Free camera default controls:", 20, 20, 10, Color.BLACK);
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, Color.DARKGRAY);
DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, Color.DARKGRAY);
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, Color.DARKGRAY);
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, Color.DARKGRAY);
DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, Color.DARKGRAY);
DrawText("Free camera default controls:", 20, 20, 10, Color.Black);
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, Color.DarkGray);
DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, Color.DarkGray);
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, Color.DarkGray);
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, Color.DarkGray);
DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, Color.DarkGray);
EndDrawing();
//----------------------------------------------------------------------------------