0

I am learning three js and I encounter some issue which is not clear to me. I have one mesh object and and 3 materials (MeshBasicMaterial,MeshNormalMaterial,MeshLambertMaterial). In my example, I swith one material to another.

There is something I don't understand.If i initialize my mesh object with one material other than the MeshBasicMaterial, I can switch perfectly.

But if I initialize my mesh object with the MeshBasicMaterial, I can't switch to another material. Within the webbroswer console, I got an error such as GL_INVALID_OPERATION attemp to acces out of range vertices attribute 1.

What is the explanation of that?

Valimo Ral
  • 339
  • 1
  • 11
  • I use a three.js r:60. It's the same release as used with the book I read. Do you think that using that release is not appropriate? – Valimo Ral Sep 03 '16 at 21:46
  • r.60 is more than 3 years old. See [this post](http://stackoverflow.com/questions/11966779/learning-webgl-and-three-js/11970687#11970687) for advice. Read the book if you want, but switch to the current version, and learn from the three.js examples. – WestLangley Sep 03 '16 at 22:20
  • Now it is solved with the current release. – Valimo Ral Sep 04 '16 at 15:38

0 Answers0