Closed kalwalt closed 3 years ago
I'm testing ARnft-threejs with this PR https://github.com/webarkit/ARnft-threejs/pull/6. Anyway i get this error:
three.module.js:24647 Uncaught TypeError: material.onBuild is not a function
at getProgram (three.module.js:24647)
at setProgram (three.module.js:24809)
at WebGLRenderer.renderBufferDirect (three.module.js:24010)
at renderObject (three.module.js:24588)
at renderObjects (three.module.js:24561)
at WebGLRenderer.render (three.module.js:24340)
at SceneRendererTJS.draw (SceneRendererTJS.ts:112)
at tick (App.js:49)
Maybe because the Three.js code should be in the ComponentDidMount ?
Probably this error is caused by double import of Threejs https://discourse.threejs.org/t/uncaught-typeerror-material-onbuild-is-not-a-function/26071
That issue https://github.com/kalwalt/ARnft-ES6-react/pull/15#issuecomment-847134120 was caused by a non matching version of Three.js, i was using0.126.1
but instead was required 0.128.0
Testing the new ARnft lib without the ThreejsRenderer class see PR https://github.com/webarkit/ARnft/pull/180 (now on dev branch) and the new ARnft-threejs package