-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
示例页面第二次进入时无法显示(黑屏) #89
Comments
@chenjm1109 |
I assume this has to do with disposing resources. |
I encountered the same problem. var stlLoader = STLLoader(null);
var meshGeometry1 = await stlLoader.loadAsync("assets/ClosedArea.stl");
var meshGeometry2 = await stlLoader.loadAsync("assets/ClosedArea.stl"); When debugging, I found that FileLoader helped me deal with the resource path problem. I understand that the code here is for http to parse the file normally. // load assets file TODO
if (url.startsWith("assets")) {
url = "assets/$url";
}
http.Response response = await http.get(Uri.parse(url )); This will cause the subsequent loader to be unable to remove the corresponding url // load assets file TODO
var httpUrl = url;
if (httpUrl.startsWith("assets")) {
httpUrl = "assets/$httpUrl";
}
http.Response response = await http.get(Uri.parse(httpUrl)); |
浏览web版本的示例程序时,以loader/gltf为例,第一次进入可以正常显示,退出到主页后再次进入,就没有任何显示了。似乎其它加载外部模型的loader页面也有这样的情况。
The text was updated successfully, but these errors were encountered: