-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomas Slusny <[email protected]>
- Loading branch information
Tomas Slusny
committed
Oct 23, 2024
1 parent
b5c60ef
commit 89e4bc7
Showing
3 changed files
with
56 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Raylib.NET\Raylib.NET.csproj" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Raylib.NET.Native\Raylib.NET.Native.csproj"/> | ||
<ProjectReference Include="..\Raylib.NET\Raylib.NET.csproj"/> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<WasmMainJSPath>main.js</WasmMainJSPath> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
<WasmEmitSymbolMap>false</WasmEmitSymbolMap> | ||
<RunAOTCompilation>true</RunAOTCompilation> | ||
<WasmBuildNative>true</WasmBuildNative> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<DirectPInvoke Include="raylib"/> | ||
<NativeLibrary Include="$(OutputPath)libraylib.a"/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Raylib.NET</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="modulepreload" href="./main.js" /> | ||
<link rel="modulepreload" href="./dotnet.js" /> | ||
|
||
<style> | ||
canvas.emscripten { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas> | ||
<script type="module" src="./main.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); |