Changes
1 changed files (+26/-3)
-
-
@@ -1,5 +1,5 @@diff --git a/c/raylib_bindings.c b/c/raylib_bindings.c index 902a945..3d60268 100644 index 902a945..0750084 100644 --- a/c/raylib_bindings.c +++ b/c/raylib_bindings.c @@ -314,11 +314,11 @@ static inline Camera2D camera2D_of_arg(lean_obj_arg camera) {
-
@@ -54,8 +54,22 @@ +lean_obj_res drawCube(lean_obj_arg position, double width, double height, double length, lean_obj_arg color) { DrawCube(vector3_of_arg(position), width, height, length, @@ -416,6 +437,13 @@ lean_obj_res drawCubeWires(lean_obj_arg position, double width, double height, return IO_UNIT; } +lean_obj_res drawCylinderEx(lean_obj_arg startPos, lean_obj_arg endPos, double startRadius, double endRadius, + lean_obj_arg sides, lean_obj_arg color) { + DrawCylinderEx(vector3_of_arg(startPos), vector3_of_arg(endPos), startRadius, endRadius, + lean_uint32_of_nat_mk(sides), color_of_arg(color)); + return IO_UNIT; +} + lean_obj_res drawGrid(lean_obj_arg slices, double spacing) { DrawGrid(lean_uint32_of_nat_mk(slices), spacing); return IO_UNIT; diff --git a/lean/Raylean/Core.lean b/lean/Raylean/Core.lean index e0818b6..0bff306 100644 index e0818b6..23f03d9 100644 --- a/lean/Raylean/Core.lean +++ b/lean/Raylean/Core.lean @@ -15,6 +15,15 @@ opaque closeWindow : IO Unit
-
@@ -84,7 +98,7 @@ +/- Timing-related functions -/ @[extern "setTargetFPS"] @@ -112,6 +124,9 @@ opaque drawText : (text : @& String) → (posX : Nat) → (posY : Nat) → (font @@ -112,12 +124,18 @@ opaque drawText : (text : @& String) → (posX : Nat) → (posY : Nat) → (font /- Basic geometric 3D shapes drawing functions -/
-
@@ -94,3 +108,12 @@ +@[extern "drawCube"] opaque drawCube : (position : @& Vector3) → (width : Float) → (height : Float) → (length : Float) → (color : @& Color) -> IO Unit @[extern "drawCubeWires"] opaque drawCubeWires : (position : @& Vector3) → (width : Float) → (height : Float) → (length : Float) → (color : @& Color) -> IO Unit +@[extern "drawCylinderEx"] +opaque drawCylinderEx : (startPos : @& Vector3) → (endPos : @& Vector3) → (startRadius : Float) → (endRadius : Float) → (sides : Nat) → (color : @& Color) -> IO Unit + @[extern "drawGrid"] opaque drawGrid : (slices : Nat) → (spacing : Float) → IO Unit
-