Extract reusable fire runtime consumers#7
Open
cybrdelic wants to merge 1 commit into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the first extraction pass for issue #6.
The goal here is not to pretend the full app/runtime split is done. The goal is to cut a real seam into the current app so the fire system can already be exercised as a reusable runtime mounted by multiple consumer shells.
This PR does three concrete things:
components/fireRuntime/transport.tsso one of the most app-independent runtime pieces no longer lives inside the control-deck component.components/fireRuntime/consumers.tsthat describes the target host shapes the runtime needs to support.FluidSimulationso it can mount into different consumer profiles and size itself to its own container instead of assuming it always owns the full browser window.Consumer Examples Included
The app now ships with a consumer gallery in
App.tsxthat remounts the same runtime into five host examples:Control Deck: full tuning/diagnostics product surface3D Scene Embed: minimal scene-mounted runtime shell2D Site Hero: branded hero/background treatmentCursor Effect: lighter fire-only interactive effect shellAmbient Background: lower-UI ambient/idle consumerThese examples are intentionally run one at a time so we can prove the runtime can serve different products without paying for five simultaneous GPU scenes.
Implementation Notes
FluidSimulationnow accepts aconsumerIdand switches chrome/defaults based on the consumer definition instead of hardcoding the control deck as the only host.ResizeObserver, which is the key requirement for future embedding in 3D scenes, 2D sections, and effect surfaces.What This PR Does Not Claim
FluidSimulation.tsx.Those remain follow-up work under issue #6. This PR is the first credible step that makes those follow-ups much less speculative.
Validation
npm run typechecknpm run buildRelated