Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create proof-of-concept web widget #816

Closed
hannobraun opened this issue Jul 14, 2022 · 5 comments
Closed

Create proof-of-concept web widget #816

hannobraun opened this issue Jul 14, 2022 · 5 comments
Labels
type: feature New features and improvements to existing features

Comments

@hannobraun
Copy link
Owner

One of Fornjot's goals is support for embedding Fornjot models into websites, without any need for a custom backend. For that, we need some kind of widget that can be embedded in a website to display a Fornjot model there. Presumably, this widget would include a WebAssembly module that contains most of the Fornjot components.

The object of this issue is to create such a widget as a proof of concept and basis for further iteration. It doesn't need to be perfect, or even good. It just needs to demonstrate that embedding Fornjot models into websites is something that can work.

I assume that this widget would be a thin Rust crate that uses other Fornjot components as required to do the actual work, similar to fj-app. Initially, the ability to load models is not required. Just ship the thing with a simple default model, to demonstrate that it can work. Eventually, we will most likely use WebAssembly to load models (see #71).

This issue is currently blocked on #815.

@hannobraun hannobraun added type: feature New features and improvements to existing features status: blocked Issue or pull request is blocked by another issue or pull request, or some outside circumstance topic: platforms labels Jul 14, 2022
@hannobraun hannobraun added this to the Initial Web Support milestone Jul 14, 2022
@hannobraun
Copy link
Owner Author

#815 has been addressed. This issue is no longer blocked.

@hannobraun hannobraun removed the status: blocked Issue or pull request is blocked by another issue or pull request, or some outside circumstance label Oct 24, 2022
@OliverEvans96
Copy link

I just want to express my excitement for this pursuit. It would be really cool to view models in the browser.

Admittedly, I haven't actually looked at the fj-viewer, so I'm not sure if it includes the ability to modify parameters. But a fascinating next step (after dynamically loading models is implemented) would be to expose a basic JS API so that parameters can be modified via HTML sliders, etc.

@hannobraun
Copy link
Owner Author

Thank you for the comment, @OliverEvans96!

fj-viewer doesn't currently support modifying parameters, but that's definitely planned (#35). And yes, you're absolutely correct, that capability should also be present in the browser!

@hannobraun
Copy link
Owner Author

Just a note, so the information is available once implementation on this starts: wgpu has some async functions which need to be handled. That is in addition to any other async Rust code we might add in the meantime.

We're probably going to need different executors in the browser and elsewhere, and the combination of Pollster and wasm-bindgen-futures seems to work well.

@hannobraun
Copy link
Owner Author

Closing as out of scope. See A New Direction for context.

@hannobraun hannobraun closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New features and improvements to existing features
Projects
None yet
Development

No branches or pull requests

2 participants