I am using the PIXI.Loader to load images for sprites. Therefore I am tracking the loading progress to show and hide a corresponding loader component. When the progress is at 100 the loader component is set to invisible.
So far this was working totally fine, but suddenly the loader stops at 99.99999999999984%. The images seem to be loaded all correctly, but the loader components obviously won't hide.
I am using React, the part where the progress is looks like the following:
if (loader && !firstRender.current) {
firstRender.current = true
loader.onProgress.add(l => {
setProgress(l.progress)
})
}
useEffect(() => {
if (progress === 100) setVisibility("none")
}, [progress])
return (
<div className="bg" style={{display: visibility}}>
<CircularProgressWithLabel color="primary" value={progress} />
</div>
)
Does anybody have an idea why the progress doesn't reach 100%?
Kind regards Philipp