diff --git a/readme.md b/readme.md index 9880eed..d042d5c 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Blazorex ## Description -Blazorex is an HTML Canvas wrapper library for Blazor, written with .NET 6. +Blazorex is an HTML Canvas wrapper library for Blazor, written with .NET. ![Blazorex](https://raw.githubusercontent.com/mizrael/Blazorex/master/sample.gif "Blazorex") @@ -10,7 +10,7 @@ Blazorex can be installed as Nuget package: https://www.nuget.org/packages/Blazo ## Usage -Simply add the `Canvas` Component to your Razor page and register to the `OnCanvasReady` to receive the `IRenderContext` instance. +Simply add the `Canvas` Component to your Razor page and register to the `OnCanvasReady` to receive the `CanvasBase` instance. Then use `OnFrameReady` to define your update/rendere logic: @@ -22,7 +22,7 @@ Then use `OnFrameReady` to define your update/rendere logic: @code{ IRenderContext _context; - private void OnCanvasReady(IRenderContext context) + private void OnCanvasReady(CanvasBase canvas) { _context = context; } @@ -43,6 +43,10 @@ You might also need to update your `index.html` to include the library's CSS: ``` -For a complete sample, check the [./src/Blazorex.Web](./src/Blazorex.Web) folder. +For a complete sample, check the [./src/Blazorex.Web](./src/Blazorex.Web) folder. It showcases some interesting functionalities like +- multiple canvases +- background rendering +- image rendering +- dynamic image generation A sample game can be found here: [Blazeroids](https://github.com/mizrael/Blazeroids) \ No newline at end of file diff --git a/sample.gif b/sample.gif index 9e861c9..d186c1e 100644 Binary files a/sample.gif and b/sample.gif differ diff --git a/src/Blazorex/Blazorex.csproj b/src/Blazorex/Blazorex.csproj index 953f73e..bf09d2f 100644 --- a/src/Blazorex/Blazorex.csproj +++ b/src/Blazorex/Blazorex.csproj @@ -2,7 +2,7 @@ net7.0 - 1.0.0-alpha + 1.0.0 true davidguida Blazorex