files_3d
files_3d copied to clipboard
[BUG] STL files don't render when opening the first time
Describe the bug I cant seem to properly explain it, but when trying to open an STL file for the first time, the preview just stays black. If you then close the preview (X) and click on the same file again - it works as expected.
Only after freshly loading the Page with "F5", the first click on any preview will succeed. There seems to be no recognizable pattern as to "why" it happens, or with which specific file.
To Reproduce Let me know if I should upload the STL's :)
Expected behavior The preview should always normally render
Video demonstration https://streamable.com/thbrr0
Desktop:
- OS: Windows 10
- Browser: Chrome
- Version: latest
Additional context There are no errors in the console aside from some jQuery deprecation warnings which I hid in the video because of Spam...
It seems to me like the "fetching additional file.."-behavior is pretty random, but I don't know if that could be the cause of this problem..
Maybe the three.js Renderer is already initializing while the STL-data is still loading or something?
It's not a huge problem since it always works on the 2nd try... but on the long term it would be great to avoid these extra clicks ^^ Aside from that, nice work on the plugin.
I have that problem with different models and formats (e.g. PLY or GLB).
Only thing I noticed inthe console is a WebGL context was lost.
warning message.
This appears every time when a file is closed (click on X), but also when opening a model fails. So something seems to be wrong which leads to that context loss. But why this is happening and why only sometimes and only on some models :shrug:
Maybe the three.js Renderer is already initializing while the STL-data is still loading or something?
You might be right, but the plugin should wait for the models. I'll look into this 🧐
Same problem .. :(
Great modules ! :)