Skip to content

Commit

Permalink
updated notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mizrael committed Jun 13, 2023
1 parent 07857db commit cf7690a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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")

Expand All @@ -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:

Expand All @@ -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;
}
Expand All @@ -43,6 +43,10 @@ You might also need to update your `index.html` to include the library's CSS:
</head>
```

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)
Binary file modified sample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Blazorex/Blazorex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageVersion>1.0.0-alpha</PackageVersion>
<PackageVersion>1.0.0</PackageVersion>
<IsPackable>true</IsPackable>
<Authors>davidguida</Authors>
<Product>Blazorex</Product>
Expand Down

0 comments on commit cf7690a

Please sign in to comment.