From 89e4bc7e35111edc64987de8aef8c35910a3465d Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Wed, 23 Oct 2024 18:54:50 +0200 Subject: [PATCH] WIP WASM test Signed-off-by: Tomas Slusny --- src/Raylib.NET.Test/Raylib.NET.Test.csproj | 35 ++++++++++++++-------- src/Raylib.NET.Test/index.html | 23 ++++++++++++++ src/Raylib.NET.Test/main.js | 10 +++++++ 3 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 src/Raylib.NET.Test/index.html create mode 100644 src/Raylib.NET.Test/main.js diff --git a/src/Raylib.NET.Test/Raylib.NET.Test.csproj b/src/Raylib.NET.Test/Raylib.NET.Test.csproj index 6966c2a..9b30646 100644 --- a/src/Raylib.NET.Test/Raylib.NET.Test.csproj +++ b/src/Raylib.NET.Test/Raylib.NET.Test.csproj @@ -1,14 +1,25 @@ + - - - - - - - Exe - net8.0 - enable - enable - - + + + + + + Exe + net8.0 + enable + enable + true + + + main.js + true + false + true + true + + + + + diff --git a/src/Raylib.NET.Test/index.html b/src/Raylib.NET.Test/index.html new file mode 100644 index 0000000..2da6f75 --- /dev/null +++ b/src/Raylib.NET.Test/index.html @@ -0,0 +1,23 @@ + + + + Raylib.NET + + + + + + + + + + + + + + diff --git a/src/Raylib.NET.Test/main.js b/src/Raylib.NET.Test/main.js new file mode 100644 index 0000000..7592283 --- /dev/null +++ b/src/Raylib.NET.Test/main.js @@ -0,0 +1,10 @@ +import { dotnet } from './dotnet.js' + +await dotnet + .withDebugging(1) + .withDiagnosticTracing(false) + .withApplicationArgumentsFromQuery() + .create(); + +dotnet.instance.Module['canvas'] = document.getElementById('canvas'); +await dotnet.run();