0

I currently have a model that I try to load on a IOS device that fails to load some textures (this is not the issue at hand!). When delving into wgs.js I noticed that having a texture that fails to load is considered accepted as the other request that complete call the nextRequest function and the failing textures return null and just gets passed over. However in the case where all textures that are currently requested fail to load the function nextRequest(); nevers gets called as its absent from the simpleError function. My suggestion is to add that to the simpleError function as the model itself seems to perfectly work without textures loaded.

So:

var simpleError = function simpleError(e) {
     _requestsInProgress--;
     exports.logger.error("Texture load error", e);
     callback(null);
};

Could become the following to fix the issue:

var simpleError = function simpleError(e) {
     _requestsInProgress--;
     exports.logger.error("Texture load error", e);
     callback(null);
     nextRequest();
};
  • Is it possible to share a non-confidential model demonstrating this issue? If it is not proper to be shared publicly, could you please also consider sending it to `forge.help@autodesk.com`. I'm glad to help pass it to our engineering team for investigation. – Eason Kang Apr 25 '18 at 07:52
  • BTW, which version viewer are you using? Which iOS version? And what is the source model format? – Eason Kang Apr 25 '18 at 07:54
  • I sadly may not share this model in any means. An easy way to reproduce this is to take any model containing textures, delete all the texture files and try to open the model. I tested this in forge version 3.3.5 with wgs.js version 0.0.16 and with the latest version of WGS.js (version 0.0.17) iOS is on version: 11.2.6 Also important to know is that we use this within an app, so we have the entire viewer pre downloaded in our app. We listen to the TEXTURES_LOADED_EVENT to show our viewer what never gets called as the request queue never empties in this case. – Patrick Kersten Apr 25 '18 at 11:10
  • I cannot get the repo about the `TEXTURES_LOADED_EVENT` event didn't be fired. If you can consider providing a non-confidential reproducible case contained a model and a simple viewer app. I'm glad to help. – Eason Kang Apr 27 '18 at 11:01
  • Your event handler of `TEXTURES_LOADED_EVENT` has to be registered before calling `viewer.loadModel()`. In addition, you're using viewer under an unofficial supported way (say offline mode), please make sure all viewable bubble files are downloaded completely. – Eason Kang Apr 27 '18 at 11:39
  • Im adding that listener before calling the loadmodel function. I created a small demo that shows this issue. To where can I send it. Important to note is that on desktop this demo works without issues (it shows an alert). However on mobile it doesnt as the viewer seems to limit the amount of calls it makes. this is easy to reproduce by changing your browsers user agent to for example ipad. – Patrick Kersten May 22 '18 at 09:43
  • Please sent it to forge.help@autodesk.com, and remove confidential information from it before submitting. – Eason Kang May 22 '18 at 09:46

0 Answers0