Gondwana.Blazor
2.4.3
dotnet add package Gondwana.Blazor --version 2.4.3
NuGet\Install-Package Gondwana.Blazor -Version 2.4.3
<PackageReference Include="Gondwana.Blazor" Version="2.4.3" />
<PackageVersion Include="Gondwana.Blazor" Version="2.4.3" />
<PackageReference Include="Gondwana.Blazor" />
paket add Gondwana.Blazor --version 2.4.3
#r "nuget: Gondwana.Blazor, 2.4.3"
#:package Gondwana.Blazor@2.4.3
#addin nuget:?package=Gondwana.Blazor&version=2.4.3
#tool nuget:?package=Gondwana.Blazor&version=2.4.3
Gondwana.Blazor
Gondwana.Blazor provides Blazor adapters for rendering and input, enabling Gondwana games to run as ASP.NET Blazor WebAssembly applications with standard cross-platform WASM support.
It mirrors the Gondwana.Avalonia package but targets the Blazor component model instead of
Avalonia UI.
Features
- Bitmap rendering surface using a browser
<canvas>element via the Canvas 2D API (no platform-specific SkiaSharp view package required) - Keyboard input integration via Blazor keyboard events on the canvas element
- Mouse / pointer input integration
- Touch input integration
BlazorKeyenum mapping browserKeyboardEvent.codevalues to integer key codes
Installation
dotnet add package Gondwana.Blazor
Usage
Add <BlazorBitmapRenderSurfaceComponent> to your Blazor page or layout and capture a reference
to it using @ref:
@using Gondwana.Blazor.Rendering
<BlazorBitmapRenderSurfaceComponent @ref="_surface" style="width: 800px; height: 600px;" />
Then initialize your game host in the component's OnAfterRenderAsync:
@code {
private BlazorBitmapRenderSurfaceComponent _surface = null!;
private MyGameHost? _host;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!firstRender) return;
_host = new MyGameHost(_surface);
_host.Initialize();
}
}
Key codes
BlazorKeyboardAdapter uses (int)BlazorKey values as key codes. Use
BlazorKeyboardAdapter.GetKeyCodeFromString("ArrowLeft") to resolve a key name at runtime,
or use the BlazorKey enum directly:
Engine.Instance.Input.KeyboardEventPoller!.StartMonitoringKey(
(int)BlazorKey.Space, "Jump");
Touch input
Enable touch input by calling InitializeBlazorTouchAdapter:
Engine.Instance.InitializeBlazorTouchAdapter(renderSurface);
After initialization, the touch system is accessible via Engine.Instance.Input.TouchEventPoller.
Documentation
Source Code
https://github.com/isthimius/GondwanaArchitecture & Guides
https://github.com/isthimius/Gondwana/wikiAPI Reference (Doxygen)
https://isthimius.github.io/Gondwana/
Related Packages
Gondwana– Core engineGondwana.Blazor.Hosting– Blazor game host
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Gondwana (>= 2.4.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Gondwana.Blazor:
| Package | Downloads |
|---|---|
|
Gondwana.Blazor.Hosting
Blazor hosting implementation for the Gondwana Game Engine, providing a Blazor-specific game host for application startup, lifecycle management, and adapter integration in ASP.NET Blazor WebAssembly applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.3 | 167 | 6/16/2026 |