Gondwana.Blazor 2.4.3

dotnet add package Gondwana.Blazor --version 2.4.3
                    
NuGet\Install-Package Gondwana.Blazor -Version 2.4.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gondwana.Blazor" Version="2.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gondwana.Blazor" Version="2.4.3" />
                    
Directory.Packages.props
<PackageReference Include="Gondwana.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Gondwana.Blazor --version 2.4.3
                    
#r "nuget: Gondwana.Blazor, 2.4.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Gondwana.Blazor@2.4.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Gondwana.Blazor&version=2.4.3
                    
Install as a Cake Addin
#tool nuget:?package=Gondwana.Blazor&version=2.4.3
                    
Install as a Cake Tool

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
  • BlazorKey enum mapping browser KeyboardEvent.code values 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

  • Gondwana – Core engine
  • Gondwana.Blazor.Hosting – Blazor game host

License

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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