svelteml
svelteml copied to clipboard
Race condition when loading the FaceMesh model
the model is defined in the module mainly because it is loaded one time across all declarations of the FaceMesh. In doing os though, it looks like the image is binding correctly but the reactive check in FaceMesh.svelte fails because image is satisfied but not the module model (as it hasn't loaded yet and event never triggers the reactive element again, unlike the DOM update)
potential solution: Load the model in the main script portion and make image and model reactive within that scope.
Found a solution, will commit asap.
made the model writable() so that module declaration can be updated and will push events to the reactive code.