Three.js: WebXRManager: renderer.getContext() throws

Created on 16 Jul 2019  路  5Comments  路  Source: mrdoob/three.js

It looks like WebXRManager is constructed in WebGLRenderer, and tries to getContext() of the renderer.

However, this happens before the getContext accessor is set up in the first place.

Should WebXRManager initialization be moved down?

Bug

Most helpful comment

Thanks for the bug report!

All 5 comments

Should WebXRManager initialization be moved down?

That's probably the best solution. Do you want to make a PR for this? 馃槆

I think I would solve it differently.

Thanks for the bug report!

Yeah nice catch!

Just my two cents. I know it may be just my preference but I prefer moving down the manager initialization (or something) because (new) users might think having both renderer and gl arguments in the constructor looks redundant.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yqrashawn picture yqrashawn  路  3Comments

makc picture makc  路  3Comments

fuzihaofzh picture fuzihaofzh  路  3Comments

ghost picture ghost  路  3Comments

seep picture seep  路  3Comments