Hello, looking for a patch review I guess. I’m trying to go full on Reactive (if that’s a good idea ?)
The goal here is to monitor added and remove files from a folder, and never display the loaded JPG more than one at a time on screen.
So I made this patch which loads JPGs path from a folder and check every second if something has been added or removed (Async).
Compare the path to only create TextureObject
when a new files has been added to that folder.
Also compare path to only remove TextureObject
when a file has been removed from that folder.
Now when OnQueryRandom
is called with CombineLatest (Reactive) the currently displayed is set to false then randomly choose a new TextureObject
that is NOT currently displayed and set IsDisplayed to true.
Is there something incorrect here in the way I’m approaching this ? Optimization or shorter patch ?
Thanks
ReactiveTest.vl (75.5 KB)
PS. @tonfilm you mention that Reactive nodes build their graph in the first frame
what does that imply ?