0

I'm using the SceneLoader to load objects exported from Blender. Each object is exported as its own scene since they each have multiple meshes and a material for each mesh. When I tested the SceneLoader with a single Blender export, it worked fine. However, when I use the SceneLoader multiple times for multiple exports, I sometimes get the following error:

Uncaught TypeError: Cannot read property 'opacity' of undefined    SceneLoader.js:1122

I don't get the error on every object, but every time I refresh the page, it happens for the same objects. This even happens when I create a new SceneLoader for each object. I realize that it was probably not intended to load multiple scenes, but I'd like it to if I can.

Any ideas why this might be happening?

1
  • Looks like this is a Chrome issue. Chrome was caching the AJAX request, so it was loading an old version of my Blender export. Any way to force SceneLoader to load the file, even if Chrome has cached it? Commented Nov 12, 2014 at 20:43

1 Answer 1

1

There's two ways to disable the caching which is reported to be the problem in the comment:

  1. Use the incognito mode (it doesn't cache)

  2. In the the Chrome developer tools (the thing with console etc) there's an option to disable caching when the console is open.

We usually use the incognito mode for that at work when doing three.js dev. I figure more reliable as I at least sometimes close & reopen the devtools while developing but tend to keep the same window. The incognito mode looks different so don't make mistakes so that accidentally would start working in a cached setup again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.