Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

three.js issues: application suddenly wont work on Chrome - old code, wont work with new three.js library

I wrote a few three.js (R48) applications a while back, and they've been working fine for up until a few weeks when I found they no longer work on Chrome.

Here are the first few error messages:

WebGL: INVALID_OPERATION: getAttribLocation: program not linked skyWheel.html:1
8
WebGL: INVALID_OPERATION: getUniformLocation: program not linked skyWheel.html:1
Could not initialise shader
VALIDATE_STATUS: false, gl error [1282] Three.js:355
29
WebGL: INVALID_OPERATION: getUniformLocation: program not linked 

It still works fine with Firefox.

So I downloaded the latest version of three.js, and when I use it instead of the old version, I get this message and it doesn't work. (this is on Firefox)

[21:50:32.679] TypeError: material is undefined @ file:Three.js:23513

I was just hoping someone went though this type of thing recently and can save me some time fixing these problems.

like image 316
MVTC Avatar asked Nov 25 '13 05:11

MVTC


2 Answers

Try to use minified version or developer version (three.min.js).. because using them in the examples works fine even if they use backdated version :) if not, i used canvas renderer and omitted the spotlight and shut down shadow mapping for renderer and yes it is caused by THREE.WebglRenderer(). use THREE.CanvasRenderer(). though it wont provide you the desired output.. :(

like image 68
serious_luffy Avatar answered Sep 17 '22 14:09

serious_luffy


Many things hace changed since r48. Have a look at the migration page.

like image 29
mrdoob Avatar answered Sep 17 '22 14:09

mrdoob