Skip to content

Commit

Permalink
Merge pull request #378 from FUSEEProjectTeam/release/0.11.1
Browse files Browse the repository at this point in the history
Release/0.11.1
  • Loading branch information
ASPePeX authored Nov 25, 2021
2 parents 3dd45f7 + b86cc54 commit 42535be
Show file tree
Hide file tree
Showing 367 changed files with 1,430 additions and 1,021 deletions.
62 changes: 59 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,63 @@ jobs:
with:
name: fusee-desktop-${{ matrix.os }}-tools
path: bin/Release/Tools/
- name: Upload Example-Artifacts
# - name: Upload Example-Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: fusee-desktop-${{ matrix.os }}-examples
# path: bin/Release/Examples/**/Desktop/

buildnuget:
needs: [tests]
name: Build NuGet
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
NUGET_BUILD: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-2022' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: '[17.0,]'
- name: Build F.E.Player.Desktop
run: dotnet publish -c Release -p:PublishProfile=win-x64-release src\Engine\Player\Desktop\Fusee.Engine.Player.Desktop.csproj
- name: Pack Fusee.sln NuGet
run: dotnet pack Fusee.sln -c Release-NuGet
- name: Pack F.B.I.Android
run: msbuild src\Base\Imp\Android\Fusee.Base.Imp.Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack F.E.I.Graphics.Android
run: msbuild src\Engine\Imp\Graphics\Android\Fusee.Engine.Imp.Graphics.Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack Core Metapackage
run: dotnet pack dis\NuGet\Core\Core.csproj -c Release -o bin\Release\nuget
- name: Pack Desktop Metapackage
run: dotnet pack dis\NuGet\Desktop\Desktop.csproj -c Release -o bin\Release\nuget
- name: Pack Android Metapackage
run: msbuild dis\NuGet\Android\Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack Fusee.Template.dotnet
run: dotnet pack dis\DnTemplate\DnTemplate.csproj -c Release -o bin\Release\nuget
- name: Pack VSTemplate
run: msbuild dis\VSTemplate\VSTemplate.sln -t:restore,build -p:Configuration=Release
- name: Pack Blender Addon
run: tar -c -a -f bin\Release\nuget\io_export_fus.zip -C bin\Release\Tools\CmdLine\net6.0\BlenderScripts\addons *
- name: Upload NuGet-Atrifacts
uses: actions/upload-artifact@v2
with:
name: fusee-desktop-${{ matrix.os }}-examples
path: bin/Release/Examples/**/Desktop/
name: fusee-nuget-${{ matrix.os }}
path: |
bin/Release/nuget/
dis/VSTemplate/VSTemplate/bin/Release/ProjectTemplates/CSharp/1033/Fusee.Template.VS.zip
dis/VSTemplate/VSIX/bin/Release/Fusee.Template.VS.vsix
buildblazor:
needs: [tests]
Expand Down Expand Up @@ -134,6 +186,10 @@ jobs:
run: dotnet workload install wasm-tools
- name: Publish F.E.Player.Blazor
run: dotnet publish -c Release -p:PublishProfile=FolderProfileRelease src/Engine/Player/Blazor/Fusee.Engine.Player.Blazor.csproj
- name: Build F.T.B.Blazorpatch
run: dotnet build -c Release src/Tools/Build/Blazorpatch/Fusee.Tools.Build.Blazorpatch.csproj
- name: Patch Blazor
run: dotnet bin/Release/Tools/Build/Blazorpatch/net6.0/Fusee.Tools.Build.Blazorpatch.dll -p bin/Release/Player/Blazor/net6.0/publish/wwwroot -t All
- name: Upload Player-Artifact
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/deleteoldartifacts.yml

This file was deleted.

10 changes: 5 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<Authors>FuseeProjectTeam</Authors>
<Company>Furtwangen University</Company>
<Product>FUSEE</Product>
<Version>0.11.0.0</Version>
<AssemblyVersion>0.11.0.0</AssemblyVersion>
<FileVersion>0.11.0.0</FileVersion>
<PackageVersion>0.11.0.0</PackageVersion>
<Copyright>Copyright © 2013-today</Copyright>
<Version>0.11.1</Version>
<AssemblyVersion>0.11.1</AssemblyVersion>
<FileVersion>0.11.1</FileVersion>
<PackageVersion>0.11.1</PackageVersion>
<Copyright>Copyright 2013-2021</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://fusee3d.org/</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(FuseeEngineRoot)\src\Base\Imp\Blazor\Fusee.Base.Imp.Blazor.csproj" />
<ProjectReference Include="$(FuseeEngineRoot)\src\Base\Imp\Blazor\Fusee.Base.Imp.Blazor.csproj" />
<ProjectReference Include="$(FuseeEngineRoot)\src\Engine\Imp\Graphics\Blazor\Fusee.Engine.Imp.Graphics.Blazor.csproj" />
<ProjectReference Include="..\Core\Fusee.Examples.Camera.Core.csproj" />
</ItemGroup>

Expand Down
10 changes: 7 additions & 3 deletions Examples/Complete/Camera/Blazor/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Fusee.Engine.Core.Scene;
using Fusee.Engine.Imp.Graphics.Blazor;
using Fusee.Serialization;
using Microsoft.JSInterop;
using ProtoBuf;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
Expand All @@ -31,9 +32,6 @@ public override void Run()
Diagnostics.UseConsoleColor(false);
Diagnostics.SetMinDebugOutputLoggingSeverityLevel(Diagnostics.SeverityLevel.Verbose);

// Disable text logging as this is not supported for platform: web
//Diagnostics.SetMinTextFileLoggingSeverityLevel(Diagnostics.SeverityLevel.None);


base.Run();

Expand Down Expand Up @@ -197,6 +195,12 @@ static ImageData ReadPixels(Image image)
_app.ContextImplementor = new RenderContextImp(_app.CanvasImplementor);
Input.AddDriverImp(new RenderCanvasInputDriverImp(_app.CanvasImplementor, Runtime));

_app.LoadingCompleted += (s, e) =>
{
Console.WriteLine("Loading finished");
((IJSInProcessRuntime)Runtime).InvokeVoid("LoadingFinished");
};

_app.InitApp();

// Start the app
Expand Down
5 changes: 1 addition & 4 deletions Examples/Complete/Camera/Blazor/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
{
var program = new Fusee.Base.Imp.Blazor.BlazorProgramm();
var main = new Main();
program.Start(main, (IJSInProcessRuntime)JS);
}



await base.OnAfterRenderAsync(firstRender);
}
}
18 changes: 8 additions & 10 deletions Examples/Complete/Camera/Blazor/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
"sslPort": 44374
}
},
"profiles":
{
"Fusee.Examples.Camera.Blazor": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
"profiles": {
"Fusee.Examples.Camera.Blazor": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
3 changes: 2 additions & 1 deletion Examples/Complete/Camera/Blazor/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
@using Fusee.Examples.Camera.Blazor
@using Fusee.Examples.Camera.Blazor.Shared
@using Fusee.Base.Imp.Blazor
@using Fusee.Engine.Imp.Blazor
@using Fusee.Base.Imp.Blazor
@using Fusee.Engine.Imp.Graphics.Blazor
29 changes: 26 additions & 3 deletions Examples/Complete/Camera/Blazor/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,42 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Fusee.Examples.Camera.Blazor</title>
<base href="/" />
<base href="/" />
<link href="manifest.json" rel="manifest" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@700&display=swap" rel="stylesheet">

<link rel="stylesheet" href="style/style.css" type="text/css" />

</head>

<body style="overflow: hidden;">
<body>

<div id="LoadingOverlay" style="position:absolute;width:100%;height:100%;z-index:999;background-color:white;">Loading...</div>
<div id="LoadingOverlay">
<div id="center">
<p>
<img src="style/FuseeSpinning.gif" alt="Loading Animation" />
</p>
<p>Loading</p>
</div>
</div>

<div id="LoadingFinishedOverlay">
<div id="center">
<p>
<img src="style/FuseeAnim.gif" alt="Startup animation" />
</p>
<p>Made with Fusee</p>
</div>
</div>

<div id="app">
</div>

<script src="./_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>
<script src="./_content/Fusee.Base.Imp.Blazor/Fusee.Base.Imp.Blazor.Native.js"></script>
<script src="./_content/Fusee.Engine.Imp.Graphics.Blazor/Fusee.Engine.Imp.Graphics.Blazor.Native.js"></script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions Examples/Complete/Camera/Blazor/wwwroot/style/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
body {
padding: 0;
margin: 0;
overflow: hidden;
font-family: 'Lato', sans-serif;
font-weight: 700;
color: #8cb34f;
}

#LoadingFinishedOverlay
{
visibility: hidden;
}

#LoadingOverlay,
#LoadingFinishedOverlay {
position: absolute;
width: 100%;
height: 100%;
z-index: 999;
padding: 0;
margin: auto 0;
background-color: white;
}

#center p {
font-weight: 700;
text-transform: uppercase;
font-size: 1.25em;
}

#center {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
15 changes: 7 additions & 8 deletions Examples/Complete/Camera/Core/Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Fusee.Math.Core;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using static Fusee.Engine.Core.Input;
using static Fusee.Engine.Core.Time;

Expand Down Expand Up @@ -41,9 +42,7 @@ public class CameraExample : RenderCanvas
private float _valHorzMain;
private float _valVertMain;

private bool _loaded;

private async void Load()
private async Task Load()
{
_gui = await FuseeGuiHelper.CreateDefaultGuiAsync(this, CanvasRenderMode.Screen, "FUSEE Camera Example");
SceneNode guiCam = new()
Expand Down Expand Up @@ -132,8 +131,12 @@ private async void Load()
// Wrap a SceneRenderer around the model.
_sceneRenderer = new SceneRendererForward(_rocketScene);
_guiRenderer = new SceneRendererForward(_gui);
}

_loaded = true;
public override async Task InitAsync()
{
await Load();
await base.InitAsync();
}

// Init is called on startup.
Expand All @@ -159,15 +162,11 @@ public override void Init()
Translation = new float3(0, 1, -30),
Scale = new float3(1, 1, 1)
};

Load();
}

// RenderAFrame is called once a frame
public override void RenderAFrame()
{
if (!_loaded) return;

if (Mouse.RightButton)
{
_valHorzSnd = Mouse.XVel * 0.003f * DeltaTime;
Expand Down
27 changes: 27 additions & 0 deletions Examples/Complete/ComputeFractal/Blazor/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Fusee.Base.Core;
using Fusee.Base.Imp.Blazor;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace Fusee.Examples.ComputeFractal.Blazor
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

await builder.Build().RunAsync();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<ItemGroup>
<ProjectReference Include="$(FuseeEngineRoot)\src\Base\Imp\Blazor\Fusee.Base.Imp.Blazor.csproj" />
<ProjectReference Include="$(FuseeEngineRoot)\src\Engine\Imp\Graphics\Blazor\Fusee.Engine.Imp.Graphics.Blazor.csproj" />
<ProjectReference Include="..\Core\Fusee.Examples.Picking.Core.csproj" />
</ItemGroup>

Expand Down
7 changes: 7 additions & 0 deletions Examples/Complete/Picking/Blazor/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Fusee.Engine.Core.Scene;
using Fusee.Engine.Imp.Graphics.Blazor;
using Fusee.Serialization;
using Microsoft.JSInterop;
using ProtoBuf;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
Expand Down Expand Up @@ -197,6 +198,12 @@ static ImageData ReadPixels(Image image)
_app.ContextImplementor = new RenderContextImp(_app.CanvasImplementor);
Input.AddDriverImp(new RenderCanvasInputDriverImp(_app.CanvasImplementor, Runtime));

_app.LoadingCompleted += (s, e) =>
{
Console.WriteLine("Loading finished");
((IJSInProcessRuntime)Runtime).InvokeVoid("LoadingFinished");
};

_app.InitApp();

// Start the app
Expand Down
Loading

0 comments on commit 42535be

Please sign in to comment.