svelteml icon indicating copy to clipboard operation
svelteml copied to clipboard

Race condition when loading the FaceMesh model

Open john--kane opened this issue 5 years ago • 1 comments

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.

john--kane avatar Sep 02 '20 18:09 john--kane

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.

john--kane avatar Sep 02 '20 19:09 john--kane