Blazorex 0.0.5

.NET 6.0
dotnet add package Blazorex --version 0.0.5
NuGet\Install-Package Blazorex -Version 0.0.5
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="Blazorex" Version="0.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blazorex --version 0.0.5
#r "nuget: Blazorex, 0.0.5"
#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.
// Install Blazorex as a Cake Addin
#addin nuget:?package=Blazorex&version=0.0.5

// Install Blazorex as a Cake Tool
#tool nuget:?package=Blazorex&version=0.0.5



Blazorex is an HTML Canvas wrapper library for Blazor, written with .NET 6.



Blazorex can be installed as Nuget package:


Simply add the Canvas Component to your Razor page and register to the OnCanvasReady to receive the IRenderContext instance.

Then use OnFrameReady to define your update/rendere logic:

<Canvas Width="800" Height="600" 
        OnFrameReady="(t) => OnFrameReady(t)"
        OnCanvasReady="(ctx) => OnCanvasReady(ctx)" />

    IRenderContext _context;

    private void OnCanvasReady(IRenderContext context)
        _context = context;

    private void OnFrameReady(float timeStamp)
        // your render logic goes here

You might also need to update your index.html to include the library's CSS:

    <link href="_content/Blazorex/blazorex.css" rel="stylesheet" />

For a complete sample, check the ./src/Blazorex.Web folder.

A sample game can be found here: Blazeroids

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.5 328 10/3/2022
0.0.4 334 10/3/2022
0.0.3 308 9/19/2022
0.0.2 311 9/19/2022
0.0.1 319 9/19/2022