A demonstration of C# code generating image data to be displayed on a web page. Webassembly is used to run the C# code in the browser and interoperate with Javascript.
Find a file
Avik Das 46d5d5bb20 Draw image on canvas each frame
The data for the canvas is generated in C#. Right now, the animation is
very choppy, and I don't know if this is because of interop latency or a
bug in my code. However, the proof-of-concept works.
2023-11-20 00:33:02 -08:00
.config Incorporate WASM build 2023-11-20 00:33:02 -08:00
web Draw image on canvas each frame 2023-11-20 00:33:02 -08:00
.gitignore Initial commit: template console app 2023-11-20 00:32:52 -08:00
com.avikdas.wasm.helloworld.csproj Incorporate WASM build 2023-11-20 00:33:02 -08:00
LICENSE Initial commit: template console app 2023-11-20 00:32:52 -08:00
Program.cs Draw image on canvas each frame 2023-11-20 00:33:02 -08:00
README.md Incorporate WASM build 2023-11-20 00:33:02 -08:00

WASM C# Demo

Quick start

dotnet build  # create WASM assets
dotnet serve  # start up a local webserver
# Open http://localhost:36037/web/ - or whatever port the server starts on

Any time you update the C# code, run dotnet build. Updating the HTML or JS doesn't require any building.