{"id":13709014,"url":"https://github.com/lionfire/LionFire.Stride.Ultralight","last_synced_at":"2025-05-06T15:31:51.960Z","repository":{"id":76158818,"uuid":"327195248","full_name":"lionfire/LionFire.Stride.Ultralight","owner":"lionfire","description":"Ultralig.ht integration for the Stride (stride3d.net) game engine","archived":false,"fork":false,"pushed_at":"2021-01-09T14:13:24.000Z","size":336,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-13T19:39:26.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lionfire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-06T04:04:39.000Z","updated_at":"2024-10-22T04:05:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3f82ae8-3196-4fc0-b6da-13fd0922f88c","html_url":"https://github.com/lionfire/LionFire.Stride.Ultralight","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionfire%2FLionFire.Stride.Ultralight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionfire%2FLionFire.Stride.Ultralight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionfire%2FLionFire.Stride.Ultralight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionfire%2FLionFire.Stride.Ultralight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lionfire","download_url":"https://codeload.github.com/lionfire/LionFire.Stride.Ultralight/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252712984,"owners_count":21792403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T23:00:35.099Z","updated_at":"2025-05-06T15:31:46.952Z","avatar_url":"https://github.com/lionfire.png","language":"C#","funding_links":[],"categories":["Embedded Stride"],"sub_categories":["Very old projects"],"readme":"# LionFire.Stride.Ultralight (with Blazor Server)\n\nI have .NET 5.0 + Blazor Server + Ultralig.ht working as a proof of concept inside Stride (stride3d.net) game engine on Windows.  This repo doesn't have a complete working example (feel free to create one) but contains some key files and this README refers you to more detailed info.\n\nWorking:\n - Transparency\n - Mouse clicks (left-click only)\n - Toggle the ultralight browser visibility on/off with F10 key (perhaps useful for a debug UI)\n - Auto-reload via Livesharp (not a free product), a bit crude\n \nPartially working:\n - colors in Ultralight are a little bit off.  I'm not sure how perfect of a match to expect.\n - Keyboard input\n\nTODO:\n - Pass through clicks on transparent areas of the browser window to the 3D world\n - GPU renderer for ultralight -- is this possible?\n - Scroll input\n - Middle and right mouse clicks: it looks like these will require changes to Stride's input code, which currently only passes left clicks up to the Stride UI's ImageElement touch events.\n - Require a cookie / auth token to be sent via HTTP when talking to Blazor Server, so that only the Stride Game process can talk to its in-process web server.\n\n## Screenshot\n\n![screenshot](screenshots/BrowserAndStride.png \"Blazor Server in Stride\")\n\n## Stride + Ultralig.ht integration\n\nBased off of this repo -- refer to it for instructions: https://github.com/makotech222/Ultralight-Stride3d_Integration\n\nHere's my customized C# file that supports Microsoft.Extensions.Logging and Mouse/Keyboard Input:  [UltralightUIScript.cs](https://github.com/lionfire/LionFire.Stride.Ultralight/blob/main/StrideGame.Game/Code/UltralightUIScript.cs)\n\n**More up to date version lives here:** [UltralightUIScript.cs](https://github.com/lionfire/Core/blob/master/src/LionFire.Hosting.Stride/Ultralight/UltralightUIScript.cs)\n\n## Stride UI fix\n\nBy default, as of now, Stride's postproessing effects are applied to the UI, which makes it look bad.\nRefer to here for the full scoop: https://github.com/herocrab/StrideCleanUI\n\nIn short:\n\n 1. Set UI to render to group 31\n 2. Rework your compositor (I included my compositor asset FWIW: GraphicsCompositor.sdgfxcomp)\n\n## Hosting ASP.NET Core (Blazor Server) alongside Stride\n\nSee [StrideGameService.cs](https://github.com/lionfire/LionFire.Stride.Ultralight/blob/main/LionFire.Hosting.Stride/StrideGameService.cs)\n\n 1. Create an ASP.NET Core application (.NET 5.0)\n 2. In your `ConfigureServices(IServicesCollection services)` method, do `services.AddHostedService\u003cStrideGameService\u003e();`\n\nA more up to date copy of StrideGameService.cs may be here: \nhttps://github.com/lionfire/Core/blob/master/src/LionFire.Hosting.Stride/StrideGameService.cs\n\n## Blazor object inspector\n\nThe razor component for the fledgling .NET object inspector/explorer I created can be found here:\n\nhttps://github.com/lionfire/Core/blob/master/src/LionFire.Blazor.Components.MudBlazor/ObjectExplorer.razor\n\n## Stride keyboard mapping\n\nSee [StrideKeyConversion.cs](https://github.com/lionfire/Core/blob/master/src/LionFire.Hosting.Stride/Input/StrideKeyConversion.cs)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionfire%2FLionFire.Stride.Ultralight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flionfire%2FLionFire.Stride.Ultralight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionfire%2FLionFire.Stride.Ultralight/lists"}