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.
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. |
||
|---|---|---|
| .config | ||
| web | ||
| .gitignore | ||
| com.avikdas.wasm.helloworld.csproj | ||
| LICENSE | ||
| Program.cs | ||
| README.md | ||
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.