Hey Brave Support Team!
I am having a bit of trouble with Threejs texture loading. The reason I am posting this here is because I suspect the issue has to do with chromium itself, although I cannot say for certain.
A demonstration of the issue β https://streamable.com/3jh1md
I am using webpack to include .png files for distribution and the import function to include it as a filepath for usage in JS. Threejs has a built in TextureLoader class that creates a JS Image object asynchronously and populates a Texture object with this image once it has been successfully loaded in.
This TextureLoader class has callbacks for the various stages of files being loaded locally, onLoad, onProgress, and onError. These should always be called however, when the bug is present, none of these callbacks get called. To me it seems like there is a silent error.
I have tested this with :
-
Brave Nightly (Version 1.50.23 Chromium: 110.0.5481.77 (Official Build) nightly (arm64))
-
Official release (Version 1.48.158 Chromium: 110.0.5481.77 (Official Build) (arm64))
-
Official release on windows (Version 1.48.158 Chromium 110.0.5481.77 (Official Build) (64-bit))
The bug is present on each.
The mobile versions of Brave and Safari on desktop do not have this issue.
I have also posted this report to Threejs forums as well but thought I would cover all my basis in the slim chance that it is a Chromium issue.
Here are code snippets of my texture loading code and using with Threejs libraries :
Here is my repo β https://github.com/MDouglas345/roargame-threejs
and a live site that can be tested β https://roarthreejs.onrender.com/
You will notice that when the texture is loaded and the planets are rendered, the console will log that the texture is being processed and then loaded, but nothing is logged when the bug is prevalent.
This is the worst kind of issue when its hard to reproduce, but it occurs more often when the Network tab of Dev Tools has a Slow 3G throttle.
Im happy to provide more information if needed!
Thank you,
Porridge