Open dallinbeutler opened 5 years ago
hi. thanks for checking out! the file you mentioned is the right if i remember correctly. i will look into this...
bests
i just create a new f# interactive setup. due to native dependencies and some other annoyances it is not totally straightforward to get fsharp interactive running with rendering windows etc.
my demo is given in the walkthrough repository which shows is a collection of technical background information. the setup is here: https://github.com/aardvark-platform/walkthrough/tree/master/src/InteractiveNet471
i made a little video showing how it works: https://youtu.be/899Ld6JZsBA
the story however is not over. there is stuff to do:
i'm not happy with the initialization boilerplate code here: https://github.com/aardvark-platform/walkthrough/blob/master/src/InteractiveNet471/InteractiveTest.fsx#L11 . i will create another version of aardvark.base which makes this initialization much more streamlined.
there is still no full port of the original video. after creating a new aardvark.base with better plugin initialization we can for for it.
so far the progress, bests harald
Thanks for the update! Those are valid concerns and duly noted. Looks straight forward enough. I'll test this as soon as I have time and get back to you! Not sure how much I could help with issues yet, but I'm willing to dive in.
Works on my machine! nice! And yeah, I see what you mean with the boilerplate. And I take it transact is the only way to force an update to reflect changes in the dependency graph? not an issue, just making sure I understand the flow of things.
On a semi-related note, it seems that everything is there to make a Safe style template or like this fable electron with a hot module replacement workflow.
I'll play around interactive and with some ideas, and let you guys know if I come up with anything useful.
i just moved the boilerplate code to aardvark.rendering.
the file now looks like this
transact
to feed changes into the dependency graph. in aardvark.media we layered an ELM implementation on top, which internally performs diffing and feeds changes into the system using transact
looking forward to more open source activity in the ecosystem :)
Thanks again for being so helpful and welcoming! The more time I've spent with it the more excited I get 😄
So I don't need to call transact in the .media context? .media sounds almost identical to Fable.React in both goal and function.
media (we know it's a quite bad name) was invented to get server-side rendering of 3d content into html apps and since 3d rendering tends to require huge scenegraphs we were not quite happy with the ELM/Fable-approach recreating the entire SceneGraph/DOM on every change of the model. Therefore we explored the path of differentiating the Model instead of the Scene/DOM and integrating it with our incremental system. Since programmers then need to use the incrementalized model in the view function (composed of IMods
, alists
, asets
and so on) we have a special msbuild-plugin called Aardvark.Compiler.DomainTypes which generates the code for the incremental model.
So to answer your question, media-apps basically look just like fable/elm apps and App.start
takes care of submitting changes to the system (via transact
).
However there are two main differences between fable/elm and media:
view
function in media gets the incrementalized model instead of the immutable model and is therefore executed exaclty once.The whole concept has been explained quite well by @ThomasOrtner here, here and here
so does hmr work in .Media? or your saying that functionality got deprecated as you moved from fablish?
We sadly never made that work, but it would obviously be great to see that. The hard part here might be to also integrate the Domain-Type-Compiler into the HMR system. (since it needs to regenerate files on model-changes)
looks good! I tested on two different computers with VS, and the only issue was forgetting to set FSI to 64 bit on the other one. I'll going to look through domaintcc and see if I can help with that
As an outsider, I'm trying to replicate what was seen in the demo on youtube
LiveDemo.fsx looked like the closest option, but upon inspecting its "loadReferences.fsx" file it looks to be somewhat out of date. (Fshade.dll renamed to fshade.core.dll, #11 implies that that nanovg shouldn't be referenced, etc.). I guess as a beginner here, I ultimately want to know what the proper steps would be for taking the standard template, and running an interactive rendering session on top of it? thanks