dataarts / dat.guiVR

A flexible graphical user interface for changing variables within WebVR.
https://workshop.chromeexperiments.com/examples/guiVR/
Apache License 2.0
311 stars 50 forks source link

WebGLIndexedBufferRenderer error #97

Closed joshstrike closed 5 years ago

joshstrike commented 5 years ago

Setting the position of the GUIVR seems to throw an error in the current version of THREE.js. This code works for me when I don't set the gui.position. I've also seen the same error when adding more than two parameters.

this.gui = dat.GUIVR.create('VRExample');
this.gui.add(this.mesh2.rotation,'y').listen();
this.scene.add(this.gui);
this.gui.position.set(0,3,-3);
Uncaught TypeError: Cannot read property 'type' of undefined

    at WebGLIndexedBufferRenderer.setIndex (three.js:15326)

    at WebGLRenderer.renderBufferDirect (three.js:22379)

    at renderObject (three.js:23086)

    at renderObjects (three.js:23056)

    at WebGLRenderer.render (three.js:22810)
xinaesthete commented 5 years ago

Can't reproduce, either in vanilla or in my branch https://github.com/xinaesthete/dat.guiVR/tree/ImageButton which AFAIK is the most actively developed (some undocumented extra features but should be compatible & with some bug fixes).

joshstrike commented 5 years ago

I believe this wasn't specific to dat.guiVR but was a general problem caused by running two versions of THREE.js on the same page.