![]() |
VOOZH | about |
dotnet add package SilkRay --version 2025.1.2
NuGet\Install-Package SilkRay -Version 2025.1.2
<PackageReference Include="SilkRay" Version="2025.1.2" />
<PackageVersion Include="SilkRay" Version="2025.1.2" />Directory.Packages.props
<PackageReference Include="SilkRay" />Project file
paket add SilkRay --version 2025.1.2
#r "nuget: SilkRay, 2025.1.2"
#:package SilkRay@2025.1.2
#addin nuget:?package=SilkRay&version=2025.1.2Install as a Cake Addin
#tool nuget:?package=SilkRay&version=2025.1.2Install as a Cake Tool
A C# implementation of core Raylib functions using Silk.NET OpenGL bindings. SilkRay provides a Raylib-compatible 2D graphics API for cross-platform game development and graphics programming.
SilkRay provides a familiar Raylib-style API for 2D graphics programming in C# using modern Silk.NET libraries. It implements core 2D functionality including window management, shape drawing, input handling, camera system, and text rendering with full NativeAOT support.
InitWindow, CloseWindow, WindowShouldClose)BeginDrawing, EndDrawing, ClearBackground)GetScreenWidth, GetScreenHeight)GetTime, GetFrameTime, GetFPS)GetMonitorWidth, GetMonitorHeight, GetMonitorName)DrawPixel, DrawPixelVDrawLine, DrawLineV, DrawLineExDrawRectangle, DrawRectangleV, DrawRectangleRec, DrawRectangleLines, DrawRectangleProDrawCircle, DrawCircleV, DrawCircleLinesDrawTriangleIsKeyDown, IsKeyPressed, IsKeyReleased, GetKeyPressed, GetCharPressedIsMouseButtonDown, IsMouseButtonPressed, IsMouseButtonReleased, GetMousePosition, GetMouseWheelMoveIsGamepadAvailable, IsGamepadButtonDown, GetGamepadAxisMovementShowCursor, HideCursor, SetMouseCursorGetScreenToWorld2D, GetWorldToScreen2DBeginMode2D, EndMode2DDrawText, DrawTextExLoadFont, UnloadFontMeasureText, MeasureTextExColor - RGBA color with predefined constants (UPPERCASE naming)Vector2 - 2D vector math operationsRectangle - Rectangle structure for boundsCamera2D - 2D camera with transformation matrixusing static SilkRay.Core;
using static SilkRay.Shapes;
using static SilkRay.Text;
// Initialize 2D window
InitWindow(800, 450, "My SilkRay 2D App");
SetTargetFPS(60);
// Main loop
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(RAYWHITE);
// Draw 2D shapes
DrawRectangle(100, 100, 200, 100, RED);
DrawCircle(400, 200, 50, BLUE);
DrawLine(0, 0, 800, 450, GREEN);
DrawText("Hello SilkRay 2D!", 10, 10, 20, BLACK);
EndDrawing();
}
CloseWindow();
dotnet add package SilkRay
git clone https://github.com/AliasBLACK/SilkRay.git
cd SilkRay
dotnet build
Comprehensive example projects are available in a separate repository:
Repository: https://github.com/AliasBLACK/SilkRayExamples
All examples support NativeAOT compilation for optimal 2D performance.
dotnet restore
dotnet build
dotnet publish -c Release -r win-x64 --self-contained
SilkRay is specifically designed for 2D graphics and game development:
This project is provided as-is for educational and development purposes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Updated README with correct Color naming convention (UPPERCASE) and comprehensive 2D feature documentation